Ir al contenido
UnoPagoDocumentación
Referencia de la APICustomer dataCustomers

Get customer invoices

GET
/v1/customers/{customerId}/invoices

This API is used to get a customer invoices

Autorización

bearerAuth
headerAutorizaciónBearer <token>

Your API key, created in Configuración → Claves API. The key alone, without the Bearer prefix, is accepted too.

Parámetros de ruta

customerId*string
Patrón^[cC][0-9a-z]{6,}$
Formatocuid
invoiceStatus*array<>
Elementos1 <= items
isPrinted?boolean
search?string
Longitudlength <= 120
cursor?string
limit?number
Rangovalue <= 100
Por defecto10
sortKey?string
Por defecto"dueDate"
Valor en"issueDate""dueDate""updatedAt"
sortDirection?string
Por defecto"desc"
Valor en"asc""desc"

Cuerpo de la respuesta

Successful response

application/json
  1. response
results*array<>
total*number
totalPages*number
nextCursor?|

The cursor to get the next page of results

exchangeRates?
Ejemplo de solicitud
curl -X GET 'https://api.unopago.com/v1/customers/string/invoices?invoiceStatus=DRAFT'
Ejemplo de respuesta
{  "results": [    {      "lateFeeType": "PERCENTAGE",      "currency": "VES",      "pricingMode": "CURRENCY",      "status": "DRAFT",      "source": "STANDARD",      "id": "string",      "externalId": "string",      "accountId": "string",      "customerId": "string",      "printJobId": "string",      "fiscalRecordId": "string",      "billingDetailsId": "string",      "description": "string",      "issueDate": "string",      "dueDate": "string",      "expired": true,      "paidAt": "string",      "voidedAt": "string",      "planDate": "string",      "billingRunKey": "string",      "lateFee": 0,      "fiscalInvoicing": true,      "createdAt": "string",      "updatedAt": "string",      "details": {        "invoiceItems": [          {            "id": "string",            "description": "string",            "exento": true,            "quantity": 0,            "unitPrice": 0,            "total": 0,            "totalWithDiscount": 0,            "discount": 0          }        ],        "feesTotals": [          {            "type": "IGTF",            "rateBase": 0,            "rate": 0,            "total": 0          }        ],        "subTotal": 0,        "lateFee": 0,        "total": 0,        "discountTotal": 0,        "discounts": [          {            "id": "string",            "amount": 0,            "description": "string"          }        ],        "paymentCredits": 0,        "transactionBalance": 0      },      "items": [        {          "discountValueType": "PERCENTAGE",          "id": "string",          "accountId": "string",          "invoiceId": "string",          "productId": "string",          "studentId": "string",          "description": "string",          "amount": 0,          "quantity": -9007199254740991,          "exento": true,          "isService": true,          "subscriptionId": "string",          "ivaRatePercent": -9007199254740991,          "discountValue": 0,          "discountExpiresAt": "string",          "discountExpired": true,          "createdAt": "string",          "updatedAt": "string"        }      ],      "discounts": [        {          "valueType": "PERCENTAGE",          "id": "string",          "accountId": "string",          "invoiceId": "string",          "fromPaymentId": "string",          "description": "string",          "value": 0,          "expiresAt": "string",          "expired": true,          "createdAt": "string",          "updatedAt": "string"        }      ],      "transactions": [        {          "kind": "ITEMS",          "currency": "VES",          "id": "string",          "accountId": "string",          "customerId": "string",          "invoiceId": "string",          "statementId": "string",          "description": "string",          "transactionDate": "string",          "exchangeRate": 0,          "rateDate": "string",          "credit": 0,          "debit": 0,          "paymentId": "string",          "fromPaymentId": "string",          "retentionId": "string",          "createdAt": "string",          "updatedAt": "string"        }      ],      "fees": [        {          "type": "IGTF",          "id": "string",          "accountId": "string",          "invoiceId": "string",          "fromPaymentId": "string",          "amount": 0,          "rate": 0,          "rateBase": 0,          "createdAt": "string",          "updatedAt": "string"        }      ],      "invoiceSequence": "string",      "fiscalInvoice": {        "source": "UNOPRINT",        "invoiceNumber": "string",        "controlNumber": "string",        "issuedAt": "string"      }    }  ],  "total": 0,  "totalPages": 0,  "nextCursor": "string",  "exchangeRates": {    "property1": {      "rate": 0,      "rateDate": "string",      "daysAhead": 0    },    "property2": {      "rate": 0,      "rateDate": "string",      "daysAhead": 0    }  }}