Перейти к основному содержимому

Sales Return Order API

Overview

The WMS Sales Return Order API is a Business Central API page designed to manage sales return orders. This API allows external systems to interact with sales return order records, providing functionality for creating, reading, and updating return order information.

API Details

  • Publisher: smart
  • API Group: wms
  • API Version: v2.0
  • Entity Name: salesReturnOrder
  • Entity Set Name: salesReturnOrders
  • Source Table: Sales Header
  • ODataKeyFields: Document Type, No

Fields

The following fields are exposed in the API:

Field NameSource FieldRequiredDescription
DocumentTypeSales Header."Document Type"YesType of the document (always "Return Order").
NoSales Header."No."YesUnique identifier for the sales return order.
CustomerNoSales Header."Sell-to Customer No."YesCustomer number associated with the order.
CustomerNameSales Header."Sell-to Customer Name"NoName of the customer (read-only).
LocationCodeSales Header."Location Code"NoCode of the location for the return order.
DocumentDateSales Header."SMA API Document Date"NoDate of the document.
PostingDateSales Header."Posting Date"NoPosting date of the return order.
DueDateSales Header."Due Date"NoDue date of the return order.
OrderDateSales Header."SMA API Order Date"NoOrder date of the return order.
ShipmentFromLocationDateSales Header."SMA Shpt from Location Date"NoShipment from location date.
ShipmentFromLocationTimeSales Header."SMA Shpt from Location Time"NoShipment from location time.
CustomerOrderCategorySales Header."SMA Customer Order Category"NoCategory of the customer order.
StatusSales Header.StatusNoStatus of the sales return order.
ExternalDocumentNoSales Header."External Document No."NoExternal document number.
ShipToCodeSales Header."Ship-to Code"NoCode of the ship-to address.

Notes

  • The DocumentType field is always set to "Return Order" for this API.
  • 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.
  • The salesLines part is linked to the SMA Sales Line API for managing sales order lines.

Example Usage

Create a New Sales Return Order

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

{
"No": "SRO001",
"CustomerNo": "CUST001",
"LocationCode": "MAIN",
"DocumentDate": "2023-10-01",
"PostingDate": "2023-10-02",
"DueDate": "2023-10-10",
"OrderDate": "2023-09-30",
"ExternalDocumentNo": "EXT12345"
}

Retrieve a Sales Return Order

GET host/instance/api/smart/wms/v2.0/companies(companyId)/salesReturnOrders('SRO001')

Update a Sales Return Order

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

{
"LocationCode": "SECONDARY",
"DueDate": "2023-10-15"
}

Release a Sales Return Order

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

Release All Marked Sales Return Orders

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