Purchase Debit Note
Debit notes raised against a supplier account.
Path Parameter:
:DOCKEY (integer) — the internal document ID used in the URL pathEndpoints
GET
/purchasedebitnoteList documents with pagination and filters
GET
/purchasedebitnote/:DOCKEYGet a single document by its internal ID
POST
/purchasedebitnoteCreate a new purchase debit note
PUT
/purchasedebitnote/:DOCKEYUpdate an existing document
DELETE
/purchasedebitnote/:DOCKEYDelete a document by its internal ID
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| dockey | integer | No | Send 0 to let SQL Account auto-assign the internal ID. The returned dockey is the value used as the path param. Default: 0 |
| docno | string | No | Document number. Leave blank to let SQL Account generate the next running number. Default: "" |
| docdate | string | Yes | Document date in YYYY-MM-DD. Proven: "2026-09-30". |
| postdate | string | No | Accounting posting date in YYYY-MM-DD. Required on invoices, notes and journals. |
| code | string | No | code is the supplier code — the supplier must already exist. |
| terms | string | No | Payment terms code from GET /terms → data[].code. |
| currencycode | string | No | Currency code. ---- means the company base currency. Default: "----" |
| cancelled | boolean | No | Cancellation flag. Default: false |
| sdsdocdetail | array | Yes | Detail lines. At least one line is required — an empty array is rejected. |
| sdsdocdetail[].dtlkey | integer | No | Send 0 for a new detail line. Default: 0 |
| sdsdocdetail[].itemcode | string | No | Stock item code from GET /stockitem → data[].code. |
| sdsdocdetail[].location | string | No | Stock location code — used on inventory documents. |
| sdsdocdetail[].qty | string | No | Quantity as a string decimal. Proven: "1.00". |
| sdsdocdetail[].uom | string | No | Unit of measure. Proven: "UNIT". |
| sdsdocdetail[].unitprice | string | No | Unit price as a string decimal. Proven: "100.00". |
| sdsdocdetail[].tax | string | No | Tax code for the line from GET /tax → data[].code. |
| sdsdocdetail[].amount | string | No | Line amount. Computed by SQL Account when omitted. |
Examples
POST — Create Purchase Debit Note
POST /purchasedebitnote
{
"dockey": 0,
"docno": "",
"docdate": "2026-09-30",
"postdate": "2026-09-30",
"code": "SUP-01",
"terms": "30 Days",
"currencycode": "----",
"sdsdocdetail": [
{
"dtlkey": 0,
"itemcode": "STK-001",
"qty": "10.00",
"unitprice": "50.00",
"uom": "UNIT"
}
]
}GET — List Documents
GET /purchasedebitnote?offset=0GET — Single Document
GET /purchasedebitnote/1DELETE
DELETE /purchasedebitnote/1
Response: "OK" (plain text)Notes
- code is the supplier code — the supplier must already exist.
- Transaction documents need existing master data first — the referenced party code and every itemcode must already exist.
