action squareup_retrieve_order { label: "RetrieveOrder" description: "Provides comprehensive information for a single online store order, including the order's history." provider: squareup method: GET path: "/v1/{location_id}/orders/{order_id}" encoding: json input: { type: "object" properties: { location_id: { type: "string" } order_id: { type: "string" } } required: ["location_id", "order_id"] additionalProperties: false } output: { type: "object" description: "V1Order" properties: { btc_price_satoshi: { type: "number" description: "For Bitcoin transactions, the price of the buyer's order in satoshi (100 million satoshi equals 1 BTC)." } btc_receive_address: { type: "string" description: "For Bitcoin transactions, the address that the buyer sent Bitcoin to." } buyer_email: { type: "string" description: "The email address of the order's buyer." } buyer_note: { type: "string" description: "A note provided by the buyer when the order was created, if any." } canceled_note: { type: "string" description: "A note provided by the merchant when the order's state was set to CANCELED, if any." } completed_note: { type: "string" description: "A note provided by the merchant when the order's state was set to COMPLETED, if any" } created_at: { type: "string" description: "The time when the order was created, in ISO 8601 format." } errors: { type: "array" description: "Any errors that occurred during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } expires_at: { type: "string" description: "The time when the order expires if no action is taken, in ISO 8601 format." } id: { type: "string" description: "The order's unique identifier." } order_history: { type: "array" description: "The history of actions associated with the order." items: { type: "object" description: "V1OrderHistoryEntry" properties: { action: { type: "string" description: "The type of action performed on the order." } created_at: { type: "string" description: "The time when the action was performed, in ISO 8601 format." } } } } payment_id: { type: "string" description: "The unique identifier of the payment associated with the order." } promo_code: { type: "string" description: "The promo code provided by the buyer, if any." } recipient_name: { type: "string" description: "The name of the order's buyer." } recipient_phone_number: { type: "string" description: "The phone number to use for the order's delivery." } refunded_note: { type: "string" description: "A note provided by the merchant when the order's state was set to REFUNDED, if any." } shipping_address: { type: "object" description: "Represents a postal address in a country. The address format is based \non an [open-source library from Google](https://github.com/google/libaddressinput). For more information, \nsee [AddressValidationMetadata](https://github.com/google/libaddressinput/wiki/AddressValidationMetadata). \nThis format has dedicated fields for four address components: postal code, \nlocality (city), administrative district (state, prefecture, or province), and \nsublocality (town or village). These components have dedicated fields in the \n`Address` object because software sometimes behaves differently based on them. \nFor example, sales tax software may charge different amounts of sales tax \nbased on the postal code, and some software is only available in \ncertain states due to compliance reasons.\n\nFor the remaining address components, the `Address` type provides the \n`address_line_1` and `address_line_2` fields for free-form data entry. \nThese fields are free-form because the remaining address components have \ntoo many variations around the world and typical software does not parse \nthese components. These fields enable users to enter anything they want. \n\nNote that, in the current implementation, all other `Address` type fields are blank. \nThese include `address_line_3`, `sublocality_2`, `sublocality_3`, \n`administrative_district_level_2`, `administrative_district_level_3`, \n`first_name`, `last_name`, and `organization`. \n\nWhen it comes to localization, the seller's language preferences \n(see [Language preferences](https://developer.squareup.com/docs/locations-api#location-specific-and-seller-level-language-preferences)) \nare ignored for addresses. Even though Square products (such as Square Point of Sale \nand the Seller Dashboard) mostly use a seller's language preference in \ncommunication, when it comes to addresses, they will use English for a US address, \nJapanese for an address in Japan, and so on." properties: { address_line_1: { type: "string" description: "The first line of the address.\n\nFields that start with `address_line` provide the address's most specific\ndetails, like street number, street name, and building name. They do *not*\nprovide less specific details like city, state/province, or country (these\ndetails are provided in other fields)." } address_line_2: { type: "string" description: "The second line of the address, if any." } address_line_3: { type: "string" description: "The third line of the address, if any." } administrative_district_level_1: { type: "string" description: "A civil entity within the address's country. In the US, this\nis the state." } administrative_district_level_2: { type: "string" description: "A civil entity within the address's `administrative_district_level_1`.\nIn the US, this is the county." } administrative_district_level_3: { type: "string" description: "A civil entity within the address's `administrative_district_level_2`,\nif any." } country: { type: "string" description: "The address's country, in ISO 3166-1-alpha-2 format." } first_name: { type: "string" description: "Optional first name when it's representing recipient." } last_name: { type: "string" description: "Optional last name when it's representing recipient." } locality: { type: "string" description: "The city or town of the address." } organization: { type: "string" description: "Optional organization name when it's representing recipient." } postal_code: { type: "string" description: "The address's postal code." } sublocality: { type: "string" description: "A civil region within the address's `locality`, if any." } sublocality_2: { type: "string" description: "A civil region within the address's `sublocality`, if any." } sublocality_3: { type: "string" description: "A civil region within the address's `sublocality_2`, if any." } } } state: { type: "string" description: "Whether the tax is an ADDITIVE tax or an INCLUSIVE tax." } subtotal_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } tender: { type: "object" description: "A tender represents a discrete monetary exchange. Square represents this\nexchange as a money object with a specific currency and amount, where the\namount is given in the smallest denomination of the given currency.\n\nSquare POS can accept more than one form of tender for a single payment (such\nas by splitting a bill between a credit card and a gift card). The `tender`\nfield of the Payment object lists all forms of tender used for the payment.\n\nSplit tender payments behave slightly differently from single tender payments:\n\nThe receipt_url for a split tender corresponds only to the first tender listed\nin the tender field. To get the receipt URLs for the remaining tenders, use\nthe receipt_url fields of the corresponding Tender objects.\n\n*A note on gift cards**: when a customer purchases a Square gift card from a\nmerchant, the merchant receives the full amount of the gift card in the\nassociated payment.\n\nWhen that gift card is used as a tender, the balance of the gift card is\nreduced and the merchant receives no funds. A `Tender` object with a type of\n`SQUARE_GIFT_CARD` indicates a gift card was used for some or all of the\nassociated payment." properties: { card_brand: { type: "string" description: "The brand of credit card provided." } change_back_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } employee_id: { type: "string" description: "The ID of the employee that processed the tender." } entry_method: { type: "string" description: "The tender's unique ID." } id: { type: "string" description: "The tender's unique ID." } is_exchange: { type: "boolean" description: "Indicates whether or not the tender is associated with an exchange. If is_exchange is true, the tender represents the value of goods returned in an exchange not the actual money paid. The exchange value reduces the tender amounts needed to pay for items purchased in the exchange." } name: { type: "string" description: "A human-readable description of the tender." } pan_suffix: { type: "string" description: "The last four digits of the provided credit card's account number." } payment_note: { type: "string" description: "Notes entered by the merchant about the tender at the time of payment, if any. Typically only present for tender with the type: OTHER." } receipt_url: { type: "string" description: "The URL of the receipt for the tender." } refunded_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } settled_at: { type: "string" description: "The time when the tender was settled, in ISO 8601 format." } tendered_at: { type: "string" description: "The time when the tender was created, in ISO 8601 format." } tendered_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } total_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } type: { type: "string" description: "The type of tender." } } } total_discount_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } total_price_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } total_shipping_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } total_tax_money: { type: "object" properties: { amount: { type: "integer" description: "Amount in the lowest denominated value of this Currency. E.g. in USD\nthese are cents, in JPY they are Yen (which do not have a 'cent' concept)." } currency_code: { type: "string" } } } updated_at: { type: "string" description: "The time when the order was last modified, in ISO 8601 format." } } } }