Skip to content

Get debt list

GET
/v1/debt
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.

page
integer format: int32
default: 1

Page number; <= 1000

Example
1
limit
integer format: int32
default: 10

Page size; <= 1000

Example
5
search
string

Search; no more than 100 characters

status
string

fully_paid, unpaid, overdue, partial_paid; any other value — 400

start_date
string

Start of period

end_date
string

End of period

customer_id
string format: uuid

If non-empty — must be a valid UUID, otherwise 400

min_amount
number format: double
0

Minimum amount; cannot exceed the maximum

max_amount
number format: double
0

Maximum amount

shop_ids
Array<string>

Shops; at most 100 elements

repayment_date_start
string

Start of the repayment date period

repayment_date_end
string

End of the repayment date period

user_id
string format: uuid

Must be a valid UUID

last_update
string

Time in UTC

with_transactions
string

When true, transactions are additionally loaded into each debt

session_id
string

Not used

language
string

Not used

company_payment_type_ids
Array<string>

Not used

platform-id
string
default: 7d4a4c38-dd84-4902-b744-0488b80a4c01

Platform identifier. A static value is used for integrations.

Successful response

Media typeapplication/json
object
count

Number of debts

number format: double
data

List of debts

Array<object>
object
id

Debt ID

string
order_id

Order ID

string
order_number

Order number

string
external_id

External debt identifier

string
amount

Debt amount

number format: double
comment

Comment

string
repayment_date

Repayment date

string
created_by

Creator

object
id
string
name
string
first_name
string
last_name
string
created_at

Creation date

string
deleted_at

Deletion date

string
status

Status: fully_paid, unpaid, overdue, partial_paid

string
customer

Customer

object
id
string
name
string
first_name
string
last_name
string
paid_amount

Paid amount

number format: double
shop

Shop

object
id
string
name
string
updated_at

Update date

string
payments

Text descriptions of payments

Array<string>
created_at_tz

Creation date with TZ

string
repayment_at_tz

Repayment date with TZ

string
contact_phones

Contact phone numbers

Array<string>
transactions

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

Array<string>
nullable
source_type
string
source_id
integer format: int32
source_item_id
integer
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
}
]
}