Skip to main content

Purchase Order API

Overview

The WMS Purchase Orders API is a Business Central API page designed to manage purchase order data. This API allows external systems to interact with purchase order records, providing functionality for creating, reading, and updating purchase order information.

API Details

  • Publisher: smart
  • API Group: wms
  • API Version: v2.0
  • Entity Name: purchaseOrder
  • Entity Set Name: purchaseOrders
  • Source Table: Purchase Header
  • ODataKeyFields: Document Type, No

Fields

The following fields are exposed in the API:

Field NameSource FieldRequiredDescription
DocumentTypePurchase Header."Document Type"YesType of the document (e.g., Order).
NoPurchase Header."No."YesUnique identifier for the purchase order.
VendorNoPurchase Header."Buy-from Vendor No."YesVendor number associated with the order.
VendorNamePurchase Header."Buy-from Vendor Name"NoName of the vendor.
LocationCodePurchase Header."Location Code"NoCode of the location.
DocumentDatePurchase Header."SMA API Document Date"YesDate of the document.
PostingDatePurchase Header."Posting Date"YesPosting date of the purchase order.
DueDatePurchase Header."Due Date"YesDue date of the purchase order.
OrderDatePurchase Header."SMA API Order Date"YesOrder date of the purchase order.
VendorInvoiceNoPurchase Header."Vendor Invoice No."NoVendor invoice number.
StatusPurchase Header.StatusNoStatus of the purchase order.
PromisedReceiptDatePurchase Header."Promised Receipt Date"NoPromised receipt date of the order.

Notes

  • The ReleaseAllMarked and Release procedures are service-enabled and can be used to release purchase orders. All records created via API are marked for release by default. You need just call 'ReleaseAllMarked' procedure to release all of them.

Example Usage

Create a New Purchase Order

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

{
"DocumentType": "Order",
"No": "PO001",
"VendorNo": "VEND001",
"DocumentDate": "2023-01-01",
"PostingDate": "2023-01-01",
"DueDate": "2023-01-15",
"OrderDate": "2023-01-01"
}

Retrieve a Purchase Order

GET host/instance/api/smart/wms/v2.0/companies(companyId)/purchaseOrders('PO001')

Update a Purchase Order

PATCH host/instance/api/smart/wms/v2.0/companies(companyId)/purchaseOrders('PO001')
Content-Type: application/json

{
"VendorName": "Updated Vendor Name"
}

Release a specific Purchase Order

POST host/instance/api/smart/wms/v2.0/companies(companyId)/purchaseOrders('PO001')/Microsoft.NAV.release

Release All Marked Purchase Orders

POST host/instance/api/smart/wms/v2.0/companies(companyId)/purchaseOrders/Microsoft.NAV.releaseAllMarked
© 2008 - 2026 SMART business