Create a Shipment with the Receipt Operation Type

By using the REST API, you can create a receipt (that is, an incoming shipment with the Receipt operation type) for a return, which is returned as a part of the RMA order (return order of the RM type). A receipt for a return is created on the Sales Orders (SO301000) form.

System Preparation

Before you test the code below, you need to do the following to configure your client application and the MYOB Acumatica instance to be used:
  1. 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.
  2. 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.
  3. 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.
  4. On the Enable/Disable Features (CS100000) form, make sure that the Inventory and Order Management feature is enabled.
  5. Execute the Create an RMA Order for a Return request.

Request

You can use the following request example to create a shipment with the Receipt operation type from the 000127 return order of the RM type through the REST API. In the WarehouseID parameter, you specify the destination warehouse for the items that will be returned.

Tip: In the request example below, <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 /SalesOrderCreateReceipt 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:

  1. 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
  2. Creates shipments for the newly ordered items and confirms these shipments.
  3. Creates incoming shipments with the Receipt operation type for the returned items and confirms these shipments.
  4. 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:

  1. Create an RMA Order for a Return
  2. For a return:
    1. Create a Shipment with the Receipt Operation Type
    2. Retrieve a List of Sales Orders with Details and Related Shipments
    3. Confirm a Shipment
    4. Prepare an Invoice for a Shipment, which creates a credit memo
    5. Retrieve an Invoice Related to a Shipment
    6. Release a Credit Memo
  3. For a replacement:
    1. Create a Shipment for a Replacement
    2. Retrieve a List of Sales Orders with Details and Related Shipments
    3. Confirm a Shipment
    4. Prepare an Invoice for a Shipment, which creates a sales invoice
    5. Retrieve an Invoice Related to a Shipment
    6. Invoke Release of an Invoice