Ir al contenido
UnoPagoDocumentación
Referencia de la APICustomer dataImports

Preview a debt import

POST
/v1/invoices/debt-import/preview

Resolves debts against the account without writing: the invoices the import would issue, the rows it cannot resolve, those already billed, and the unverified issuance allowance.

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.

application/json
  1. body
rows*array<>
Elementos1 <= items
currency*string
Valor en"VES""USD""EUR"

Cuerpo de la respuesta

Successful response

application/json
  1. response
summary*
problems*array<>
groups*array<>
alreadyBilledCount*integer
Rango0 <= value <= 9007199254740991
unverified?
Ejemplo de solicitud
curl -X POST 'https://api.unopago.com/v1/invoices/debt-import/preview' \  -H 'Content-Type: application/json' \  -d '{  "rows": [    {      "sourceRow": 1,      "name": "string",      "concept": "string",      "dueDate": "2019-08-24",      "amount": 0.01    }  ],  "currency": "VES"}'
Ejemplo de respuesta
{  "summary": {    "invoiceCount": 0,    "subjectCount": 0,    "total": "string",    "bornOverdueCount": 0,    "notYetDueCount": 0  },  "problems": [    {      "sourceRow": 1,      "name": "string",      "resolution": {        "status": "notFound"      }    }  ],  "groups": [    {      "subjectKey": "string",      "customerId": "string",      "dueDate": "string",      "amount": "string"    }  ],  "alreadyBilledCount": 0,  "unverified": {    "limitUsd": 0,    "issuedUsd": "string",    "remainingUsd": "string",    "totalUsd": "string"  }}