Edit Order Item
The Edit Order Item API allows an item associated with an order to be edited after its generation with an order.
Version 2.0 Call https://integration.shopatron.com/api/v2/orderItem/action/edit Supported Formats JSON HTTP Method POST Schema https://integration.shopatron.com/api/v2/schema/orderItem/action/edit.json
The .json address above can be used to access the schema within Postman. An example use of the Order Item API follows below, or view the schema or the sample Postman Collection .
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:
Parameter Type Description orderItemID integer A unique identifier for the order item. The minimum value is “0”. rectifyOrder boolean Should 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:
Parameter Type Description quantity number The new quantity of the order item. The minimum value is “1”. price number The new price of the order item. The minim value is “0”. orderItemUnits array Information 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:
Parameter Type Description orderItemUnitID integer A unique identifier for order item units. serialNumber string A serial number for an individual unit within an item. The maximum length is 255. removeNullValues boolean If 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.