Create a Shipment for a Replacement
By using the REST API, you can create a shipment for a replacement, which is ordered as a part of the RMA order (return order of the RM type). This shipment can be created on the Sales Orders (SO301000) form.
System Preparation
- Deploy a new MYOB Acumatica instance with the U100 dataset. For details on deploying an instance, see Instance Deployment: To Deploy an Instance with Demo Data.
- To sign in to the instance in the client application, use the tenant name (which you specified when you created the instance) and the HEADOFFICE branch.
- 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.
- On the Enable/Disable Features (CS100000) form, make sure that the Inventory and Order Management feature is enabled.
- Execute the Create an RMA Order for a Return request.
Request
You can use the following request example to create a shipment for a replacement from the 000127 return order of the RM type through the REST API. In theWarehouseID
parameter, you specify the
warehouse from which the replacement items are taken.<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.POST /SalesOrderCreateShipment HTTP/1.1
Host: [<Acumatica ERP instance URL>]/entity/Default/24.200.001/SalesOrder
Accept: application/json
Content-Type: application/json
{
"entity":{
"OrderNbr": {"value": "000127"},
"OrderType": {"value": "RM"}
},
"parameters": {
"ShipmentDate": {"value": "2025-04-11T00:00:00+03:00"},
"WarehouseID": {"value": "WHOLESALE"}
}
}
Usage Notes: an RMA Order with Shipments
A point-of-sale (POS) system can create a return for replacement at another price (that is, an order of the RM predefined order type) to perform a customer return in which the customer returns an inventory item for replacement. Both the return and the replacement are shipped to the customer.
Consider the following scenario example. In the online shop, a customer bought a 32-ounce glass bottle, which was shipped to the customer. Then the customer decides to return this bottle. In the online shop, the customer creates an order that includes both the returned item and a 16-ounce glass bottle that the customer wants to buy. Thus, the customer would like to buy a smaller bottle and to return a larger one.
To process a return for replacement with shipments, the POS system performs the following steps:
- For the returned items that are linked to a sales order and shipment, creates an RMA order
(return order of the RM type), and adds in the order the lines for the
following items:
- The previously issued sales invoice that contains the returned items
- The newly ordered items
- Creates shipments for the newly ordered items and confirms these shipments.
- Creates incoming shipments with the Receipt operation type for the returned items and confirms these shipments.
- Creates sales invoices and releases the invoices. For the return, the system generates an invoice of the Credit Memo type; for the shipment, the system generates a sales invoice of the Invoice type.
Execution of this process in MYOB Acumatica is described in Returns for Replacement at Another Price: General Information.
You can use the following sequence of requests to implement this process through the REST API:
- Create an RMA Order for a Return
- For a return:
- For a replacement: