Override Values in the Item–Warehouse Details
If you are using the contract-based REST API to integrate MYOB Acumatica with an external system, this external system can specify item–warehouse details, mark particular fields as overridden, and set new values for these fields.
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:
- Deploy a new MYOB Acumatica instance with the U100 dataset. For details on deploying an instance, see To Deploy an MYOB Acumatica Instance in the Installation Guide.
- On the Enable/Disable Features (CS100000) form, make sure the Inventory and Order Management, Inventory, and Multiple Warehouses features are enabled.
- 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.
- To sign in to the instance in the client application, use the tenant name that you specified when you created the instance and the HEADOFFICE branch.
Request
Tip:
You can use the following example of an HTTP request to specify item–warehouse
details for the APPLES inventory item and the RETAIL warehouse. This
request marks the 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.MaxQty
, ReorderPoint
, and
SafetyStock
fields as overridden and specifies their new values.
The specification of the new values for the MSRP
,
ReplenishmentMethod
, ReplenishmentSource
,
Seasonality
, PreferredLocation
,
PreferredVendor
, and ServiceLevel
fields in the
request body has no effect because these fields are not marked as
overridden.PUT / HTTP/1.1
Host: [<MYOB Acumatica instance URL>]/entity/Default/23.200.001/ItemWarehouse
Accept: application/json
Content-Type: application/json
{
"InventoryID": { "value": "APPLES" },
"OverrideMaxQty": { "value": true },
"MaxQty": { "value": 2222 },
"OverridePrice": { "value": false },
"MSRP": { "value": 600 },
"OverrideReorderPoint": { "value": true },
"ReorderPoint": { "value": 14 },
"ReplenishmentClass": { "value": "PURCHASE" },
"OverrideReplenishmentSettings": { "value": false },
"ReplenishmentMethod": { "value": "Min./Max." },
"ReplenishmentSource": { "value": "Purchase" },
"Seasonality": { "value": "NONE" },
"OverrideSafetyStock": { "value": true },
"SafetyStock": { "value": 244 },
"PreferredLocation": { "value": "MAIN" },
"PreferredVendor": { "value": "ALLFRUITS" },
"ServiceLevel": { "value": 87 },
"WarehouseID": { "value": "RETAIL" }
}