Transfer Order API
Overview
The WMS Transfer Orders API is a Business Central API page designed to manage transfer order data. This API allows external systems to interact with transfer order records, providing functionality for creating, reading, and updating transfer orders.
API Details
- Publisher: smart
- API Group: wms
- API Version: v2.0
- Entity Name: transferOrder
- Entity Set Name: transferOrders
- Source Table: Transfer Header
- ODataKeyFields: No
Fields
The following fields are exposed in the API:
| Field Name | Source Field | Required | Description |
|---|---|---|---|
No | Transfer Header."No." | Yes | Unique identifier for the transfer order. |
TransferFrom | Transfer Header."Transfer-from Code" | Yes | Code of the location transferring from. |
TransferTo | Transfer Header."Transfer-to Code" | Yes | Code of the location transferring to. |
DirectTransfer | Transfer Header."Direct Transfer" | No | Indicates if the transfer is direct. |
Transit | Transfer Header."In-Transit Code" | No | Code of the in-transit location. If DirectTransfer is false, the value is replaced with the first location that has Use As In-Transit enabled; if there is no such location, the order is not created. |
PostingDate | Transfer Header."Posting Date" | Yes | Date the transfer order was posted. |
ShipmentDate | Transfer Header."Shipment Date" | Yes | Date the transfer is scheduled for shipment. |
ReceiptDate | Transfer Header."Receipt Date" | Yes | Date the transfer is scheduled for receipt. |
Status | Transfer Header.Status | No | Current status of the transfer order. |
ExternalDocumentNo | Transfer Header."External Document No." | No | External reference number for the order. |
Notes
- The
transferLinespart is linked to the SMA Transfer Line API for managing transfer order lines. - All transfer orders created via API are marked for release. The
Releaseprocedure releases the order specified in the URL, and theReleaseAllMarkedprocedure releases all marked transfer orders. If the transfer-to location requires receive and the transfer-from location requires neither shipment nor pick, the transfer shipment is posted after the release. ReleasereturnsOK. If the order is already released, it returns theALREADY RELEASEDerror; if the release or the shipment posting fails, it returnsERROR:followed by the error text.ReleaseAllMarkedreturnsOKorFAILED ORDERS:followed by the numbers of the orders that were not released. Such orders remain marked for release. If there are no marked orders, it returns theNO MARKED RECORDSerror.- Service-enabled procedures are bound actions, so the
releaseAllMarkedURL must contain the key of an existing record. The action processes all marked orders regardless of which order is specified in the URL.
Example Usage
Create a New Transfer Order
POST host/instance/api/smart/wms/v2.0/companies(companyId)/transferOrders
Content-Type: application/json
{
"No": "TO001",
"TransferFrom": "LOC001",
"TransferTo": "LOC002",
"PostingDate": "2023-01-01",
"ShipmentDate": "2023-01-05",
"ReceiptDate": "2023-01-10",
"DirectTransfer": false,
"ExternalDocumentNo": "EXT001"
}
Retrieve a Transfer Order
GET host/instance/api/smart/wms/v2.0/companies(companyId)/transferOrders('TO001')
Update a Transfer Order
PATCH host/instance/api/smart/wms/v2.0/companies(companyId)/transferOrders('TO001')
Content-Type: application/json
{
"ShipmentDate": "2023-01-10",
"ReceiptDate": "2023-01-15"
}
Release a Transfer Order
POST host/instance/api/smart/wms/v2.0/companies(companyId)/transferOrders('TO001')/Microsoft.NAV.release
Release All Marked Transfer Orders
POST host/instance/api/smart/wms/v2.0/companies(companyId)/transferOrders('TO001')/Microsoft.NAV.releaseAllMarked