/v2/api/entity base and authenticated with a Bearer token. It requires the Inventory plugin to be active.type must be 14 — sending a different type (or omitting it) fails with a 400 ("error": "Record Not Found") because the entity can only be resolved for type 14.422:| Field | Requirement |
|---|---|
supplier_business_name | Required, non-empty. |
draft | Required. 1 = save as draft, 0 = finalized. |
summary_total.currency | Required, non-empty (the currency of the totals object). |
type must be 14 for the record to save (enforced below the validation layer with a 400).no (the debit-note number) is generated automatically when omitted. currency_code and supplier_id are optional. Server-managed fields (id, created, modified, branch_id, site_id, staff_id, payment/summary totals) are assigned by the server.purchase_debit_notes_items array (each entry becomes a purchase-order-item row). Each item takes product_id, item (name), description, unit_price, quantity, discount, discount_type, tax1, tax2, and optional col_3..col_5 extra columns.requisition_delivery_status:| Value | Meaning |
|---|---|
| 1 | Received |
| 2 | Rejected |
| 3 | Pending |
| 4 | Partially Received |
| 5 | Partially Rejected |
{ "message": "...", "id": <new id> }; the message is localized to the caller's language.curl --location --globoff 'https://.daftara.com/v2/api/entity/purchase_debit_note' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"supplier_business_name": "Test Supplier",
"supplier_id": 1,
"type": 14,
"currency_code": "EGP",
"date": "2026-07-13",
"draft": 0,
"purchase_debit_notes_items": [
{
"product_id": 20,
"item": "Item 1",
"description": "",
"unit_price": 100,
"quantity": 1,
"discount": 0,
"discount_type": 1,
"tax1": null,
"tax2": null
}
],
"summary_total": {
"currency": "EGP"
}
}'{
"message": "Debit note added successfully",
"id": 3
}