Consultar documento
curl --request GET \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/collection-documents/{externalDocumentId} \
--header 'Authorization: Bearer <token>' \
--header 'Cobrix-Signature: <cobrix-signature>' \
--header 'Cobrix-Timestamp: <cobrix-timestamp>'const options = {
method: 'GET',
headers: {
'Cobrix-Timestamp': '<cobrix-timestamp>',
'Cobrix-Signature': '<cobrix-signature>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/collection-documents/{externalDocumentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cobrix.co/api/integrations/v1/{companyId}/collection-documents/{externalDocumentId}"
headers = {
"Cobrix-Timestamp": "<cobrix-timestamp>",
"Cobrix-Signature": "<cobrix-signature>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text){
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"externalDocumentId": "<string>",
"customerExternalId": "<string>",
"customer": {
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"taxId": "<string>",
"customerCode": "<string>"
},
"currency": "<string>",
"totalMinor": 123,
"balanceMinor": 123,
"status": "<string>",
"lines": [
{
"quantity": 123,
"unitAmountMinor": 123,
"amountMinor": 123,
"description": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z"
}
],
"appliedPayments": [
{
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountMinor": 123,
"source": "<string>",
"externalPaymentId": "<string>",
"currency": "<string>",
"status": "<string>",
"appliedAt": "2023-11-07T05:31:56Z"
}
],
"invoiceNumber": "<string>",
"issueDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid.",
"requestId": "req-1001"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key.",
"requestId": "req-1001"
}
}Documentos de cobro
Consultar documento
Devuelve líneas, saldo y pagos aplicados del documento dentro del source autorizado.
GET
/
integrations
/
v1
/
{companyId}
/
collection-documents
/
{externalDocumentId}
Consultar documento
curl --request GET \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/collection-documents/{externalDocumentId} \
--header 'Authorization: Bearer <token>' \
--header 'Cobrix-Signature: <cobrix-signature>' \
--header 'Cobrix-Timestamp: <cobrix-timestamp>'const options = {
method: 'GET',
headers: {
'Cobrix-Timestamp': '<cobrix-timestamp>',
'Cobrix-Signature': '<cobrix-signature>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/collection-documents/{externalDocumentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cobrix.co/api/integrations/v1/{companyId}/collection-documents/{externalDocumentId}"
headers = {
"Cobrix-Timestamp": "<cobrix-timestamp>",
"Cobrix-Signature": "<cobrix-signature>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text){
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"externalDocumentId": "<string>",
"customerExternalId": "<string>",
"customer": {
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"taxId": "<string>",
"customerCode": "<string>"
},
"currency": "<string>",
"totalMinor": 123,
"balanceMinor": 123,
"status": "<string>",
"lines": [
{
"quantity": 123,
"unitAmountMinor": 123,
"amountMinor": 123,
"description": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z"
}
],
"appliedPayments": [
{
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountMinor": 123,
"source": "<string>",
"externalPaymentId": "<string>",
"currency": "<string>",
"status": "<string>",
"appliedAt": "2023-11-07T05:31:56Z"
}
],
"invoiceNumber": "<string>",
"issueDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid.",
"requestId": "req-1001"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key.",
"requestId": "req-1001"
}
}Authorizations
Llave cbx_live creada para el partner.
Headers
Segundos Unix dentro de una ventana de cinco minutos.
Pattern:
^[0-9]{10}$HMAC-SHA256 de timestamp, método, ruta y cuerpo crudo.
Pattern:
^v1=[a-f0-9]{64}$Path Parameters
Empresa vinculada a la llave.
Response
Detalle del documento
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

