Skip to main content

Posting API

Overview​

The WMS Order Posting API is a Business Central API page designed to handle the posting of WMS orders. This API allows external systems to trigger posting operations for orders and retrieve error messages related to the posting process.

API Details​

  • Publisher: smart
  • API Group: wms
  • API Version: v2.0
  • Entity Name: orderPost
  • Entity Set Name: orderPosting
  • ODataKeyFields: ID

Fields​

The following fields are exposed in the API:

Field NameSource FieldRequiredDescription
SourceDocument"SMA Source Document"YesThe source document type ("Sales Order","Purchase Order","Transfer Order","Purchase Return Order").
SourceNo"SMA Source No."YesThe source document number.
PostingTypePosting TypeYesThe type of posting (Normal, Shipment, Receipt, Invoice). The allowed values depend on the source document; see Posting Types.
IDIDNoUnique identifier. Assigned automatically; do not send it in the request.
MessageType"Message Type"NoThe type of message (e.g., error, warning).
DescriptionMessageNoDetailed description of the error message.

Posting Types​

Source DocumentAllowed Posting TypesResult
Sales OrderNormalThe warehouse shipments of the order are posted, and then the order is invoiced.
Purchase OrderNormal, Receipt, InvoiceReceipt posts the receipt, Invoice posts the invoice, and Normal posts both. If the location requires receive, the receipt is posted through a warehouse receipt, which is created if it does not exist.
Transfer OrderShipment, ReceiptShipment posts the warehouse shipments of the order. Receipt creates and posts the warehouse receipts. Invoice is accepted but posts nothing.
Purchase Return OrderNormal, Shipment, InvoiceShipment posts the shipment, Invoice posts the invoice, and Normal posts both. If the location requires shipment, the shipment is posted through a warehouse shipment, which is created if it does not exist.

If the posting type is not allowed for the source document, the request fails with the Wrong Posting Type error.

Response​

A failed posting does not return an HTTP error. The API creates a record with the posting result:

  • MessageType is Information and Description is OK if the posting succeeded;
  • MessageType is Error and Description contains the error text if the posting failed.

If a warehouse shipment could not be posted, the shpmtErrors sub-entity contains the available and missing quantities of the item.

Sub-Entities​

Shipment Errors​

This API includes a sub-entity for shipment errors:

Example Usage​

Post a Sales Order​

POST host/instance/api/smart/wms/v2.0/companies(companyId)/orderPosting
Content-Type: application/json

{
"SourceDocument": "Sales Order",
"SourceNo": "SALES001",
"PostingType": "Normal"
}
© 2008 - 2026 SMART business