OrderItems
The order items included in the order. Every order has at least one order item.
Table Specific Information
Select
The driver uses the Square API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the driver.
- LocationId supports the following operators: =, IN.
- OrderId supports the following operators: =, IN.
Retrieve all order items found in every order of your Square account. Only orders that have been successfully charged are included in the response.
SELECT * FROM OrderItems
You can retrieve all order items from an order by specifying the OrderId.
SELECT * FROM OrderItems WHERE OrderId = 'TzratjkPk9rhOuLYvSXeznmVvIx5PVlZpg72GfPQGBxckDeeWNBN8yqnf11qTrg3W3AelXC1kB'
You can also use the IN operator to specify multiple OrderIds in the WHERE clause:
SELECT * FROM OrderItems WHERE OrderId IN ('XKKB7LD30TpfNyW3e843ziklKh4vWEvweQyL5l4ESJLH3N2XXNBN8yqnf11qTrg3W3AelXC1kB', 'pxICohrEXPDtoUitiZhG1um5uhp5WI7CRMHknbuKpaj53PXfWNBN8yqnf11qTrg3W3AelXC1kB', '6j8avtXB5fIaPZ9H12beiZP7sCSiqguGhHpwmECsEaENswJnWNBN8yqnf11qTrg3W3AelXC1kB')
Columns
| Name | Type | Description |
| OrderId [KEY] | String | The order's unique Id. |
| OrderItemNumber [KEY] | Integer | The nth item of the order. |
| LocationId | String | The Id of the location. |
| Name | String | The name of the order item. |
| Quantity | String | The quantity purchased, as a string representation of a number. |
| Note | String | The note of the order item. |
| CatalogObjectId | String | The CatalogItemVariation Id applied to this order item. |
| VariationName | String | The name of the variation applied to this order item. |
| Taxes | String | The taxes applied to this order item. |
| Discounts | String | The discounts applied to this order item. |
| Modifiers | String | The CatalogModifiers applied to this order item. |
| BasePriceMoneyAmount | Integer | The base price for a single unit of the order item. |
| BasePriceMoneyCurrency | String | The currency of the base price for a single unit of the order item. |
| GrossSalesMoneyAmount | Integer | The gross sales amount of money calculated as (item base price + modifiers price) * quantity. |
| GrossSalesMoneyCurrency | String | The currency of the gross sales. |
| TotalTaxMoney | Integer | The total tax amount of money to collect for the order item. |
| TotalTaxMoneyCurrency | String | The currency of the total tax amount of money to collect for the order item. |
| TotalDiscountMoneyAmount | Integer | The total discount amount of money to collect for the order item. |
| TotalDiscountMoneyCurrency | String | The currency of the total discount amount of money to collect for the order item. |
| TotalMoneyAmount | Integer | The total amount of money to collect for this order item. |
| TotalMoneyCurrency | String | The currency of the total amount of money to collect for this order item. |
| CatalogVersion | Int64 | The version of the catalog object that this line item references. |
| ItemType | String | The type of line item: an itemized sale, a non-itemized sale (custom amount), or the activation or reloading of a gift card.
The allowed values are ITEM, CUSTOM_AMOUNT, GIFT_CARD. |
| QuantityUnitCatalogObjectId | String | The catalog object ID referencing the CatalogMeasurementUnit used for this line item. Set only when the unit is catalog-backed. |
| QuantityUnitCatalogVersion | Int64 | The version of the catalog object used for the measurement unit. Set only when the unit is catalog-backed. |
| QuantityUnitPrecision | Integer | For non-integer quantities, the number of digits after the decimal point that are recorded. For example, a value of 1 allows quantities such as 1.1 and 1.9, but not 1.01 and 1.99. |
| QuantityUnitMeasurementUnit | String | The unit of measure for the quantity of this line item. |
| AppliedServiceCharges | String | The list of references to service charges applied to this order item. (Beta) |
| Metadata | String | Application-defined data attached to this line item. Intended to store descriptive references or associations with an entity in another system. (Beta) |
| PricingBlocklistsBlockedDiscounts | String | A list of discounts blocked from automatic application to this line item. (Beta) |
| PricingBlocklistsBlockedTaxes | String | A list of taxes blocked from automatic application to this line item. (Beta) |
| PricingBlocklistsBlockedServiceCharges | String | A list of service charges blocked from automatic application to this line item. (Beta) |