Create a Transfer Receipt with Allocations for a Transfer Order

If you are using the contract-based REST API to integrate MYOB Acumatica with an external system, this external system can create transfer receipts with allocations in MYOB Acumatica in a single API call. For details about the creation of transfer receipts, see Two-Step Transfers: General Information.

For a detailed description of a user scenario when transfer receipts with allocations can be created, see Sales from Multiple Warehouses: General Information.

Testing of the Request

Before you test the code below, you 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 To Deploy an MYOB Acumatica Instance.
  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 use Postman as the client application for testing, in the IntegrationDevelopmentGuide.postman_collection.json collection (which is located in the IntegrationDevelopment\Help folder of the Help-and-Training-Examples repository on GitHub), make sure the collection variables have the proper values.
  4. On the Enable/Disable Features (CS100000) form, make sure the Inventory and Order Management, Inventory, and Multiple Warehouses features are enabled.

To further prepare the system, you need to create a sales order with items allocated in different warehouses; to fulfill this sales order, you need to create a transfer order and transfer receipt. You perform these tasks as follows:

  1. On the Warehouses (IN204000) form, open the RETAIL warehouse. On the Locations tab, clear the Receiving Location box. In the warning dialog box that is displayed, click Yes; click Save.
  2. On the Sales Orders (SO301000) form, create a sales order with items as follows:
    1. Create a sales order of the SO order type for the GOODFOOD customer and MAIN location.
    2. On the Details tab of the form, click Add Items on the table toolbar.
    3. In the Inventory Lookup dialog box, which opens, select the unlabeled check box in the line containing the APJAM08 inventory ID and the RETAIL warehouse, and specify 12 in the Qty. Selected column. Click Add & Close.
    4. On the Details tab, click the line the system has added to the table, and click Line Details on the table toolbar.
    5. In the Line Details dialog box, which opens, in the only line, select the check box in the Allocated column. In the automatically added line, select the check box in the Allocated column, and specify WHOLESALE in the Alloc. Warehouse column; leave 1 in the Quantity column. Click OK.
    6. Save the sales order.
  3. On the More menu (under Replenishment), click Create Transfer Order.
  4. On the Create Transfer Orders (SO509000) form, which opens, in the table, select the unlabeled check box for the transfer request that the system just created, and click Process on the form toolbar.
  5. On the Sales Orders (SO301000) form, which opens for the created transfer order, click Create Shipment on the form toolbar. In the Specify Shipment Parameters dialog box, leave the parameter values as they are, and click OK.
  6. On the Shipments (SO302000) form (which opens for the created shipment), on the form toolbar, click Confirm Shipment and then click Update IN.

Request

You can use the following example of an HTTP request to create a transfer receipt with allocations for the transfer order that was just created. Half of the APJAM08 inventory item (0.5 units) will be moved to the JS1 location, and the other half of the APJAM08 inventory item will be moved to the JS2 location.

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.
PUT ?$expand=Details,Details/Allocations HTTP/1.1
Host: [<MYOB Acumatica instance URL>]/entity/Default/23.200.001/PurchaseReceipt
Accept: application/json
Content-Type: application/json

{
    "Type": {
        "value": "Transfer Receipt"
    },
    "Warehouse": {
        "value": "RETAIL"
    },
    "Details": [
        {
            "TransferOrderType": {
                "value": "TR"
            },
            "TransferOrderNbr": {
                "value": "000064"
            },
            "TransferOrderLineNbr": {
                "value": "1"
            },
            "TransferShipmentNbr": {
                "value": "000059"
            },
            "ReceiptQty": {
                "value": "1"
            },
            "Allocations": [
                {
                    "Location": {
                        "value": "JS1"
                    },
                    "Qty": {
                        "value": 0.5
                    }
                },
                {
                    "Location": {
                        "value": "JS2"
                    },
                    "Qty": {
                        "value": 0.5
                    }
                }
            ]
        }
    ]
}