DocsAPI ReferenceContact Credit/bff/contact-credit/expiration-breakdown
getContact CreditAdmin BFF

/bff/contact-credit/expiration-breakdown

Returns the customer's unspent credits sliced into buckets by their expiration date. FIFO-aware: each bucket reports only what is still unspent of the underlying source credit(s), not the original face value. Buckets are ordered: overdue first (past expiration but not yet processed by the cron), then by date ascending, never-expires last. A non-zero outstandingDebt reports a negative running balance that has not yet been paid off.

Contact CreditgetBffContact-creditExpiration-breakdown

Parameters

1 query

1 total
Query · 1
customerIdstringRequired

Contact external ID.

Request

GET /bff/contact-credit/expiration-breakdown

get
curl -X GET "https://api.bizkithub.com/bff/contact-credit/expiration-breakdown?customerId=abc123def456ghij" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

JSON payload

{
  "totalAmount": 36,
  "totalAmountMoney": 36,
  "outstandingDebt": 0,
  "currency": "CZK",
  "buckets": [
    {
      "overdue": false,
      "amount": 36,
      "amountMoney": 36,
      "sources": [
        {
          "creditId": 8422,
          "creditExternalId": "4L0jcnkzA8SPW1gE",
          "originalAmount": 300,
          "amount": 36,
          "amountMoney": 36
        }
      ]
    }
  ]
}

All response codes

1 status code documented

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key