v1

latestOpenAPI 3.0.12026-07-242871595.3 MB
ORDERS

Create a new line item

Creates a new item list for an order. However, requests must include a price or inventory item id.

Note: To ensure platform stability, an order is limited to a maximum of 2,500 line items. If this call would cause the order to exceed this limit, the request will fail with a 400 Bad Request error.

post/v3/merchants/{mId}/orders/{orderId}/line_items

Path parameters

mIdstring required

Merchant Id

orderIdstring required

Order Id

Headers

User-Agentstring required

Identifies the application, operating system, vendor, and/or version of the requesting user agent. Format: <AppName>/<Version> <Comment>

Request body

idstring

Unique identifier.

colorCodestring

Hex code representation of the color assigned to item in the form of #fff, #ffffff, or #ffffffff. Note that item color can be changed and deleted any time such that it no longer matches this line item

namestring

Line item name.

alternateNamestring

Alternate name of the line item.

priceinteger

Price of the item, typically in cents of merchant currency. When unit quantity is not null then this is the price for a single unit and is not the complete price.

priceWithModifiersinteger

Price of item after adding all modifications. This is used only for reporting.

priceWithModifiersAndItemAndOrderDiscountsinteger

Price of item after adding all modifications and subtracting all line item and order level discounts. This is used only for reporting.

unitQtyinteger

This is applicable only if the item is priced by quantity of a unit. The item must have a priceType of PER_UNIT. The value is a fixed-point integer with scaling factor of 1000 (e.g. if charging per ounce, the value should be set to 2500 for 2.5 ounces). To compute the complete price perform the following calculation: PRICE * (UNIT QTY / 1000). If the item doesn’t have a priceType of PER_UNIT, then unitQty is ignored.

unitNamestring

Unit name (e.g. oz, lb, etc) if priced by unit, otherwise null.

itemCodestring
notestring
printedboolean

True if this line item has been printed out on an order printer at least once already.

isOrderFeeboolean

True if this line item is an order fee line item

isPlatformOrderFeeboolean

True if this line item is an platform order fee line item

orderFeeTypestring

Used to define type of order fee line item, e.g. gratuity.

binNamestring
userDatastring
createdTimeinteger
orderClientCreatedTimeinteger
discountAmountinteger

Unnamed fixed discount amount in cents. Or, in reporting, this may be the calculated sum of all the line item discounts.

orderLevelDiscountAmountinteger

The calculated sum of order level discounts attributed, approximately to the nearest cent, to this the line item. This is only used in reporting.

exchangedboolean
refundedboolean

True if this line item has been refunded

isRevenueboolean

True if this item should be counted as revenue, for example gift cards and donations would not.

revenueAmountinteger

Revenue collected for this. This field is only used in reporting.

quantitySoldnumber

Quantity sold for this line item. This field is only used in reporting