Sales Credit Note
Return documents that credit a customer for goods previously invoiced.
Path Parameter:
:DOCKEY (integer) — the internal document ID used in the URL pathEndpoints
GET
/salescreditnoteList documents with pagination and filters
GET
/salescreditnote/:DOCKEYGet a single document by its internal ID
POST
/salescreditnoteCreate a new sales credit note
PUT
/salescreditnote/:DOCKEYUpdate an existing document
DELETE
/salescreditnote/: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 customer code — the customer 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 Sales Credit Note
POST /salescreditnote
{
"dockey": 0,
"docno": "",
"docdate": "2026-09-30",
"postdate": "2026-09-30",
"code": "CUS-01",
"terms": "30 Days",
"currencycode": "----",
"sdsdocdetail": [
{
"dtlkey": 0,
"itemcode": "STK-001",
"qty": "1.00",
"unitprice": "100.00",
"uom": "UNIT",
"tax": "",
"amount": "100.00"
}
]
}GET — List Documents
GET /salescreditnote?offset=0GET — Single Document
GET /salescreditnote/1DELETE
DELETE /salescreditnote/1
Response: "OK" (plain text)Notes
- code is the customer code — the customer must already exist.
- Transaction documents need existing master data first — the referenced party code and every itemcode must already exist.
