Retrieve a List of Sales Orders with Details and Related Shipments
If you are using the contract-based REST API to integrate MYOB Acumatica with an external system, this external system can retrieve a list of sales orders along with their details and related shipments.
To list the sales orders, you will use the SalesOrder entity and
the GET
method with the $filter,
$expand, and $select parameters. The
SalesOrder entity is mapped to the Sales Orders (SO301000) form.
System Preparation
- Deploy a new MYOB Acumatica instance with the T100 dataset. For details on deploying an instance, see Instance Deployment: To Deploy an Instance with Demo Data.
- If you are using Postman as the client application for testing, in the IntegrationDevelopmentGuide.postman_collection.json collection, make sure that the collection’s variables have the proper values. This collection is located in the IntegrationDevelopment\Help folder of the Help-and-Training-Examples repository on GitHub.
- To sign in to the instance in the client application, use the tenant name (which you specified when you created the instance) and the MYSTORE branch.
Request
You can use the following request example to retrieve the sales orders of the C000000003 customer (along with their details and related shipments) through the contract-based REST API.
<MYOB Acumatica instance URL>
is the URL of the MYOB Acumatica
instance (such as https://my.acumatica.com/MyInstance). You can omit the instance
name in the URL (that is, you can use https://my.acumatica.com) if the instance
is installed in the root of the website.GET ?$expand=Details,Shipments&$filter=CustomerID eq 'C000000003'&
$select=OrderNbr,OrderType,CustomerID,CustomerOrder,Details/InventoryID,
Details/OrderQty,Details/UnitPrice,Date,OrderedQty,OrderTotal,
Shipments/InvoiceNbr,Shipments/ShipmentNbr HTTP/1.1
Host: [<MYOB Acumatica instance URL>]/entity/Default/24.200.001/SalesOrder
Accept: application/json
Content-Type: application/json
Usage Notes
For the best performance of the data retrieval, it is important that you request only the values of the fields that you need (instead of requesting the values of all fields available in the entity).
To achieve the best performance, we also recommend that you retrieve multiple records with multiple kinds of detail lines in one request.