Edit Order Item

Warning

This documentation is for translated APIs and intended only for some implementations who have upgraded from a previous version of Order Management. Verify whether your implementation uses translated APIs before making this call, as you will experience errors if your tenant is not configured to use these. If your implementation is not configured to do so, then refer to the standard API documentation instead.

The Edit Order Item API allows an item associated with an order to be edited after its generation with an order.

Note that the request body and parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoint, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.

Production URLhttps://{tenantId}-translation.mozu.com/api/v2/orderItem/action/edit
Sandbox URLhttps://{tenantId}-translation.sandbox.mozu.com/api/v2/orderItem/action/edit
Supported FormatsJSON
HTTP MethodPOST

Example

This example case creates a call that will edit an existing order item. The important properties and new edits are:

  • Order Item 12345678
  • Sets quantity to 5 and price to 50

This guide will demonstrate how to put together each section of the request to edit this item.

Required Parameters

The orderItemID is required for all instances of this call:

ParameterTypeDescription
orderItemIDintegerA unique identifier for the order item. The minimum value is “0”.
rectifyOrderbooleanShould the order be rectified? The default is “TRUE” so that even if this is not provided in the request, the parameter will be automatically set to the suggested best practice of rectification.

Optional Parameters

These are the other details that can be used to edit an order item:

ParameterTypeDescription
quantitynumberThe new quantity of the order item. The minimum value is “1”.
pricenumberThe new price of the order item. The minim value is “0”.
orderItemUnitsarrayInformation to store about the individual units within an item. The minimum length is 0.

Order Item Units

These are the parameters used to build the elements of the orderItemUnits array, if provided:

ParameterTypeDescription
orderItemUnitIDintegerA unique identifier for order item units.
serialNumberstringA serial number for an individual unit within an item. The maximum length is 255.
removeNullValuesbooleanIf true, null values will erase existing values. If false, existing values are left alone. The default is false.

The Full Request

This is the entire request that will edit an order item.

{
 "orderItemID": 12345678,
 "quantity": 5,
 "price": 50,
 "shipping":10,
 "rectifyOrder": true 
}

The returned response follows the same structure as the Get Order Item API, providing information about the item that was edited.