/v2/api/entity base and authenticated with a Bearer token. It requires the Inventory plugin to be active.-1) is the relation data level — how deeply related records are eager-loaded — not a page number. Use -1 (load base record with light relations only). Calling the list without a data level (.../purchase_debit_note/list) attempts to eager-load the full relation graph and fails with a 400 database error, so always include the segment.| Parameter | Purpose |
|---|---|
page | Page number (default 1). |
per_page | Items per page (default 20). |
filter[<field>] | Filter by a field's value, e.g. filter[no]=PDN-0001 or filter[supplier_id]=1. |
sort[<field>] | Sort by a field, asc or desc, e.g. sort[date]=desc. Default ordering is newest first (id descending). |
version | Set to 2 to run each row through the listing formatter (adds display-formatted values); the top-level envelope is unchanged. |
filter[<field>][<operator>]=<value> (the operator is optional; filter[<field>]=<value> uses a default match). The fields intended for filtering:| Field | Type | Example |
|---|---|---|
no | string | filter[no]=PDN-0001 |
supplier_id | integer (supplier) | filter[supplier_id]=1 |
date | date | filter[date][greater_than_equal]=2026-01-01 |
summary_total | number | filter[summary_total][greater_than_equal]=100 |
tags | string | filter[tags]=urgent |
sort[<field>]=asc|desc. The fields intended for sorting:| Field | Type | Example |
|---|---|---|
date | date | sort[date]=desc |
no | string | sort[no]=asc |
created | datetime | sort[created]=desc |
sort, results are ordered by id descending.current_page, data, per_page, total, last_page, and the page-URL/link fields). Each item in data is a flat purchase debit note record.payment_status and requisition_delivery_status are returned as codes; their meanings are listed on those fields below.curl --location --globoff 'https://.daftara.com/v2/api/entity/purchase_debit_note/list/-1?page=1&per_page=20&filter[%3Cfield%3E]=undefined&sort[%3Cfield%3E]=undefined&version=2' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'{
"current_page": 1,
"data": [
{
"id": 0,
"no": "string",
"type": 0,
"supplier_id": 0,
"supplier_business_name": "string",
"date": "string",
"currency_code": "string",
"summary_total": 0,
"summary_subtotal": 0,
"summary_paid": 0,
"summary_unpaid": 0,
"payment_status": -1,
"requisition_delivery_status": 1,
"follow_up_status": 0,
"draft": 0,
"store_id": 0,
"work_order_id": 0,
"created": "string",
"modified": "string",
"branch_id": 0,
"tags": [
"string"
]
}
],
"per_page": 20,
"total": 0,
"last_page": 0,
"from": 0,
"to": 0,
"first_page_url": "string",
"last_page_url": "string",
"next_page_url": "string",
"prev_page_url": "string",
"path": "string",
"links": [
{}
]
}