• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

Object Index

You are viewing an old version of the API
OrderLineItem

Represents a line item in an order.

Each line item describes a different product to purchase, with its own quantity and price details.

Properties

Name Description
uid
string

Beta

Unique ID that identifies the line item only within this order.

Max Length 60
name
string

The name of the line item.

Max Length 500
quantity
string

Required

The quantity purchased, formatted as a decimal number. For example: "3".

Line items with a quantity_unit can have non-integer quantities. For example: "1.70000".

Max Length 12 Min Length 1
quantity_unit
OrderQuantityUnit

The unit and precision that this line item's quantity is measured in.

note
string

The note of the line item.

Max Length 500
catalog_object_id
string

The CatalogItemVariation id applied to this line item.

Max Length 192
variation_name
string

The name of the variation applied to this line item.

Max Length 255
metadata
Map<string, string>

Beta

Application-defined data attached to this line item. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.).

Keys written by applications must be 60 characters or less and must be in the character set [a-zA-Z0-9_-]. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character.

Values have a max length of 255 characters.

An application may have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same application.

See Metadata for more information.

modifiers
OrderLineItemModifier [ ]

The CatalogModifiers applied to this line item.

applied_taxes
OrderLineItemAppliedTax [ ]

Beta

The list of references to taxes applied to this line item. Each OrderLineItemAppliedTax has a tax_uid that references the uid of a top-level OrderLineItemTax applied to the line item. On reads, the amount applied is populated.

An OrderLineItemAppliedTax will be automatically created on every line item for all ORDER scoped taxes added to the order. OrderLineItemAppliedTax records for LINE_ITEM scoped taxes must be added in requests for the tax to apply to any line items.

To change the amount of a tax, modify the referenced top-level tax.

applied_discounts
OrderLineItemAppliedDiscount [ ]

Beta

The list of references to discounts applied to this line item. Each OrderLineItemAppliedDiscount has a discount_uid that references the uid of a top-level OrderLineItemDiscounts applied to the line item. On reads, the amount applied is populated.

An OrderLineItemAppliedDiscount will be automatically created on every line item for all ORDER scoped discounts that are added to the order. OrderLineItemAppliedDiscount records for LINE_ITEM scoped discounts must be added in requests for the discount to apply to any line items.

To change the amount of a discount, modify the referenced top-level discount.

base_price_money
Money

The base price for a single unit of the line item.

variation_total_price_money
Money

Read only The total price of all item variations sold in this line item. Calculated as base_price_money multiplied by quantity. Does not include modifiers.

gross_sales_money
Money

Read only The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price.

total_tax_money
Money

Read only The total tax amount of money to collect for the line item.

total_discount_money
Money

Read only The total discount amount of money to collect for the line item.

total_money
Money

Read only The total amount of money to collect for this line item.

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?