Supplier Contra
Offsets a supplier balance against another account.
Path Parameter:
:DOCKEY (integer) — the internal document ID used in the URL pathEndpoints
GET
/suppliercontraList documents with pagination and filters
GET
/suppliercontra/:DOCKEYGet a single document by its internal ID
POST
/suppliercontraCreate a new supplier contra
PUT
/suppliercontra/:DOCKEYUpdate an existing document
DELETE
/suppliercontra/:DOCKEYDelete a document by its internal ID
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| docno | string | No | Leave blank to auto-generate the document number. Default: "" |
| docdate | string | Yes | Document date in YYYY-MM-DD. Proven: "2026-09-30". |
| code | string | Yes | code is the supplier code. |
| paymentmethod | string | Yes | Bank or cash account code from GET /pmmethod → data[].code. Proven: "310-000". |
| docamt | string | No | Total document amount as a string decimal. Proven: "1000.00". |
| sdsdocdetail | array | Yes | Allocation lines — one entry per document being settled. |
| sdsdocdetail[].dtlkey | integer | No | Send 0 for a new allocation line. Default: 0 |
| sdsdocdetail[].fromdoctype | string | No | Document type being settled. Proven: "PI". |
| sdsdocdetail[].fromdocno | string | No | Document number being settled. Proven: "PI-00001". |
| sdsdocdetail[].amount | string | No | Amount applied against that document. Proven: "1000.00". |
Examples
POST — Create Supplier Contra
POST /suppliercontra
{
"docno": "",
"docdate": "2026-09-30",
"code": "SUP-01",
"paymentmethod": "310-000",
"docamt": "1000.00",
"sdsdocdetail": [
{
"dtlkey": 0,
"fromdoctype": "PI",
"fromdocno": "PI-00001",
"amount": "1000.00"
}
]
}GET — List Documents
GET /suppliercontra?offset=0GET — Payment Methods
GET /pmmethod?offset=0DELETE
DELETE /suppliercontra/1
Response: "OK" (plain text)Notes
- code is the supplier code.
- Every payment and receipt requires an existing payment method — read the codes from GET /pmmethod.
- Not probed end-to-end yet. The field list follows the shared payment document pattern.
