Skip to content

Credits ​

Accounts receivable / payable queries. GET only — limits live on the business partner; balances come from open documents and journal items.

Requires authentication.

Routes ​

MethodPathDescription
GET/credits/summaryAging — clients
GET/credits/summary/exportExport clients
GET/credits/providers/summaryAging — providers
GET/credits/providers/summary/exportExport providers
GET/credits/client/:clientIdOne client detail
GET/credits/client/:clientId/statementStatement
GET/credits/client/:clientId/movementsMovements
GET/credits/provider/:providerIdOne provider detail
GET/credits/provider/:providerId/statementStatement
GET/credits/provider/:providerId/movementsMovements

Paths

Use /credits/provider/... (singular), not supplier. Global client aging is /credits/summary, not per-id.

Optional: summary=1 on aging endpoints omits documents[] (lighter payload).


Client summary ​

GET /credits/summary

CXC document types: 01, 07, 113 (+ open journal items as JE).

json
{
  "clientId": 10,
  "clientName": "API Demo Customer",
  "clientRtn": "08011990123456",
  "totalCredit": 1150.00,
  "current": 1150.00,
  "days1_15": 0,
  "days16_30": 0,
  "days31_60": 0,
  "days61_90": 0,
  "days90_plus": 0,
  "documents": [
    {
      "id": 12345,
      "Number": "00001234",
      "type": "01",
      "remainingAmount": 1150.00,
      "daysOverdue": 0
    }
  ]
}

Provider aging: same buckets with providerId / providerName; types 103, 104, 106.


Client detail ​

GET /credits/client/:clientId
json
{
  "clientId": 10,
  "clientName": "API Demo Customer",
  "documents": [
    {
      "documentId": 12345,
      "documentNumber": "00001234",
      "documentType": "01",
      "totalPaid": 0,
      "remainingAmount": 1150.00,
      "daysOverdue": 0,
      "status": "pendiente"
    }
  ]
}

Credit limits ​

Configured on the partner (credit_limit, payment condition). Check /credits/client/:clientId before creating a sales document via API.


Common errors ​

json
{
  "error": "Usuario no tiene una compañía asignada"
}
HTTPWhen
400User without company
401Invalid auth
500Internal aging failure

Business partners · Documents · API index