Orders
Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase.
Table Specific Information
Select
The 本製品 uses the Square API to process search criteria that refer to the Id column, while other filters are processed client side within the 本製品.
Retrieve all the orders in your Square account. Only orders that have been successfully charged are included in the response.
SELECT * FROM Orders
Specify multiple Ids in the WHERE clause using the IN operator:
SELECT * FROM Orders WHERE Id IN ('XKKB7LD30TpfNyW3e843ziklKh4vWEvweQyL5l4ESJLH3N2XXNBN8yqnf11qTrg3W3AelXC1kB', 'pxICohrEXPDtoUitiZhG1um5uhp5WI7CRMHknbuKpaj53PXfWNBN8yqnf11qTrg3W3AelXC1kB', '6j8avtXB5fIaPZ9H12beiZP7sCSiqguGhHpwmECsEaENswJnWNBN8yqnf11qTrg3W3AelXC1kB')
Columns
Name | Type | Description |
Id [KEY] | String | The order's unique ID |
ReferenceId | String | A client specified identifier to associate an entity in another system with this order |
LocationId | String | The Id of the location |
CreatedAt | Datetime | The time when the location was created in RFC 3339 format |
CustomerId | String | The ID of the customer associated with the order |
Discounts | String | The list of all discounts associated with the order |
LineItems | String | The line items included in the order |
NetDueAmount | Integer | The amount of money in the smallest denomination of the currency indicated by currency |
NetDueCurrency | String | The type of currency in ISO 4217 format |
NetDiscountAmount | Integer | The amount of money in the smallest denomination of the currency indicated by currency |
NetDiscountCurrency | String | The type of currency in ISO 4217 format |
NetServiceChargeAmount | Integer | The amount of money in the smallest denomination of the currency indicated by currency |
NetServiceChargeCurrency | String | The type of currency in ISO 4217 format |
NetTaxAmount | Integer | The amount of money in the smallest denomination of the currency indicated by currency |
NetTaxCurrency | String | The type of currency in ISO 4217 format |
NetTipAmount | Integer | The amount of money in the smallest denomination of the currency indicated by currency |
NetTipCurrency | String | The type of currency in ISO 4217 format |
NetTotalAmount | Integer | The amount of money in the smallest denomination of the currency indicated by currency |
NetTotalCurrency | String | The type of currency in ISO 4217 format |
PricingAutoApplyDiscounts | Boolean | The option to determine whether pricing rule-based discounts are automatically applied to an order |
SourceName | String | The name used to identify the place physical or digital that an order originates |
State | String | The current state of the order |
Taxes | String | The list of all taxes associated with the order |
Tenders | String | The tenders that were used to pay for the order |
TotalDiscountAmount | Integer | The amount of money, in the smallest denomination of the currency indicated by currency |
TotalDiscountCurrency | String | The type of currency in ISO 4217 format |
TotalAmount | Integer | The amount of money, in the smallest denomination of the currency indicated by currency |
TotalCurrency | String | The type of currency in ISO 4217 format |
ServiceChargeAmount | Integer | The amount of money, in the smallest denomination of the currency indicated by currency |
ServiceChargeCurrency | String | The type of currency in ISO 4217 format |
TaxAmount | Integer | The total amount of tax money to collect for the order |
TaxCurrency | String | The type of currency, in ISO 4217 format |
TipAmount | Integer | The total amount of tip money to collect for the order |
TipCurrency | String | The type of currency, in ISO 4217 format |
UpdatedAt | Datetime | The time when the location was updated, in RFC 3339 format |
Version | Int64 | The version number, which is incremented each time an update is committed to the order |