CData Python Connector for Square

Build 26.0.9770

Orders

Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase.

Table Specific Information

Select

The connector 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 connector.

  • Id supports the following operators: =, IN.
  • LocationId supports the following operators: =, IN.
  • CreatedAt supports the following operators: =, >=, <=, >, <.
  • CustomerId supports the following operators: =, IN.
  • SourceName supports the following operators: =, IN.
  • State supports the following operators: =, IN.
  • UpdatedAt supports the following operators: =, >=, <=, >, <.
  • FulfillmentState supports the following operators: =, IN.
  • FulfillmentType supports the following operators: =, IN.

Retrieve all the orders in your Square account. Note that 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.

The allowed values are OPEN, COMPLETED, CANCELED, DRAFT.

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.
ClosedAt Datetime The timestamp for when the order was closed, in RFC 3339 format.
Fulfillments String Details about the fulfillments of the order.
Returns String Collection of line items from a sale order being returned in this one. Supported only for refund orders. (Beta)
Refunds String The refunds that have been applied to payments in the order. (Beta)
Rewards String A set-like list of Rewards that have been added to the Order. (Beta)
ServiceCharges String A list of service charges applied to the order.
Metadata String Application-defined data attached to this order. Metadata fields are intended to store descriptive references or associations. Each application may define up to 10 key/value pairs per order. (Beta)
ReturnAmountsTotalAmount Int64 The amount of money, in the smallest denomination of the currency indicated by currency. (Beta)
ReturnAmountsTotalCurrency String The type of currency, in ISO 4217 format. (Beta)
ReturnAmountsTaxAmount Int64 The amount of money, in the smallest denomination of the currency indicated by currency. (Beta)
ReturnAmountsTaxCurrency String The type of currency, in ISO 4217 format. (Beta)
ReturnAmountsDiscountAmount Int64 The amount of money, in the smallest denomination of the currency indicated by currency. (Beta)
ReturnAmountsDiscountCurrency String The type of currency, in ISO 4217 format. (Beta)
ReturnAmountsTipAmount Int64 The amount of money, in the smallest denomination of the currency indicated by currency. (Beta)
ReturnAmountsTipCurrency String The type of currency, in ISO 4217 format. (Beta)
ReturnAmountsServiceChargeAmount Int64 The amount of money, in the smallest denomination of the currency indicated by currency. (Beta)
ReturnAmountsServiceChargeCurrency String The type of currency, in ISO 4217 format. (Beta)
NetCardSurchargeAmount Int64 The amount of money, in the smallest denomination of the currency indicated by currency. (Beta)
NetCardSurchargeCurrency String The type of currency, in ISO 4217 format. (Beta)
TotalCardSurchargeAmount Int64 The amount of money, in the smallest denomination of the currency indicated by currency.
TotalCardSurchargeCurrency String The type of currency, in ISO 4217 format.
PricingOptionsAutoApplyTaxes Boolean The option to determine whether rule-based taxes are automatically applied to an order when the criteria of the rule is met. (Beta)
RoundingAdjustmentUid String A unique ID that identifies the rounding adjustment only within this order. (Beta)
RoundingAdjustmentName String The name of the rounding adjustment from the original sale order. (Beta)
RoundingAdjustmentAmountMoneyAmount Int64 The amount of money, in the smallest denomination of the currency indicated by currency. (Beta)
RoundingAdjustmentAmountMoneyCurrency String The type of currency, in ISO 4217 format. (Beta)
TicketName String A short-form label assigned to an order for display in a user interface, such as a kitchen display system. (Beta)

Pseudocolumns

Pseudo column fields are used in the WHERE clause of SELECT statements (unless stated otherwise) and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
FulfillmentState String A list of fulfillment states to filter for. The list returns orders if any of its fulfillments match any of the fulfillment states listed in this field.

The allowed values are PROPOSED, RESERVED, PREPARED, COMPLETED, CANCELED, FAILED.

FulfillmentType String A list of fulfillment types to filter for. The list returns orders if any of its fulfillments match any of the fulfillment types listed in this field.

The allowed values are PICKUP, SHIPMENT, DELIVERY, IN_STORE.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770