Get debt list
const url = 'https://api-admin.billz.ai/v1/debt?page=1&limit=5&min_amount=0&max_amount=0';const options = { method: 'GET', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api-admin.billz.ai/v1/debt?page=1&limit=5&min_amount=0&max_amount=0' \ --header 'Authorization: Bearer <token>' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01'Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Page number; <= 1000
Example
1Page size; <= 1000
Example
5Search; no more than 100 characters
fully_paid, unpaid, overdue, partial_paid; any other value — 400
Start of period
End of period
If non-empty — must be a valid UUID, otherwise 400
Minimum amount; cannot exceed the maximum
Maximum amount
Shops; at most 100 elements
Start of the repayment date period
End of the repayment date period
Must be a valid UUID
Time in UTC
When true, transactions are additionally loaded into each debt
Not used
Not used
Not used
Header Parameters
Section titled “Header Parameters”Platform identifier. A static value is used for integrations.
Responses
Section titled “Responses”Successful response
object
Number of debts
List of debts
object
Debt ID
Order ID
Order number
External debt identifier
Debt amount
Comment
Repayment date
Creator
object
Creation date
Deletion date
Status: fully_paid, unpaid, overdue, partial_paid
Customer
object
Paid amount
Shop
object
Update date
Text descriptions of payments
Creation date with TZ
Repayment date with TZ
Contact phone numbers
Filled only when with_transactions=true. Fields: id, external_id, debt_id, comment, shop, created_by, created_at, payments (id, amount, payment_type), amount, customer, source_type, source_id, cashbox_id
Examplegenerated
{ "count": 1, "data": [ { "id": "example", "order_id": "example", "order_number": "example", "external_id": "example", "amount": 1, "comment": "example", "repayment_date": "example", "created_by": { "id": "example", "name": "example", "first_name": "example", "last_name": "example" }, "created_at": "example", "deleted_at": "example", "status": "example", "customer": { "id": "example", "name": "example", "first_name": "example", "last_name": "example" }, "paid_amount": 1, "shop": { "id": "example", "name": "example" }, "updated_at": "example", "payments": [ "example" ], "created_at_tz": "example", "repayment_at_tz": "example", "contact_phones": [ "example" ], "transactions": [ "example" ], "source_type": "example", "source_id": 1, "source_item_id": 1 } ]}