SaleOrder — sales order
Fields
| Field | Type | Required on AddSaleOrder | Description |
|---|---|---|---|
Id | integer | (auto) | Unique identifier |
Number | string | (auto) | Generated as COM-NNNNNN from the default series |
Series | string | no | The document series (default COM) |
Date | date | no (default today) | The document date |
PartnerId | integer | yes | Reference to Partner |
Currency | string | no (default RON) | EUR / USD / RON |
TotalValue | number | (computed) | Sum of lines + VAT |
Lines | array | yes | At least one line (see DocumentLine) |
JSON example
{
"Id": 9001,
"Number": "COM-000555",
"Series": "COM",
"Date": "2026-05-13",
"PartnerId": 27501,
"Currency": "RON",
"TotalValue": 4589.00,
"Lines": [
{ "ArticleCode": "0000002", "Quantity": 1, "UnitPrice": 4500.00, "VATRateId": 1, "WarehouseId": 1 },
{ "ArticleCode": "0000003", "Quantity": 1, "UnitPrice": 89.00, "VATRateId": 1, "WarehouseId": 1 }
]
}
Associated operations
AddSaleOrder— standard creationAddSaleOrderSyncronize— variant with immediate synchronization (legacy)DeleteDocumentwithId= SaleOrder.Id
Typical flow
The order → invoice conversion is not exposed as a dedicated operation; the client must call AddSaleInvoice with the lines copied from the SaleOrder.