Add Order Item
Items are added to an existing order with the Add Order Item action. This action is actually part of the Order API, as reflected in the URL of the endpoint.
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.
The example case creates an API call to add an item that has the following properties:
- Five t-shirts added to Order 40000000
- Price override 19.99
This guide will demonstrate how to put together each section of the request to add an item.
The required parameters to add an order item are:
|orderID||integer||A unique identifier for the order. The minimum value is “1”.|
|partNumber||string||The item’s part number or similar unique identifier.|
|quantity||number||The number of items to add. The minimum value is “1”.|
|priceOverride||number||The item price. The minimum value is “0”.|
|name||string||The product’s name or title. The minimum length is 1 and the maximum length is 600.|
|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.|
Other possible parameters can be provided to specify other details about the order item. These variables are:
|shipmentID||integer||A unique identifier for the shipment. The minimum value is “1”.|
|taxOverride||number||The item tax to be applied. The minimum value is “0”.|
|taxRateOverride||number||The item tax rate to be applied. The minimum value is “0”.|
|options||array||Specified options for the product. For each option in the array, it includes a groupID, optionID, and optionText. See the schema for more details about these parameters.|
|upcCode||string||The Universal Product Code for this product. The maximum length is 50.|
|sku||string||The Stock Keeping Unit code for this product. The maximum length is 50.|
|imageURL||string||A URL to an image of the item.|
The Full Request
This is the entire request that will add an order item to an order.
The returned response follows the same structure as the Get Order API, providing information about the order that the item was added to.