{ "swagger": "2.0", "info": { "version": "2.0", "title": "Square Connect API", "description": "Client library for accessing the Square Connect APIs", "termsOfService": "https://connect.squareup.com/tos", "contact": { "name": "Square Developer Platform", "email": "developers@squareup.com", "url": "https://squareup.com/developers" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "externalDocs": { "description": "Read the official documentation here:", "url": "https://docs.connect.squareup.com/" }, "host": "connect.squareup.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "securityDefinitions": { "oauth2": { "type": "oauth2", "authorizationUrl": "https://connect.squareup.com/oauth2/authorize", "flow": "accessCode", "tokenUrl": "https://connect.squareup.com/oauth2/token", "scopes": { "BANK_ACCOUNTS_READ": "__HTTP Method__: `GET`\n\nGrants read access to bank account information associated with the targeted\nSquare account. For example, to call the Connect v1 ListBankAccounts endpoint.", "CASH_DRAWER_READ": "__HTTP Method__: `GET`\n\nGrants read access to cash drawer shift information. For example, to call the\nListCashDrawerShifts endpoint.", "CUSTOMERS_READ": "__HTTP Method__: `GET`\n\nGrants read access to customer information. For example, to call the\nListCustomers endpoint.", "CUSTOMERS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to customer information. For example, to create and update\ncustomer profiles.", "DEVICE_CREDENTIAL_MANAGEMENT": "__HTTP Method__: `POST`, `GET`\n\nGrants read/write access to device credentials information. For example, to\ncall the CreateDeviceCode endpoint.", "EMPLOYEES_READ": "__HTTP Method__: `GET`\n\nGrants read access to employee profile information. For example, to call the\nConnect v1 Employees API.", "EMPLOYEES_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to employee profile information. For example, to create\nand modify employee profiles.", "INVENTORY_READ": "__HTTP Method__: `GET`\n\nGrants read access to inventory information. For example, to call the\nRetrieveInventoryCount endpoint.", "INVENTORY_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to inventory information. For example, to call the\nBatchChangeInventory endpoint.", "ITEMS_READ": "__HTTP Method__: `GET`\n\nGrants read access to product catalog information. For example, to obtain objects in a product catalog.", "ITEMS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to product catalog information. For example, to modify or\nadd to a product catalog.", "LOYALTY_READ": "__HTTP Method__: `GET`\n\nGrants read access to loyalty information. For example, to call the\nListLoyaltyPrograms endpoint.", "LOYALTY_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to loyalty information. For example, to call the\nCreateLoyaltyAccount endpoint.", "MERCHANT_PROFILE_READ": "__HTTP Method__: `GET`\n\nGrants read access to business and location information. For example, to\nobtain a location ID for subsequent activity.", "ORDERS_READ": "__HTTP Method__: `GET`\n\nGrants read access to order information. For example, to call the\nBatchRetrieveOrders endpoint.", "ORDERS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to order information. For example, to call the\nCreateCheckout endpoint.", "PAYMENTS_READ": "__HTTP Method__: `GET`\n\nGrants read access to transaction and refund information. For example, to call\nthe RetrieveTransaction endpoint.", "PAYMENTS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to transaction and refunds information. For example, to\nprocess payments with the Payments or Checkout API.", "PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nAllow third party applications to deduct a portion of each transaction amount.\n__Required__ to use multiparty transaction functionality with the Payments\nAPI.", "PAYMENTS_WRITE_IN_PERSON": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to payments and refunds information. For example, to\nprocess in-person payments.", "SETTLEMENTS_READ": "__HTTP Method__: `GET`\n\nGrants read access to settlement (deposit) information. For example, to call\nthe Connect v1 ListSettlements endpoint.", "TIMECARDS_READ": "__HTTP Method__: `GET`\n\nGrants read access to employee timecard information. For example, to call the\nConnect v2 SearchShifts endpoint.", "TIMECARDS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to employee shift information. For example, to create\nand modify employee shifts.", "TIMECARDS_SETTINGS_READ": "__HTTP Method__: `GET`\n\nGrants read access to employee timecard settings information. For example, to\ncall the GetBreakType endpoint.", "TIMECARDS_SETTINGS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to employee timecard settings information. For example, to\ncall the UpdateBreakType endpoint.", "APPOINTMENTS_READ": "__HTTP Method__: `GET`, `POST`\n\nGrants read access to booking information. For example, to call the\nRetrieveBooking endpoint.", "APPOINTMENTS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to booking information. For example, to call the CreateBooking endpoint.", "APPOINTMENTS_BUSINESS_SETTINGS_READ": "__HTTP Method__: `GET`\n\nGrants read access to booking business settings. For example, to call the\nListTeamMemberBookingProfiles endpoint.", "INVOICES_READ": "__HTTP Method__: `GET`, `POST`\n\nGrants read access to invoice information. For example, to call the ListInvoices endpoint.", "INVOICES_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to invoice information. For example, to call the CreateInvoice endpoint.", "SUBSCRIPTIONS_READ": "__HTTP Method__: `GET`, `POST`\n\nGrants read access to subscription information. For example, to call the RetrieveSubscription\nendpoint.", "SUBSCRIPTIONS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to subscription information. For example, to call the CreateSubscription\nendpoint.", "DISPUTES_READ": "__HTTP Method__: `GET`\n\nGrants read access to dispute information. For example, to call the RetrieveDispute\nendpoint.", "DISPUTES_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to dispute information. For example, to call the SubmitEvidence\nendpoint.", "GIFTCARDS_READ": "__HTTP Method__: `GET`, `POST`\n\nGrants read access to gift card information. For example, to call the RetrieveGiftCard\nendpoint.", "GIFTCARDS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to gift card information. For example, to call the CreateGiftCard\nendpoint.", "ONLINE_STORE_SNIPPETS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nWrite access to ECOM online store snippets on published websites.", "ONLINE_STORE_SNIPPETS_READ": "__HTTP Method__: `GET`, `POST`\n\nRead access to ECOM online store snippets on published websites.", "ONLINE_STORE_SITE_READ": "__HTTP Method__: `GET`, `POST`\n\nRead access to ECOM online store site details.", "PAYMENTS_WRITE_SHARED_ONFILE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nAllows the developer to process payments on behalf of a seller using a shared on file payment method.", "APPOINTMENTS_ALL_READ": "__HTTP Method__: `GET`, `POST`\n\nGrants read access to all of a seller\u0027s booking information, calendar, and business details.\nThis permission must be accompanied by the `APPOINTMENTS_READ` permission.", "APPOINTMENTS_ALL_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to all booking details, including double-booking a seller.\nThis permission must be accompanied by the `APPOINTMENTS_WRITE` permission.", "MERCHANT_PROFILE_WRITE": "__HTTP Method__: `POST`, `PUT`\n\nGrants write access to business and location information. For example, to create a new location or\nupdate the business hours at an existing location.", "VENDOR_READ": "__HTTP Method__: `GET`, `POST`\n\nGrants read access to vendor information, for example, when calling the\n`RetrieveVendor` endpoint.", "VENDOR_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to vendor information, for example, when calling the\n`BulkUpdateVendors` endpoint.", "PAYOUTS_READ": "__HTTP Method__: `GET`\n\nGrants read access to payouts and payout entries information. For example,\nto call the Connect v2 `ListPayouts` endpoint.", "RESERVATIONS_READ": "__HTTP Method__: `GET`\n\nGrants read access to reservation information, for example, when calling the\n`RetrieveReservation` endpoint.", "RESERVATIONS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access to reservation information, for example, when calling the\n`CreateReservation` endpoint.", "RESTAURANT_CHECKS_READ": "__HTTP Method__: `GET`\n\nGrants read access to check information, for example, when calling the\n`RetrieveCheck` endpoint.", "DEVICES_READ": "__HTTP Method__: `GET`\n\nGrants read access to device information. For example, to\ncall the `GetDevice` and `ListDevices` endpoints.", "CHANNELS_READ": "__HTTP Method__: `GET`\n\nGrants read access to view channels, for example, when calling the\n`RetrieveChannel` endpoint.", "CHANNELS_CREATE": "__HTTP Method__: `POST`\n\nGrants write access to create channels, for example, when calling the\n`CreateChannel` endpoint.", "CHANNELS_UPDATE": "__HTTP Method__: `PUT`\n\nGrants write access to update channels, for example, when calling the\n`UpdateChannel` endpoint.", "ADDON_CONFIGURATIONS_READ": "__HTTP Method__: `GET`\n\nGrants write access for third-party Add-ons to read configurations of their Add-ons, for example, when calling `RetrieveConfiguration` endpoint.", "ADDON_CONFIGURATIONS_WRITE": "__HTTP Method__: `POST`, `PUT`, `DELETE`\n\nGrants write access for third-party Add-ons to store configurations of their Add-ons, for example, when calling `CreateConfiguration` endpoint.", "PERMISSION_SETS_READ": "__HTTP Method__: `GET`\n\nGrants read access to Permission Sets. For example, to\ncall the `ListPermissionSets` and `RetrievePermissionSet` endpoints.", "PERMISSION_SETS_WRITE": "__HTTP Method__: `PUT`\n\nGrants write access to Permission Sets." } }, "oauth2ClientSecret": { "type": "apiKey", "in": "header", "name": "Authorization" } }, "paths": { "/mobile/authorization-code": { "post": { "tags": [ "MobileAuthorization" ], "summary": "CreateMobileAuthorizationCode", "operationId": "CreateMobileAuthorizationCode", "description": "Generates code to authorize a mobile application to connect to a Square card reader.\n\nAuthorization codes are one-time-use codes and expire 60 minutes after being issued.\n\n__Important:__ The `Authorization` header you provide to this endpoint must have the following format:\n\n```\nAuthorization: Bearer ACCESS_TOKEN\n```\n\nReplace `ACCESS_TOKEN` with a\n[valid production authorization credential](https://developer.squareup.com/docs/build-basics/access-tokens).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE_IN_PERSON" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE_IN_PERSON" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateMobileAuthorizationCodeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateMobileAuthorizationCodeResponse" } } } } }, "/oauth2/revoke": { "post": { "tags": [ "OAuth" ], "summary": "RevokeToken", "operationId": "RevokeToken", "description": "Revokes an access token generated with the OAuth flow.\n\nIf an account has more than one OAuth access token for your application, this\nendpoint revokes all of them, regardless of which token you specify. \n\n__Important:__ The `Authorization` header for this endpoint must have the\nfollowing format:\n\n```\nAuthorization: Client APPLICATION_SECRET\n```\n\nReplace `APPLICATION_SECRET` with the application secret on the **OAuth**\npage for your application in the Developer Dashboard.", "x-release-status": "PUBLIC", "x-sq-version": "2024-04-17", "security": [ { "oauth2ClientSecret": [] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/RevokeTokenRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RevokeTokenResponse" } } } } }, "/oauth2/token": { "post": { "tags": [ "OAuth" ], "summary": "ObtainToken", "operationId": "ObtainToken", "description": "Returns an OAuth access token and a refresh token unless the \n`short_lived` parameter is set to `true`, in which case the endpoint \nreturns only an access token.\n\nThe `grant_type` parameter specifies the type of OAuth request. If \n`grant_type` is `authorization_code`, you must include the authorization \ncode you received when a seller granted you authorization. If `grant_type` \nis `refresh_token`, you must provide a valid refresh token. If you\u0027re using \nan old version of the Square APIs (prior to March 13, 2019), `grant_type` \ncan be `migration_token` and you must provide a valid migration token.\n\nYou can use the `scopes` parameter to limit the set of permissions granted \nto the access token and refresh token. You can use the `short_lived` parameter \nto create an access token that expires in 24 hours.\n\n__Note:__ OAuth tokens should be encrypted and stored on a secure server. \nApplication clients should never interact directly with OAuth tokens.", "x-release-status": "PUBLIC", "x-sq-version": "2024-04-17", "security": [], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/ObtainTokenRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ObtainTokenResponse" } } } } }, "/oauth2/token/status": { "post": { "tags": [ "OAuth" ], "summary": "RetrieveTokenStatus", "operationId": "RetrieveTokenStatus", "description": "Returns information about an [OAuth access token](https://developer.squareup.com/docs/build-basics/access-tokens#get-an-oauth-access-token) or an application’s [personal access token](https://developer.squareup.com/docs/build-basics/access-tokens#get-a-personal-access-token).\n\nAdd the access token to the Authorization header of the request.\n\n__Important:__ The `Authorization` header you provide to this endpoint must have the following format:\n\n```\nAuthorization: Bearer ACCESS_TOKEN\n```\n\nwhere `ACCESS_TOKEN` is a\n[valid production authorization credential](https://developer.squareup.com/docs/build-basics/access-tokens).\n\nIf the access token is expired or not a valid access token, the endpoint returns an `UNAUTHORIZED` error.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveTokenStatusResponse" } } } } }, "/v1/{location_id}/orders": { "get": { "tags": [ "V1Transactions" ], "summary": "V1ListOrders", "operationId": "V1ListOrders", "description": "Provides summary information for a merchant\u0027s online store orders.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY", "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location to list online store orders for.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "order", "description": "The order in which payments are listed in the response.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of payments to return in a single response. This value cannot exceed 200.", "x-is-deprecated": true, "type": "integer", "in": "query", "required": false }, { "name": "batch_token", "description": "A pagination cursor to retrieve the next set of results for your\noriginal query to the endpoint.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "type": "array", "items": { "$ref": "#/definitions/V1Order" } } } } } }, "/v1/{location_id}/orders/{order_id}": { "get": { "tags": [ "V1Transactions" ], "summary": "V1RetrieveOrder", "operationId": "V1RetrieveOrder", "description": "Provides comprehensive information for a single online store order, including the order\u0027s history.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY", "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the order\u0027s associated location.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "order_id", "description": "The order\u0027s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint", "x-is-deprecated": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/V1Order" } } } }, "put": { "tags": [ "V1Transactions" ], "summary": "V1UpdateOrder", "operationId": "V1UpdateOrder", "description": "Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions:", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY", "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the order\u0027s associated location.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "order_id", "description": "The order\u0027s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/V1UpdateOrderRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/V1Order" } } } } }, "/v2/apple-pay/domains": { "post": { "tags": [ "ApplePay" ], "summary": "RegisterDomain", "operationId": "RegisterDomain", "description": "Activates a domain for use with Apple Pay on the Web and Square. A validation\nis performed on this domain by Apple to ensure that it is properly set up as\nan Apple Pay enabled domain.\n\nThis endpoint provides an easy way for platform developers to bulk activate\nApple Pay on the Web with Square for merchants using their platform.\n\nNote: The SqPaymentForm library is deprecated as of May 13, 2021, and will only receive critical security updates until it is retired on October 31, 2022.\nYou must migrate your payment form code to the Web Payments SDK to continue using your domain for Apple Pay. For more information on migrating to the Web Payments SDK, see [Migrate to the Web Payments SDK](https://developer.squareup.com/docs/web-payments/migrate).\n\nTo learn more about the Web Payments SDK and how to add Apple Pay, see [Take an Apple Pay Payment](https://developer.squareup.com/docs/web-payments/apple-pay).", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/RegisterDomainRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RegisterDomainResponse" } } } } }, "/v2/bank-accounts": { "get": { "tags": [ "BankAccounts" ], "summary": "ListBankAccounts", "operationId": "ListBankAccounts", "description": "Returns a list of [BankAccount](https://developer.squareup.com/reference/square_2024-04-17/objects/BankAccount) objects linked to a Square account.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "BANK_ACCOUNTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "BANK_ACCOUNTS_READ" ] } ], "parameters": [ { "name": "cursor", "description": "The pagination cursor returned by a previous call to this endpoint.\nUse it in the next `ListBankAccounts` request to retrieve the next set \nof results.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "Upper limit on the number of bank accounts to return in the response. \nCurrently, 1000 is the largest supported limit. You can specify a limit \nof up to 1000 bank accounts. This is also the default limit.", "type": "integer", "in": "query", "required": false }, { "name": "location_id", "description": "Location ID. You can specify this optional filter \nto retrieve only the linked bank accounts belonging to a specific location.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListBankAccountsResponse" } } } } }, "/v2/bank-accounts/by-v1-id/{v1_bank_account_id}": { "get": { "tags": [ "BankAccounts" ], "summary": "GetBankAccountByV1Id", "operationId": "GetBankAccountByV1Id", "description": "Returns details of a [BankAccount](https://developer.squareup.com/reference/square_2024-04-17/objects/BankAccount) identified by V1 bank account ID.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "BANK_ACCOUNTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "BANK_ACCOUNTS_READ" ] } ], "parameters": [ { "name": "v1_bank_account_id", "description": "Connect V1 ID of the desired `BankAccount`. For more information, see \n[Retrieve a bank account by using an ID issued by V1 Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api).", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetBankAccountByV1IdResponse" } } } } }, "/v2/bank-accounts/{bank_account_id}": { "get": { "tags": [ "BankAccounts" ], "summary": "GetBankAccount", "operationId": "GetBankAccount", "description": "Returns details of a [BankAccount](https://developer.squareup.com/reference/square_2024-04-17/objects/BankAccount)\nlinked to a Square account.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "BANK_ACCOUNTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "BANK_ACCOUNTS_READ" ] } ], "parameters": [ { "name": "bank_account_id", "description": "Square-issued ID of the desired `BankAccount`.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetBankAccountResponse" } } } } }, "/v2/bookings": { "get": { "tags": [ "Bookings" ], "summary": "ListBookings", "operationId": "ListBookings", "description": "Retrieve a collection of bookings.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_READ" ] } ], "parameters": [ { "name": "limit", "description": "The maximum number of results per page to return in a paged response.", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results.", "type": "string", "in": "query", "required": false }, { "name": "customer_id", "description": "The [customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved.", "type": "string", "in": "query", "required": false }, { "name": "team_member_id", "description": "The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved.", "type": "string", "in": "query", "required": false }, { "name": "location_id", "description": "The location for which to retrieve bookings. If this is not set, all locations\u0027 bookings are retrieved.", "type": "string", "in": "query", "required": false }, { "name": "start_at_min", "description": "The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used.", "type": "string", "in": "query", "required": false }, { "name": "start_at_max", "description": "The RFC 3339 timestamp specifying the latest of the start time. If this is not set, the time of 31 days after `start_at_min` is used.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListBookingsResponse" } } } }, "post": { "tags": [ "Bookings" ], "summary": "CreateBooking", "operationId": "CreateBooking", "description": "Creates a booking.\n\nThe required input must include the following:\n- `Booking.location_id`\n- `Booking.start_at`\n- `Booking.AppointmentSegment.team_member_id`\n- `Booking.AppointmentSegment.service_variation_id`\n- `Booking.AppointmentSegment.service_variation_version`\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateBookingRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateBookingResponse" } } } } }, "/v2/bookings/availability/search": { "post": { "tags": [ "Bookings" ], "summary": "SearchAvailability", "operationId": "SearchAvailability", "description": "Searches for availabilities for booking.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchAvailabilityRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchAvailabilityResponse" } } } } }, "/v2/bookings/bulk-retrieve": { "post": { "tags": [ "Bookings" ], "summary": "BulkRetrieveBookings", "operationId": "BulkRetrieveBookings", "description": "Bulk-Retrieves a list of bookings by booking IDs.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkRetrieveBookingsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkRetrieveBookingsResponse" } } } } }, "/v2/bookings/business-booking-profile": { "get": { "tags": [ "Bookings" ], "summary": "RetrieveBusinessBookingProfile", "operationId": "RetrieveBusinessBookingProfile", "description": "Retrieves a seller\u0027s booking profile.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ] } ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveBusinessBookingProfileResponse" } } } } }, "/v2/bookings/custom-attribute-definitions": { "get": { "tags": [ "BookingCustomAttributes" ], "summary": "ListBookingCustomAttributeDefinitions", "operationId": "ListBookingCustomAttributeDefinitions", "description": "Get all bookings custom attribute definitions.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_READ" ] } ], "parameters": [ { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListBookingCustomAttributeDefinitionsResponse" } } } }, "post": { "tags": [ "BookingCustomAttributes" ], "summary": "CreateBookingCustomAttributeDefinition", "operationId": "CreateBookingCustomAttributeDefinition", "description": "Creates a bookings custom attribute definition.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateBookingCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateBookingCustomAttributeDefinitionResponse" } } } } }, "/v2/bookings/custom-attribute-definitions/{key}": { "delete": { "tags": [ "BookingCustomAttributes" ], "summary": "DeleteBookingCustomAttributeDefinition", "operationId": "DeleteBookingCustomAttributeDefinition", "description": "Deletes a bookings custom attribute definition.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to delete.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteBookingCustomAttributeDefinitionResponse" } } } }, "get": { "tags": [ "BookingCustomAttributes" ], "summary": "RetrieveBookingCustomAttributeDefinition", "operationId": "RetrieveBookingCustomAttributeDefinition", "description": "Retrieves a bookings custom attribute definition.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_READ" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to retrieve. If the requesting application\nis not the definition owner, you must use the qualified key.", "type": "string", "in": "path", "required": true }, { "name": "version", "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error.", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveBookingCustomAttributeDefinitionResponse" } } } }, "put": { "tags": [ "BookingCustomAttributes" ], "summary": "UpdateBookingCustomAttributeDefinition", "operationId": "UpdateBookingCustomAttributeDefinition", "description": "Updates a bookings custom attribute definition.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateBookingCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateBookingCustomAttributeDefinitionResponse" } } } } }, "/v2/bookings/custom-attributes/bulk-delete": { "post": { "tags": [ "BookingCustomAttributes" ], "summary": "BulkDeleteBookingCustomAttributes", "operationId": "BulkDeleteBookingCustomAttributes", "description": "Bulk deletes bookings custom attributes.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkDeleteBookingCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkDeleteBookingCustomAttributesResponse" } } } } }, "/v2/bookings/custom-attributes/bulk-upsert": { "post": { "tags": [ "BookingCustomAttributes" ], "summary": "BulkUpsertBookingCustomAttributes", "operationId": "BulkUpsertBookingCustomAttributes", "description": "Bulk upserts bookings custom attributes.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkUpsertBookingCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkUpsertBookingCustomAttributesResponse" } } } } }, "/v2/bookings/location-booking-profiles": { "get": { "tags": [ "Bookings" ], "summary": "ListLocationBookingProfiles", "operationId": "ListLocationBookingProfiles", "description": "Lists location booking profiles of a seller.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ] } ], "parameters": [ { "name": "limit", "description": "The maximum number of results to return in a paged response.", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListLocationBookingProfilesResponse" } } } } }, "/v2/bookings/location-booking-profiles/{location_id}": { "get": { "tags": [ "Bookings" ], "summary": "RetrieveLocationBookingProfile", "operationId": "RetrieveLocationBookingProfile", "description": "Retrieves a seller\u0027s location booking profile.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location to retrieve the booking profile.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLocationBookingProfileResponse" } } } } }, "/v2/bookings/team-member-booking-profiles": { "get": { "tags": [ "Bookings" ], "summary": "ListTeamMemberBookingProfiles", "operationId": "ListTeamMemberBookingProfiles", "description": "Lists booking profiles for team members.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ] } ], "parameters": [ { "name": "bookable_only", "description": "Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`).", "type": "boolean", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a paged response.", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results.", "type": "string", "in": "query", "required": false }, { "name": "location_id", "description": "Indicates whether to include only team members enabled at the given location in the returned result.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListTeamMemberBookingProfilesResponse" } } } } }, "/v2/bookings/team-member-booking-profiles/bulk-retrieve": { "post": { "tags": [ "Bookings" ], "summary": "BulkRetrieveTeamMemberBookingProfiles", "operationId": "BulkRetrieveTeamMemberBookingProfiles", "description": "Retrieves one or more team members\u0027 booking profiles.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkRetrieveTeamMemberBookingProfilesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkRetrieveTeamMemberBookingProfilesResponse" } } } } }, "/v2/bookings/team-member-booking-profiles/{team_member_id}": { "get": { "tags": [ "Bookings" ], "summary": "RetrieveTeamMemberBookingProfile", "operationId": "RetrieveTeamMemberBookingProfile", "description": "Retrieves a team member\u0027s booking profile.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_BUSINESS_SETTINGS_READ" ] } ], "parameters": [ { "name": "team_member_id", "description": "The ID of the team member to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveTeamMemberBookingProfileResponse" } } } } }, "/v2/bookings/{booking_id}": { "get": { "tags": [ "Bookings" ], "summary": "RetrieveBooking", "operationId": "RetrieveBooking", "description": "Retrieves a booking.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_READ" ] } ], "parameters": [ { "name": "booking_id", "description": "The ID of the [Booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking) object representing the to-be-retrieved booking.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveBookingResponse" } } } }, "put": { "tags": [ "Bookings" ], "summary": "UpdateBooking", "operationId": "UpdateBooking", "description": "Updates a booking.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "booking_id", "description": "The ID of the [Booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking) object representing the to-be-updated booking.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateBookingRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateBookingResponse" } } } } }, "/v2/bookings/{booking_id}/cancel": { "post": { "tags": [ "Bookings" ], "summary": "CancelBooking", "operationId": "CancelBooking", "description": "Cancels an existing booking.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "booking_id", "description": "The ID of the [Booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking) object representing the to-be-cancelled booking.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CancelBookingRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelBookingResponse" } } } } }, "/v2/bookings/{booking_id}/custom-attributes": { "get": { "tags": [ "BookingCustomAttributes" ], "summary": "ListBookingCustomAttributes", "operationId": "ListBookingCustomAttributes", "description": "Lists a booking\u0027s custom attributes.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_READ" ] } ], "parameters": [ { "name": "booking_id", "description": "The ID of the target [booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking).", "type": "string", "in": "path", "required": true }, { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "with_definitions", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`.", "type": "boolean", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListBookingCustomAttributesResponse" } } } } }, "/v2/bookings/{booking_id}/custom-attributes/{key}": { "delete": { "tags": [ "BookingCustomAttributes" ], "summary": "DeleteBookingCustomAttribute", "operationId": "DeleteBookingCustomAttribute", "description": "Deletes a bookings custom attribute.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "booking_id", "description": "The ID of the target [booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking).", "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to delete. This key must match the `key` of a custom\nattribute definition in the Square seller account. If the requesting application is not the\ndefinition owner, you must use the qualified key.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteBookingCustomAttributeResponse" } } } }, "get": { "tags": [ "BookingCustomAttributes" ], "summary": "RetrieveBookingCustomAttribute", "operationId": "RetrieveBookingCustomAttribute", "description": "Retrieves a bookings custom attribute.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_READ" ] } ], "parameters": [ { "name": "booking_id", "description": "The ID of the target [booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking).", "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to retrieve. This key must match the `key` of a custom\nattribute definition in the Square seller account. If the requesting application is not the\ndefinition owner, you must use the qualified key.", "type": "string", "in": "path", "required": true }, { "name": "with_definition", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`.", "type": "boolean", "in": "query", "required": false }, { "name": "version", "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error.", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveBookingCustomAttributeResponse" } } } }, "put": { "tags": [ "BookingCustomAttributes" ], "summary": "UpsertBookingCustomAttribute", "operationId": "UpsertBookingCustomAttribute", "description": "Upserts a bookings custom attribute.\n\nTo call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.\nTo call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.\n\nFor calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus*\nor *Appointments Premium*.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "APPOINTMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "APPOINTMENTS_WRITE" ] } ], "parameters": [ { "name": "booking_id", "description": "The ID of the target [booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking).", "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to create or update. This key must match the `key` of a\ncustom attribute definition in the Square seller account. If the requesting application is not\nthe definition owner, you must use the qualified key.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpsertBookingCustomAttributeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpsertBookingCustomAttributeResponse" } } } } }, "/v2/cards": { "get": { "tags": [ "Cards" ], "summary": "ListCards", "operationId": "ListCards", "description": "Retrieves a list of cards owned by the account making the request.\nA max of 25 cards will be returned.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.", "type": "string", "in": "query", "required": false }, { "name": "customer_id", "description": "Limit results to cards associated with the customer supplied.\nBy default, all cards owned by the merchant are returned.", "type": "string", "in": "query", "required": false }, { "name": "include_disabled", "description": "Includes disabled cards.\nBy default, all enabled cards owned by the merchant are returned.", "type": "boolean", "in": "query", "required": false }, { "name": "reference_id", "description": "Limit results to cards associated with the reference_id supplied.", "type": "string", "in": "query", "required": false }, { "name": "sort_order", "description": "Sorts the returned list by when the card was created with the specified order.\nThis field defaults to ASC.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCardsResponse" } } } }, "post": { "tags": [ "Cards" ], "summary": "CreateCard", "operationId": "CreateCard", "description": "Adds a card on file to an existing merchant.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateCardRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateCardResponse" } } } } }, "/v2/cards/{card_id}": { "get": { "tags": [ "Cards" ], "summary": "RetrieveCard", "operationId": "RetrieveCard", "description": "Retrieves details for a specific Card.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "card_id", "description": "Unique ID for the desired Card.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveCardResponse" } } } } }, "/v2/cards/{card_id}/disable": { "post": { "tags": [ "Cards" ], "summary": "DisableCard", "operationId": "DisableCard", "description": "Disables the card, preventing any further updates or charges.\nDisabling an already disabled card is allowed but has no effect.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "card_id", "description": "Unique ID for the desired Card.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DisableCardResponse" } } } } }, "/v2/cash-drawers/shifts": { "get": { "tags": [ "CashDrawers" ], "summary": "ListCashDrawerShifts", "operationId": "ListCashDrawerShifts", "description": "Provides the details for all of the cash drawer shifts for a location\nin a date range.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CASH_DRAWER_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CASH_DRAWER_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location to query for a list of cash drawer shifts.", "type": "string", "in": "query", "required": true }, { "name": "sort_order", "description": "The order in which cash drawer shifts are listed in the response,\nbased on their opened_at field. Default value: ASC", "type": "string", "in": "query", "required": false }, { "name": "begin_time", "description": "The inclusive start time of the query on opened_at, in ISO 8601 format.", "type": "string", "in": "query", "required": false }, { "name": "end_time", "description": "The exclusive end date of the query on opened_at, in ISO 8601 format.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "Number of cash drawer shift events in a page of results (200 by\ndefault, 1000 max).", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "Opaque cursor for fetching the next page of results.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCashDrawerShiftsResponse" } } } } }, "/v2/cash-drawers/shifts/{shift_id}": { "get": { "tags": [ "CashDrawers" ], "summary": "RetrieveCashDrawerShift", "operationId": "RetrieveCashDrawerShift", "description": "Provides the summary details for a single cash drawer shift. See\n[ListCashDrawerShiftEvents](https://developer.squareup.com/reference/square_2024-04-17/cash-drawers-api/list-cash-drawer-shift-events) for a list of cash drawer shift events.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CASH_DRAWER_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CASH_DRAWER_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location to retrieve cash drawer shifts from.", "type": "string", "in": "query", "required": true }, { "name": "shift_id", "description": "The shift ID.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveCashDrawerShiftResponse" } } } } }, "/v2/cash-drawers/shifts/{shift_id}/events": { "get": { "tags": [ "CashDrawers" ], "summary": "ListCashDrawerShiftEvents", "operationId": "ListCashDrawerShiftEvents", "description": "Provides a paginated list of events for a single cash drawer shift.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CASH_DRAWER_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CASH_DRAWER_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location to list cash drawer shifts for.", "type": "string", "in": "query", "required": true }, { "name": "shift_id", "description": "The shift ID.", "type": "string", "in": "path", "required": true }, { "name": "limit", "description": "Number of resources to be returned in a page of results (200 by\ndefault, 1000 max).", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "Opaque cursor for fetching the next page of results.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCashDrawerShiftEventsResponse" } } } } }, "/v2/catalog/batch-delete": { "post": { "tags": [ "Catalog" ], "summary": "BatchDeleteCatalogObjects", "operationId": "BatchDeleteCatalogObjects", "description": "Deletes a set of [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem)s based on the\nprovided list of target IDs and returns a set of successfully deleted IDs in\nthe response. Deletion is a cascading event such that all children of the\ntargeted object are also deleted. For example, deleting a CatalogItem will\nalso delete all of its [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation)\nchildren.\n\n`BatchDeleteCatalogObjects` succeeds even if only a portion of the targeted\nIDs can be deleted. The response will only include IDs that were\nactually deleted.\n\nTo ensure consistency, only one delete request is processed at a time per seller account. \nWhile one (batch or non-batch) delete request is being processed, other (batched and non-batched) \ndelete requests are rejected with the `429` error code.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchDeleteCatalogObjectsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchDeleteCatalogObjectsResponse" } } } } }, "/v2/catalog/batch-retrieve": { "post": { "tags": [ "Catalog" ], "summary": "BatchRetrieveCatalogObjects", "operationId": "BatchRetrieveCatalogObjects", "description": "Returns a set of objects based on the provided ID.\nEach [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) returned in the set includes all of its\nchild information including: all of its\n[CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) objects, references to\nits [CatalogModifierList](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifierList) objects, and the ids of\nany [CatalogTax](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogTax) objects that apply to it.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchRetrieveCatalogObjectsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchRetrieveCatalogObjectsResponse" } } } } }, "/v2/catalog/batch-upsert": { "post": { "tags": [ "Catalog" ], "summary": "BatchUpsertCatalogObjects", "operationId": "BatchUpsertCatalogObjects", "description": "Creates or updates up to 10,000 target objects based on the provided\nlist of objects. The target objects are grouped into batches and each batch is\ninserted/updated in an all-or-nothing manner. If an object within a batch is\nmalformed in some way, or violates a database constraint, the entire batch\ncontaining that item will be disregarded. However, other batches in the same\nrequest may still succeed. Each batch may contain up to 1,000 objects, and\nbatches will be processed in order as long as the total object count for the\nrequest (items, variations, modifier lists, discounts, and taxes) is no more\nthan 10,000.\n\nTo ensure consistency, only one update request is processed at a time per seller account. \nWhile one (batch or non-batch) update request is being processed, other (batched and non-batched) \nupdate requests are rejected with the `429` error code.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchUpsertCatalogObjectsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchUpsertCatalogObjectsResponse" } } } } }, "/v2/catalog/info": { "get": { "tags": [ "Catalog" ], "summary": "CatalogInfo", "operationId": "CatalogInfo", "description": "Retrieves information about the Square Catalog API, such as batch size\nlimits that can be used by the `BatchUpsertCatalogObjects` endpoint.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_READ" ] } ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CatalogInfoResponse" } } } } }, "/v2/catalog/list": { "get": { "tags": [ "Catalog" ], "summary": "ListCatalog", "operationId": "ListCatalog", "description": "Returns a list of all [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s of the specified types in the catalog. \n\nThe `types` parameter is specified as a comma-separated list of the [CatalogObjectType](https://developer.squareup.com/reference/square_2024-04-17/enums/CatalogObjectType) values, \nfor example, \"`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`, `IMAGE`\".\n\n__Important:__ ListCatalog does not return deleted catalog items. To retrieve\ndeleted catalog items, use [SearchCatalogObjects](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-objects)\nand set the `include_deleted_objects` attribute value to `true`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_READ" ] } ], "parameters": [ { "name": "cursor", "description": "The pagination cursor returned in the previous response. Leave unset for an initial request.\nThe page size is currently set to be 100.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.", "type": "string", "in": "query", "required": false }, { "name": "types", "description": "An optional case-insensitive, comma-separated list of object types to retrieve.\n\nThe valid values are defined in the [CatalogObjectType](https://developer.squareup.com/reference/square_2024-04-17/enums/CatalogObjectType) enum, for example,\n`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,\n`MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.\n\nIf this is unspecified, the operation returns objects of all the top level types at the version\nof the Square API used to make the request. Object types that are nested onto other object types\nare not included in the defaults.\n\nAt the current API version the default object types are:\nITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST, \nPRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,\nSUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS.", "type": "string", "in": "query", "required": false }, { "name": "catalog_version", "description": "The specific version of the catalog objects to be included in the response.\nThis allows you to retrieve historical versions of objects. The specified version value is matched against\nthe [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s\u0027 `version` attribute. If not included, results will be from the\ncurrent version of the catalog.", "x-is-beta": true, "type": "integer", "format": "int64", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCatalogResponse" } } } } }, "/v2/catalog/object": { "post": { "tags": [ "Catalog" ], "summary": "UpsertCatalogObject", "operationId": "UpsertCatalogObject", "description": "Creates a new or updates the specified [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject).\n\nTo ensure consistency, only one update request is processed at a time per seller account. \nWhile one (batch or non-batch) update request is being processed, other (batched and non-batched) \nupdate requests are rejected with the `429` error code.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpsertCatalogObjectRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpsertCatalogObjectResponse" } } } } }, "/v2/catalog/object/{object_id}": { "delete": { "tags": [ "Catalog" ], "summary": "DeleteCatalogObject", "operationId": "DeleteCatalogObject", "description": "Deletes a single [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) based on the\nprovided ID and returns the set of successfully deleted IDs in the response.\nDeletion is a cascading event such that all children of the targeted object\nare also deleted. For example, deleting a [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem)\nwill also delete all of its\n[CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) children.\n\nTo ensure consistency, only one delete request is processed at a time per seller account. \nWhile one (batch or non-batch) delete request is being processed, other (batched and non-batched) \ndelete requests are rejected with the `429` error code.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_WRITE" ] } ], "parameters": [ { "name": "object_id", "description": "The ID of the catalog object to be deleted. When an object is deleted, other\nobjects in the graph that depend on that object will be deleted as well (for example, deleting a\ncatalog item will delete its catalog item variations).", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteCatalogObjectResponse" } } } }, "get": { "tags": [ "Catalog" ], "summary": "RetrieveCatalogObject", "operationId": "RetrieveCatalogObject", "description": "Returns a single [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) as a\n[CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) based on the provided ID. The returned\nobject includes all of the relevant [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem)\ninformation including: [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation)\nchildren, references to its\n[CatalogModifierList](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifierList) objects, and the ids of\nany [CatalogTax](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogTax) objects that apply to it.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_READ" ] } ], "parameters": [ { "name": "object_id", "description": "The object ID of any type of catalog objects to be retrieved.", "type": "string", "in": "path", "required": true }, { "name": "include_related_objects", "description": "If `true`, the response will include additional objects that are related to the\nrequested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field\nof the response. These objects are put in the `related_objects` field. Setting this to `true` is\nhelpful when the objects are needed for immediate display to a user.\nThis process only goes one level deep. Objects referenced by the related objects will not be included. For example,\n\nif the `objects` field of the response contains a CatalogItem, its associated\nCatalogCategory objects, CatalogTax objects, CatalogImage objects and\nCatalogModifierLists will be returned in the `related_objects` field of the\nresponse. If the `objects` field of the response contains a CatalogItemVariation,\nits parent CatalogItem will be returned in the `related_objects` field of\nthe response.\n\nDefault value: `false`", "type": "boolean", "in": "query", "required": false }, { "name": "catalog_version", "description": "Requests objects as of a specific version of the catalog. This allows you to retrieve historical\nversions of objects. The value to retrieve a specific version of an object can be found\nin the version field of [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s. If not included, results will\nbe from the current version of the catalog.", "x-is-beta": true, "type": "integer", "format": "int64", "in": "query", "required": false }, { "name": "include_category_path_to_root", "description": "Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists\nof `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category\nand ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned\nin the response payload.", "x-is-beta": true, "type": "boolean", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveCatalogObjectResponse" } } } } }, "/v2/catalog/search": { "post": { "tags": [ "Catalog" ], "summary": "SearchCatalogObjects", "operationId": "SearchCatalogObjects", "description": "Searches for [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) of any type by matching supported search attribute values,\nexcluding custom attribute values on items or item variations, against one or more of the specified query filters.\n\nThis (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-items)\nendpoint in the following aspects:\n\n- `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects.\n- `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not.\n- `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does.\n- The both endpoints have different call conventions, including the query filter formats.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchCatalogObjectsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchCatalogObjectsResponse" } } } } }, "/v2/catalog/search-catalog-items": { "post": { "tags": [ "Catalog" ], "summary": "SearchCatalogItems", "operationId": "SearchCatalogItems", "description": "Searches for catalog items or item variations by matching supported search attribute values, including\ncustom attribute values, against one or more of the specified query filters.\n\nThis (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-objects)\nendpoint in the following aspects:\n\n- `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects.\n- `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not.\n- `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does.\n- The both endpoints use different call conventions, including the query filter formats.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchCatalogItemsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchCatalogItemsResponse" } } } } }, "/v2/catalog/update-item-modifier-lists": { "post": { "tags": [ "Catalog" ], "summary": "UpdateItemModifierLists", "operationId": "UpdateItemModifierLists", "description": "Updates the [CatalogModifierList](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifierList) objects\nthat apply to the targeted [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) without having\nto perform an upsert on the entire item.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateItemModifierListsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateItemModifierListsResponse" } } } } }, "/v2/catalog/update-item-taxes": { "post": { "tags": [ "Catalog" ], "summary": "UpdateItemTaxes", "operationId": "UpdateItemTaxes", "description": "Updates the [CatalogTax](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogTax) objects that apply to the\ntargeted [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) without having to perform an\nupsert on the entire item.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ITEMS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ITEMS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateItemTaxesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateItemTaxesResponse" } } } } }, "/v2/customers": { "get": { "tags": [ "Customers" ], "summary": "ListCustomers", "operationId": "ListCustomers", "description": "Lists customer profiles associated with a Square account.\n\nUnder normal operating conditions, newly created or updated customer profiles become available\nfor the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated\nprofiles can take closer to one minute or longer, especially during network incidents and outages.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the specified limit is less than 1 or greater than 100, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "integer", "in": "query", "required": false }, { "name": "sort_field", "description": "Indicates how customers should be sorted.\n\nThe default value is `DEFAULT`.", "type": "string", "in": "query", "required": false }, { "name": "sort_order", "description": "Indicates whether customers should be sorted in ascending (`ASC`) or\ndescending (`DESC`) order.\n\nThe default value is `ASC`.", "type": "string", "in": "query", "required": false }, { "name": "count", "description": "Indicates whether to return the total count of customers in the `count` field of the response.\n\nThe default value is `false`.", "type": "boolean", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCustomersResponse" } } } }, "post": { "tags": [ "Customers" ], "summary": "CreateCustomer", "operationId": "CreateCustomer", "description": "Creates a new customer for a business.\n\nYou must provide at least one of the following values in your request to this\nendpoint:\n\n- `given_name`\n- `family_name`\n- `company_name`\n- `email_address`\n- `phone_number`", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateCustomerRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateCustomerResponse" } } } } }, "/v2/customers/bulk-create": { "post": { "tags": [ "Customers" ], "summary": "BulkCreateCustomers", "operationId": "BulkCreateCustomers", "description": "Creates multiple [customer profiles](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) for a business.\n\nThis endpoint takes a map of individual create requests and returns a map of responses.\n\nYou must provide at least one of the following values in each create request:\n\n- `given_name`\n- `family_name`\n- `company_name`\n- `email_address`\n- `phone_number`", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkCreateCustomersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkCreateCustomersResponse" } } } } }, "/v2/customers/bulk-delete": { "post": { "tags": [ "Customers" ], "summary": "BulkDeleteCustomers", "operationId": "BulkDeleteCustomers", "description": "Deletes multiple customer profiles.\n\nThe endpoint takes a list of customer IDs and returns a map of responses.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkDeleteCustomersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkDeleteCustomersResponse" } } } } }, "/v2/customers/bulk-retrieve": { "post": { "tags": [ "Customers" ], "summary": "BulkRetrieveCustomers", "operationId": "BulkRetrieveCustomers", "description": "Retrieves multiple customer profiles.\n\nThis endpoint takes a list of customer IDs and returns a map of responses.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkRetrieveCustomersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkRetrieveCustomersResponse" } } } } }, "/v2/customers/bulk-update": { "post": { "tags": [ "Customers" ], "summary": "BulkUpdateCustomers", "operationId": "BulkUpdateCustomers", "description": "Updates multiple customer profiles.\n\nThis endpoint takes a map of individual update requests and returns a map of responses.\n\nYou cannot use this endpoint to change cards on file. To make changes, use the [Cards API](https://developer.squareup.com/reference/square_2024-04-17/cards-api) or [Gift Cards API](https://developer.squareup.com/reference/square_2024-04-17/gift-cards-api).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkUpdateCustomersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkUpdateCustomersResponse" } } } } }, "/v2/customers/custom-attribute-definitions": { "get": { "tags": [ "CustomerCustomAttributes" ], "summary": "ListCustomerCustomAttributeDefinitions", "operationId": "ListCustomerCustomAttributeDefinitions", "description": "Lists the customer-related [custom attribute definitions](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) that belong to a Square seller account.\n\nWhen all response pages are retrieved, the results include all custom attribute definitions\nthat are visible to the requesting application, including those that are created by other\napplications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that\nseller-defined custom attributes (also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCustomerCustomAttributeDefinitionsResponse" } } } }, "post": { "tags": [ "CustomerCustomAttributes" ], "summary": "CreateCustomerCustomAttributeDefinition", "operationId": "CreateCustomerCustomAttributeDefinition", "description": "Creates a customer-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) for a Square seller account.\nUse this endpoint to define a custom attribute that can be associated with customer profiles.\n\nA custom attribute definition specifies the `key`, `visibility`, `schema`, and other properties\nfor a custom attribute. After the definition is created, you can call\n[UpsertCustomerCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/upsert-customer-custom-attribute) or\n[BulkUpsertCustomerCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/bulk-upsert-customer-custom-attributes)\nto set the custom attribute for customer profiles in the seller\u0027s Customer Directory.\n\nSellers can view all custom attributes in exported customer data, including those set to\n`VISIBILITY_HIDDEN`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateCustomerCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateCustomerCustomAttributeDefinitionResponse" } } } } }, "/v2/customers/custom-attribute-definitions/{key}": { "delete": { "tags": [ "CustomerCustomAttributes" ], "summary": "DeleteCustomerCustomAttributeDefinition", "operationId": "DeleteCustomerCustomAttributeDefinition", "description": "Deletes a customer-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) from a Square seller account.\n\nDeleting a custom attribute definition also deletes the corresponding custom attribute from\nall customer profiles in the seller\u0027s Customer Directory.\n\nOnly the definition owner can delete a custom attribute definition.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to delete.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteCustomerCustomAttributeDefinitionResponse" } } } }, "get": { "tags": [ "CustomerCustomAttributes" ], "summary": "RetrieveCustomerCustomAttributeDefinition", "operationId": "RetrieveCustomerCustomAttributeDefinition", "description": "Retrieves a customer-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) from a Square seller account.\n\nTo retrieve a custom attribute definition created by another application, the `visibility`\nsetting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to retrieve. If the requesting application\nis not the definition owner, you must use the qualified key.", "type": "string", "in": "path", "required": true }, { "name": "version", "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error.", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveCustomerCustomAttributeDefinitionResponse" } } } }, "put": { "tags": [ "CustomerCustomAttributes" ], "summary": "UpdateCustomerCustomAttributeDefinition", "operationId": "UpdateCustomerCustomAttributeDefinition", "description": "Updates a customer-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) for a Square seller account.\n\nUse this endpoint to update the following fields: `name`, `description`, `visibility`, or the\n`schema` for a `Selection` data type.\n\nOnly the definition owner can update a custom attribute definition. Note that sellers can view\nall custom attributes in exported customer data, including those set to `VISIBILITY_HIDDEN`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateCustomerCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateCustomerCustomAttributeDefinitionResponse" } } } } }, "/v2/customers/custom-attributes/bulk-upsert": { "post": { "tags": [ "CustomerCustomAttributes" ], "summary": "BulkUpsertCustomerCustomAttributes", "operationId": "BulkUpsertCustomerCustomAttributes", "description": "Creates or updates [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for customer profiles as a bulk operation.\n\nUse this endpoint to set the value of one or more custom attributes for one or more customer profiles.\nA custom attribute is based on a custom attribute definition in a Square seller account, which is\ncreated using the [CreateCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/create-customer-custom-attribute-definition) endpoint.\n\nThis `BulkUpsertCustomerCustomAttributes` endpoint accepts a map of 1 to 25 individual upsert\nrequests and returns a map of individual upsert responses. Each upsert request has a unique ID\nand provides a customer ID and custom attribute. Each upsert response is returned with the ID\nof the corresponding request.\n\nTo create or update a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkUpsertCustomerCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkUpsertCustomerCustomAttributesResponse" } } } } }, "/v2/customers/groups": { "get": { "tags": [ "CustomerGroups" ], "summary": "ListCustomerGroups", "operationId": "ListCustomerGroups", "description": "Retrieves the list of customer groups of a business.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the limit is less than 1 or greater than 50, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCustomerGroupsResponse" } } } }, "post": { "tags": [ "CustomerGroups" ], "summary": "CreateCustomerGroup", "operationId": "CreateCustomerGroup", "description": "Creates a new customer group for a business.\n\nThe request must include the `name` value of the group.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateCustomerGroupRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateCustomerGroupResponse" } } } } }, "/v2/customers/groups/{group_id}": { "delete": { "tags": [ "CustomerGroups" ], "summary": "DeleteCustomerGroup", "operationId": "DeleteCustomerGroup", "description": "Deletes a customer group as identified by the `group_id` value.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "group_id", "description": "The ID of the customer group to delete.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteCustomerGroupResponse" } } } }, "get": { "tags": [ "CustomerGroups" ], "summary": "RetrieveCustomerGroup", "operationId": "RetrieveCustomerGroup", "description": "Retrieves a specific customer group as identified by the `group_id` value.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "group_id", "description": "The ID of the customer group to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveCustomerGroupResponse" } } } }, "put": { "tags": [ "CustomerGroups" ], "summary": "UpdateCustomerGroup", "operationId": "UpdateCustomerGroup", "description": "Updates a customer group as identified by the `group_id` value.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "group_id", "description": "The ID of the customer group to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateCustomerGroupRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateCustomerGroupResponse" } } } } }, "/v2/customers/search": { "post": { "tags": [ "Customers" ], "summary": "SearchCustomers", "operationId": "SearchCustomers", "description": "Searches the customer profiles associated with a Square account using one or more supported query filters.\n\nCalling `SearchCustomers` without any explicit query filter returns all\ncustomer profiles ordered alphabetically based on `given_name` and\n`family_name`.\n\nUnder normal operating conditions, newly created or updated customer profiles become available\nfor the search operation in well under 30 seconds. Occasionally, propagation of the new or updated\nprofiles can take closer to one minute or longer, especially during network incidents and outages.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchCustomersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchCustomersResponse" } } } } }, "/v2/customers/segments": { "get": { "tags": [ "CustomerSegments" ], "summary": "ListCustomerSegments", "operationId": "ListCustomerSegments", "description": "Retrieves the list of customer segments of a business.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by previous calls to `ListCustomerSegments`.\nThis cursor is used to retrieve the next set of query results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the specified limit is less than 1 or greater than 50, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCustomerSegmentsResponse" } } } } }, "/v2/customers/segments/{segment_id}": { "get": { "tags": [ "CustomerSegments" ], "summary": "RetrieveCustomerSegment", "operationId": "RetrieveCustomerSegment", "description": "Retrieves a specific customer segment as identified by the `segment_id` value.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "segment_id", "description": "The Square-issued ID of the customer segment.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveCustomerSegmentResponse" } } } } }, "/v2/customers/{customer_id}": { "delete": { "tags": [ "Customers" ], "summary": "DeleteCustomer", "operationId": "DeleteCustomer", "description": "Deletes a customer profile from a business. This operation also unlinks any associated cards on file.\n\nTo delete a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the customer to delete.", "type": "string", "in": "path", "required": true }, { "name": "version", "description": "The current version of the customer profile.\n\nAs a best practice, you should include this parameter to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control. For more information, see [Delete a customer profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#delete-customer-profile).", "type": "integer", "format": "int64", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteCustomerResponse" } } } }, "get": { "tags": [ "Customers" ], "summary": "RetrieveCustomer", "operationId": "RetrieveCustomer", "description": "Returns details for a single customer.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the customer to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveCustomerResponse" } } } }, "put": { "tags": [ "Customers" ], "summary": "UpdateCustomer", "operationId": "UpdateCustomer", "description": "Updates a customer profile. This endpoint supports sparse updates, so only new or changed fields are required in the request.\nTo add or update a field, specify the new value. To remove a field, specify `null`.\n\nTo update a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.\n\nYou cannot use this endpoint to change cards on file. To make changes, use the [Cards API](https://developer.squareup.com/reference/square_2024-04-17/cards-api) or [Gift Cards API](https://developer.squareup.com/reference/square_2024-04-17/gift-cards-api).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the customer to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateCustomerRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateCustomerResponse" } } } } }, "/v2/customers/{customer_id}/cards": { "post": { "tags": [ "Customers" ], "summary": "CreateCustomerCard", "operationId": "CreateCustomerCard", "description": "Adds a card on file to an existing customer.\n\nAs with charges, calls to `CreateCustomerCard` are idempotent. Multiple\ncalls with the same card nonce return the same card record that was created\nwith the provided nonce during the _first_ call.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "customer_id", "description": "The Square ID of the customer profile the card is linked to.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateCustomerCardRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateCustomerCardResponse" } } } } }, "/v2/customers/{customer_id}/cards/{card_id}": { "delete": { "tags": [ "Customers" ], "summary": "DeleteCustomerCard", "operationId": "DeleteCustomerCard", "description": "Removes a card on file from a customer.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the customer that the card on file belongs to.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "card_id", "description": "The ID of the card on file to delete.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteCustomerCardResponse" } } } } }, "/v2/customers/{customer_id}/custom-attributes": { "get": { "tags": [ "CustomerCustomAttributes" ], "summary": "ListCustomerCustomAttributes", "operationId": "ListCustomerCustomAttributes", "description": "Lists the [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a customer profile.\n\nYou can use the `with_definitions` query parameter to also retrieve custom attribute definitions\nin the same call.\n\nWhen all response pages are retrieved, the results include all custom attributes that are\nvisible to the requesting application, including those that are owned by other applications\nand set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the target [customer profile](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer).", "type": "string", "in": "path", "required": true }, { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "with_definitions", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`.", "type": "boolean", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListCustomerCustomAttributesResponse" } } } } }, "/v2/customers/{customer_id}/custom-attributes/{key}": { "delete": { "tags": [ "CustomerCustomAttributes" ], "summary": "DeleteCustomerCustomAttribute", "operationId": "DeleteCustomerCustomAttribute", "description": "Deletes a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a customer profile.\n\nTo delete a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the target [customer profile](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer).", "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to delete. This key must match the `key` of a custom\nattribute definition in the Square seller account. If the requesting application is not the\ndefinition owner, you must use the qualified key.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteCustomerCustomAttributeResponse" } } } }, "get": { "tags": [ "CustomerCustomAttributes" ], "summary": "RetrieveCustomerCustomAttribute", "operationId": "RetrieveCustomerCustomAttribute", "description": "Retrieves a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a customer profile.\n\nYou can use the `with_definition` query parameter to also retrieve the custom attribute definition\nin the same call.\n\nTo retrieve a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the target [customer profile](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer).", "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to retrieve. This key must match the `key` of a custom\nattribute definition in the Square seller account. If the requesting application is not the\ndefinition owner, you must use the qualified key.", "type": "string", "in": "path", "required": true }, { "name": "with_definition", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`.", "type": "boolean", "in": "query", "required": false }, { "name": "version", "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error.", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveCustomerCustomAttributeResponse" } } } }, "post": { "tags": [ "CustomerCustomAttributes" ], "summary": "UpsertCustomerCustomAttribute", "operationId": "UpsertCustomerCustomAttribute", "description": "Creates or updates a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for a customer profile.\n\nUse this endpoint to set the value of a custom attribute for a specified customer profile.\nA custom attribute is based on a custom attribute definition in a Square seller account, which\nis created using the [CreateCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/create-customer-custom-attribute-definition) endpoint.\n\nTo create or update a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the target [customer profile](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer).", "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to create or update. This key must match the `key` of a\ncustom attribute definition in the Square seller account. If the requesting application is not\nthe definition owner, you must use the qualified key.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpsertCustomerCustomAttributeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpsertCustomerCustomAttributeResponse" } } } } }, "/v2/customers/{customer_id}/groups/{group_id}": { "delete": { "tags": [ "Customers" ], "summary": "RemoveGroupFromCustomer", "operationId": "RemoveGroupFromCustomer", "description": "Removes a group membership from a customer.\n\nThe customer is identified by the `customer_id` value\nand the customer group is identified by the `group_id` value.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the customer to remove from the group.", "type": "string", "in": "path", "required": true }, { "name": "group_id", "description": "The ID of the customer group to remove the customer from.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RemoveGroupFromCustomerResponse" } } } }, "put": { "tags": [ "Customers" ], "summary": "AddGroupToCustomer", "operationId": "AddGroupToCustomer", "description": "Adds a group membership to a customer.\n\nThe customer is identified by the `customer_id` value\nand the customer group is identified by the `group_id` value.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_WRITE" ] } ], "parameters": [ { "name": "customer_id", "description": "The ID of the customer to add to a group.", "type": "string", "in": "path", "required": true }, { "name": "group_id", "description": "The ID of the customer group to add the customer to.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/AddGroupToCustomerResponse" } } } } }, "/v2/devices": { "get": { "tags": [ "Devices" ], "summary": "ListDevices", "operationId": "ListDevices", "description": "List devices associated with the merchant. Currently, only Terminal API\ndevices are supported.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "DEVICES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DEVICES_READ" ] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "sort_order", "description": "The order in which results are listed.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default).", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The number of results to return in a single page.", "x-is-beta": true, "type": "integer", "in": "query", "required": false }, { "name": "location_id", "description": "If present, only returns devices at the target location.", "x-is-beta": true, "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListDevicesResponse" } } } } }, "/v2/devices/codes": { "get": { "tags": [ "Devices" ], "summary": "ListDeviceCodes", "operationId": "ListDeviceCodes", "description": "Lists all DeviceCodes associated with the merchant.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DEVICE_CREDENTIAL_MANAGEMENT" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DEVICE_CREDENTIAL_MANAGEMENT" ] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.", "type": "string", "in": "query", "required": false }, { "name": "location_id", "description": "If specified, only returns DeviceCodes of the specified location.\nReturns DeviceCodes of all locations if empty.", "type": "string", "in": "query", "required": false }, { "name": "product_type", "description": "If specified, only returns DeviceCodes targeting the specified product type.\nReturns DeviceCodes of all product types if empty.", "type": "string", "in": "query", "required": false }, { "name": "status", "description": "If specified, returns DeviceCodes with the specified statuses.\nReturns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListDeviceCodesResponse" } } } }, "post": { "tags": [ "Devices" ], "summary": "CreateDeviceCode", "operationId": "CreateDeviceCode", "description": "Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected\nterminal mode.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DEVICE_CREDENTIAL_MANAGEMENT" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DEVICE_CREDENTIAL_MANAGEMENT" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateDeviceCodeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateDeviceCodeResponse" } } } } }, "/v2/devices/codes/{id}": { "get": { "tags": [ "Devices" ], "summary": "GetDeviceCode", "operationId": "GetDeviceCode", "description": "Retrieves DeviceCode with the associated ID.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DEVICE_CREDENTIAL_MANAGEMENT" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DEVICE_CREDENTIAL_MANAGEMENT" ] } ], "parameters": [ { "name": "id", "description": "The unique identifier for the device code.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetDeviceCodeResponse" } } } } }, "/v2/devices/{device_id}": { "get": { "tags": [ "Devices" ], "summary": "GetDevice", "operationId": "GetDevice", "description": "Retrieves Device with the associated `device_id`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "DEVICES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DEVICES_READ" ] } ], "parameters": [ { "name": "device_id", "description": "The unique ID for the desired `Device`.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetDeviceResponse" } } } } }, "/v2/disputes": { "get": { "tags": [ "Disputes" ], "summary": "ListDisputes", "operationId": "ListDisputes", "description": "Returns a list of disputes associated with a particular account.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DISPUTES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DISPUTES_READ" ] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "states", "description": "The dispute states used to filter the result. If not specified, the endpoint returns all disputes.", "type": "string", "in": "query", "required": false }, { "name": "location_id", "description": "The ID of the location for which to return a list of disputes.\nIf not specified, the endpoint returns disputes associated with all locations.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListDisputesResponse" } } } } }, "/v2/disputes/{dispute_id}": { "get": { "tags": [ "Disputes" ], "summary": "RetrieveDispute", "operationId": "RetrieveDispute", "description": "Returns details about a specific dispute.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DISPUTES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DISPUTES_READ" ] } ], "parameters": [ { "name": "dispute_id", "description": "The ID of the dispute you want more details about.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveDisputeResponse" } } } } }, "/v2/disputes/{dispute_id}/accept": { "post": { "tags": [ "Disputes" ], "summary": "AcceptDispute", "operationId": "AcceptDispute", "description": "Accepts the loss on a dispute. Square returns the disputed amount to the cardholder and\nupdates the dispute state to ACCEPTED.\n\nSquare debits the disputed amount from the seller’s Square account. If the Square account\ndoes not have sufficient funds, Square debits the associated bank account.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DISPUTES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DISPUTES_WRITE" ] } ], "parameters": [ { "name": "dispute_id", "description": "The ID of the dispute you want to accept.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/AcceptDisputeResponse" } } } } }, "/v2/disputes/{dispute_id}/evidence": { "get": { "tags": [ "Disputes" ], "summary": "ListDisputeEvidence", "operationId": "ListDisputeEvidence", "description": "Returns a list of evidence associated with a dispute.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DISPUTES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DISPUTES_READ" ] } ], "parameters": [ { "name": "dispute_id", "description": "The ID of the dispute.", "type": "string", "in": "path", "required": true }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListDisputeEvidenceResponse" } } } } }, "/v2/disputes/{dispute_id}/evidence-text": { "post": { "tags": [ "Disputes" ], "summary": "CreateDisputeEvidenceText", "operationId": "CreateDisputeEvidenceText", "description": "Uploads text to use as evidence for a dispute challenge.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DISPUTES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DISPUTES_WRITE" ] } ], "parameters": [ { "name": "dispute_id", "description": "The ID of the dispute for which you want to upload evidence.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateDisputeEvidenceTextRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateDisputeEvidenceTextResponse" } } } } }, "/v2/disputes/{dispute_id}/evidence/{evidence_id}": { "delete": { "tags": [ "Disputes" ], "summary": "DeleteDisputeEvidence", "operationId": "DeleteDisputeEvidence", "description": "Removes specified evidence from a dispute.\nSquare does not send the bank any evidence that is removed.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DISPUTES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DISPUTES_WRITE" ] } ], "parameters": [ { "name": "dispute_id", "description": "The ID of the dispute from which you want to remove evidence.", "type": "string", "in": "path", "required": true }, { "name": "evidence_id", "description": "The ID of the evidence you want to remove.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteDisputeEvidenceResponse" } } } }, "get": { "tags": [ "Disputes" ], "summary": "RetrieveDisputeEvidence", "operationId": "RetrieveDisputeEvidence", "description": "Returns the metadata for the evidence specified in the request URL path.\n\nYou must maintain a copy of any evidence uploaded if you want to reference it later. Evidence cannot be downloaded after you upload it.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DISPUTES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DISPUTES_READ" ] } ], "parameters": [ { "name": "dispute_id", "description": "The ID of the dispute from which you want to retrieve evidence metadata.", "type": "string", "in": "path", "required": true }, { "name": "evidence_id", "description": "The ID of the evidence to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveDisputeEvidenceResponse" } } } } }, "/v2/disputes/{dispute_id}/submit-evidence": { "post": { "tags": [ "Disputes" ], "summary": "SubmitEvidence", "operationId": "SubmitEvidence", "description": "Submits evidence to the cardholder\u0027s bank.\n\nThe evidence submitted by this endpoint includes evidence uploaded\nusing the [CreateDisputeEvidenceFile](https://developer.squareup.com/reference/square_2024-04-17/disputes-api/create-dispute-evidence-file) and\n[CreateDisputeEvidenceText](https://developer.squareup.com/reference/square_2024-04-17/disputes-api/create-dispute-evidence-text) endpoints and\nevidence automatically provided by Square, when available. Evidence cannot be removed from\na dispute after submission.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "DISPUTES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "DISPUTES_WRITE" ] } ], "parameters": [ { "name": "dispute_id", "description": "The ID of the dispute for which you want to submit evidence.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SubmitEvidenceResponse" } } } } }, "/v2/employees": { "get": { "tags": [ "Employees" ], "summary": "ListEmployees", "operationId": "ListEmployees", "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "location_id", "description": "", "x-is-deprecated": true, "type": "string", "in": "query", "required": false }, { "name": "status", "description": "Specifies the EmployeeStatus to filter the employee by.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The number of employees to be returned on each page.", "x-is-deprecated": true, "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The token required to retrieve the specified page of results.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListEmployeesResponse" } } } } }, "/v2/employees/{id}": { "get": { "tags": [ "Employees" ], "summary": "RetrieveEmployee", "operationId": "RetrieveEmployee", "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "id", "description": "UUID for the employee that was requested.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveEmployeeResponse" } } } } }, "/v2/gift-cards": { "get": { "tags": [ "GiftCards" ], "summary": "ListGiftCards", "operationId": "ListGiftCards", "description": "Lists all gift cards. You can specify optional filters to retrieve \na subset of the gift cards. Results are sorted by `created_at` in ascending order.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_READ" ] } ], "parameters": [ { "name": "type", "description": "If a [type](https://developer.squareup.com/reference/square_2024-04-17/enums/GiftCardType) is provided, the endpoint returns gift cards of the specified type.\nOtherwise, the endpoint returns gift cards of all types.", "type": "string", "in": "query", "required": false }, { "name": "state", "description": "If a [state](https://developer.squareup.com/reference/square_2024-04-17/enums/GiftCardStatus) is provided, the endpoint returns the gift cards in the specified state.\nOtherwise, the endpoint returns the gift cards of all states.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "If a limit is provided, the endpoint returns only the specified number of results per page.\nThe maximum value is 200. The default value is 30.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", "type": "string", "in": "query", "required": false }, { "name": "customer_id", "description": "If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListGiftCardsResponse" } } } }, "post": { "tags": [ "GiftCards" ], "summary": "CreateGiftCard", "operationId": "CreateGiftCard", "description": "Creates a digital gift card or registers a physical (plastic) gift card. After the gift card \nis created, you must call [CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) \nto activate the card with an initial balance before it can be used for payment.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateGiftCardRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateGiftCardResponse" } } } } }, "/v2/gift-cards/activities": { "get": { "tags": [ "GiftCardActivities" ], "summary": "ListGiftCardActivities", "operationId": "ListGiftCardActivities", "description": "Lists gift card activities. By default, you get gift card activities for all\ngift cards in the seller\u0027s account. You can optionally specify query parameters to\nfilter the list. For example, you can get a list of gift card activities for a gift card,\nfor all gift cards in a specific region, or for activities within a time window.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_READ" ] } ], "parameters": [ { "name": "gift_card_id", "description": "If a gift card ID is provided, the endpoint returns activities related \nto the specified gift card. Otherwise, the endpoint returns all gift card activities for \nthe seller.", "type": "string", "in": "query", "required": false }, { "name": "type", "description": "If a [type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType) is provided, the endpoint returns gift card activities of the specified type. \nOtherwise, the endpoint returns all types of gift card activities.", "type": "string", "in": "query", "required": false }, { "name": "location_id", "description": "If a location ID is provided, the endpoint returns gift card activities for the specified location. \nOtherwise, the endpoint returns gift card activities for all locations.", "type": "string", "in": "query", "required": false }, { "name": "begin_time", "description": "The timestamp for the beginning of the reporting period, in RFC 3339 format.\nThis start time is inclusive. The default value is the current time minus one year.", "type": "string", "in": "query", "required": false }, { "name": "end_time", "description": "The timestamp for the end of the reporting period, in RFC 3339 format.\nThis end time is inclusive. The default value is the current time.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "If a limit is provided, the endpoint returns the specified number \nof results (or fewer) per page. The maximum value is 100. The default value is 50.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", "type": "string", "in": "query", "required": false }, { "name": "sort_order", "description": "The order in which the endpoint returns the activities, based on `created_at`.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default).", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListGiftCardActivitiesResponse" } } } }, "post": { "tags": [ "GiftCardActivities" ], "summary": "CreateGiftCardActivity", "operationId": "CreateGiftCardActivity", "description": "Creates a gift card activity to manage the balance or state of a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard). \nFor example, you create an `ACTIVATE` activity to activate a gift card with an initial balance \nbefore the gift card can be used.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateGiftCardActivityRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateGiftCardActivityResponse" } } } } }, "/v2/gift-cards/from-gan": { "post": { "tags": [ "GiftCards" ], "summary": "RetrieveGiftCardFromGAN", "operationId": "RetrieveGiftCardFromGAN", "description": "Retrieves a gift card using the gift card account number (GAN).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/RetrieveGiftCardFromGANRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveGiftCardFromGANResponse" } } } } }, "/v2/gift-cards/from-nonce": { "post": { "tags": [ "GiftCards" ], "summary": "RetrieveGiftCardFromNonce", "operationId": "RetrieveGiftCardFromNonce", "description": "Retrieves a gift card using a secure payment token that represents the gift card.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/RetrieveGiftCardFromNonceRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveGiftCardFromNonceResponse" } } } } }, "/v2/gift-cards/{gift_card_id}/link-customer": { "post": { "tags": [ "GiftCards" ], "summary": "LinkCustomerToGiftCard", "operationId": "LinkCustomerToGiftCard", "description": "Links a customer to a gift card, which is also referred to as adding a card on file.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_WRITE" ] } ], "parameters": [ { "name": "gift_card_id", "description": "The ID of the gift card to be linked.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/LinkCustomerToGiftCardRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/LinkCustomerToGiftCardResponse" } } } } }, "/v2/gift-cards/{gift_card_id}/unlink-customer": { "post": { "tags": [ "GiftCards" ], "summary": "UnlinkCustomerFromGiftCard", "operationId": "UnlinkCustomerFromGiftCard", "description": "Unlinks a customer from a gift card, which is also referred to as removing a card on file.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_WRITE" ] } ], "parameters": [ { "name": "gift_card_id", "description": "The ID of the gift card to be unlinked.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UnlinkCustomerFromGiftCardRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UnlinkCustomerFromGiftCardResponse" } } } } }, "/v2/gift-cards/{id}": { "get": { "tags": [ "GiftCards" ], "summary": "RetrieveGiftCard", "operationId": "RetrieveGiftCard", "description": "Retrieves a gift card using the gift card ID.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "GIFTCARDS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "GIFTCARDS_READ" ] } ], "parameters": [ { "name": "id", "description": "The ID of the gift card to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveGiftCardResponse" } } } } }, "/v2/inventory/adjustment/{adjustment_id}": { "get": { "tags": [ "Inventory" ], "summary": "DeprecatedRetrieveInventoryAdjustment", "operationId": "DeprecatedRetrieveInventoryAdjustment", "description": "Deprecated version of [RetrieveInventoryAdjustment](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/retrieve-inventory-adjustment) after the endpoint URL\nis updated to conform to the standard convention.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "adjustment_id", "description": "ID of the [InventoryAdjustment](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryAdjustment) to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveInventoryAdjustmentResponse" } } } } }, "/v2/inventory/adjustments/{adjustment_id}": { "get": { "tags": [ "Inventory" ], "summary": "RetrieveInventoryAdjustment", "operationId": "RetrieveInventoryAdjustment", "description": "Returns the [InventoryAdjustment](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryAdjustment) object\nwith the provided `adjustment_id`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "adjustment_id", "description": "ID of the [InventoryAdjustment](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryAdjustment) to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveInventoryAdjustmentResponse" } } } } }, "/v2/inventory/batch-change": { "post": { "tags": [ "Inventory" ], "summary": "DeprecatedBatchChangeInventory", "operationId": "DeprecatedBatchChangeInventory", "description": "Deprecated version of [BatchChangeInventory](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/batch-change-inventory) after the endpoint URL\nis updated to conform to the standard convention.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "INVENTORY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchChangeInventoryRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchChangeInventoryResponse" } } } } }, "/v2/inventory/batch-retrieve-changes": { "post": { "tags": [ "Inventory" ], "summary": "DeprecatedBatchRetrieveInventoryChanges", "operationId": "DeprecatedBatchRetrieveInventoryChanges", "description": "Deprecated version of [BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/batch-retrieve-inventory-changes) after the endpoint URL\nis updated to conform to the standard convention.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchRetrieveInventoryChangesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchRetrieveInventoryChangesResponse" } } } } }, "/v2/inventory/batch-retrieve-counts": { "post": { "tags": [ "Inventory" ], "summary": "DeprecatedBatchRetrieveInventoryCounts", "operationId": "DeprecatedBatchRetrieveInventoryCounts", "description": "Deprecated version of [BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/batch-retrieve-inventory-counts) after the endpoint URL\nis updated to conform to the standard convention.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchRetrieveInventoryCountsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchRetrieveInventoryCountsResponse" } } } } }, "/v2/inventory/changes/batch-create": { "post": { "tags": [ "Inventory" ], "summary": "BatchChangeInventory", "operationId": "BatchChangeInventory", "description": "Applies adjustments and counts to the provided item quantities.\n\nOn success: returns the current calculated counts for all objects\nreferenced in the request.\nOn failure: returns a list of related errors.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVENTORY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchChangeInventoryRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchChangeInventoryResponse" } } } } }, "/v2/inventory/changes/batch-retrieve": { "post": { "tags": [ "Inventory" ], "summary": "BatchRetrieveInventoryChanges", "operationId": "BatchRetrieveInventoryChanges", "description": "Returns historical physical counts and adjustments based on the\nprovided filter criteria.\n\nResults are paginated and sorted in ascending order according their\n`occurred_at` timestamp (oldest first).\n\nBatchRetrieveInventoryChanges is a catch-all query endpoint for queries\nthat cannot be handled by other, simpler endpoints.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchRetrieveInventoryChangesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchRetrieveInventoryChangesResponse" } } } } }, "/v2/inventory/counts/batch-retrieve": { "post": { "tags": [ "Inventory" ], "summary": "BatchRetrieveInventoryCounts", "operationId": "BatchRetrieveInventoryCounts", "description": "Returns current counts for the provided\n[CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s at the requested\n[Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location)s.\n\nResults are paginated and sorted in descending order according to their\n`calculated_at` timestamp (newest first).\n\nWhen `updated_after` is specified, only counts that have changed since that\ntime (based on the server timestamp for the most recent change) are\nreturned. This allows clients to perform a \"sync\" operation, for example\nin response to receiving a Webhook notification.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchRetrieveInventoryCountsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchRetrieveInventoryCountsResponse" } } } } }, "/v2/inventory/physical-count/{physical_count_id}": { "get": { "tags": [ "Inventory" ], "summary": "DeprecatedRetrieveInventoryPhysicalCount", "operationId": "DeprecatedRetrieveInventoryPhysicalCount", "description": "Deprecated version of [RetrieveInventoryPhysicalCount](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/retrieve-inventory-physical-count) after the endpoint URL\nis updated to conform to the standard convention.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "physical_count_id", "description": "ID of the\n[InventoryPhysicalCount](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryPhysicalCount) to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveInventoryPhysicalCountResponse" } } } } }, "/v2/inventory/physical-counts/{physical_count_id}": { "get": { "tags": [ "Inventory" ], "summary": "RetrieveInventoryPhysicalCount", "operationId": "RetrieveInventoryPhysicalCount", "description": "Returns the [InventoryPhysicalCount](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryPhysicalCount)\nobject with the provided `physical_count_id`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "physical_count_id", "description": "ID of the\n[InventoryPhysicalCount](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryPhysicalCount) to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveInventoryPhysicalCountResponse" } } } } }, "/v2/inventory/transfers/{transfer_id}": { "get": { "tags": [ "Inventory" ], "summary": "RetrieveInventoryTransfer", "operationId": "RetrieveInventoryTransfer", "description": "Returns the [InventoryTransfer](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryTransfer) object\nwith the provided `transfer_id`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "transfer_id", "description": "ID of the [InventoryTransfer](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryTransfer) to retrieve.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveInventoryTransferResponse" } } } } }, "/v2/inventory/{catalog_object_id}": { "get": { "tags": [ "Inventory" ], "summary": "RetrieveInventoryCount", "operationId": "RetrieveInventoryCount", "description": "Retrieves the current calculated stock count for a given\n[CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) at a given set of\n[Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location)s. Responses are paginated and unsorted.\nFor more sophisticated queries, use a batch endpoint.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "catalog_object_id", "description": "ID of the [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) to retrieve.", "type": "string", "in": "path", "required": true }, { "name": "location_ids", "description": "The [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) IDs to look up as a comma-separated\nlist. An empty list queries all locations.", "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveInventoryCountResponse" } } } } }, "/v2/inventory/{catalog_object_id}/changes": { "get": { "tags": [ "Inventory" ], "summary": "RetrieveInventoryChanges", "operationId": "RetrieveInventoryChanges", "description": "Returns a set of physical counts and inventory adjustments for the\nprovided [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) at the requested\n[Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location)s.\n\nYou can achieve the same result by calling [BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/batch-retrieve-inventory-changes)\nand having the `catalog_object_ids` list contain a single element of the `CatalogObject` ID.\n\nResults are paginated and sorted in descending order according to their\n`occurred_at` timestamp (newest first).\n\nThere are no limits on how far back the caller can page. This endpoint can be\nused to display recent changes for a specific item. For more\nsophisticated queries, use a batch endpoint.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "INVENTORY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVENTORY_READ" ] } ], "parameters": [ { "name": "catalog_object_id", "description": "ID of the [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) to retrieve.", "type": "string", "in": "path", "required": true }, { "name": "location_ids", "description": "The [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) IDs to look up as a comma-separated\nlist. An empty list queries all locations.", "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveInventoryChangesResponse" } } } } }, "/v2/invoices": { "get": { "tags": [ "Invoices" ], "summary": "ListInvoices", "operationId": "ListInvoices", "description": "Returns a list of invoices for a given location. The response \nis paginated. If truncated, the response includes a `cursor` that you \nuse in a subsequent request to retrieve the next set of invoices.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVOICES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVOICES_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location for which to list invoices.", "type": "string", "in": "query", "required": true }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint. \nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of invoices to return (200 is the maximum `limit`). \nIf not provided, the server uses a default limit of 100 invoices.", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListInvoicesResponse" } } } }, "post": { "tags": [ "Invoices" ], "summary": "CreateInvoice", "operationId": "CreateInvoice", "description": "Creates a draft [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) \nfor an order created using the Orders API.\n\nA draft invoice remains in your account and no action is taken. \nYou must publish the invoice before Square can process it (send it to the customer\u0027s email address or charge the customer’s card on file).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateInvoiceRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateInvoiceResponse" } } } } }, "/v2/invoices/search": { "post": { "tags": [ "Invoices" ], "summary": "SearchInvoices", "operationId": "SearchInvoices", "description": "Searches for invoices from a location specified in \nthe filter. You can optionally specify customers in the filter for whom to \nretrieve invoices. In the current implementation, you can only specify one location and \noptionally one customer.\n\nThe response is paginated. If truncated, the response includes a `cursor` \nthat you use in a subsequent request to retrieve the next set of invoices.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVOICES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVOICES_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchInvoicesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchInvoicesResponse" } } } } }, "/v2/invoices/{invoice_id}": { "delete": { "tags": [ "Invoices" ], "summary": "DeleteInvoice", "operationId": "DeleteInvoice", "description": "Deletes the specified invoice. When an invoice is deleted, the \nassociated order status changes to CANCELED. You can only delete a draft \ninvoice (you cannot delete a published invoice, including one that is scheduled for processing).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "invoice_id", "description": "The ID of the invoice to delete.", "type": "string", "in": "path", "required": true }, { "name": "version", "description": "The version of the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) to delete.\nIf you do not know the version, you can call [GetInvoice](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/get-invoice) or \n[ListInvoices](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/list-invoices).", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteInvoiceResponse" } } } }, "get": { "tags": [ "Invoices" ], "summary": "GetInvoice", "operationId": "GetInvoice", "description": "Retrieves an invoice by invoice ID.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVOICES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVOICES_READ" ] } ], "parameters": [ { "name": "invoice_id", "description": "The ID of the invoice to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetInvoiceResponse" } } } }, "put": { "tags": [ "Invoices" ], "summary": "UpdateInvoice", "operationId": "UpdateInvoice", "description": "Updates an invoice by modifying fields, clearing fields, or both. For most updates, you can use a sparse \n`Invoice` object to add fields or change values and use the `fields_to_clear` field to specify fields to clear. \nHowever, some restrictions apply. For example, you cannot change the `order_id` or `location_id` field and you \nmust provide the complete `custom_fields` list to update a custom field. Published invoices have additional restrictions.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "invoice_id", "description": "The ID of the invoice to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateInvoiceRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateInvoiceResponse" } } } } }, "/v2/invoices/{invoice_id}/attachments/{attachment_id}": { "delete": { "tags": [ "Invoices" ], "summary": "DeleteInvoiceAttachment", "operationId": "DeleteInvoiceAttachment", "description": "Removes an attachment from an invoice and permanently deletes the file. Attachments can be removed only\nfrom invoices in the `DRAFT`, `SCHEDULED`, `UNPAID`, or `PARTIALLY_PAID` state.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "INVOICES_WRITE" ] } ], "parameters": [ { "name": "invoice_id", "description": "The ID of the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) to delete the attachment from.", "type": "string", "in": "path", "required": true }, { "name": "attachment_id", "description": "The ID of the [attachment](https://developer.squareup.com/reference/square_2024-04-17/objects/InvoiceAttachment) to delete.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteInvoiceAttachmentResponse" } } } } }, "/v2/invoices/{invoice_id}/cancel": { "post": { "tags": [ "Invoices" ], "summary": "CancelInvoice", "operationId": "CancelInvoice", "description": "Cancels an invoice. The seller cannot collect payments for \nthe canceled invoice.\n\nYou cannot cancel an invoice in the `DRAFT` state or in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "invoice_id", "description": "The ID of the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) to cancel.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CancelInvoiceRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelInvoiceResponse" } } } } }, "/v2/invoices/{invoice_id}/publish": { "post": { "tags": [ "Invoices" ], "summary": "PublishInvoice", "operationId": "PublishInvoice", "description": "Publishes the specified draft invoice. \n\nAfter an invoice is published, Square \nfollows up based on the invoice configuration. For example, Square \nsends the invoice to the customer\u0027s email address, charges the customer\u0027s card on file, or does \nnothing. Square also makes the invoice available on a Square-hosted invoice page. \n\nThe invoice `status` also changes from `DRAFT` to a status \nbased on the invoice configuration. For example, the status changes to `UNPAID` if \nSquare emails the invoice or `PARTIALLY_PAID` if Square charges a card on file for a portion of the \ninvoice amount.\n\nIn addition to the required `ORDERS_WRITE` and `INVOICES_WRITE` permissions, `CUSTOMERS_READ`\nand `PAYMENTS_WRITE` are required when publishing invoices configured for card-on-file payments.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "invoice_id", "description": "The ID of the invoice to publish.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/PublishInvoiceRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/PublishInvoiceResponse" } } } } }, "/v2/labor/break-types": { "get": { "tags": [ "Labor" ], "summary": "ListBreakTypes", "operationId": "ListBreakTypes", "description": "Returns a paginated list of `BreakType` instances for a business.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_SETTINGS_READ" ] } ], "parameters": [ { "name": "location_id", "description": "Filter the returned `BreakType` results to only those that are associated with the\nspecified location.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of `BreakType` results to return per page. The number can range between 1\nand 200. The default is 200.", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "A pointer to the next page of `BreakType` results to fetch.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListBreakTypesResponse" } } } }, "post": { "tags": [ "Labor" ], "summary": "CreateBreakType", "operationId": "CreateBreakType", "description": "Creates a new `BreakType`.\n\nA `BreakType` is a template for creating `Break` objects.\nYou must provide the following values in your request to this\nendpoint:\n\n- `location_id`\n- `break_name`\n- `expected_duration`\n- `is_paid`\n\nYou can only have three `BreakType` instances per location. If you attempt to add a fourth\n`BreakType` for a location, an `INVALID_REQUEST_ERROR` \"Exceeded limit of 3 breaks per location.\"\nis returned.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_SETTINGS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_SETTINGS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateBreakTypeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateBreakTypeResponse" } } } } }, "/v2/labor/break-types/{id}": { "delete": { "tags": [ "Labor" ], "summary": "DeleteBreakType", "operationId": "DeleteBreakType", "description": "Deletes an existing `BreakType`.\n\nA `BreakType` can be deleted even if it is referenced from a `Shift`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_SETTINGS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_SETTINGS_WRITE" ] } ], "parameters": [ { "name": "id", "description": "The UUID for the `BreakType` being deleted.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteBreakTypeResponse" } } } }, "get": { "tags": [ "Labor" ], "summary": "GetBreakType", "operationId": "GetBreakType", "description": "Returns a single `BreakType` specified by `id`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_SETTINGS_READ" ] } ], "parameters": [ { "name": "id", "description": "The UUID for the `BreakType` being retrieved.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetBreakTypeResponse" } } } }, "put": { "tags": [ "Labor" ], "summary": "UpdateBreakType", "operationId": "UpdateBreakType", "description": "Updates an existing `BreakType`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_SETTINGS_WRITE", "TIMECARDS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_SETTINGS_WRITE", "TIMECARDS_SETTINGS_READ" ] } ], "parameters": [ { "name": "id", "description": " The UUID for the `BreakType` being updated.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateBreakTypeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateBreakTypeResponse" } } } } }, "/v2/labor/employee-wages": { "get": { "tags": [ "Labor" ], "summary": "ListEmployeeWages", "operationId": "ListEmployeeWages", "description": "Returns a paginated list of `EmployeeWage` instances for a business.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "employee_id", "description": "Filter the returned wages to only those that are associated with the specified employee.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of `EmployeeWage` results to return per page. The number can range between\n1 and 200. The default is 200.", "x-is-deprecated": true, "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "A pointer to the next page of `EmployeeWage` results to fetch.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListEmployeeWagesResponse" } } } } }, "/v2/labor/employee-wages/{id}": { "get": { "tags": [ "Labor" ], "summary": "GetEmployeeWage", "operationId": "GetEmployeeWage", "description": "Returns a single `EmployeeWage` specified by `id`.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "id", "description": "The UUID for the `EmployeeWage` being retrieved.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetEmployeeWageResponse" } } } } }, "/v2/labor/shifts": { "post": { "tags": [ "Labor" ], "summary": "CreateShift", "operationId": "CreateShift", "description": "Creates a new `Shift`.\n\nA `Shift` represents a complete workday for a single team member.\nYou must provide the following values in your request to this\nendpoint:\n\n- `location_id`\n- `team_member_id`\n- `start_at`\n\nAn attempt to create a new `Shift` can result in a `BAD_REQUEST` error when:\n- The `status` of the new `Shift` is `OPEN` and the team member has another\nshift with an `OPEN` status.\n- The `start_at` date is in the future.\n- The `start_at` or `end_at` date overlaps another shift for the same team member.\n- The `Break` instances are set in the request and a break `start_at`\nis before the `Shift.start_at`, a break `end_at` is after\nthe `Shift.end_at`, or both.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateShiftRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateShiftResponse" } } } } }, "/v2/labor/shifts/search": { "post": { "tags": [ "Labor" ], "summary": "SearchShifts", "operationId": "SearchShifts", "description": "Returns a paginated list of `Shift` records for a business.\nThe list to be returned can be filtered by:\n- Location IDs\n- Team member IDs\n- Shift status (`OPEN` or `CLOSED`)\n- Shift start\n- Shift end\n- Workday details\n\nThe list can be sorted by:\n- `START_AT`\n- `END_AT`\n- `CREATED_AT`\n- `UPDATED_AT`", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchShiftsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchShiftsResponse" } } } } }, "/v2/labor/shifts/{id}": { "delete": { "tags": [ "Labor" ], "summary": "DeleteShift", "operationId": "DeleteShift", "description": "Deletes a `Shift`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_WRITE" ] } ], "parameters": [ { "name": "id", "description": "The UUID for the `Shift` being deleted.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteShiftResponse" } } } }, "get": { "tags": [ "Labor" ], "summary": "GetShift", "operationId": "GetShift", "description": "Returns a single `Shift` specified by `id`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_READ" ] } ], "parameters": [ { "name": "id", "description": "The UUID for the `Shift` being retrieved.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetShiftResponse" } } } }, "put": { "tags": [ "Labor" ], "summary": "UpdateShift", "operationId": "UpdateShift", "description": "Updates an existing `Shift`.\n\nWhen adding a `Break` to a `Shift`, any earlier `Break` instances in the `Shift` have\nthe `end_at` property set to a valid RFC-3339 datetime string.\n\nWhen closing a `Shift`, all `Break` instances in the `Shift` must be complete with `end_at`\nset on each `Break`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_WRITE", "TIMECARDS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_WRITE", "TIMECARDS_READ" ] } ], "parameters": [ { "name": "id", "description": "The ID of the object being updated.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateShiftRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateShiftResponse" } } } } }, "/v2/labor/team-member-wages": { "get": { "tags": [ "Labor" ], "summary": "ListTeamMemberWages", "operationId": "ListTeamMemberWages", "description": "Returns a paginated list of `TeamMemberWage` instances for a business.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "team_member_id", "description": "Filter the returned wages to only those that are associated with the\nspecified team member.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of `TeamMemberWage` results to return per page. The number can range between\n1 and 200. The default is 200.", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "A pointer to the next page of `EmployeeWage` results to fetch.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListTeamMemberWagesResponse" } } } } }, "/v2/labor/team-member-wages/{id}": { "get": { "tags": [ "Labor" ], "summary": "GetTeamMemberWage", "operationId": "GetTeamMemberWage", "description": "Returns a single `TeamMemberWage` specified by `id`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "id", "description": "The UUID for the `TeamMemberWage` being retrieved.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetTeamMemberWageResponse" } } } } }, "/v2/labor/workweek-configs": { "get": { "tags": [ "Labor" ], "summary": "ListWorkweekConfigs", "operationId": "ListWorkweekConfigs", "description": "Returns a list of `WorkweekConfig` instances for a business.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_SETTINGS_READ" ] } ], "parameters": [ { "name": "limit", "description": "The maximum number of `WorkweekConfigs` results to return per page.", "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "A pointer to the next page of `WorkweekConfig` results to fetch.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListWorkweekConfigsResponse" } } } } }, "/v2/labor/workweek-configs/{id}": { "put": { "tags": [ "Labor" ], "summary": "UpdateWorkweekConfig", "operationId": "UpdateWorkweekConfig", "description": "Updates a `WorkweekConfig`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "TIMECARDS_SETTINGS_WRITE", "TIMECARDS_SETTINGS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "TIMECARDS_SETTINGS_WRITE", "TIMECARDS_SETTINGS_READ" ] } ], "parameters": [ { "name": "id", "description": "The UUID for the `WorkweekConfig` object being updated.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateWorkweekConfigRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateWorkweekConfigResponse" } } } } }, "/v2/locations": { "get": { "tags": [ "Locations" ], "summary": "ListLocations", "operationId": "ListLocations", "description": "Provides details about all of the seller\u0027s [locations](https://developer.squareup.com/docs/locations-api),\nincluding those with an inactive status. Locations are listed alphabetically by `name`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListLocationsResponse" } } } }, "post": { "tags": [ "Locations" ], "summary": "CreateLocation", "operationId": "CreateLocation", "description": "Creates a [location](https://developer.squareup.com/docs/locations-api).\nCreating new locations allows for separate configuration of receipt layouts, item prices,\nand sales reports. Developers can use locations to separate sales activity through applications\nthat integrate with Square from sales activity elsewhere in a seller\u0027s account.\nLocations created programmatically with the Locations API last forever and\nare visible to the seller for their own management. Therefore, ensure that\neach location has a sensible and unique name.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateLocationRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateLocationResponse" } } } } }, "/v2/locations/custom-attribute-definitions": { "get": { "tags": [ "LocationCustomAttributes" ], "summary": "ListLocationCustomAttributeDefinitions", "operationId": "ListLocationCustomAttributeDefinitions", "description": "Lists the location-related [custom attribute definitions](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) that belong to a Square seller account.\nWhen all response pages are retrieved, the results include all custom attribute definitions\nthat are visible to the requesting application, including those that are created by other\napplications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "visibility_filter", "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values.", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "x-is-beta": true, "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "x-is-beta": true, "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListLocationCustomAttributeDefinitionsResponse" } } } }, "post": { "tags": [ "LocationCustomAttributes" ], "summary": "CreateLocationCustomAttributeDefinition", "operationId": "CreateLocationCustomAttributeDefinition", "description": "Creates a location-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) for a Square seller account.\nUse this endpoint to define a custom attribute that can be associated with locations.\nA custom attribute definition specifies the `key`, `visibility`, `schema`, and other properties\nfor a custom attribute. After the definition is created, you can call\n[UpsertLocationCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/upsert-location-custom-attribute) or\n[BulkUpsertLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-upsert-location-custom-attributes)\nto set the custom attribute for locations.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateLocationCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateLocationCustomAttributeDefinitionResponse" } } } } }, "/v2/locations/custom-attribute-definitions/{key}": { "delete": { "tags": [ "LocationCustomAttributes" ], "summary": "DeleteLocationCustomAttributeDefinition", "operationId": "DeleteLocationCustomAttributeDefinition", "description": "Deletes a location-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) from a Square seller account.\nDeleting a custom attribute definition also deletes the corresponding custom attribute from\nall locations.\nOnly the definition owner can delete a custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to delete.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteLocationCustomAttributeDefinitionResponse" } } } }, "get": { "tags": [ "LocationCustomAttributes" ], "summary": "RetrieveLocationCustomAttributeDefinition", "operationId": "RetrieveLocationCustomAttributeDefinition", "description": "Retrieves a location-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) from a Square seller account.\nTo retrieve a custom attribute definition created by another application, the `visibility`\nsetting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to retrieve. If the requesting application\nis not the definition owner, you must use the qualified key.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "version", "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error.", "x-is-beta": true, "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLocationCustomAttributeDefinitionResponse" } } } }, "put": { "tags": [ "LocationCustomAttributes" ], "summary": "UpdateLocationCustomAttributeDefinition", "operationId": "UpdateLocationCustomAttributeDefinition", "description": "Updates a location-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) for a Square seller account.\nUse this endpoint to update the following fields: `name`, `description`, `visibility`, or the\n`schema` for a `Selection` data type.\nOnly the definition owner can update a custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to update.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateLocationCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateLocationCustomAttributeDefinitionResponse" } } } } }, "/v2/locations/custom-attributes/bulk-delete": { "post": { "tags": [ "LocationCustomAttributes" ], "summary": "BulkDeleteLocationCustomAttributes", "operationId": "BulkDeleteLocationCustomAttributes", "description": "Deletes [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for locations as a bulk operation.\nTo delete a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkDeleteLocationCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkDeleteLocationCustomAttributesResponse" } } } } }, "/v2/locations/custom-attributes/bulk-upsert": { "post": { "tags": [ "LocationCustomAttributes" ], "summary": "BulkUpsertLocationCustomAttributes", "operationId": "BulkUpsertLocationCustomAttributes", "description": "Creates or updates [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for locations as a bulk operation.\nUse this endpoint to set the value of one or more custom attributes for one or more locations.\nA custom attribute is based on a custom attribute definition in a Square seller account, which is\ncreated using the [CreateLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/create-location-custom-attribute-definition) endpoint.\nThis `BulkUpsertLocationCustomAttributes` endpoint accepts a map of 1 to 25 individual upsert\nrequests and returns a map of individual upsert responses. Each upsert request has a unique ID\nand provides a location ID and custom attribute. Each upsert response is returned with the ID\nof the corresponding request.\nTo create or update a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkUpsertLocationCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkUpsertLocationCustomAttributesResponse" } } } } }, "/v2/locations/{location_id}": { "get": { "tags": [ "Locations" ], "summary": "RetrieveLocation", "operationId": "RetrieveLocation", "description": "Retrieves details of a single location. Specify \"main\"\nas the location ID to retrieve details of the [main location](https://developer.squareup.com/docs/locations-api#about-the-main-location).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location to retrieve. Specify the string\n\"main\" to return the main location.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLocationResponse" } } } }, "put": { "tags": [ "Locations" ], "summary": "UpdateLocation", "operationId": "UpdateLocation", "description": "Updates a [location](https://developer.squareup.com/docs/locations-api).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateLocationRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateLocationResponse" } } } } }, "/v2/locations/{location_id}/checkouts": { "post": { "tags": [ "Checkout" ], "summary": "CreateCheckout", "operationId": "CreateCheckout", "description": "Links a `checkoutId` to a `checkout_page_url` that customers are\ndirected to in order to provide their payment information using a\npayment processing workflow hosted on connect.squareup.com. \n\n\nNOTE: The Checkout API has been updated with new features. \nFor more information, see [Checkout API highlights](https://developer.squareup.com/docs/checkout-api#checkout-api-highlights).", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "PAYMENTS_WRITE", "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE", "ORDERS_WRITE" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the business location to associate the checkout with.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateCheckoutRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateCheckoutResponse" } } } } }, "/v2/locations/{location_id}/custom-attributes": { "get": { "tags": [ "LocationCustomAttributes" ], "summary": "ListLocationCustomAttributes", "operationId": "ListLocationCustomAttributes", "description": "Lists the [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a location.\nYou can use the `with_definitions` query parameter to also retrieve custom attribute definitions\nin the same call.\nWhen all response pages are retrieved, the results include all custom attributes that are\nvisible to the requesting application, including those that are owned by other applications\nand set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the target [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "visibility_filter", "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values.", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "x-is-beta": true, "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "with_definitions", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`.", "x-is-beta": true, "type": "boolean", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListLocationCustomAttributesResponse" } } } } }, "/v2/locations/{location_id}/custom-attributes/{key}": { "delete": { "tags": [ "LocationCustomAttributes" ], "summary": "DeleteLocationCustomAttribute", "operationId": "DeleteLocationCustomAttribute", "description": "Deletes a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a location.\nTo delete a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the target [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to delete. This key must match the `key` of a custom\nattribute definition in the Square seller account. If the requesting application is not the\ndefinition owner, you must use the qualified key.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteLocationCustomAttributeResponse" } } } }, "get": { "tags": [ "LocationCustomAttributes" ], "summary": "RetrieveLocationCustomAttribute", "operationId": "RetrieveLocationCustomAttribute", "description": "Retrieves a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a location.\nYou can use the `with_definition` query parameter to also retrieve the custom attribute definition\nin the same call.\nTo retrieve a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the target [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to retrieve. This key must match the `key` of a custom\nattribute definition in the Square seller account. If the requesting application is not the\ndefinition owner, you must use the qualified key.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "with_definition", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`.", "x-is-beta": true, "type": "boolean", "in": "query", "required": false }, { "name": "version", "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error.", "x-is-beta": true, "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLocationCustomAttributeResponse" } } } }, "post": { "tags": [ "LocationCustomAttributes" ], "summary": "UpsertLocationCustomAttribute", "operationId": "UpsertLocationCustomAttribute", "description": "Creates or updates a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for a location.\nUse this endpoint to set the value of a custom attribute for a specified location.\nA custom attribute is based on a custom attribute definition in a Square seller account, which\nis created using the [CreateLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/create-location-custom-attribute-definition) endpoint.\nTo create or update a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the target [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to create or update. This key must match the `key` of a\ncustom attribute definition in the Square seller account. If the requesting application is not\nthe definition owner, you must use the qualified key.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpsertLocationCustomAttributeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpsertLocationCustomAttributeResponse" } } } } }, "/v2/locations/{location_id}/transactions": { "get": { "tags": [ "Transactions" ], "summary": "ListTransactions", "operationId": "ListTransactions", "description": "Lists transactions for a particular location.\n\nTransactions include payment information from sales and exchanges and refund\ninformation from returns and exchanges.\n\nMax results per [page](https://developer.squareup.com/docs/working-with-apis/pagination): 50", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location to list transactions for.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "begin_time", "description": "The beginning of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time minus one year.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false }, { "name": "end_time", "description": "The end of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false }, { "name": "sort_order", "description": "The order in which results are listed in the response (`ASC` for\noldest first, `DESC` for newest first).\n\nDefault value: `DESC`", "x-is-deprecated": true, "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.", "x-is-deprecated": true, "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListTransactionsResponse" } } } } }, "/v2/locations/{location_id}/transactions/{transaction_id}": { "get": { "tags": [ "Transactions" ], "summary": "RetrieveTransaction", "operationId": "RetrieveTransaction", "description": "Retrieves details for a single transaction.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the transaction\u0027s associated location.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "transaction_id", "description": "The ID of the transaction to retrieve.", "x-is-deprecated": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveTransactionResponse" } } } } }, "/v2/locations/{location_id}/transactions/{transaction_id}/capture": { "post": { "tags": [ "Transactions" ], "summary": "CaptureTransaction", "operationId": "CaptureTransaction", "description": "Captures a transaction that was created with the [Charge](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/charge)\nendpoint with a `delay_capture` value of `true`.\n\n\nSee [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)\nfor more information.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "location_id", "description": "", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "transaction_id", "description": "", "x-is-deprecated": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CaptureTransactionResponse" } } } } }, "/v2/locations/{location_id}/transactions/{transaction_id}/void": { "post": { "tags": [ "Transactions" ], "summary": "VoidTransaction", "operationId": "VoidTransaction", "description": "Cancels a transaction that was created with the [Charge](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/charge)\nendpoint with a `delay_capture` value of `true`.\n\n\nSee [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)\nfor more information.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "location_id", "description": "", "x-is-deprecated": true, "type": "string", "in": "path", "required": true }, { "name": "transaction_id", "description": "", "x-is-deprecated": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/VoidTransactionResponse" } } } } }, "/v2/loyalty/accounts": { "post": { "tags": [ "Loyalty" ], "summary": "CreateLoyaltyAccount", "operationId": "CreateLoyaltyAccount", "description": "Creates a loyalty account. To create a loyalty account, you must provide the `program_id` and a `mapping` with the `phone_number` of the buyer.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateLoyaltyAccountRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateLoyaltyAccountResponse" } } } } }, "/v2/loyalty/accounts/search": { "post": { "tags": [ "Loyalty" ], "summary": "SearchLoyaltyAccounts", "operationId": "SearchLoyaltyAccounts", "description": "Searches for loyalty accounts in a loyalty program.\n\nYou can search for a loyalty account using the phone number or customer ID associated with the account. To return all loyalty accounts, specify an empty `query` object or omit it entirely.\n\nSearch results are sorted by `created_at` in ascending order.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchLoyaltyAccountsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchLoyaltyAccountsResponse" } } } } }, "/v2/loyalty/accounts/{account_id}": { "get": { "tags": [ "Loyalty" ], "summary": "RetrieveLoyaltyAccount", "operationId": "RetrieveLoyaltyAccount", "description": "Retrieves a loyalty account.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "account_id", "description": "The ID of the [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount) to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLoyaltyAccountResponse" } } } } }, "/v2/loyalty/accounts/{account_id}/accumulate": { "post": { "tags": [ "Loyalty" ], "summary": "AccumulateLoyaltyPoints", "operationId": "AccumulateLoyaltyPoints", "description": "Adds points earned from a purchase to a [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount).\n\n- If you are using the Orders API to manage orders, provide the `order_id`. Square reads the order\nto compute the points earned from both the base loyalty program and an associated\n[loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion). For purchases that qualify for multiple accrual\nrules, Square computes points based on the accrual rule that grants the most points.\nFor purchases that qualify for multiple promotions, Square computes points based on the most\nrecently created promotion. A purchase must first qualify for program points to be eligible for promotion points.\n\n- If you are not using the Orders API to manage orders, provide `points` with the number of points to add.\nYou must first perform a client-side computation of the points earned from the loyalty program and\nloyalty promotion. For spend-based and visit-based programs, you can call [CalculateLoyaltyPoints](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/calculate-loyalty-points)\nto compute the points earned from the base loyalty program. For information about computing points earned from a loyalty promotion, see\n[Calculating promotion points](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#calculate-promotion-points).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_WRITE" ] } ], "parameters": [ { "name": "account_id", "description": "The ID of the target [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount).", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/AccumulateLoyaltyPointsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/AccumulateLoyaltyPointsResponse" } } } } }, "/v2/loyalty/accounts/{account_id}/adjust": { "post": { "tags": [ "Loyalty" ], "summary": "AdjustLoyaltyPoints", "operationId": "AdjustLoyaltyPoints", "description": "Adds points to or subtracts points from a buyer\u0027s account.\n\nUse this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call\n[AccumulateLoyaltyPoints](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/accumulate-loyalty-points)\nto add points when a buyer pays for the purchase.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_WRITE" ] } ], "parameters": [ { "name": "account_id", "description": "The ID of the target [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount).", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/AdjustLoyaltyPointsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/AdjustLoyaltyPointsResponse" } } } } }, "/v2/loyalty/events/search": { "post": { "tags": [ "Loyalty" ], "summary": "SearchLoyaltyEvents", "operationId": "SearchLoyaltyEvents", "description": "Searches for loyalty events.\n\nA Square loyalty program maintains a ledger of events that occur during the lifetime of a\nbuyer\u0027s loyalty account. Each change in the point balance\n(for example, points earned, points redeemed, and points expired) is\nrecorded in the ledger. Using this endpoint, you can search the ledger for events.\n\nSearch results are sorted by `created_at` in descending order.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchLoyaltyEventsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchLoyaltyEventsResponse" } } } } }, "/v2/loyalty/programs": { "get": { "tags": [ "Loyalty" ], "summary": "ListLoyaltyPrograms", "operationId": "ListLoyaltyPrograms", "description": "Returns a list of loyalty programs in the seller\u0027s account.\nLoyalty programs define how buyers can earn points and redeem points for rewards. Square sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. For more information, see [Loyalty Program Overview](https://developer.squareup.com/docs/loyalty/overview).\n\n\nReplaced with [RetrieveLoyaltyProgram](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/retrieve-loyalty-program) when used with the keyword `main`.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListLoyaltyProgramsResponse" } } } } }, "/v2/loyalty/programs/{program_id}": { "get": { "tags": [ "Loyalty" ], "summary": "RetrieveLoyaltyProgram", "operationId": "RetrieveLoyaltyProgram", "description": "Retrieves the loyalty program in a seller\u0027s account, specified by the program ID or the keyword `main`.\n\nLoyalty programs define how buyers can earn points and redeem points for rewards. Square sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. For more information, see [Loyalty Program Overview](https://developer.squareup.com/docs/loyalty/overview).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "program_id", "description": "The ID of the loyalty program or the keyword `main`. Either value can be used to retrieve the single loyalty program that belongs to the seller.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLoyaltyProgramResponse" } } } } }, "/v2/loyalty/programs/{program_id}/calculate": { "post": { "tags": [ "Loyalty" ], "summary": "CalculateLoyaltyPoints", "operationId": "CalculateLoyaltyPoints", "description": "Calculates the number of points a buyer can earn from a purchase. Applications might call this endpoint\nto display the points to the buyer.\n\n- If you are using the Orders API to manage orders, provide the `order_id` and (optional) `loyalty_account_id`.\nSquare reads the order to compute the points earned from the base loyalty program and an associated\n[loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion).\n\n- If you are not using the Orders API to manage orders, provide `transaction_amount_money` with the\npurchase amount. Square uses this amount to calculate the points earned from the base loyalty program,\nbut not points earned from a loyalty promotion. For spend-based and visit-based programs, the `tax_mode`\nsetting of the accrual rule indicates how taxes should be treated for loyalty points accrual.\nIf the purchase qualifies for program points, call\n[ListLoyaltyPromotions](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/list-loyalty-promotions) and perform a client-side computation\nto calculate whether the purchase also qualifies for promotion points. For more information, see\n[Calculating promotion points](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#calculate-promotion-points).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "program_id", "description": "The ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram), which defines the rules for accruing points.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CalculateLoyaltyPointsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CalculateLoyaltyPointsResponse" } } } } }, "/v2/loyalty/programs/{program_id}/promotions": { "get": { "tags": [ "Loyalty" ], "summary": "ListLoyaltyPromotions", "operationId": "ListLoyaltyPromotions", "description": "Lists the loyalty promotions associated with a [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).\nResults are sorted by the `created_at` date in descending order (newest to oldest).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "program_id", "description": "The ID of the base [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram). To get the program ID,\ncall [RetrieveLoyaltyProgram](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/retrieve-loyalty-program) using the `main` keyword.", "type": "string", "in": "path", "required": true }, { "name": "status", "description": "The status to filter the results by. If a status is provided, only loyalty promotions\nwith the specified status are returned. Otherwise, all loyalty promotions associated with\nthe loyalty program are returned.", "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single paged response.\nThe minimum value is 1 and the maximum value is 30. The default value is 30.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListLoyaltyPromotionsResponse" } } } }, "post": { "tags": [ "Loyalty" ], "summary": "CreateLoyaltyPromotion", "operationId": "CreateLoyaltyPromotion", "description": "Creates a loyalty promotion for a [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram). A loyalty promotion\nenables buyers to earn points in addition to those earned from the base loyalty program.\n\nThis endpoint sets the loyalty promotion to the `ACTIVE` or `SCHEDULED` status, depending on the\n`available_time` setting. A loyalty program can have a maximum of 10 loyalty promotions with an\n`ACTIVE` or `SCHEDULED` status.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_WRITE" ] } ], "parameters": [ { "name": "program_id", "description": "The ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram) to associate with the promotion.\nTo get the program ID, call [RetrieveLoyaltyProgram](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/retrieve-loyalty-program)\nusing the `main` keyword.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateLoyaltyPromotionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateLoyaltyPromotionResponse" } } } } }, "/v2/loyalty/programs/{program_id}/promotions/{promotion_id}": { "get": { "tags": [ "Loyalty" ], "summary": "RetrieveLoyaltyPromotion", "operationId": "RetrieveLoyaltyPromotion", "description": "Retrieves a loyalty promotion.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "promotion_id", "description": "The ID of the [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion) to retrieve.", "type": "string", "in": "path", "required": true }, { "name": "program_id", "description": "The ID of the base [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram). To get the program ID,\ncall [RetrieveLoyaltyProgram](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/retrieve-loyalty-program) using the `main` keyword.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLoyaltyPromotionResponse" } } } } }, "/v2/loyalty/programs/{program_id}/promotions/{promotion_id}/cancel": { "post": { "tags": [ "Loyalty" ], "summary": "CancelLoyaltyPromotion", "operationId": "CancelLoyaltyPromotion", "description": "Cancels a loyalty promotion. Use this endpoint to cancel an `ACTIVE` promotion earlier than the\nend date, cancel an `ACTIVE` promotion when an end date is not specified, or cancel a `SCHEDULED` promotion.\nBecause updating a promotion is not supported, you can also use this endpoint to cancel a promotion before\nyou create a new one.\n\nThis endpoint sets the loyalty promotion to the `CANCELED` state", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_WRITE" ] } ], "parameters": [ { "name": "promotion_id", "description": "The ID of the [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion) to cancel. You can cancel a\npromotion that has an `ACTIVE` or `SCHEDULED` status.", "type": "string", "in": "path", "required": true }, { "name": "program_id", "description": "The ID of the base [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelLoyaltyPromotionResponse" } } } } }, "/v2/loyalty/rewards": { "post": { "tags": [ "Loyalty" ], "summary": "CreateLoyaltyReward", "operationId": "CreateLoyaltyReward", "description": "Creates a loyalty reward. In the process, the endpoint does following:\n\n- Uses the `reward_tier_id` in the request to determine the number of points\nto lock for this reward.\n- If the request includes `order_id`, it adds the reward and related discount to the order.\n\nAfter a reward is created, the points are locked and\nnot available for the buyer to redeem another reward.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateLoyaltyRewardRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateLoyaltyRewardResponse" } } } } }, "/v2/loyalty/rewards/search": { "post": { "tags": [ "Loyalty" ], "summary": "SearchLoyaltyRewards", "operationId": "SearchLoyaltyRewards", "description": "Searches for loyalty rewards. This endpoint accepts a request with no query filters and returns results for all loyalty accounts.\nIf you include a `query` object, `loyalty_account_id` is required and `status` is optional.\n\nIf you know a reward ID, use the\n[RetrieveLoyaltyReward](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/retrieve-loyalty-reward) endpoint.\n\nSearch results are sorted by `updated_at` in descending order.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchLoyaltyRewardsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchLoyaltyRewardsResponse" } } } } }, "/v2/loyalty/rewards/{reward_id}": { "delete": { "tags": [ "Loyalty" ], "summary": "DeleteLoyaltyReward", "operationId": "DeleteLoyaltyReward", "description": "Deletes a loyalty reward by doing the following:\n\n- Returns the loyalty points back to the loyalty account.\n- If an order ID was specified when the reward was created\n(see [CreateLoyaltyReward](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/create-loyalty-reward)),\nit updates the order by removing the reward and related\ndiscounts.\n\nYou cannot delete a reward that has reached the terminal state (REDEEMED).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_WRITE" ] } ], "parameters": [ { "name": "reward_id", "description": "The ID of the [loyalty reward](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyReward) to delete.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteLoyaltyRewardResponse" } } } }, "get": { "tags": [ "Loyalty" ], "summary": "RetrieveLoyaltyReward", "operationId": "RetrieveLoyaltyReward", "description": "Retrieves a loyalty reward.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_READ" ] } ], "parameters": [ { "name": "reward_id", "description": "The ID of the [loyalty reward](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyReward) to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLoyaltyRewardResponse" } } } } }, "/v2/loyalty/rewards/{reward_id}/redeem": { "post": { "tags": [ "Loyalty" ], "summary": "RedeemLoyaltyReward", "operationId": "RedeemLoyaltyReward", "description": "Redeems a loyalty reward.\n\nThe endpoint sets the reward to the `REDEEMED` terminal state.\n\nIf you are using your own order processing system (not using the\nOrders API), you call this endpoint after the buyer paid for the\npurchase.\n\nAfter the reward reaches the terminal state, it cannot be deleted.\nIn other words, points used for the reward cannot be returned\nto the account.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "LOYALTY_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "LOYALTY_WRITE" ] } ], "parameters": [ { "name": "reward_id", "description": "The ID of the [loyalty reward](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyReward) to redeem.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/RedeemLoyaltyRewardRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RedeemLoyaltyRewardResponse" } } } } }, "/v2/merchants": { "get": { "tags": [ "Merchants" ], "summary": "ListMerchants", "operationId": "ListMerchants", "description": "Provides details about the merchant associated with a given access token.\n\nThe access token used to connect your application to a Square seller is associated\nwith a single merchant. That means that `ListMerchants` returns a list\nwith a single `Merchant` object. You can specify your personal access token\nto get your own merchant information or specify an OAuth token to get the\ninformation for the merchant that granted your application access.\n\nIf you know the merchant ID, you can also use the [RetrieveMerchant](https://developer.squareup.com/reference/square_2024-04-17/merchants-api/retrieve-merchant)\nendpoint to retrieve the merchant information.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "cursor", "description": "The cursor generated by the previous response.", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListMerchantsResponse" } } } } }, "/v2/merchants/custom-attribute-definitions": { "get": { "tags": [ "MerchantCustomAttributes" ], "summary": "ListMerchantCustomAttributeDefinitions", "operationId": "ListMerchantCustomAttributeDefinitions", "description": "Lists the merchant-related [custom attribute definitions](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) that belong to a Square seller account.\nWhen all response pages are retrieved, the results include all custom attribute definitions\nthat are visible to the requesting application, including those that are created by other\napplications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "visibility_filter", "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values.", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "x-is-beta": true, "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "x-is-beta": true, "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListMerchantCustomAttributeDefinitionsResponse" } } } }, "post": { "tags": [ "MerchantCustomAttributes" ], "summary": "CreateMerchantCustomAttributeDefinition", "operationId": "CreateMerchantCustomAttributeDefinition", "description": "Creates a merchant-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) for a Square seller account.\nUse this endpoint to define a custom attribute that can be associated with a merchant connecting to your application.\nA custom attribute definition specifies the `key`, `visibility`, `schema`, and other properties\nfor a custom attribute. After the definition is created, you can call\n[UpsertMerchantCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/upsert-merchant-custom-attribute) or\n[BulkUpsertMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-upsert-merchant-custom-attributes)\nto set the custom attribute for a merchant.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateMerchantCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateMerchantCustomAttributeDefinitionResponse" } } } } }, "/v2/merchants/custom-attribute-definitions/{key}": { "delete": { "tags": [ "MerchantCustomAttributes" ], "summary": "DeleteMerchantCustomAttributeDefinition", "operationId": "DeleteMerchantCustomAttributeDefinition", "description": "Deletes a merchant-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) from a Square seller account.\nDeleting a custom attribute definition also deletes the corresponding custom attribute from\nthe merchant.\nOnly the definition owner can delete a custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to delete.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteMerchantCustomAttributeDefinitionResponse" } } } }, "get": { "tags": [ "MerchantCustomAttributes" ], "summary": "RetrieveMerchantCustomAttributeDefinition", "operationId": "RetrieveMerchantCustomAttributeDefinition", "description": "Retrieves a merchant-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) from a Square seller account.\nTo retrieve a custom attribute definition created by another application, the `visibility`\nsetting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to retrieve. If the requesting application\nis not the definition owner, you must use the qualified key.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "version", "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error.", "x-is-beta": true, "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveMerchantCustomAttributeDefinitionResponse" } } } }, "put": { "tags": [ "MerchantCustomAttributes" ], "summary": "UpdateMerchantCustomAttributeDefinition", "operationId": "UpdateMerchantCustomAttributeDefinition", "description": "Updates a merchant-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) for a Square seller account.\nUse this endpoint to update the following fields: `name`, `description`, `visibility`, or the\n`schema` for a `Selection` data type.\nOnly the definition owner can update a custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to update.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateMerchantCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateMerchantCustomAttributeDefinitionResponse" } } } } }, "/v2/merchants/custom-attributes/bulk-delete": { "post": { "tags": [ "MerchantCustomAttributes" ], "summary": "BulkDeleteMerchantCustomAttributes", "operationId": "BulkDeleteMerchantCustomAttributes", "description": "Deletes [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for a merchant as a bulk operation.\nTo delete a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkDeleteMerchantCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkDeleteMerchantCustomAttributesResponse" } } } } }, "/v2/merchants/custom-attributes/bulk-upsert": { "post": { "tags": [ "MerchantCustomAttributes" ], "summary": "BulkUpsertMerchantCustomAttributes", "operationId": "BulkUpsertMerchantCustomAttributes", "description": "Creates or updates [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for a merchant as a bulk operation.\nUse this endpoint to set the value of one or more custom attributes for a merchant.\nA custom attribute is based on a custom attribute definition in a Square seller account, which is\ncreated using the [CreateMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/create-merchant-custom-attribute-definition) endpoint.\nThis `BulkUpsertMerchantCustomAttributes` endpoint accepts a map of 1 to 25 individual upsert\nrequests and returns a map of individual upsert responses. Each upsert request has a unique ID\nand provides a merchant ID and custom attribute. Each upsert response is returned with the ID\nof the corresponding request.\nTo create or update a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkUpsertMerchantCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkUpsertMerchantCustomAttributesResponse" } } } } }, "/v2/merchants/{merchant_id}": { "get": { "tags": [ "Merchants" ], "summary": "RetrieveMerchant", "operationId": "RetrieveMerchant", "description": "Retrieves the `Merchant` object for the given `merchant_id`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "merchant_id", "description": "The ID of the merchant to retrieve. If the string \"me\" is supplied as the ID,\nthen retrieve the merchant that is currently accessible to this call.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveMerchantResponse" } } } } }, "/v2/merchants/{merchant_id}/custom-attributes": { "get": { "tags": [ "MerchantCustomAttributes" ], "summary": "ListMerchantCustomAttributes", "operationId": "ListMerchantCustomAttributes", "description": "Lists the [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a merchant.\nYou can use the `with_definitions` query parameter to also retrieve custom attribute definitions\nin the same call.\nWhen all response pages are retrieved, the results include all custom attributes that are\nvisible to the requesting application, including those that are owned by other applications\nand set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "merchant_id", "description": "The ID of the target [merchant](https://developer.squareup.com/reference/square_2024-04-17/objects/Merchant).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "visibility_filter", "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values.", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "x-is-beta": true, "type": "integer", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "with_definitions", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`.", "x-is-beta": true, "type": "boolean", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListMerchantCustomAttributesResponse" } } } } }, "/v2/merchants/{merchant_id}/custom-attributes/{key}": { "delete": { "tags": [ "MerchantCustomAttributes" ], "summary": "DeleteMerchantCustomAttribute", "operationId": "DeleteMerchantCustomAttribute", "description": "Deletes a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a merchant.\nTo delete a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "merchant_id", "description": "The ID of the target [merchant](https://developer.squareup.com/reference/square_2024-04-17/objects/Merchant).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to delete. This key must match the `key` of a custom\nattribute definition in the Square seller account. If the requesting application is not the\ndefinition owner, you must use the qualified key.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteMerchantCustomAttributeResponse" } } } }, "get": { "tags": [ "MerchantCustomAttributes" ], "summary": "RetrieveMerchantCustomAttribute", "operationId": "RetrieveMerchantCustomAttribute", "description": "Retrieves a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a merchant.\nYou can use the `with_definition` query parameter to also retrieve the custom attribute definition\nin the same call.\nTo retrieve a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "merchant_id", "description": "The ID of the target [merchant](https://developer.squareup.com/reference/square_2024-04-17/objects/Merchant).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to retrieve. This key must match the `key` of a custom\nattribute definition in the Square seller account. If the requesting application is not the\ndefinition owner, you must use the qualified key.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "with_definition", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`.", "x-is-beta": true, "type": "boolean", "in": "query", "required": false }, { "name": "version", "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error.", "x-is-beta": true, "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveMerchantCustomAttributeResponse" } } } }, "post": { "tags": [ "MerchantCustomAttributes" ], "summary": "UpsertMerchantCustomAttribute", "operationId": "UpsertMerchantCustomAttribute", "description": "Creates or updates a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for a merchant.\nUse this endpoint to set the value of a custom attribute for a specified merchant.\nA custom attribute is based on a custom attribute definition in a Square seller account, which\nis created using the [CreateMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/create-merchant-custom-attribute-definition) endpoint.\nTo create or update a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE" ] } ], "parameters": [ { "name": "merchant_id", "description": "The ID of the target [merchant](https://developer.squareup.com/reference/square_2024-04-17/objects/Merchant).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "key", "description": "The key of the custom attribute to create or update. This key must match the `key` of a\ncustom attribute definition in the Square seller account. If the requesting application is not\nthe definition owner, you must use the qualified key.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpsertMerchantCustomAttributeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpsertMerchantCustomAttributeResponse" } } } } }, "/v2/online-checkout/location-settings/{location_id}": { "get": { "tags": [ "Checkout" ], "summary": "RetrieveLocationSettings", "operationId": "RetrieveLocationSettings", "description": "Retrieves the location-level settings for a Square-hosted checkout page.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location for which to retrieve settings.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveLocationSettingsResponse" } } } }, "put": { "tags": [ "Checkout" ], "summary": "UpdateLocationSettings", "operationId": "UpdateLocationSettings", "description": "Updates the location-level settings for a Square-hosted checkout page.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE", "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE", "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location for which to retrieve settings.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateLocationSettingsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateLocationSettingsResponse" } } } } }, "/v2/online-checkout/merchant-settings": { "get": { "tags": [ "Checkout" ], "summary": "RetrieveMerchantSettings", "operationId": "RetrieveMerchantSettings", "description": "Retrieves the merchant-level settings for a Square-hosted checkout page.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "PAYMENT_METHODS_READ", "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENT_METHODS_READ", "MERCHANT_PROFILE_READ" ] } ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveMerchantSettingsResponse" } } } }, "put": { "tags": [ "Checkout" ], "summary": "UpdateMerchantSettings", "operationId": "UpdateMerchantSettings", "description": "Updates the merchant-level settings for a Square-hosted checkout page.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "MERCHANT_PROFILE_WRITE", "PAYMENT_METHODS_READ", "MERCHANT_PROFILE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "MERCHANT_PROFILE_WRITE", "PAYMENT_METHODS_READ", "MERCHANT_PROFILE_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateMerchantSettingsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateMerchantSettingsResponse" } } } } }, "/v2/online-checkout/payment-links": { "get": { "tags": [ "Checkout" ], "summary": "ListPaymentLinks", "operationId": "ListPaymentLinks", "description": "Lists all payment links.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "A limit on the number of results to return per page. The limit is advisory and\nthe implementation might return more or less results. If the supplied limit is negative, zero, or\ngreater than the maximum limit of 1000, it is ignored.\n\nDefault value: `100`", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListPaymentLinksResponse" } } } }, "post": { "tags": [ "Checkout" ], "summary": "CreatePaymentLink", "operationId": "CreatePaymentLink", "description": "Creates a Square-hosted checkout page. Applications can share the resulting payment link with their buyer to pay for goods and services.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE", "ORDERS_READ", "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE", "ORDERS_READ", "ORDERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreatePaymentLinkRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreatePaymentLinkResponse" } } } } }, "/v2/online-checkout/payment-links/{id}": { "delete": { "tags": [ "Checkout" ], "summary": "DeletePaymentLink", "operationId": "DeletePaymentLink", "description": "Deletes a payment link.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_READ", "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ", "ORDERS_WRITE" ] } ], "parameters": [ { "name": "id", "description": "The ID of the payment link to delete.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeletePaymentLinkResponse" } } } }, "get": { "tags": [ "Checkout" ], "summary": "RetrievePaymentLink", "operationId": "RetrievePaymentLink", "description": "Retrieves a payment link.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "id", "description": "The ID of link to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrievePaymentLinkResponse" } } } }, "put": { "tags": [ "Checkout" ], "summary": "UpdatePaymentLink", "operationId": "UpdatePaymentLink", "description": "Updates a payment link. You can update the `payment_link` fields such as\n`description`, `checkout_options`, and `pre_populated_data`.\nYou cannot update other fields such as the `order_id`, `version`, `URL`, or `timestamp` field.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE", "ORDERS_READ", "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE", "ORDERS_READ", "ORDERS_WRITE" ] } ], "parameters": [ { "name": "id", "description": "The ID of the payment link to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdatePaymentLinkRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdatePaymentLinkResponse" } } } } }, "/v2/orders": { "post": { "tags": [ "Orders" ], "summary": "CreateOrder", "operationId": "CreateOrder", "description": "Creates a new [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) that can include information about products for\npurchase and settings to apply to the purchase.\n\nTo pay for a created order, see\n[Pay for Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders).\n\nYou can modify open orders using the [UpdateOrder](https://developer.squareup.com/reference/square_2024-04-17/orders-api/update-order) endpoint.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateOrderRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateOrderResponse" } } } } }, "/v2/orders/batch-retrieve": { "post": { "tags": [ "Orders" ], "summary": "BatchRetrieveOrders", "operationId": "BatchRetrieveOrders", "description": "Retrieves a set of [orders](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) by their IDs.\n\nIf a given order ID does not exist, the ID is ignored instead of generating an error.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BatchRetrieveOrdersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BatchRetrieveOrdersResponse" } } } } }, "/v2/orders/calculate": { "post": { "tags": [ "Orders" ], "summary": "CalculateOrder", "operationId": "CalculateOrder", "description": "Enables applications to preview order pricing without creating an order.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CalculateOrderRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CalculateOrderResponse" } } } } }, "/v2/orders/clone": { "post": { "tags": [ "Orders" ], "summary": "CloneOrder", "operationId": "CloneOrder", "description": "Creates a new order, in the `DRAFT` state, by duplicating an existing order. The newly created order has\nonly the core fields (such as line items, taxes, and discounts) copied from the original order.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CloneOrderRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CloneOrderResponse" } } } } }, "/v2/orders/custom-attribute-definitions": { "get": { "tags": [ "OrderCustomAttributes" ], "summary": "ListOrderCustomAttributeDefinitions", "operationId": "ListOrderCustomAttributeDefinitions", "description": "Lists the order-related [custom attribute definitions](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) that belong to a Square seller account.\n\nWhen all response pages are retrieved, the results include all custom attribute definitions\nthat are visible to the requesting application, including those that are created by other\napplications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that\nseller-defined custom attributes (also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "visibility_filter", "description": "Requests that all of the custom attributes be returned, or only those that are read-only or read-write.", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint. \nProvide this cursor to retrieve the next page of results for your original request. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory. \nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. \nThe default value is 20.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", "x-is-beta": true, "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListOrderCustomAttributeDefinitionsResponse" } } } }, "post": { "tags": [ "OrderCustomAttributes" ], "summary": "CreateOrderCustomAttributeDefinition", "operationId": "CreateOrderCustomAttributeDefinition", "description": "Creates an order-related custom attribute definition. Use this endpoint to\ndefine a custom attribute that can be associated with orders.\n\nAfter creating a custom attribute definition, you can set the custom attribute for orders\nin the Square seller account.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateOrderCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateOrderCustomAttributeDefinitionResponse" } } } } }, "/v2/orders/custom-attribute-definitions/{key}": { "delete": { "tags": [ "OrderCustomAttributes" ], "summary": "DeleteOrderCustomAttributeDefinition", "operationId": "DeleteOrderCustomAttributeDefinition", "description": "Deletes an order-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) from a Square seller account.\n\nOnly the definition owner can delete a custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to delete.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteOrderCustomAttributeDefinitionResponse" } } } }, "get": { "tags": [ "OrderCustomAttributes" ], "summary": "RetrieveOrderCustomAttributeDefinition", "operationId": "RetrieveOrderCustomAttributeDefinition", "description": "Retrieves an order-related [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) from a Square seller account.\n\nTo retrieve a custom attribute definition created by another application, the `visibility`\nsetting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to retrieve.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "version", "description": "To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include this optional field and specify the current version of the custom attribute.", "x-is-beta": true, "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveOrderCustomAttributeDefinitionResponse" } } } }, "put": { "tags": [ "OrderCustomAttributes" ], "summary": "UpdateOrderCustomAttributeDefinition", "operationId": "UpdateOrderCustomAttributeDefinition", "description": "Updates an order-related custom attribute definition for a Square seller account.\n\nOnly the definition owner can update a custom attribute definition. Note that sellers can view all custom attributes in exported customer data, including those set to `VISIBILITY_HIDDEN`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "key", "description": "The key of the custom attribute definition to update.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateOrderCustomAttributeDefinitionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateOrderCustomAttributeDefinitionResponse" } } } } }, "/v2/orders/custom-attributes/bulk-delete": { "post": { "tags": [ "OrderCustomAttributes" ], "summary": "BulkDeleteOrderCustomAttributes", "operationId": "BulkDeleteOrderCustomAttributes", "description": "Deletes order [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) as a bulk operation.\n\nUse this endpoint to delete one or more custom attributes from one or more orders.\nA custom attribute is based on a custom attribute definition in a Square seller account. (To create a\ncustom attribute definition, use the [CreateOrderCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/order-custom-attributes-api/create-order-custom-attribute-definition) endpoint.)\n\nThis `BulkDeleteOrderCustomAttributes` endpoint accepts a map of 1 to 25 individual delete\nrequests and returns a map of individual delete responses. Each delete request has a unique ID\nand provides an order ID and custom attribute. Each delete response is returned with the ID\nof the corresponding request.\n\nTo delete a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkDeleteOrderCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkDeleteOrderCustomAttributesResponse" } } } } }, "/v2/orders/custom-attributes/bulk-upsert": { "post": { "tags": [ "OrderCustomAttributes" ], "summary": "BulkUpsertOrderCustomAttributes", "operationId": "BulkUpsertOrderCustomAttributes", "description": "Creates or updates order [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) as a bulk operation.\n\nUse this endpoint to delete one or more custom attributes from one or more orders.\nA custom attribute is based on a custom attribute definition in a Square seller account. (To create a\ncustom attribute definition, use the [CreateOrderCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/order-custom-attributes-api/create-order-custom-attribute-definition) endpoint.)\n\nThis `BulkUpsertOrderCustomAttributes` endpoint accepts a map of 1 to 25 individual upsert\nrequests and returns a map of individual upsert responses. Each upsert request has a unique ID\nand provides an order ID and custom attribute. Each upsert response is returned with the ID\nof the corresponding request.\n\nTo create or update a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkUpsertOrderCustomAttributesRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkUpsertOrderCustomAttributesResponse" } } } } }, "/v2/orders/search": { "post": { "tags": [ "Orders" ], "summary": "SearchOrders", "operationId": "SearchOrders", "description": "Search all orders for one or more locations. Orders include all sales,\nreturns, and exchanges regardless of how or when they entered the Square\necosystem (such as Point of Sale, Invoices, and Connect APIs).\n\n`SearchOrders` requests need to specify which locations to search and define a\n[SearchOrdersQuery](https://developer.squareup.com/reference/square_2024-04-17/objects/SearchOrdersQuery) object that controls\nhow to sort or filter the results. Your `SearchOrdersQuery` can:\n\n Set filter criteria.\n Set the sort order.\n Determine whether to return results as complete `Order` objects or as\n[OrderEntry](https://developer.squareup.com/reference/square_2024-04-17/objects/OrderEntry) objects.\n\nNote that details for orders processed with Square Point of Sale while in\noffline mode might not be transmitted to Square for up to 72 hours. Offline\norders have a `created_at` value that reflects the time the order was created,\nnot the time it was subsequently transmitted to Square.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchOrdersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchOrdersResponse" } } } } }, "/v2/orders/{order_id}": { "get": { "tags": [ "Orders" ], "summary": "RetrieveOrder", "operationId": "RetrieveOrder", "description": "Retrieves an [Order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) by ID.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "order_id", "description": "The ID of the order to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveOrderResponse" } } } }, "put": { "tags": [ "Orders" ], "summary": "UpdateOrder", "operationId": "UpdateOrder", "description": "Updates an open [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) by adding, replacing, or deleting\nfields. Orders with a `COMPLETED` or `CANCELED` state cannot be updated.\n\nAn `UpdateOrder` request requires the following:\n\n- The `order_id` in the endpoint path, identifying the order to update.\n- The latest `version` of the order to update.\n- The [sparse order](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#sparse-order-objects)\ncontaining only the fields to update and the version to which the update is\nbeing applied.\n- If deleting fields, the [dot notation paths](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#identifying-fields-to-delete)\nidentifying the fields to clear.\n\nTo pay for an order, see\n[Pay for Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders).", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "order_id", "description": "The ID of the order to update.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateOrderRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateOrderResponse" } } } } }, "/v2/orders/{order_id}/custom-attributes": { "get": { "tags": [ "OrderCustomAttributes" ], "summary": "ListOrderCustomAttributes", "operationId": "ListOrderCustomAttributes", "description": "Lists the [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with an order.\n\nYou can use the `with_definitions` query parameter to also retrieve custom attribute definitions\nin the same call.\n\nWhen all response pages are retrieved, the results include all custom attributes that are\nvisible to the requesting application, including those that are owned by other applications\nand set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "order_id", "description": "The ID of the target [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "visibility_filter", "description": "Requests that all of the custom attributes be returned, or only those that are read-only or read-write.", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "The cursor returned in the paged response from the previous call to this endpoint. \nProvide this cursor to retrieve the next page of results for your original request. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", "x-is-beta": true, "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to return in a single paged response. This limit is advisory. \nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. \nThe default value is 20.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", "x-is-beta": true, "type": "integer", "in": "query", "required": false }, { "name": "with_definitions", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom attribute, \ninformation about the data type, or other definition details. The default value is `false`.", "x-is-beta": true, "type": "boolean", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListOrderCustomAttributesResponse" } } } } }, "/v2/orders/{order_id}/custom-attributes/{custom_attribute_key}": { "delete": { "tags": [ "OrderCustomAttributes" ], "summary": "DeleteOrderCustomAttribute", "operationId": "DeleteOrderCustomAttribute", "description": "Deletes a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with a customer profile.\n\nTo delete a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "order_id", "description": "The ID of the target [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "custom_attribute_key", "description": "The key of the custom attribute to delete. This key must match the key of an\nexisting custom attribute definition.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteOrderCustomAttributeResponse" } } } }, "get": { "tags": [ "OrderCustomAttributes" ], "summary": "RetrieveOrderCustomAttribute", "operationId": "RetrieveOrderCustomAttribute", "description": "Retrieves a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) associated with an order.\n\nYou can use the `with_definition` query parameter to also retrieve the custom attribute definition\nin the same call.\n\nTo retrieve a custom attribute owned by another application, the `visibility` setting must be\n`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\nalso known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_READ" ] } ], "parameters": [ { "name": "order_id", "description": "The ID of the target [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "custom_attribute_key", "description": "The key of the custom attribute to retrieve. This key must match the key of an\nexisting custom attribute definition.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "version", "description": "To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include this optional field and specify the current version of the custom attribute.", "x-is-beta": true, "type": "integer", "in": "query", "required": false }, { "name": "with_definition", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each \ncustom attribute. Set this parameter to `true` to get the name and description of each custom attribute, \ninformation about the data type, or other definition details. The default value is `false`.", "x-is-beta": true, "type": "boolean", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveOrderCustomAttributeResponse" } } } }, "post": { "tags": [ "OrderCustomAttributes" ], "summary": "UpsertOrderCustomAttribute", "operationId": "UpsertOrderCustomAttribute", "description": "Creates or updates a [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) for an order.\n\nUse this endpoint to set the value of a custom attribute for a specific order.\nA custom attribute is based on a custom attribute definition in a Square seller account. (To create a\ncustom attribute definition, use the [CreateOrderCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/order-custom-attributes-api/create-order-custom-attribute-definition) endpoint.)\n\nTo create or update a custom attribute owned by another application, the `visibility` setting\nmust be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes\n(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ORDERS_WRITE" ] } ], "parameters": [ { "name": "order_id", "description": "The ID of the target [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order).", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "custom_attribute_key", "description": "The key of the custom attribute to create or update. This key must match the key \nof an existing custom attribute definition.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpsertOrderCustomAttributeRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpsertOrderCustomAttributeResponse" } } } } }, "/v2/orders/{order_id}/pay": { "post": { "tags": [ "Orders" ], "summary": "PayOrder", "operationId": "PayOrder", "description": "Pay for an [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) using one or more approved [payments](https://developer.squareup.com/reference/square_2024-04-17/objects/Payment)\nor settle an order with a total of `0`.\n\nThe total of the `payment_ids` listed in the request must be equal to the order\ntotal. Orders with a total amount of `0` can be marked as paid by specifying an empty\narray of `payment_ids` in the request.\n\nTo be used with `PayOrder`, a payment must:\n\n- Reference the order by specifying the `order_id` when [creating the payment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/create-payment).\nAny approved payments that reference the same `order_id` not specified in the\n`payment_ids` is canceled.\n- Be approved with [delayed capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture).\nUsing a delayed capture payment with `PayOrder` completes the approved payment.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "PAYMENTS_WRITE", "ORDERS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE", "ORDERS_WRITE" ] } ], "parameters": [ { "name": "order_id", "description": "The ID of the order being paid.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/PayOrderRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/PayOrderResponse" } } } } }, "/v2/payments": { "get": { "tags": [ "Payments" ], "summary": "ListPayments", "operationId": "ListPayments", "description": "Retrieves a list of payments taken by the account making the request.\n\nResults are eventually consistent, and new payments or changes to payments might take several\nseconds to appear.\n\nThe maximum results per page is 100.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "begin_time", "description": "Indicates the start of the time range to retrieve payments for, in RFC 3339 format. \nThe range is determined using the `created_at` field for each Payment.\nInclusive. Default: The current time minus one year.", "type": "string", "in": "query", "required": false }, { "name": "end_time", "description": "Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The \nrange is determined using the `created_at` field for each Payment.\n\nDefault: The current time.", "type": "string", "in": "query", "required": false }, { "name": "sort_order", "description": "The order in which results are listed by `Payment.created_at`:\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default).", "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "location_id", "description": "Limit results to the location supplied. By default, results are returned\nfor the default (main) location associated with the seller.", "type": "string", "in": "query", "required": false }, { "name": "total", "description": "The exact amount in the `total_money` for a payment.", "type": "integer", "format": "int64", "in": "query", "required": false }, { "name": "last_4", "description": "The last four digits of a payment card.", "type": "string", "in": "query", "required": false }, { "name": "card_brand", "description": "The brand of the payment card (for example, VISA).", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\n\nThe default value of 100 is also the maximum allowed value. If the provided value is \ngreater than 100, it is ignored and the default value is used instead.\n\nDefault: `100`", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListPaymentsResponse" } } } }, "post": { "tags": [ "Payments" ], "summary": "CreatePayment", "operationId": "CreatePayment", "description": "Creates a payment using the provided source. You can use this endpoint \nto charge a card (credit/debit card or \nSquare gift card) or record a payment that the seller received outside of Square \n(cash payment from a buyer or a payment that an external entity \nprocessed on behalf of the seller).\n\nThe endpoint creates a \n`Payment` object and returns it in the response.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreatePaymentRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreatePaymentResponse" } } } } }, "/v2/payments/cancel": { "post": { "tags": [ "Payments" ], "summary": "CancelPaymentByIdempotencyKey", "operationId": "CancelPaymentByIdempotencyKey", "description": "Cancels (voids) a payment identified by the idempotency key that is specified in the\nrequest.\n\nUse this method when the status of a `CreatePayment` request is unknown (for example, after you send a\n`CreatePayment` request, a network error occurs and you do not get a response). In this case, you can\ndirect Square to cancel the payment using this endpoint. In the request, you provide the same\nidempotency key that you provided in your `CreatePayment` request that you want to cancel. After\ncanceling the payment, you can submit your `CreatePayment` request again.\n\nNote that if no payment with the specified idempotency key is found, no action is taken and the endpoint\nreturns successfully.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CancelPaymentByIdempotencyKeyRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelPaymentByIdempotencyKeyResponse" } } } } }, "/v2/payments/{payment_id}": { "get": { "tags": [ "Payments" ], "summary": "GetPayment", "operationId": "GetPayment", "description": "Retrieves details for a specific payment.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "payment_id", "description": "A unique ID for the desired payment.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetPaymentResponse" } } } }, "put": { "tags": [ "Payments" ], "summary": "UpdatePayment", "operationId": "UpdatePayment", "description": "Updates a payment with the APPROVED status.\nYou can update the `amount_money` and `tip_money` using this endpoint.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "payment_id", "description": "The ID of the payment to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdatePaymentRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdatePaymentResponse" } } } } }, "/v2/payments/{payment_id}/cancel": { "post": { "tags": [ "Payments" ], "summary": "CancelPayment", "operationId": "CancelPayment", "description": "Cancels (voids) a payment. You can use this endpoint to cancel a payment with \nthe APPROVED `status`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "payment_id", "description": "The ID of the payment to cancel.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelPaymentResponse" } } } } }, "/v2/payments/{payment_id}/complete": { "post": { "tags": [ "Payments" ], "summary": "CompletePayment", "operationId": "CompletePayment", "description": "Completes (captures) a payment.\nBy default, payments are set to complete immediately after they are created.\n\nYou can use this endpoint to complete a payment with the APPROVED `status`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "payment_id", "description": "The unique ID identifying the payment to be completed.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CompletePaymentRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CompletePaymentResponse" } } } } }, "/v2/payouts": { "get": { "tags": [ "Payouts" ], "summary": "ListPayouts", "operationId": "ListPayouts", "description": "Retrieves a list of all payouts for the default location.\nYou can filter payouts by location ID, status, time range, and order them in ascending or descending order.\nTo call this endpoint, set `PAYOUTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "location_id", "description": "The ID of the location for which to list the payouts.\nBy default, payouts are returned for the default (main) location associated with the seller.", "type": "string", "in": "query", "required": false }, { "name": "status", "description": "If provided, only payouts with the given status are returned.", "type": "string", "in": "query", "required": false }, { "name": "begin_time", "description": "The timestamp for the beginning of the payout creation time, in RFC 3339 format.\nInclusive. Default: The current time minus one year.", "type": "string", "in": "query", "required": false }, { "name": "end_time", "description": "The timestamp for the end of the payout creation time, in RFC 3339 format.\nDefault: The current time.", "type": "string", "in": "query", "required": false }, { "name": "sort_order", "description": "The order in which payouts are listed.", "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).\nIf request parameters change between requests, subsequent results may contain duplicates or missing records.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value. If the provided value is\ngreater than 100, it is ignored and the default value is used instead.\nDefault: `100`", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListPayoutsResponse" } } } } }, "/v2/payouts/{payout_id}": { "get": { "tags": [ "Payouts" ], "summary": "GetPayout", "operationId": "GetPayout", "description": "Retrieves details of a specific payout identified by a payout ID.\nTo call this endpoint, set `PAYOUTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "payout_id", "description": "The ID of the payout to retrieve the information for.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetPayoutResponse" } } } } }, "/v2/payouts/{payout_id}/payout-entries": { "get": { "tags": [ "Payouts" ], "summary": "ListPayoutEntries", "operationId": "ListPayoutEntries", "description": "Retrieves a list of all payout entries for a specific payout.\nTo call this endpoint, set `PAYOUTS_READ` for the OAuth scope.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "payout_id", "description": "The ID of the payout to retrieve the information for.", "type": "string", "in": "path", "required": true }, { "name": "sort_order", "description": "The order in which payout entries are listed.", "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).\nIf request parameters change between requests, subsequent results may contain duplicates or missing records.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value. If the provided value is\ngreater than 100, it is ignored and the default value is used instead.\nDefault: `100`", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListPayoutEntriesResponse" } } } } }, "/v2/refunds": { "get": { "tags": [ "Refunds" ], "summary": "ListPaymentRefunds", "operationId": "ListPaymentRefunds", "description": "Retrieves a list of refunds for the account making the request.\n\nResults are eventually consistent, and new refunds or changes to refunds might take several\nseconds to appear.\n\nThe maximum results per page is 100.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "begin_time", "description": "Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339 \nformat. The range is determined using the `created_at` field for each `PaymentRefund`. \n\nDefault: The current time minus one year.", "type": "string", "in": "query", "required": false }, { "name": "end_time", "description": "Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339 \nformat. The range is determined using the `created_at` field for each `PaymentRefund`.\n\nDefault: The current time.", "type": "string", "in": "query", "required": false }, { "name": "sort_order", "description": "The order in which results are listed by `PaymentRefund.created_at`:\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default).", "type": "string", "in": "query", "required": false }, { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "location_id", "description": "Limit results to the location supplied. By default, results are returned\nfor all locations associated with the seller.", "type": "string", "in": "query", "required": false }, { "name": "status", "description": "If provided, only refunds with the given status are returned.\nFor a list of refund status values, see [PaymentRefund](https://developer.squareup.com/reference/square_2024-04-17/objects/PaymentRefund).\n\nDefault: If omitted, refunds are returned regardless of their status.", "type": "string", "in": "query", "required": false }, { "name": "source_type", "description": "If provided, only returns refunds whose payments have the indicated source type.\nCurrent values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `CASH`, and `EXTERNAL`.\nFor information about these payment source types, see\n[Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).\n\nDefault: If omitted, refunds are returned regardless of the source type.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to be returned in a single page.\n\nIt is possible to receive fewer results than the specified limit on a given page.\n\nIf the supplied value is greater than 100, no more than 100 results are returned.\n\nDefault: 100", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListPaymentRefundsResponse" } } } }, "post": { "tags": [ "Refunds" ], "summary": "RefundPayment", "operationId": "RefundPayment", "description": "Refunds a payment. You can refund the entire payment amount or a\nportion of it. You can use this endpoint to refund a card payment or record a \nrefund of a cash or external payment. For more information, see\n[Refund Payment](https://developer.squareup.com/docs/payments-api/refund-payments).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/RefundPaymentRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RefundPaymentResponse" } } } } }, "/v2/refunds/{refund_id}": { "get": { "tags": [ "Refunds" ], "summary": "GetPaymentRefund", "operationId": "GetPaymentRefund", "description": "Retrieves a specific refund using the `refund_id`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "refund_id", "description": "The unique ID for the desired `PaymentRefund`.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetPaymentRefundResponse" } } } } }, "/v2/sites": { "get": { "tags": [ "Sites" ], "summary": "ListSites", "operationId": "ListSites", "description": "Lists the Square Online sites that belong to a seller. Sites are listed in descending order by the `created_at` date.\n\n\n__Note:__ Square Online APIs are publicly available as part of an early access program. For more information, see [Early access program for Square Online APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ONLINE_STORE_SITE_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ONLINE_STORE_SITE_READ" ] } ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListSitesResponse" } } } } }, "/v2/sites/{site_id}/snippet": { "delete": { "tags": [ "Snippets" ], "summary": "DeleteSnippet", "operationId": "DeleteSnippet", "description": "Removes your snippet from a Square Online site.\n\nYou can call [ListSites](https://developer.squareup.com/reference/square_2024-04-17/sites-api/list-sites) to get the IDs of the sites that belong to a seller.\n\n\n__Note:__ Square Online APIs are publicly available as part of an early access program. For more information, see [Early access program for Square Online APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ONLINE_STORE_SNIPPETS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ONLINE_STORE_SNIPPETS_WRITE" ] } ], "parameters": [ { "name": "site_id", "description": "The ID of the site that contains the snippet.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteSnippetResponse" } } } }, "get": { "tags": [ "Snippets" ], "summary": "RetrieveSnippet", "operationId": "RetrieveSnippet", "description": "Retrieves your snippet from a Square Online site. A site can contain snippets from multiple snippet applications, but you can retrieve only the snippet that was added by your application.\n\nYou can call [ListSites](https://developer.squareup.com/reference/square_2024-04-17/sites-api/list-sites) to get the IDs of the sites that belong to a seller.\n\n\n__Note:__ Square Online APIs are publicly available as part of an early access program. For more information, see [Early access program for Square Online APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ONLINE_STORE_SNIPPETS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ONLINE_STORE_SNIPPETS_READ" ] } ], "parameters": [ { "name": "site_id", "description": "The ID of the site that contains the snippet.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveSnippetResponse" } } } }, "post": { "tags": [ "Snippets" ], "summary": "UpsertSnippet", "operationId": "UpsertSnippet", "description": "Adds a snippet to a Square Online site or updates the existing snippet on the site. \nThe snippet code is appended to the end of the `head` element on every page of the site, except checkout pages. A snippet application can add one snippet to a given site. \n\nYou can call [ListSites](https://developer.squareup.com/reference/square_2024-04-17/sites-api/list-sites) to get the IDs of the sites that belong to a seller.\n\n\n__Note:__ Square Online APIs are publicly available as part of an early access program. For more information, see [Early access program for Square Online APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "ONLINE_STORE_SNIPPETS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "ONLINE_STORE_SNIPPETS_WRITE" ] } ], "parameters": [ { "name": "site_id", "description": "The ID of the site where you want to add or update the snippet.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpsertSnippetRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpsertSnippetResponse" } } } } }, "/v2/subscriptions": { "post": { "tags": [ "Subscriptions" ], "summary": "CreateSubscription", "operationId": "CreateSubscription", "description": "Enrolls a customer in a subscription.\n\nIf you provide a card on file in the request, Square charges the card for\nthe subscription. Otherwise, Square sends an invoice to the customer\u0027s email\naddress. The subscription starts immediately, unless the request includes\nthe optional `start_date`. Each individual subscription is associated with a particular location.\n\nFor more information, see [Create a subscription](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#create-a-subscription).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateSubscriptionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateSubscriptionResponse" } } } } }, "/v2/subscriptions/bulk-swap-plan": { "post": { "tags": [ "Subscriptions" ], "summary": "BulkSwapPlan", "operationId": "BulkSwapPlan", "description": "Schedules a plan variation change for all active subscriptions under a given plan\nvariation. For more information, see [Swap Subscription Plan Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations).", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "SUBSCRIPTIONS_WRITE", "SUBSCRIPTIONS_READ", "ITEMS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "SUBSCRIPTIONS_WRITE", "SUBSCRIPTIONS_READ", "ITEMS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkSwapPlanRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkSwapPlanResponse" } } } } }, "/v2/subscriptions/search": { "post": { "tags": [ "Subscriptions" ], "summary": "SearchSubscriptions", "operationId": "SearchSubscriptions", "description": "Searches for subscriptions.\n\nResults are ordered chronologically by subscription creation date. If\nthe request specifies more than one location ID,\nthe endpoint orders the result\nby location ID, and then by creation date within each location. If no locations are given\nin the query, all locations are searched.\n\nYou can also optionally specify `customer_ids` to search by customer.\nIf left unset, all customers\nassociated with the specified locations are returned.\nIf the request specifies customer IDs, the endpoint orders results\nfirst by location, within location by customer ID, and within\ncustomer by subscription creation date.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "SUBSCRIPTIONS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "SUBSCRIPTIONS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchSubscriptionsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchSubscriptionsResponse" } } } } }, "/v2/subscriptions/{subscription_id}": { "get": { "tags": [ "Subscriptions" ], "summary": "RetrieveSubscription", "operationId": "RetrieveSubscription", "description": "Retrieves a specific subscription.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "SUBSCRIPTIONS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "SUBSCRIPTIONS_READ" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription to retrieve.", "type": "string", "in": "path", "required": true }, { "name": "include", "description": "A query parameter to specify related information to be included in the response. \n\nThe supported query parameter values are: \n\n- `actions`: to include scheduled actions on the targeted subscription.", "x-is-beta": true, "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveSubscriptionResponse" } } } }, "put": { "tags": [ "Subscriptions" ], "summary": "UpdateSubscription", "operationId": "UpdateSubscription", "description": "Updates a subscription by modifying or clearing `subscription` field values.\nTo clear a field, set its value to `null`.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateSubscriptionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateSubscriptionResponse" } } } } }, "/v2/subscriptions/{subscription_id}/actions/{action_id}": { "delete": { "tags": [ "Subscriptions" ], "summary": "DeleteSubscriptionAction", "operationId": "DeleteSubscriptionAction", "description": "Deletes a scheduled action for a subscription.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "SUBSCRIPTIONS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "SUBSCRIPTIONS_WRITE" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription the targeted action is to act upon.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "action_id", "description": "The ID of the targeted action to be deleted.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteSubscriptionActionResponse" } } } } }, "/v2/subscriptions/{subscription_id}/billing-anchor": { "post": { "tags": [ "Subscriptions" ], "summary": "ChangeBillingAnchorDate", "operationId": "ChangeBillingAnchorDate", "description": "Changes the [billing anchor date](https://developer.squareup.com/docs/subscriptions-api/subscription-billing#billing-dates)\nfor a subscription.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "SUBSCRIPTIONS_WRITE", "SUBSCRIPTIONS_READ", "ITEMS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "SUBSCRIPTIONS_WRITE", "SUBSCRIPTIONS_READ", "ITEMS_READ" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription to update the billing anchor date.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/ChangeBillingAnchorDateRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ChangeBillingAnchorDateResponse" } } } } }, "/v2/subscriptions/{subscription_id}/cancel": { "post": { "tags": [ "Subscriptions" ], "summary": "CancelSubscription", "operationId": "CancelSubscription", "description": "Schedules a `CANCEL` action to cancel an active subscription. This \nsets the `canceled_date` field to the end of the active billing period. After this date, \nthe subscription status changes from ACTIVE to CANCELED.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "SUBSCRIPTIONS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "SUBSCRIPTIONS_WRITE" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription to cancel.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelSubscriptionResponse" } } } } }, "/v2/subscriptions/{subscription_id}/events": { "get": { "tags": [ "Subscriptions" ], "summary": "ListSubscriptionEvents", "operationId": "ListSubscriptionEvents", "description": "Lists all [events](https://developer.squareup.com/docs/subscriptions-api/actions-events) for a specific subscription.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "SUBSCRIPTIONS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "SUBSCRIPTIONS_READ" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription to retrieve the events for.", "type": "string", "in": "path", "required": true }, { "name": "cursor", "description": "When the total number of resulting subscription events exceeds the limit of a paged response, \nspecify the cursor returned from a preceding response here to fetch the next set of results.\nIf the cursor is unset, the response contains the last page of the results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The upper limit on the number of subscription events to return\nin a paged response.", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListSubscriptionEventsResponse" } } } } }, "/v2/subscriptions/{subscription_id}/pause": { "post": { "tags": [ "Subscriptions" ], "summary": "PauseSubscription", "operationId": "PauseSubscription", "description": "Schedules a `PAUSE` action to pause an active subscription.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription to pause.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/PauseSubscriptionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/PauseSubscriptionResponse" } } } } }, "/v2/subscriptions/{subscription_id}/resume": { "post": { "tags": [ "Subscriptions" ], "summary": "ResumeSubscription", "operationId": "ResumeSubscription", "description": "Schedules a `RESUME` action to resume a paused or a deactivated subscription.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription to resume.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/ResumeSubscriptionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ResumeSubscriptionResponse" } } } } }, "/v2/subscriptions/{subscription_id}/swap-plan": { "post": { "tags": [ "Subscriptions" ], "summary": "SwapPlan", "operationId": "SwapPlan", "description": "Schedules a `SWAP_PLAN` action to swap a subscription plan variation in an existing subscription. \nFor more information, see [Swap Subscription Plan Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations).", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "CUSTOMERS_READ", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE", "ITEMS_READ", "ORDERS_WRITE", "INVOICES_WRITE" ] } ], "parameters": [ { "name": "subscription_id", "description": "The ID of the subscription to swap the subscription plan for.", "x-is-beta": true, "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SwapPlanRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SwapPlanResponse" } } } } }, "/v2/team-members": { "post": { "tags": [ "Team" ], "summary": "CreateTeamMember", "operationId": "CreateTeamMember", "description": "Creates a single `TeamMember` object. The `TeamMember` object is returned on successful creates.\nYou must provide the following values in your request to this endpoint:\n- `given_name`\n- `family_name`\n\nLearn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#createteammember).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateTeamMemberRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateTeamMemberResponse" } } } } }, "/v2/team-members/bulk-create": { "post": { "tags": [ "Team" ], "summary": "BulkCreateTeamMembers", "operationId": "BulkCreateTeamMembers", "description": "Creates multiple `TeamMember` objects. The created `TeamMember` objects are returned on successful creates.\nThis process is non-transactional and processes as much of the request as possible. If one of the creates in\nthe request cannot be successfully processed, the request is not marked as failed, but the body of the response\ncontains explicit error information for the failed create.\n\nLearn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#bulk-create-team-members).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkCreateTeamMembersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkCreateTeamMembersResponse" } } } } }, "/v2/team-members/bulk-update": { "post": { "tags": [ "Team" ], "summary": "BulkUpdateTeamMembers", "operationId": "BulkUpdateTeamMembers", "description": "Updates multiple `TeamMember` objects. The updated `TeamMember` objects are returned on successful updates.\nThis process is non-transactional and processes as much of the request as possible. If one of the updates in\nthe request cannot be successfully processed, the request is not marked as failed, but the body of the response\ncontains explicit error information for the failed update.\nLearn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#bulk-update-team-members).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkUpdateTeamMembersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkUpdateTeamMembersResponse" } } } } }, "/v2/team-members/search": { "post": { "tags": [ "Team" ], "summary": "SearchTeamMembers", "operationId": "SearchTeamMembers", "description": "Returns a paginated list of `TeamMember` objects for a business.\nThe list can be filtered by the following:\n- location IDs\n- `status`", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchTeamMembersRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchTeamMembersResponse" } } } } }, "/v2/team-members/{team_member_id}": { "get": { "tags": [ "Team" ], "summary": "RetrieveTeamMember", "operationId": "RetrieveTeamMember", "description": "Retrieves a `TeamMember` object for the given `TeamMember.id`.\nLearn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrieve-a-team-member).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "team_member_id", "description": "The ID of the team member to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveTeamMemberResponse" } } } }, "put": { "tags": [ "Team" ], "summary": "UpdateTeamMember", "operationId": "UpdateTeamMember", "description": "Updates a single `TeamMember` object. The `TeamMember` object is returned on successful updates.\nLearn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#update-a-team-member).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_WRITE" ] } ], "parameters": [ { "name": "team_member_id", "description": "The ID of the team member to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateTeamMemberRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateTeamMemberResponse" } } } } }, "/v2/team-members/{team_member_id}/wage-setting": { "get": { "tags": [ "Team" ], "summary": "RetrieveWageSetting", "operationId": "RetrieveWageSetting", "description": "Retrieves a `WageSetting` object for a team member specified\nby `TeamMember.id`.\nLearn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrievewagesetting).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_READ" ] } ], "parameters": [ { "name": "team_member_id", "description": "The ID of the team member for which to retrieve the wage setting.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveWageSettingResponse" } } } }, "put": { "tags": [ "Team" ], "summary": "UpdateWageSetting", "operationId": "UpdateWageSetting", "description": "Creates or updates a `WageSetting` object. The object is created if a\n`WageSetting` with the specified `team_member_id` does not exist. Otherwise,\nit fully replaces the `WageSetting` object for the team member.\nThe `WageSetting` is returned on a successful update.\nLearn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#create-or-update-a-wage-setting).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "EMPLOYEES_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "EMPLOYEES_WRITE" ] } ], "parameters": [ { "name": "team_member_id", "description": "The ID of the team member for which to update the `WageSetting` object.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateWageSettingRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateWageSettingResponse" } } } } }, "/v2/terminals/actions": { "post": { "tags": [ "Terminal" ], "summary": "CreateTerminalAction", "operationId": "CreateTerminalAction", "description": "Creates a Terminal action request and sends it to the specified device.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateTerminalActionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateTerminalActionResponse" } } } } }, "/v2/terminals/actions/search": { "post": { "tags": [ "Terminal" ], "summary": "SearchTerminalActions", "operationId": "SearchTerminalActions", "description": "Retrieves a filtered list of Terminal action requests created by the account making the request. Terminal action requests are available for 30 days.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchTerminalActionsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchTerminalActionsResponse" } } } } }, "/v2/terminals/actions/{action_id}": { "get": { "tags": [ "Terminal" ], "summary": "GetTerminalAction", "operationId": "GetTerminalAction", "description": "Retrieves a Terminal action request by `action_id`. Terminal action requests are available for 30 days.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "action_id", "description": "Unique ID for the desired `TerminalAction`.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetTerminalActionResponse" } } } } }, "/v2/terminals/actions/{action_id}/cancel": { "post": { "tags": [ "Terminal" ], "summary": "CancelTerminalAction", "operationId": "CancelTerminalAction", "description": "Cancels a Terminal action request if the status of the request permits it.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "action_id", "description": "Unique ID for the desired `TerminalAction`.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelTerminalActionResponse" } } } } }, "/v2/terminals/actions/{action_id}/dismiss": { "post": { "tags": [ "Terminal" ], "summary": "DismissTerminalAction", "operationId": "DismissTerminalAction", "description": "Dismisses a Terminal action request if the status and type of the request permits it.\n\nSee [Link and Dismiss Actions](https://developer.squareup.com/docs/terminal-api/advanced-features/custom-workflows/link-and-dismiss-actions) for more details.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "action_id", "description": "Unique ID for the `TerminalAction` associated with the action to be dismissed.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DismissTerminalActionResponse" } } } } }, "/v2/terminals/checkouts": { "post": { "tags": [ "Terminal" ], "summary": "CreateTerminalCheckout", "operationId": "CreateTerminalCheckout", "description": "Creates a Terminal checkout request and sends it to the specified device to take a payment\nfor the requested amount.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateTerminalCheckoutRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateTerminalCheckoutResponse" } } } } }, "/v2/terminals/checkouts/search": { "post": { "tags": [ "Terminal" ], "summary": "SearchTerminalCheckouts", "operationId": "SearchTerminalCheckouts", "description": "Returns a filtered list of Terminal checkout requests created by the application making the request. Only Terminal checkout requests created for the merchant scoped to the OAuth token are returned. Terminal checkout requests are available for 30 days.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchTerminalCheckoutsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchTerminalCheckoutsResponse" } } } } }, "/v2/terminals/checkouts/{checkout_id}": { "get": { "tags": [ "Terminal" ], "summary": "GetTerminalCheckout", "operationId": "GetTerminalCheckout", "description": "Retrieves a Terminal checkout request by `checkout_id`. Terminal checkout requests are available for 30 days.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "checkout_id", "description": "The unique ID for the desired `TerminalCheckout`.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetTerminalCheckoutResponse" } } } } }, "/v2/terminals/checkouts/{checkout_id}/cancel": { "post": { "tags": [ "Terminal" ], "summary": "CancelTerminalCheckout", "operationId": "CancelTerminalCheckout", "description": "Cancels a Terminal checkout request if the status of the request permits it.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "checkout_id", "description": "The unique ID for the desired `TerminalCheckout`.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelTerminalCheckoutResponse" } } } } }, "/v2/terminals/checkouts/{checkout_id}/dismiss": { "post": { "tags": [ "Terminal" ], "summary": "DismissTerminalCheckout", "operationId": "DismissTerminalCheckout", "description": "Dismisses a Terminal checkout request if the status and type of the request permits it.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "checkout_id", "description": "Unique ID for the `TerminalCheckout` associated with the checkout to be dismissed.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DismissTerminalCheckoutResponse" } } } } }, "/v2/terminals/refunds": { "post": { "tags": [ "Terminal" ], "summary": "CreateTerminalRefund", "operationId": "CreateTerminalRefund", "description": "Creates a request to refund an Interac payment completed on a Square Terminal. Refunds for Interac payments on a Square Terminal are supported only for Interac debit cards in Canada. Other refunds for Terminal payments should use the Refunds API. For more information, see [Refunds API](https://developer.squareup.com/reference/square_2024-04-17/refunds-api).", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateTerminalRefundRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateTerminalRefundResponse" } } } } }, "/v2/terminals/refunds/search": { "post": { "tags": [ "Terminal" ], "summary": "SearchTerminalRefunds", "operationId": "SearchTerminalRefunds", "description": "Retrieves a filtered list of Interac Terminal refund requests created by the seller making the request. Terminal refund requests are available for 30 days.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchTerminalRefundsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchTerminalRefundsResponse" } } } } }, "/v2/terminals/refunds/{terminal_refund_id}": { "get": { "tags": [ "Terminal" ], "summary": "GetTerminalRefund", "operationId": "GetTerminalRefund", "description": "Retrieves an Interac Terminal refund object by ID. Terminal refund objects are available for 30 days.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_READ" ] } ], "parameters": [ { "name": "terminal_refund_id", "description": "The unique ID for the desired `TerminalRefund`.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/GetTerminalRefundResponse" } } } } }, "/v2/terminals/refunds/{terminal_refund_id}/cancel": { "post": { "tags": [ "Terminal" ], "summary": "CancelTerminalRefund", "operationId": "CancelTerminalRefund", "description": "Cancels an Interac Terminal refund request by refund request ID if the status of the request permits it.", "x-release-status": "PUBLIC", "x-oauthpermissions": [ "PAYMENTS_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "PAYMENTS_WRITE" ] } ], "parameters": [ { "name": "terminal_refund_id", "description": "The unique ID for the desired `TerminalRefund`.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CancelTerminalRefundResponse" } } } } }, "/v2/terminals/refunds/{terminal_refund_id}/dismiss": { "post": { "tags": [ "Terminal" ], "summary": "DismissTerminalRefund", "operationId": "DismissTerminalRefund", "description": "Dismisses a Terminal refund request if the status and type of the request permits it.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "terminal_refund_id", "description": "Unique ID for the `TerminalRefund` associated with the refund to be dismissed.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DismissTerminalRefundResponse" } } } } }, "/v2/vendors/bulk-create": { "post": { "tags": [ "Vendors" ], "summary": "BulkCreateVendors", "operationId": "BulkCreateVendors", "description": "Creates one or more [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects to represent suppliers to a seller.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "VENDOR_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "VENDOR_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkCreateVendorsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkCreateVendorsResponse" } } } } }, "/v2/vendors/bulk-retrieve": { "post": { "tags": [ "Vendors" ], "summary": "BulkRetrieveVendors", "operationId": "BulkRetrieveVendors", "description": "Retrieves one or more vendors of specified [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) IDs.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "VENDOR_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "VENDOR_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkRetrieveVendorsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkRetrieveVendorsResponse" } } } } }, "/v2/vendors/bulk-update": { "put": { "tags": [ "Vendors" ], "summary": "BulkUpdateVendors", "operationId": "BulkUpdateVendors", "description": "Updates one or more of existing [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects as suppliers to a seller.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "VENDOR_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "VENDOR_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/BulkUpdateVendorsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/BulkUpdateVendorsResponse" } } } } }, "/v2/vendors/create": { "post": { "tags": [ "Vendors" ], "summary": "CreateVendor", "operationId": "CreateVendor", "description": "Creates a single [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) object to represent a supplier to a seller.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "VENDOR_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "VENDOR_WRITE" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateVendorRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateVendorResponse" } } } } }, "/v2/vendors/search": { "post": { "tags": [ "Vendors" ], "summary": "SearchVendors", "operationId": "SearchVendors", "description": "Searches for vendors using a filter against supported [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) properties and a supported sorter.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "VENDOR_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "VENDOR_READ" ] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/SearchVendorsRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SearchVendorsResponse" } } } } }, "/v2/vendors/{vendor_id}": { "get": { "tags": [ "Vendors" ], "summary": "RetrieveVendor", "operationId": "RetrieveVendor", "description": "Retrieves the vendor of a specified [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) ID.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "VENDOR_READ" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "VENDOR_READ" ] } ], "parameters": [ { "name": "vendor_id", "description": "ID of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) to retrieve.", "x-is-beta": true, "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveVendorResponse" } } } }, "put": { "tags": [ "Vendors" ], "summary": "UpdateVendor", "operationId": "UpdateVendor", "description": "Updates an existing [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) object as a supplier to a seller.", "x-release-status": "BETA", "x-is-beta": true, "x-oauthpermissions": [ "VENDOR_WRITE" ], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [ "VENDOR_WRITE" ] } ], "parameters": [ { "name": "vendor_id", "description": "", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateVendorRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateVendorResponse" } } } } }, "/v2/webhooks/event-types": { "get": { "tags": [ "WebhookSubscriptions" ], "summary": "ListWebhookEventTypes", "operationId": "ListWebhookEventTypes", "description": "Lists all webhook event types that can be subscribed to.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "api_version", "description": "The API version for which to list event types. Setting this field overrides the default version used by the application.", "type": "string", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListWebhookEventTypesResponse" } } } } }, "/v2/webhooks/subscriptions": { "get": { "tags": [ "WebhookSubscriptions" ], "summary": "ListWebhookSubscriptions", "operationId": "ListWebhookSubscriptions", "description": "Lists all webhook subscriptions owned by your application.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "cursor", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", "type": "string", "in": "query", "required": false }, { "name": "include_disabled", "description": "Includes disabled [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)s.\nBy default, all enabled [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)s are returned.", "type": "boolean", "in": "query", "required": false }, { "name": "sort_order", "description": "Sorts the returned list by when the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) was created with the specified order.\nThis field defaults to ASC.", "type": "string", "in": "query", "required": false }, { "name": "limit", "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value.\n\nDefault: 100", "type": "integer", "in": "query", "required": false } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ListWebhookSubscriptionsResponse" } } } }, "post": { "tags": [ "WebhookSubscriptions" ], "summary": "CreateWebhookSubscription", "operationId": "CreateWebhookSubscription", "description": "Creates a webhook subscription.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/CreateWebhookSubscriptionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/CreateWebhookSubscriptionResponse" } } } } }, "/v2/webhooks/subscriptions/{subscription_id}": { "delete": { "tags": [ "WebhookSubscriptions" ], "summary": "DeleteWebhookSubscription", "operationId": "DeleteWebhookSubscription", "description": "Deletes a webhook subscription.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "subscription_id", "description": "[REQUIRED] The ID of the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) to delete.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DeleteWebhookSubscriptionResponse" } } } }, "get": { "tags": [ "WebhookSubscriptions" ], "summary": "RetrieveWebhookSubscription", "operationId": "RetrieveWebhookSubscription", "description": "Retrieves a webhook subscription identified by its ID.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "subscription_id", "description": "[REQUIRED] The ID of the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) to retrieve.", "type": "string", "in": "path", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RetrieveWebhookSubscriptionResponse" } } } }, "put": { "tags": [ "WebhookSubscriptions" ], "summary": "UpdateWebhookSubscription", "operationId": "UpdateWebhookSubscription", "description": "Updates a webhook subscription.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "subscription_id", "description": "[REQUIRED] The ID of the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateWebhookSubscriptionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateWebhookSubscriptionResponse" } } } } }, "/v2/webhooks/subscriptions/{subscription_id}/signature-key": { "post": { "tags": [ "WebhookSubscriptions" ], "summary": "UpdateWebhookSubscriptionSignatureKey", "operationId": "UpdateWebhookSubscriptionSignatureKey", "description": "Updates a webhook subscription by replacing the existing signature key with a new one.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "subscription_id", "description": "[REQUIRED] The ID of the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) to update.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/UpdateWebhookSubscriptionSignatureKeyRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/UpdateWebhookSubscriptionSignatureKeyResponse" } } } } }, "/v2/webhooks/subscriptions/{subscription_id}/test": { "post": { "tags": [ "WebhookSubscriptions" ], "summary": "TestWebhookSubscription", "operationId": "TestWebhookSubscription", "description": "Tests a webhook subscription by sending a test event to the notification URL.", "x-release-status": "PUBLIC", "x-oauthpermissions": [], "x-sq-version": "2024-04-17", "security": [ { "oauth2": [] } ], "parameters": [ { "name": "subscription_id", "description": "[REQUIRED] The ID of the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) to test.", "type": "string", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "description": "An object containing the fields to POST for the request.\n\nSee the corresponding object definition for field details.", "schema": { "$ref": "#/definitions/TestWebhookSubscriptionRequest" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/TestWebhookSubscriptionResponse" } } } } } }, "definitions": { "ActionCancelReason": { "type": "string", "enum": [ "BUYER_CANCELED", "SELLER_CANCELED", "TIMED_OUT" ], "x-enum-elements": [ { "name": "BUYER_CANCELED", "description": "A person canceled the `TerminalCheckout` from a Square device." }, { "name": "SELLER_CANCELED", "description": "A client canceled the `TerminalCheckout` using the API." }, { "name": "TIMED_OUT", "description": "The `TerminalCheckout` timed out (see `deadline_duration` on the `TerminalCheckout`)." } ], "description": "", "x-release-status": "PUBLIC" }, "ActivityType": { "type": "string", "enum": [ "ADJUSTMENT", "APP_FEE_REFUND", "APP_FEE_REVENUE", "AUTOMATIC_SAVINGS", "AUTOMATIC_SAVINGS_REVERSED", "CHARGE", "DEPOSIT_FEE", "DISPUTE", "ESCHEATMENT", "FEE", "FREE_PROCESSING", "HOLD_ADJUSTMENT", "INITIAL_BALANCE_CHANGE", "MONEY_TRANSFER", "MONEY_TRANSFER_REVERSAL", "OPEN_DISPUTE", "OTHER", "OTHER_ADJUSTMENT", "PAID_SERVICE_FEE", "PAID_SERVICE_FEE_REFUND", "REDEMPTION_CODE", "REFUND", "RELEASE_ADJUSTMENT", "RESERVE_HOLD", "RESERVE_RELEASE", "RETURNED_PAYOUT", "SQUARE_CAPITAL_PAYMENT", "SQUARE_CAPITAL_REVERSED_PAYMENT", "SUBSCRIPTION_FEE", "SUBSCRIPTION_FEE_PAID_REFUND", "SUBSCRIPTION_FEE_REFUND", "TAX_ON_FEE", "THIRD_PARTY_FEE", "THIRD_PARTY_FEE_REFUND", "PAYOUT", "AUTOMATIC_BITCOIN_CONVERSIONS", "AUTOMATIC_BITCOIN_CONVERSIONS_REVERSED", "CREDIT_CARD_REPAYMENT", "CREDIT_CARD_REPAYMENT_REVERSED", "LOCAL_OFFERS_CASHBACK", "LOCAL_OFFERS_FEE", "PERCENTAGE_PROCESSING_ENROLLMENT", "PERCENTAGE_PROCESSING_DEACTIVATION", "PERCENTAGE_PROCESSING_REPAYMENT", "PERCENTAGE_PROCESSING_REPAYMENT_REVERSED", "PROCESSING_FEE", "PROCESSING_FEE_REFUND", "UNDO_PROCESSING_FEE_REFUND", "GIFT_CARD_LOAD_FEE", "GIFT_CARD_LOAD_FEE_REFUND", "UNDO_GIFT_CARD_LOAD_FEE_REFUND", "BALANCE_FOLDERS_TRANSFER", "BALANCE_FOLDERS_TRANSFER_REVERSED", "GIFT_CARD_POOL_TRANSFER", "GIFT_CARD_POOL_TRANSFER_REVERSED" ], "x-enum-elements": [ { "name": "ADJUSTMENT", "description": "A manual adjustment applied to the seller\u0027s account by Square." }, { "name": "APP_FEE_REFUND", "description": "A refund for an application fee on a payment." }, { "name": "APP_FEE_REVENUE", "description": "Revenue generated from an application fee on a payment." }, { "name": "AUTOMATIC_SAVINGS", "description": "An automatic transfer from the payment processing balance to the Square Savings account. These are generally proportional to the seller\u0027s sales." }, { "name": "AUTOMATIC_SAVINGS_REVERSED", "description": "An automatic transfer from the Square Savings account back to the processing balance. These are generally proportional to the seller\u0027s refunds." }, { "name": "CHARGE", "description": "A credit card payment capture." }, { "name": "DEPOSIT_FEE", "description": "Any fees involved with deposits such as instant deposits." }, { "name": "DISPUTE", "description": "The balance change due to a dispute event." }, { "name": "ESCHEATMENT", "description": "An escheatment entry for remittance." }, { "name": "FEE", "description": "The cost plus adjustment fee." }, { "name": "FREE_PROCESSING", "description": "Square offers free payments processing for a variety of business scenarios, including seller\nreferrals or when Square wants to apologize (for example, for a bug, customer service, or repricing complication).\nThis entry represents a credit to the seller for the purposes of free processing." }, { "name": "HOLD_ADJUSTMENT", "description": "An adjustment made by Square related to holding a payment." }, { "name": "INITIAL_BALANCE_CHANGE", "description": "An external change to a seller\u0027s balance (initial, in the sense that it causes the creation of the other activity types, such as a hold and refund)." }, { "name": "MONEY_TRANSFER", "description": "The balance change from a money transfer." }, { "name": "MONEY_TRANSFER_REVERSAL", "description": "The reversal of a money transfer." }, { "name": "OPEN_DISPUTE", "description": "The balance change for a chargeback that\u0027s been filed." }, { "name": "OTHER", "description": "Any other type that doesn\u0027t belong in the rest of the types." }, { "name": "OTHER_ADJUSTMENT", "description": "Any other type of adjustment that doesn\u0027t fall under existing types." }, { "name": "PAID_SERVICE_FEE", "description": "A fee paid to a third-party seller." }, { "name": "PAID_SERVICE_FEE_REFUND", "description": "A fee refunded to a third-party seller." }, { "name": "REDEMPTION_CODE", "description": "Repayment for a redemption code." }, { "name": "REFUND", "description": "A refund for an existing card payment." }, { "name": "RELEASE_ADJUSTMENT", "description": "An adjustment made by Square related to releasing a payment." }, { "name": "RESERVE_HOLD", "description": "Fees paid for a funding risk reserve." }, { "name": "RESERVE_RELEASE", "description": "Fees released from a risk reserve." }, { "name": "RETURNED_PAYOUT", "description": "An entry created when Square receives a response for the ACH file that Square sent indicating that the\nsettlement of the original entry failed." }, { "name": "SQUARE_CAPITAL_PAYMENT", "description": "A capital merchant cash advance (MCA) assessment. These are generally proportional to the merchant\u0027s sales but can be issued for other reasons related to the MCA." }, { "name": "SQUARE_CAPITAL_REVERSED_PAYMENT", "description": "A capital merchant cash advance (MCA) assessment refund. These are generally proportional to the merchant\u0027s refunds but can be issued for other reasons related to the MCA." }, { "name": "SUBSCRIPTION_FEE", "description": "A fee charged for subscription to a Square product." }, { "name": "SUBSCRIPTION_FEE_PAID_REFUND", "description": "A Square subscription fee that\u0027s been refunded." }, { "name": "SUBSCRIPTION_FEE_REFUND", "description": "The refund of a previously charged Square product subscription fee." }, { "name": "TAX_ON_FEE", "description": "The tax paid on fee amounts." }, { "name": "THIRD_PARTY_FEE", "description": "Fees collected by a third-party platform." }, { "name": "THIRD_PARTY_FEE_REFUND", "description": "Refunded fees from a third-party platform." }, { "name": "PAYOUT", "description": "The balance change due to money transfer." }, { "name": "AUTOMATIC_BITCOIN_CONVERSIONS", "description": "Indicates that the portion of each payment withheld by Square was automatically converted into bitcoin using Cash App. The seller manages their bitcoin in their Cash App account." }, { "name": "AUTOMATIC_BITCOIN_CONVERSIONS_REVERSED", "description": "Indicates that a withheld payment, which was scheduled to be converted into bitcoin using Cash App, was deposited back to the Square payments balance." }, { "name": "CREDIT_CARD_REPAYMENT", "description": "Indicates that a repayment toward the outstanding balance on the seller\u0027s Square credit card was made." }, { "name": "CREDIT_CARD_REPAYMENT_REVERSED", "description": "Indicates that a repayment toward the outstanding balance on the seller\u0027s Square credit card was reversed." }, { "name": "LOCAL_OFFERS_CASHBACK", "description": "Cashback amount given by a Square Local Offers seller to their customer for a purchase." }, { "name": "LOCAL_OFFERS_FEE", "description": "A commission fee paid by a Square Local Offers seller to Square for a purchase discovered through Square Local Offers." }, { "name": "PERCENTAGE_PROCESSING_ENROLLMENT", "description": "When activating Percentage Processing, a credit is applied to the seller’s account to offset any negative balance caused by a dispute." }, { "name": "PERCENTAGE_PROCESSING_DEACTIVATION", "description": "Deducting the outstanding Percentage Processing balance from the seller’s account. It\u0027s the final installment in repaying the dispute-induced negative balance through percentage processing." }, { "name": "PERCENTAGE_PROCESSING_REPAYMENT", "description": "Withheld funds from a payment to cover a negative balance. It\u0027s an installment to repay the amount from a dispute that had been offset during Percentage Processing enrollment." }, { "name": "PERCENTAGE_PROCESSING_REPAYMENT_REVERSED", "description": "The reversal of a percentage processing repayment that happens for example when a refund is issued for a payment." }, { "name": "PROCESSING_FEE", "description": "The processing fee for a payment. If sellers opt for Gross Settlement, i.e., direct bank withdrawal instead of deducting fees from daily sales, the processing fee is recorded separately as a new payout entry, not part of the CHARGE payout entry." }, { "name": "PROCESSING_FEE_REFUND", "description": "The processing fee for a payment refund issued by sellers enrolled in Gross Settlement. The refunded processing fee is recorded separately as a new payout entry, not part of the REFUND payout entry." }, { "name": "UNDO_PROCESSING_FEE_REFUND", "description": "When undoing a processing fee refund in a Gross Settlement payment, this payout entry type is used." }, { "name": "GIFT_CARD_LOAD_FEE", "description": "Fee collected during the sale or reload of a gift card. This fee, which is a portion of the amount loaded on the gift card, is deducted from the merchant\u0027s payment balance." }, { "name": "GIFT_CARD_LOAD_FEE_REFUND", "description": "Refund for fee charged during the sale or reload of a gift card." }, { "name": "UNDO_GIFT_CARD_LOAD_FEE_REFUND", "description": "The undo of a refund for a fee charged during the sale or reload of a gift card." }, { "name": "BALANCE_FOLDERS_TRANSFER", "description": "A transfer of funds to a banking folder. In the United States, the folder name is \u0027Checking Folder\u0027; in Canada, it\u0027s \u0027Balance Folder.\u0027" }, { "name": "BALANCE_FOLDERS_TRANSFER_REVERSED", "description": "A reversal of transfer of funds from a banking folder. In the United States, the folder name is \u0027Checking Folder\u0027; in Canada, it\u0027s \u0027Balance Folder.\u0027" }, { "name": "GIFT_CARD_POOL_TRANSFER", "description": "A transfer of gift card funds to a central gift card pool account. In franchises, when gift cards are loaded or reloaded at any location, the money transfers to the franchisor\u0027s account." }, { "name": "GIFT_CARD_POOL_TRANSFER_REVERSED", "description": "A reversal of transfer of gift card funds from a central gift card pool account. In franchises, when gift cards are loaded or reloaded at any location, the money transfers to the franchisor\u0027s account." } ], "description": "", "x-release-status": "PUBLIC" }, "ApplicationDetailsExternalSquareProduct": { "type": "string", "enum": [ "APPOINTMENTS", "ECOMMERCE_API", "INVOICES", "ONLINE_STORE", "OTHER", "RESTAURANTS", "RETAIL", "SQUARE_POS", "TERMINAL_API", "VIRTUAL_TERMINAL" ], "x-enum-elements": [ { "name": "APPOINTMENTS", "description": "" }, { "name": "ECOMMERCE_API", "description": "" }, { "name": "INVOICES", "description": "" }, { "name": "ONLINE_STORE", "description": "" }, { "name": "OTHER", "description": "" }, { "name": "RESTAURANTS", "description": "" }, { "name": "RETAIL", "description": "" }, { "name": "SQUARE_POS", "description": "" }, { "name": "TERMINAL_API", "description": "" }, { "name": "VIRTUAL_TERMINAL", "description": "" } ], "description": "A list of products to return to external callers.", "x-release-status": "PUBLIC" }, "ApplicationType": { "type": "string", "enum": [ "TERMINAL_API" ], "x-enum-elements": [ { "name": "TERMINAL_API", "description": "" } ], "description": "", "x-release-status": "BETA", "x-is-beta": true }, "ArchivedState": { "type": "string", "enum": [ "ARCHIVED_STATE_NOT_ARCHIVED", "ARCHIVED_STATE_ARCHIVED", "ARCHIVED_STATE_ALL" ], "x-enum-elements": [ { "name": "ARCHIVED_STATE_NOT_ARCHIVED", "description": "Requested items are not archived with the `is_archived` attribute set to `false`." }, { "name": "ARCHIVED_STATE_ARCHIVED", "description": "Requested items are archived with the `is_archived` attribute set to `true`." }, { "name": "ARCHIVED_STATE_ALL", "description": "Requested items can be archived or not archived." } ], "description": "Defines the values for the `archived_state` query expression \nused in [SearchCatalogItems](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-items) \nto return the archived, not archived or either type of catalog items.", "x-release-status": "PUBLIC" }, "BankAccountStatus": { "type": "string", "enum": [ "VERIFICATION_IN_PROGRESS", "VERIFIED", "DISABLED" ], "x-enum-elements": [ { "name": "VERIFICATION_IN_PROGRESS", "description": "Indicates that the verification process has started. Some features\n(for example, creditable or debitable) may be provisionally enabled on the bank\naccount." }, { "name": "VERIFIED", "description": "Indicates that the bank account was successfully verified." }, { "name": "DISABLED", "description": "Indicates that the bank account is disabled and is permanently unusable\nfor funds transfer. A bank account can be disabled because of a failed verification\nattempt or a failed deposit attempt." } ], "description": "Indicates the current verification status of a `BankAccount` object.", "x-release-status": "PUBLIC" }, "BankAccountType": { "type": "string", "enum": [ "CHECKING", "SAVINGS", "INVESTMENT", "OTHER", "BUSINESS_CHECKING" ], "x-enum-elements": [ { "name": "CHECKING", "description": "An account at a financial institution against which checks can be\ndrawn by the account depositor." }, { "name": "SAVINGS", "description": "An account at a financial institution that pays interest but cannot be\nused directly as money in the narrow sense of a medium of exchange." }, { "name": "INVESTMENT", "description": "An account at a financial institution that contains a deposit of funds\nand/or securities." }, { "name": "OTHER", "description": "An account at a financial institution which cannot be described by the\nother types." }, { "name": "BUSINESS_CHECKING", "description": "An account at a financial institution against which checks can be\ndrawn specifically for business purposes (non-personal use)." } ], "description": "Indicates the financial purpose of the bank account.", "x-release-status": "PUBLIC" }, "BookingBookingSource": { "type": "string", "enum": [ "FIRST_PARTY_MERCHANT", "FIRST_PARTY_BUYER", "THIRD_PARTY_BUYER", "API" ], "x-enum-elements": [ { "name": "FIRST_PARTY_MERCHANT", "description": "The booking was created by a seller from a Square Appointments application, such as the Square Appointments Dashboard or a Square Appointments mobile app." }, { "name": "FIRST_PARTY_BUYER", "description": "The booking was created by a buyer from a Square Appointments application, such as Square Online Booking Site." }, { "name": "THIRD_PARTY_BUYER", "description": "The booking was created by a buyer created from a third-party application." }, { "name": "API", "description": "The booking was created by a seller or a buyer from the Square Bookings API." } ], "description": "Supported sources a booking was created from.", "x-release-status": "PUBLIC" }, "BookingCreatorDetailsCreatorType": { "type": "string", "enum": [ "TEAM_MEMBER", "CUSTOMER" ], "x-enum-elements": [ { "name": "TEAM_MEMBER", "description": "The creator is of the seller type." }, { "name": "CUSTOMER", "description": "The creator is of the buyer type." } ], "description": "Supported types of a booking creator.", "x-release-status": "PUBLIC" }, "BookingStatus": { "type": "string", "enum": [ "PENDING", "CANCELLED_BY_CUSTOMER", "CANCELLED_BY_SELLER", "DECLINED", "ACCEPTED", "NO_SHOW" ], "x-enum-elements": [ { "name": "PENDING", "description": "An unaccepted booking. It is visible to both sellers and customers." }, { "name": "CANCELLED_BY_CUSTOMER", "description": "A customer-cancelled booking. It is visible to both the seller and the customer." }, { "name": "CANCELLED_BY_SELLER", "description": "A seller-cancelled booking. It is visible to both the seller and the customer." }, { "name": "DECLINED", "description": "A declined booking. It had once been pending, but was then declined by the seller." }, { "name": "ACCEPTED", "description": "An accepted booking agreed to or accepted by the seller." }, { "name": "NO_SHOW", "description": "A no-show booking. The booking was accepted at one time, but have now been marked as a no-show by\nthe seller because the client either missed the booking or cancelled it without enough notice." } ], "description": "Supported booking statuses.", "x-release-status": "PUBLIC" }, "BusinessAppointmentSettingsAlignmentTime": { "type": "string", "enum": [ "SERVICE_DURATION", "QUARTER_HOURLY", "HALF_HOURLY", "HOURLY" ], "x-enum-elements": [ { "name": "SERVICE_DURATION", "description": "The service duration unit is one visit of a fixed time interval specified by the seller." }, { "name": "QUARTER_HOURLY", "description": "The service duration unit is a 15-minute interval. Bookings can be scheduled every quarter hour." }, { "name": "HALF_HOURLY", "description": "The service duration unit is a 30-minute interval. Bookings can be scheduled every half hour." }, { "name": "HOURLY", "description": "The service duration unit is a 60-minute interval. Bookings can be scheduled every hour." } ], "description": "Time units of a service duration for bookings.", "x-release-status": "PUBLIC" }, "BusinessAppointmentSettingsBookingLocationType": { "type": "string", "enum": [ "BUSINESS_LOCATION", "CUSTOMER_LOCATION", "PHONE" ], "x-enum-elements": [ { "name": "BUSINESS_LOCATION", "description": "The service is provided at a seller location." }, { "name": "CUSTOMER_LOCATION", "description": "The service is provided at a customer location." }, { "name": "PHONE", "description": "The service is provided over the phone." } ], "description": "Supported types of location where service is provided.", "x-release-status": "PUBLIC" }, "BusinessAppointmentSettingsCancellationPolicy": { "type": "string", "enum": [ "CANCELLATION_TREATED_AS_NO_SHOW", "CUSTOM_POLICY" ], "x-enum-elements": [ { "name": "CANCELLATION_TREATED_AS_NO_SHOW", "description": "Cancellations are treated as no shows and may incur a fee as specified by `cancellation_fee_money`." }, { "name": "CUSTOM_POLICY", "description": "Cancellations follow the seller-specified policy that is described in free-form text and not enforced automatically by Square." } ], "description": "The category of the seller’s cancellation policy.", "x-release-status": "PUBLIC" }, "BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType": { "type": "string", "enum": [ "PER_TEAM_MEMBER", "PER_LOCATION" ], "x-enum-elements": [ { "name": "PER_TEAM_MEMBER", "description": "The maximum number of daily appointments is set on a per team member basis." }, { "name": "PER_LOCATION", "description": "The maximum number of daily appointments is set on a per location basis." } ], "description": "Types of daily appointment limits.", "x-release-status": "PUBLIC" }, "BusinessBookingProfileBookingPolicy": { "type": "string", "enum": [ "ACCEPT_ALL", "REQUIRES_ACCEPTANCE" ], "x-enum-elements": [ { "name": "ACCEPT_ALL", "description": "The seller accepts all booking requests automatically." }, { "name": "REQUIRES_ACCEPTANCE", "description": "The seller must accept requests to complete bookings." } ], "description": "Policies for accepting bookings.", "x-release-status": "PUBLIC" }, "BusinessBookingProfileCustomerTimezoneChoice": { "type": "string", "enum": [ "BUSINESS_LOCATION_TIMEZONE", "CUSTOMER_CHOICE" ], "x-enum-elements": [ { "name": "BUSINESS_LOCATION_TIMEZONE", "description": "Use the time zone of the business location for bookings." }, { "name": "CUSTOMER_CHOICE", "description": "Use the customer-chosen time zone for bookings." } ], "description": "Choices of customer-facing time zone used for bookings.", "x-release-status": "PUBLIC" }, "CardBrand": { "type": "string", "enum": [ "OTHER_BRAND", "VISA", "MASTERCARD", "AMERICAN_EXPRESS", "DISCOVER", "DISCOVER_DINERS", "JCB", "CHINA_UNIONPAY", "SQUARE_GIFT_CARD", "SQUARE_CAPITAL_CARD", "INTERAC", "EFTPOS", "FELICA", "EBT" ], "x-enum-elements": [ { "name": "OTHER_BRAND", "description": "" }, { "name": "VISA", "description": "" }, { "name": "MASTERCARD", "description": "" }, { "name": "AMERICAN_EXPRESS", "description": "" }, { "name": "DISCOVER", "description": "" }, { "name": "DISCOVER_DINERS", "description": "" }, { "name": "JCB", "description": "" }, { "name": "CHINA_UNIONPAY", "description": "" }, { "name": "SQUARE_GIFT_CARD", "description": "" }, { "name": "SQUARE_CAPITAL_CARD", "description": "" }, { "name": "INTERAC", "description": "" }, { "name": "EFTPOS", "description": "" }, { "name": "FELICA", "description": "" }, { "name": "EBT", "description": "" } ], "description": "Indicates a card\u0027s brand, such as `VISA` or `MASTERCARD`.", "x-release-status": "PUBLIC" }, "CardCoBrand": { "type": "string", "enum": [ "UNKNOWN", "AFTERPAY", "CLEARPAY" ], "x-enum-elements": [ { "name": "UNKNOWN", "description": "" }, { "name": "AFTERPAY", "description": "" }, { "name": "CLEARPAY", "description": "" } ], "description": "Indicates the brand for a co-branded card.", "x-release-status": "PUBLIC" }, "CardPrepaidType": { "type": "string", "enum": [ "UNKNOWN_PREPAID_TYPE", "NOT_PREPAID", "PREPAID" ], "x-enum-elements": [ { "name": "UNKNOWN_PREPAID_TYPE", "description": "" }, { "name": "NOT_PREPAID", "description": "" }, { "name": "PREPAID", "description": "" } ], "description": "Indicates a card\u0027s prepaid type, such as `NOT_PREPAID` or `PREPAID`.", "x-release-status": "PUBLIC" }, "CardType": { "type": "string", "enum": [ "UNKNOWN_CARD_TYPE", "CREDIT", "DEBIT" ], "x-enum-elements": [ { "name": "UNKNOWN_CARD_TYPE", "description": "" }, { "name": "CREDIT", "description": "" }, { "name": "DEBIT", "description": "" } ], "description": "Indicates a card\u0027s type, such as `CREDIT` or `DEBIT`.", "x-release-status": "PUBLIC" }, "CashDrawerEventType": { "type": "string", "enum": [ "NO_SALE", "CASH_TENDER_PAYMENT", "OTHER_TENDER_PAYMENT", "CASH_TENDER_CANCELLED_PAYMENT", "OTHER_TENDER_CANCELLED_PAYMENT", "CASH_TENDER_REFUND", "OTHER_TENDER_REFUND", "PAID_IN", "PAID_OUT" ], "x-enum-elements": [ { "name": "NO_SALE", "description": "Triggered when a no sale occurs on a cash drawer.\nA CashDrawerEvent of this type must have a zero money amount." }, { "name": "CASH_TENDER_PAYMENT", "description": "Triggered when a cash tender payment occurs on a cash drawer.\nA CashDrawerEvent of this type can must not have a negative amount." }, { "name": "OTHER_TENDER_PAYMENT", "description": "Triggered when a check, gift card, or other non-cash payment occurs\non a cash drawer.\nA CashDrawerEvent of this type must have a zero money amount." }, { "name": "CASH_TENDER_CANCELLED_PAYMENT", "description": "Triggered when a split tender bill is cancelled after cash has been\ntendered.\nA CASH_TENDER_CANCELLED_PAYMENT should have a corresponding CASH_TENDER_PAYMENT.\nA CashDrawerEvent of this type must not have a negative amount." }, { "name": "OTHER_TENDER_CANCELLED_PAYMENT", "description": "Triggered when a split tender bill is cancelled after a non-cash tender\nhas been tendered. An OTHER_TENDER_CANCELLED_PAYMENT should have a corresponding\nOTHER_TENDER_PAYMENT. A CashDrawerEvent of this type must have a zero money\namount." }, { "name": "CASH_TENDER_REFUND", "description": "Triggered when a cash tender refund occurs.\nA CashDrawerEvent of this type must not have a negative amount." }, { "name": "OTHER_TENDER_REFUND", "description": "Triggered when an other tender refund occurs.\nA CashDrawerEvent of this type must have a zero money amount." }, { "name": "PAID_IN", "description": "Triggered when money unrelated to a payment is added to the cash drawer.\nFor example, an employee adds coins to the drawer.\nA CashDrawerEvent of this type must not have a negative amount." }, { "name": "PAID_OUT", "description": "Triggered when money is removed from the drawer for other reasons\nthan making change.\nFor example, an employee pays a delivery person with cash from the cash drawer.\nA CashDrawerEvent of this type must not have a negative amount." } ], "description": "The types of events on a CashDrawerShift.\nEach event type represents an employee action on the actual cash drawer\nrepresented by a CashDrawerShift.", "x-release-status": "PUBLIC" }, "CashDrawerShiftState": { "type": "string", "enum": [ "OPEN", "ENDED", "CLOSED" ], "x-enum-elements": [ { "name": "OPEN", "description": "An open cash drawer shift." }, { "name": "ENDED", "description": "A cash drawer shift that is ended but has not yet had an employee content audit." }, { "name": "CLOSED", "description": "An ended cash drawer shift that is closed with a completed employee\ncontent audit and recorded result." } ], "description": "The current state of a cash drawer shift.", "x-release-status": "PUBLIC" }, "CatalogCategoryType": { "type": "string", "enum": [ "REGULAR_CATEGORY", "MENU_CATEGORY", "KITCHEN_CATEGORY" ], "x-enum-elements": [ { "name": "REGULAR_CATEGORY", "description": "The regular category." }, { "name": "MENU_CATEGORY", "description": "The menu category." }, { "name": "KITCHEN_CATEGORY", "description": "Kitchen categories are used by KDS (Kitchen Display System) to route items to specific clients" } ], "description": "Indicates the type of a category.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogCustomAttributeDefinitionAppVisibility": { "type": "string", "enum": [ "APP_VISIBILITY_HIDDEN", "APP_VISIBILITY_READ_ONLY", "APP_VISIBILITY_READ_WRITE_VALUES" ], "x-enum-elements": [ { "name": "APP_VISIBILITY_HIDDEN", "description": "Other applications cannot read this custom attribute." }, { "name": "APP_VISIBILITY_READ_ONLY", "description": "Other applications can read this custom attribute definition and\nvalues." }, { "name": "APP_VISIBILITY_READ_WRITE_VALUES", "description": "Other applications can read and write custom attribute values on objects.\nThey can read but cannot edit the custom attribute definition." } ], "description": "Defines the visibility of a custom attribute to applications other than their\ncreating application.", "x-release-status": "PUBLIC" }, "CatalogCustomAttributeDefinitionSellerVisibility": { "type": "string", "enum": [ "SELLER_VISIBILITY_HIDDEN", "SELLER_VISIBILITY_READ_WRITE_VALUES" ], "x-enum-elements": [ { "name": "SELLER_VISIBILITY_HIDDEN", "description": "Sellers cannot read this custom attribute in Square client\napplications or Square APIs." }, { "name": "SELLER_VISIBILITY_READ_WRITE_VALUES", "description": "Sellers can read and write this custom attribute value in catalog objects,\nbut cannot edit the custom attribute definition." } ], "description": "Defines the visibility of a custom attribute to sellers in Square\nclient applications, Square APIs or in Square UIs (including Square Point\nof Sale applications and Square Dashboard).", "x-release-status": "PUBLIC" }, "CatalogCustomAttributeDefinitionType": { "type": "string", "enum": [ "STRING", "BOOLEAN", "NUMBER", "SELECTION" ], "x-enum-elements": [ { "name": "STRING", "description": "A free-form string containing up to 255 characters." }, { "name": "BOOLEAN", "description": "A `true` or `false` value." }, { "name": "NUMBER", "description": "A decimal string representation of a number. Can support up to 5 digits after the decimal point." }, { "name": "SELECTION", "description": "One or more choices from `allowed_selections`." } ], "description": "Defines the possible types for a custom attribute.", "x-release-status": "PUBLIC" }, "CatalogDiscountModifyTaxBasis": { "type": "string", "enum": [ "MODIFY_TAX_BASIS", "DO_NOT_MODIFY_TAX_BASIS" ], "x-enum-elements": [ { "name": "MODIFY_TAX_BASIS", "description": "Application of the discount will modify the tax basis." }, { "name": "DO_NOT_MODIFY_TAX_BASIS", "description": "Application of the discount will not modify the tax basis." } ], "description": "", "x-release-status": "PUBLIC" }, "CatalogDiscountType": { "type": "string", "enum": [ "FIXED_PERCENTAGE", "FIXED_AMOUNT", "VARIABLE_PERCENTAGE", "VARIABLE_AMOUNT" ], "x-enum-elements": [ { "name": "FIXED_PERCENTAGE", "description": "Apply the discount as a fixed percentage (e.g., 5%) off the item price." }, { "name": "FIXED_AMOUNT", "description": "Apply the discount as a fixed amount (e.g., $1.00) off the item price." }, { "name": "VARIABLE_PERCENTAGE", "description": "Apply the discount as a variable percentage off the item price. The percentage will be specified at the time of sale." }, { "name": "VARIABLE_AMOUNT", "description": "Apply the discount as a variable amount off the item price. The amount will be specified at the time of sale." } ], "description": "How to apply a CatalogDiscount to a CatalogItem.", "x-release-status": "PUBLIC" }, "CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference": { "type": "string", "enum": [ "DAIRY_FREE", "GLUTEN_FREE", "HALAL", "KOSHER", "NUT_FREE", "VEGAN", "VEGETARIAN" ], "x-enum-elements": [ { "name": "DAIRY_FREE", "description": "" }, { "name": "GLUTEN_FREE", "description": "" }, { "name": "HALAL", "description": "" }, { "name": "KOSHER", "description": "" }, { "name": "NUT_FREE", "description": "" }, { "name": "VEGAN", "description": "" }, { "name": "VEGETARIAN", "description": "" } ], "description": "Standard dietary preferences for food and beverage items that are recommended on item creation.", "x-release-status": "PUBLIC" }, "CatalogItemFoodAndBeverageDetailsDietaryPreferenceType": { "type": "string", "enum": [ "STANDARD", "CUSTOM" ], "x-enum-elements": [ { "name": "STANDARD", "description": "A standard value from a pre-determined list." }, { "name": "CUSTOM", "description": "A user-defined custom value." } ], "description": "The type of dietary preference for the `FOOD_AND_BEV` type of items and integredients.", "x-release-status": "PUBLIC" }, "CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient": { "type": "string", "enum": [ "CELERY", "CRUSTACEANS", "EGGS", "FISH", "GLUTEN", "LUPIN", "MILK", "MOLLUSCS", "MUSTARD", "PEANUTS", "SESAME", "SOY", "SULPHITES", "TREE_NUTS" ], "x-enum-elements": [ { "name": "CELERY", "description": "" }, { "name": "CRUSTACEANS", "description": "" }, { "name": "EGGS", "description": "" }, { "name": "FISH", "description": "" }, { "name": "GLUTEN", "description": "" }, { "name": "LUPIN", "description": "" }, { "name": "MILK", "description": "" }, { "name": "MOLLUSCS", "description": "" }, { "name": "MUSTARD", "description": "" }, { "name": "PEANUTS", "description": "" }, { "name": "SESAME", "description": "" }, { "name": "SOY", "description": "" }, { "name": "SULPHITES", "description": "" }, { "name": "TREE_NUTS", "description": "" } ], "description": "Standard ingredients for food and beverage items that are recommended on item creation.", "x-release-status": "PUBLIC" }, "CatalogItemProductType": { "type": "string", "enum": [ "REGULAR", "GIFT_CARD", "APPOINTMENTS_SERVICE", "FOOD_AND_BEV", "EVENT", "DIGITAL", "DONATION", "LEGACY_SQUARE_ONLINE_SERVICE", "LEGACY_SQUARE_ONLINE_MEMBERSHIP" ], "x-enum-elements": [ { "name": "REGULAR", "description": "An ordinary item." }, { "name": "GIFT_CARD", "description": "A Square gift card." }, { "name": "APPOINTMENTS_SERVICE", "description": "A service that can be booked using the Square Appointments app." }, { "name": "FOOD_AND_BEV", "description": "A food or beverage item that can be sold by restaurants and other food venues." }, { "name": "EVENT", "description": "An event which tickets can be sold for, including location, address, and times." }, { "name": "DIGITAL", "description": "A digital item like an ebook or song." }, { "name": "DONATION", "description": "A donation which site visitors can send for any cause." }, { "name": "LEGACY_SQUARE_ONLINE_SERVICE", "description": "A legacy Square Online service that is manually fulfilled. This corresponds to the `Other` item type displayed in the Square Seller Dashboard and Square POS apps." }, { "name": "LEGACY_SQUARE_ONLINE_MEMBERSHIP", "description": "A legacy Square Online membership that is manually fulfilled. This corresponds to the `Membership` item type displayed in the Square Seller Dashboard and Square POS apps." } ], "description": "The type of a CatalogItem. Connect V2 only allows the creation of `REGULAR` or `APPOINTMENTS_SERVICE` items.", "x-release-status": "PUBLIC" }, "CatalogModifierListModifierType": { "type": "string", "enum": [ "LIST", "TEXT" ], "x-enum-elements": [ { "name": "LIST", "description": "The `CatalogModifierList` instance is a non-empty list of non text-based modifiers." }, { "name": "TEXT", "description": "The `CatalogModifierList` instance is a single text-based modifier." } ], "description": "Defines the type of `CatalogModifierList`.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogModifierListSelectionType": { "type": "string", "enum": [ "SINGLE", "MULTIPLE" ], "x-enum-elements": [ { "name": "SINGLE", "description": "Indicates that a CatalogModifierList allows only a\nsingle CatalogModifier to be selected." }, { "name": "MULTIPLE", "description": "Indicates that a CatalogModifierList allows multiple\nCatalogModifier to be selected." } ], "description": "Indicates whether a CatalogModifierList supports multiple selections.", "x-release-status": "PUBLIC" }, "CatalogObjectType": { "type": "string", "enum": [ "ITEM", "IMAGE", "CATEGORY", "ITEM_VARIATION", "TAX", "DISCOUNT", "MODIFIER_LIST", "MODIFIER", "PRICING_RULE", "PRODUCT_SET", "TIME_PERIOD", "MEASUREMENT_UNIT", "SUBSCRIPTION_PLAN_VARIATION", "ITEM_OPTION", "ITEM_OPTION_VAL", "CUSTOM_ATTRIBUTE_DEFINITION", "QUICK_AMOUNTS_SETTINGS", "SUBSCRIPTION_PLAN", "AVAILABILITY_PERIOD" ], "x-enum-elements": [ { "name": "ITEM", "description": "The `CatalogObject` instance is of the [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) type and represents an item. The item-specific data\nmust be set on the `item_data` field." }, { "name": "IMAGE", "description": "The `CatalogObject` instance is of the [CatalogImage](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogImage) type and represents an image. The image-specific data\nmust be set on the `image_data` field." }, { "name": "CATEGORY", "description": "The `CatalogObject` instance is of the [CatalogCategory](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogCategory) type and represents a category. The category-specific data\nmust be set on the `category_data` field." }, { "name": "ITEM_VARIATION", "description": "The `CatalogObject` instance is of the [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) type and represents an item variation, also referred to as variation.\nThe item variation-specific data must be set on the `item_variation_data` field." }, { "name": "TAX", "description": "The `CatalogObject` instance is of the [CatalogTax](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogTax) type and represents a tax. The tax-specific data\nmust be set on the `tax_data` field." }, { "name": "DISCOUNT", "description": "The `CatalogObject` instance is of the [CatalogDiscount](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogDiscount) type and represents a discount. The discount-specific data\nmust be set on the `discount_data` field." }, { "name": "MODIFIER_LIST", "description": "The `CatalogObject` instance is of the [CatalogModifierList](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifierList) type and represents a modifier list.\nThe modifier-list-specific data must be set on the `modifier_list_data` field." }, { "name": "MODIFIER", "description": "The `CatalogObject` instance is of the [CatalogModifier](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifier) type and represents a modifier. The modifier-specific data\nmust be set on the `modifier_data` field." }, { "name": "PRICING_RULE", "description": "The `CatalogObject` instance is of the [CatalogPricingRule](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogPricingRule) type and represents a pricing rule. The pricing-rule-specific data\nmust be set on the `pricing_rule_data` field." }, { "name": "PRODUCT_SET", "description": "The `CatalogObject` instance is of the [CatalogProductSet](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogProductSet) type and represents a product set.\nThe product-set-specific data will be stored in the `product_set_data` field." }, { "name": "TIME_PERIOD", "description": "The `CatalogObject` instance is of the [CatalogTimePeriod](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogTimePeriod) type and represents a time period.\nThe time-period-specific data must be set on the `time_period_data` field." }, { "name": "MEASUREMENT_UNIT", "description": "The `CatalogObject` instance is of the [CatalogMeasurementUnit](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogMeasurementUnit) type and represents a measurement unit specifying the unit of\nmeasure and precision in which an item variation is sold. The measurement-unit-specific data must set on the `measurement_unit_data` field." }, { "name": "SUBSCRIPTION_PLAN_VARIATION", "description": "The `CatalogObject` instance is of the [CatalogSubscriptionPlan](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogSubscriptionPlan) type and represents a subscription plan.\nThe subscription-plan-specific data must be stored on the `subscription_plan_data` field." }, { "name": "ITEM_OPTION", "description": "The `CatalogObject` instance is of the [CatalogItemOption](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemOption) type and represents a list of options (such as a color or size of a T-shirt)\nthat can be assigned to item variations. The item-option-specific data must be on the `item_option_data` field." }, { "name": "ITEM_OPTION_VAL", "description": "The `CatalogObject` instance is of the [CatalogItemOptionValue](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemOptionValue) type and represents a value associated with one or more item options.\nFor example, an item option of \"Size\" may have item option values such as \"Small\" or \"Medium\".\nThe item-option-value-specific data must be on the `item_option_value_data` field." }, { "name": "CUSTOM_ATTRIBUTE_DEFINITION", "description": "The `CatalogObject` instance is of the [CatalogCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogCustomAttributeDefinition) type and represents the definition of a custom attribute.\nThe custom-attribute-definition-specific data must be set on the `custom_attribute_definition_data` field." }, { "name": "QUICK_AMOUNTS_SETTINGS", "description": "The `CatalogObject` instance is of the [CatalogQuickAmountsSettings](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogQuickAmountsSettings) type and represents settings to configure preset charges for quick payments at each location.\nFor example, a location may have a list of both AUTO and MANUAL quick amounts that are set to DISABLED.\nThe quick-amounts-settings-specific data must be set on the `quick_amounts_settings_data` field." }, { "name": "SUBSCRIPTION_PLAN", "description": "The `CatalogObject` instance is of the [CatalogSubscriptionPlan](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogSubscriptionPlan) type and represents a subscription plan.\nThe subscription plan specific data must be stored on the `subscription_plan_data` field." }, { "name": "AVAILABILITY_PERIOD", "description": "The `CatalogObject` instance is of the [CatalogAvailabilityPeriod](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogAvailabilityPeriod) type and represents an availability period.\nThe availability period specific data must be stored on the `availability_period_data` field." } ], "description": "Possible types of CatalogObjects returned from the catalog, each\ncontaining type-specific properties in the `*_data` field corresponding to the specified object type.", "x-release-status": "PUBLIC" }, "CatalogPricingType": { "type": "string", "enum": [ "FIXED_PRICING", "VARIABLE_PRICING" ], "x-enum-elements": [ { "name": "FIXED_PRICING", "description": "The catalog item variation\u0027s price is fixed." }, { "name": "VARIABLE_PRICING", "description": "The catalog item variation\u0027s price is entered at the time of sale." } ], "description": "Indicates whether the price of a CatalogItemVariation should be entered manually at the time of sale.", "x-release-status": "PUBLIC" }, "CatalogQuickAmountType": { "type": "string", "enum": [ "QUICK_AMOUNT_TYPE_MANUAL", "QUICK_AMOUNT_TYPE_AUTO" ], "x-enum-elements": [ { "name": "QUICK_AMOUNT_TYPE_MANUAL", "description": "Quick Amount is created manually by the seller." }, { "name": "QUICK_AMOUNT_TYPE_AUTO", "description": "Quick Amount is generated automatically by machine learning algorithms." } ], "description": "Determines the type of a specific Quick Amount.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogQuickAmountsSettingsOption": { "type": "string", "enum": [ "DISABLED", "MANUAL", "AUTO" ], "x-enum-elements": [ { "name": "DISABLED", "description": "Option for seller to disable Quick Amounts." }, { "name": "MANUAL", "description": "Option for seller to choose manually created Quick Amounts." }, { "name": "AUTO", "description": "Option for seller to choose automatically created Quick Amounts." } ], "description": "Determines a seller\u0027s option on Quick Amounts feature.", "x-release-status": "BETA", "x-is-beta": true }, "ChangeTiming": { "type": "string", "enum": [ "IMMEDIATE", "END_OF_BILLING_CYCLE" ], "x-enum-elements": [ { "name": "IMMEDIATE", "description": "The action occurs immediately." }, { "name": "END_OF_BILLING_CYCLE", "description": "The action occurs at the end of the billing cycle." } ], "description": "Supported timings when a pending change, as an action, takes place to a subscription.", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutLocationSettingsBrandingButtonShape": { "type": "string", "enum": [ "SQUARED", "ROUNDED", "PILL" ], "x-enum-elements": [ { "name": "SQUARED", "description": "" }, { "name": "ROUNDED", "description": "" }, { "name": "PILL", "description": "" } ], "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutLocationSettingsBrandingHeaderType": { "type": "string", "enum": [ "BUSINESS_NAME", "FRAMED_LOGO", "FULL_WIDTH_LOGO" ], "x-enum-elements": [ { "name": "BUSINESS_NAME", "description": "" }, { "name": "FRAMED_LOGO", "description": "" }, { "name": "FULL_WIDTH_LOGO", "description": "" } ], "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutOptionsPaymentType": { "type": "string", "enum": [ "CARD_PRESENT", "MANUAL_CARD_ENTRY", "FELICA_ID", "FELICA_QUICPAY", "FELICA_TRANSPORTATION_GROUP", "FELICA_ALL", "PAYPAY" ], "x-enum-elements": [ { "name": "CARD_PRESENT", "description": "Accept credit card or debit card payments via tap, dip or swipe." }, { "name": "MANUAL_CARD_ENTRY", "description": "Launches the manual credit or debit card entry screen for the buyer to complete." }, { "name": "FELICA_ID", "description": "Launches the iD checkout screen for the buyer to complete." }, { "name": "FELICA_QUICPAY", "description": "Launches the QUICPay checkout screen for the buyer to complete." }, { "name": "FELICA_TRANSPORTATION_GROUP", "description": "Launches the Transportation Group checkout screen for the buyer to complete." }, { "name": "FELICA_ALL", "description": "Launches a checkout screen for the buyer on the Square Terminal that\nallows them to select a specific FeliCa brand or select the check balance screen." }, { "name": "PAYPAY", "description": "Launches the PayPay checkout screen for the buyer to complete." } ], "description": "", "x-release-status": "PUBLIC" }, "ComponentComponentType": { "type": "string", "enum": [ "APPLICATION", "CARD_READER", "BATTERY", "WIFI", "ETHERNET", "PRINTER" ], "x-enum-elements": [ { "name": "APPLICATION", "description": "" }, { "name": "CARD_READER", "description": "" }, { "name": "BATTERY", "description": "" }, { "name": "WIFI", "description": "" }, { "name": "ETHERNET", "description": "" }, { "name": "PRINTER", "description": "" } ], "description": "An enum for ComponentType.", "x-release-status": "BETA", "x-is-beta": true }, "Country": { "type": "string", "enum": [ "ZZ", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW" ], "x-enum-elements": [ { "name": "ZZ", "description": "Unknown" }, { "name": "AD", "description": "Andorra" }, { "name": "AE", "description": "United Arab Emirates" }, { "name": "AF", "description": "Afghanistan" }, { "name": "AG", "description": "Antigua and Barbuda" }, { "name": "AI", "description": "Anguilla" }, { "name": "AL", "description": "Albania" }, { "name": "AM", "description": "Armenia" }, { "name": "AO", "description": "Angola" }, { "name": "AQ", "description": "Antartica" }, { "name": "AR", "description": "Argentina" }, { "name": "AS", "description": "American Samoa" }, { "name": "AT", "description": "Austria" }, { "name": "AU", "description": "Australia" }, { "name": "AW", "description": "Aruba" }, { "name": "AX", "description": "Åland Islands" }, { "name": "AZ", "description": "Azerbaijan" }, { "name": "BA", "description": "Bosnia and Herzegovina" }, { "name": "BB", "description": "Barbados" }, { "name": "BD", "description": "Bangladesh" }, { "name": "BE", "description": "Belgium" }, { "name": "BF", "description": "Burkina Faso" }, { "name": "BG", "description": "Bulgaria" }, { "name": "BH", "description": "Bahrain" }, { "name": "BI", "description": "Burundi" }, { "name": "BJ", "description": "Benin" }, { "name": "BL", "description": "Saint Barthélemy" }, { "name": "BM", "description": "Bermuda" }, { "name": "BN", "description": "Brunei" }, { "name": "BO", "description": "Bolivia" }, { "name": "BQ", "description": "Bonaire" }, { "name": "BR", "description": "Brazil" }, { "name": "BS", "description": "Bahamas" }, { "name": "BT", "description": "Bhutan" }, { "name": "BV", "description": "Bouvet Island" }, { "name": "BW", "description": "Botswana" }, { "name": "BY", "description": "Belarus" }, { "name": "BZ", "description": "Belize" }, { "name": "CA", "description": "Canada" }, { "name": "CC", "description": "Cocos Islands" }, { "name": "CD", "description": "Democratic Republic of the Congo" }, { "name": "CF", "description": "Central African Republic" }, { "name": "CG", "description": "Congo" }, { "name": "CH", "description": "Switzerland" }, { "name": "CI", "description": "Ivory Coast" }, { "name": "CK", "description": "Cook Islands" }, { "name": "CL", "description": "Chile" }, { "name": "CM", "description": "Cameroon" }, { "name": "CN", "description": "China" }, { "name": "CO", "description": "Colombia" }, { "name": "CR", "description": "Costa Rica" }, { "name": "CU", "description": "Cuba" }, { "name": "CV", "description": "Cabo Verde" }, { "name": "CW", "description": "Curaçao" }, { "name": "CX", "description": "Christmas Island" }, { "name": "CY", "description": "Cyprus" }, { "name": "CZ", "description": "Czechia" }, { "name": "DE", "description": "Germany" }, { "name": "DJ", "description": "Djibouti" }, { "name": "DK", "description": "Denmark" }, { "name": "DM", "description": "Dominica" }, { "name": "DO", "description": "Dominican Republic" }, { "name": "DZ", "description": "Algeria" }, { "name": "EC", "description": "Ecuador" }, { "name": "EE", "description": "Estonia" }, { "name": "EG", "description": "Egypt" }, { "name": "EH", "description": "Western Sahara" }, { "name": "ER", "description": "Eritrea" }, { "name": "ES", "description": "Spain" }, { "name": "ET", "description": "Ethiopia" }, { "name": "FI", "description": "Finland" }, { "name": "FJ", "description": "Fiji" }, { "name": "FK", "description": "Falkland Islands" }, { "name": "FM", "description": "Federated States of Micronesia" }, { "name": "FO", "description": "Faroe Islands" }, { "name": "FR", "description": "France" }, { "name": "GA", "description": "Gabon" }, { "name": "GB", "description": "United Kingdom" }, { "name": "GD", "description": "Grenada" }, { "name": "GE", "description": "Georgia" }, { "name": "GF", "description": "French Guiana" }, { "name": "GG", "description": "Guernsey" }, { "name": "GH", "description": "Ghana" }, { "name": "GI", "description": "Gibraltar" }, { "name": "GL", "description": "Greenland" }, { "name": "GM", "description": "Gambia" }, { "name": "GN", "description": "Guinea" }, { "name": "GP", "description": "Guadeloupe" }, { "name": "GQ", "description": "Equatorial Guinea" }, { "name": "GR", "description": "Greece" }, { "name": "GS", "description": "South Georgia and the South Sandwich Islands" }, { "name": "GT", "description": "Guatemala" }, { "name": "GU", "description": "Guam" }, { "name": "GW", "description": "Guinea-Bissau" }, { "name": "GY", "description": "Guyana" }, { "name": "HK", "description": "Hong Kong" }, { "name": "HM", "description": "Heard Island and McDonald Islands" }, { "name": "HN", "description": "Honduras" }, { "name": "HR", "description": "Croatia" }, { "name": "HT", "description": "Haiti" }, { "name": "HU", "description": "Hungary" }, { "name": "ID", "description": "Indonesia" }, { "name": "IE", "description": "Ireland" }, { "name": "IL", "description": "Israel" }, { "name": "IM", "description": "Isle of Man" }, { "name": "IN", "description": "India" }, { "name": "IO", "description": "British Indian Ocean Territory" }, { "name": "IQ", "description": "Iraq" }, { "name": "IR", "description": "Iran" }, { "name": "IS", "description": "Iceland" }, { "name": "IT", "description": "Italy" }, { "name": "JE", "description": "Jersey" }, { "name": "JM", "description": "Jamaica" }, { "name": "JO", "description": "Jordan" }, { "name": "JP", "description": "Japan" }, { "name": "KE", "description": "Kenya" }, { "name": "KG", "description": "Kyrgyzstan" }, { "name": "KH", "description": "Cambodia" }, { "name": "KI", "description": "Kiribati" }, { "name": "KM", "description": "Comoros" }, { "name": "KN", "description": "Saint Kitts and Nevis" }, { "name": "KP", "description": "Democratic People\u0027s Republic of Korea" }, { "name": "KR", "description": "Republic of Korea" }, { "name": "KW", "description": "Kuwait" }, { "name": "KY", "description": "Cayman Islands" }, { "name": "KZ", "description": "Kazakhstan" }, { "name": "LA", "description": "Lao People\u0027s Democratic Republic" }, { "name": "LB", "description": "Lebanon" }, { "name": "LC", "description": "Saint Lucia" }, { "name": "LI", "description": "Liechtenstein" }, { "name": "LK", "description": "Sri Lanka" }, { "name": "LR", "description": "Liberia" }, { "name": "LS", "description": "Lesotho" }, { "name": "LT", "description": "Lithuania" }, { "name": "LU", "description": "Luxembourg" }, { "name": "LV", "description": "Latvia" }, { "name": "LY", "description": "Libya" }, { "name": "MA", "description": "Morocco" }, { "name": "MC", "description": "Monaco" }, { "name": "MD", "description": "Moldova" }, { "name": "ME", "description": "Montenegro" }, { "name": "MF", "description": "Saint Martin" }, { "name": "MG", "description": "Madagascar" }, { "name": "MH", "description": "Marshall Islands" }, { "name": "MK", "description": "North Macedonia" }, { "name": "ML", "description": "Mali" }, { "name": "MM", "description": "Myanmar" }, { "name": "MN", "description": "Mongolia" }, { "name": "MO", "description": "Macao" }, { "name": "MP", "description": "Northern Mariana Islands" }, { "name": "MQ", "description": "Martinique" }, { "name": "MR", "description": "Mauritania" }, { "name": "MS", "description": "Montserrat" }, { "name": "MT", "description": "Malta" }, { "name": "MU", "description": "Mauritius" }, { "name": "MV", "description": "Maldives" }, { "name": "MW", "description": "Malawi" }, { "name": "MX", "description": "Mexico" }, { "name": "MY", "description": "Malaysia" }, { "name": "MZ", "description": "Mozambique" }, { "name": "NA", "description": "Namibia" }, { "name": "NC", "description": "New Caledonia" }, { "name": "NE", "description": "Niger" }, { "name": "NF", "description": "Norfolk Island" }, { "name": "NG", "description": "Nigeria" }, { "name": "NI", "description": "Nicaragua" }, { "name": "NL", "description": "Netherlands" }, { "name": "NO", "description": "Norway" }, { "name": "NP", "description": "Nepal" }, { "name": "NR", "description": "Nauru" }, { "name": "NU", "description": "Niue" }, { "name": "NZ", "description": "New Zealand" }, { "name": "OM", "description": "Oman" }, { "name": "PA", "description": "Panama" }, { "name": "PE", "description": "Peru" }, { "name": "PF", "description": "French Polynesia" }, { "name": "PG", "description": "Papua New Guinea" }, { "name": "PH", "description": "Philippines" }, { "name": "PK", "description": "Pakistan" }, { "name": "PL", "description": "Poland" }, { "name": "PM", "description": "Saint Pierre and Miquelon" }, { "name": "PN", "description": "Pitcairn" }, { "name": "PR", "description": "Puerto Rico" }, { "name": "PS", "description": "Palestine" }, { "name": "PT", "description": "Portugal" }, { "name": "PW", "description": "Palau" }, { "name": "PY", "description": "Paraguay" }, { "name": "QA", "description": "Qatar" }, { "name": "RE", "description": "Réunion" }, { "name": "RO", "description": "Romania" }, { "name": "RS", "description": "Serbia" }, { "name": "RU", "description": "Russia" }, { "name": "RW", "description": "Rwanda" }, { "name": "SA", "description": "Saudi Arabia" }, { "name": "SB", "description": "Solomon Islands" }, { "name": "SC", "description": "Seychelles" }, { "name": "SD", "description": "Sudan" }, { "name": "SE", "description": "Sweden" }, { "name": "SG", "description": "Singapore" }, { "name": "SH", "description": "Saint Helena, Ascension and Tristan da Cunha" }, { "name": "SI", "description": "Slovenia" }, { "name": "SJ", "description": "Svalbard and Jan Mayen" }, { "name": "SK", "description": "Slovakia" }, { "name": "SL", "description": "Sierra Leone" }, { "name": "SM", "description": "San Marino" }, { "name": "SN", "description": "Senegal" }, { "name": "SO", "description": "Somalia" }, { "name": "SR", "description": "Suriname" }, { "name": "SS", "description": "South Sudan" }, { "name": "ST", "description": "Sao Tome and Principe" }, { "name": "SV", "description": "El Salvador" }, { "name": "SX", "description": "Sint Maarten" }, { "name": "SY", "description": "Syrian Arab Republic" }, { "name": "SZ", "description": "Eswatini" }, { "name": "TC", "description": "Turks and Caicos Islands" }, { "name": "TD", "description": "Chad" }, { "name": "TF", "description": "French Southern Territories" }, { "name": "TG", "description": "Togo" }, { "name": "TH", "description": "Thailand" }, { "name": "TJ", "description": "Tajikistan" }, { "name": "TK", "description": "Tokelau" }, { "name": "TL", "description": "Timor-Leste" }, { "name": "TM", "description": "Turkmenistan" }, { "name": "TN", "description": "Tunisia" }, { "name": "TO", "description": "Tonga" }, { "name": "TR", "description": "Turkey" }, { "name": "TT", "description": "Trinidad and Tobago" }, { "name": "TV", "description": "Tuvalu" }, { "name": "TW", "description": "Taiwan" }, { "name": "TZ", "description": "Tanzania" }, { "name": "UA", "description": "Ukraine" }, { "name": "UG", "description": "Uganda" }, { "name": "UM", "description": "United States Minor Outlying Islands" }, { "name": "US", "description": "United States of America" }, { "name": "UY", "description": "Uruguay" }, { "name": "UZ", "description": "Uzbekistan" }, { "name": "VA", "description": "Vatican City" }, { "name": "VC", "description": "Saint Vincent and the Grenadines" }, { "name": "VE", "description": "Venezuela" }, { "name": "VG", "description": "British Virgin Islands" }, { "name": "VI", "description": "U.S. Virgin Islands" }, { "name": "VN", "description": "Vietnam" }, { "name": "VU", "description": "Vanuatu" }, { "name": "WF", "description": "Wallis and Futuna" }, { "name": "WS", "description": "Samoa" }, { "name": "YE", "description": "Yemen" }, { "name": "YT", "description": "Mayotte" }, { "name": "ZA", "description": "South Africa" }, { "name": "ZM", "description": "Zambia" }, { "name": "ZW", "description": "Zimbabwe" } ], "description": "Indicates the country associated with another entity, such as a business.\nValues are in [ISO 3166-1-alpha-2 format](http://www.iso.org/iso/home/standards/country_codes.htm).", "x-release-status": "PUBLIC" }, "Currency": { "type": "string", "enum": [ "UNKNOWN_CURRENCY", "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "USS", "UYI", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XTS", "XXX", "YER", "ZAR", "ZMK", "ZMW", "BTC", "XUS" ], "x-enum-elements": [ { "name": "UNKNOWN_CURRENCY", "description": "Unknown currency" }, { "name": "AED", "description": "United Arab Emirates dirham" }, { "name": "AFN", "description": "Afghan afghani" }, { "name": "ALL", "description": "Albanian lek" }, { "name": "AMD", "description": "Armenian dram" }, { "name": "ANG", "description": "Netherlands Antillean guilder" }, { "name": "AOA", "description": "Angolan kwanza" }, { "name": "ARS", "description": "Argentine peso" }, { "name": "AUD", "description": "Australian dollar" }, { "name": "AWG", "description": "Aruban florin" }, { "name": "AZN", "description": "Azerbaijani manat" }, { "name": "BAM", "description": "Bosnia and Herzegovina convertible mark" }, { "name": "BBD", "description": "Barbados dollar" }, { "name": "BDT", "description": "Bangladeshi taka" }, { "name": "BGN", "description": "Bulgarian lev" }, { "name": "BHD", "description": "Bahraini dinar" }, { "name": "BIF", "description": "Burundian franc" }, { "name": "BMD", "description": "Bermudian dollar" }, { "name": "BND", "description": "Brunei dollar" }, { "name": "BOB", "description": "Boliviano" }, { "name": "BOV", "description": "Bolivian Mvdol" }, { "name": "BRL", "description": "Brazilian real" }, { "name": "BSD", "description": "Bahamian dollar" }, { "name": "BTN", "description": "Bhutanese ngultrum" }, { "name": "BWP", "description": "Botswana pula" }, { "name": "BYR", "description": "Belarusian ruble" }, { "name": "BZD", "description": "Belize dollar" }, { "name": "CAD", "description": "Canadian dollar" }, { "name": "CDF", "description": "Congolese franc" }, { "name": "CHE", "description": "WIR Euro" }, { "name": "CHF", "description": "Swiss franc" }, { "name": "CHW", "description": "WIR Franc" }, { "name": "CLF", "description": "Unidad de Fomento" }, { "name": "CLP", "description": "Chilean peso" }, { "name": "CNY", "description": "Chinese yuan" }, { "name": "COP", "description": "Colombian peso" }, { "name": "COU", "description": "Unidad de Valor Real" }, { "name": "CRC", "description": "Costa Rican colon" }, { "name": "CUC", "description": "Cuban convertible peso" }, { "name": "CUP", "description": "Cuban peso" }, { "name": "CVE", "description": "Cape Verdean escudo" }, { "name": "CZK", "description": "Czech koruna" }, { "name": "DJF", "description": "Djiboutian franc" }, { "name": "DKK", "description": "Danish krone" }, { "name": "DOP", "description": "Dominican peso" }, { "name": "DZD", "description": "Algerian dinar" }, { "name": "EGP", "description": "Egyptian pound" }, { "name": "ERN", "description": "Eritrean nakfa" }, { "name": "ETB", "description": "Ethiopian birr" }, { "name": "EUR", "description": "Euro" }, { "name": "FJD", "description": "Fiji dollar" }, { "name": "FKP", "description": "Falkland Islands pound" }, { "name": "GBP", "description": "Pound sterling" }, { "name": "GEL", "description": "Georgian lari" }, { "name": "GHS", "description": "Ghanaian cedi" }, { "name": "GIP", "description": "Gibraltar pound" }, { "name": "GMD", "description": "Gambian dalasi" }, { "name": "GNF", "description": "Guinean franc" }, { "name": "GTQ", "description": "Guatemalan quetzal" }, { "name": "GYD", "description": "Guyanese dollar" }, { "name": "HKD", "description": "Hong Kong dollar" }, { "name": "HNL", "description": "Honduran lempira" }, { "name": "HRK", "description": "Croatian kuna" }, { "name": "HTG", "description": "Haitian gourde" }, { "name": "HUF", "description": "Hungarian forint" }, { "name": "IDR", "description": "Indonesian rupiah" }, { "name": "ILS", "description": "Israeli new shekel" }, { "name": "INR", "description": "Indian rupee" }, { "name": "IQD", "description": "Iraqi dinar" }, { "name": "IRR", "description": "Iranian rial" }, { "name": "ISK", "description": "Icelandic króna" }, { "name": "JMD", "description": "Jamaican dollar" }, { "name": "JOD", "description": "Jordanian dinar" }, { "name": "JPY", "description": "Japanese yen" }, { "name": "KES", "description": "Kenyan shilling" }, { "name": "KGS", "description": "Kyrgyzstani som" }, { "name": "KHR", "description": "Cambodian riel" }, { "name": "KMF", "description": "Comoro franc" }, { "name": "KPW", "description": "North Korean won" }, { "name": "KRW", "description": "South Korean won" }, { "name": "KWD", "description": "Kuwaiti dinar" }, { "name": "KYD", "description": "Cayman Islands dollar" }, { "name": "KZT", "description": "Kazakhstani tenge" }, { "name": "LAK", "description": "Lao kip" }, { "name": "LBP", "description": "Lebanese pound" }, { "name": "LKR", "description": "Sri Lankan rupee" }, { "name": "LRD", "description": "Liberian dollar" }, { "name": "LSL", "description": "Lesotho loti" }, { "name": "LTL", "description": "Lithuanian litas" }, { "name": "LVL", "description": "Latvian lats" }, { "name": "LYD", "description": "Libyan dinar" }, { "name": "MAD", "description": "Moroccan dirham" }, { "name": "MDL", "description": "Moldovan leu" }, { "name": "MGA", "description": "Malagasy ariary" }, { "name": "MKD", "description": "Macedonian denar" }, { "name": "MMK", "description": "Myanmar kyat" }, { "name": "MNT", "description": "Mongolian tögrög" }, { "name": "MOP", "description": "Macanese pataca" }, { "name": "MRO", "description": "Mauritanian ouguiya" }, { "name": "MUR", "description": "Mauritian rupee" }, { "name": "MVR", "description": "Maldivian rufiyaa" }, { "name": "MWK", "description": "Malawian kwacha" }, { "name": "MXN", "description": "Mexican peso" }, { "name": "MXV", "description": "Mexican Unidad de Inversion" }, { "name": "MYR", "description": "Malaysian ringgit" }, { "name": "MZN", "description": "Mozambican metical" }, { "name": "NAD", "description": "Namibian dollar" }, { "name": "NGN", "description": "Nigerian naira" }, { "name": "NIO", "description": "Nicaraguan córdoba" }, { "name": "NOK", "description": "Norwegian krone" }, { "name": "NPR", "description": "Nepalese rupee" }, { "name": "NZD", "description": "New Zealand dollar" }, { "name": "OMR", "description": "Omani rial" }, { "name": "PAB", "description": "Panamanian balboa" }, { "name": "PEN", "description": "Peruvian sol" }, { "name": "PGK", "description": "Papua New Guinean kina" }, { "name": "PHP", "description": "Philippine peso" }, { "name": "PKR", "description": "Pakistani rupee" }, { "name": "PLN", "description": "Polish złoty" }, { "name": "PYG", "description": "Paraguayan guaraní" }, { "name": "QAR", "description": "Qatari riyal" }, { "name": "RON", "description": "Romanian leu" }, { "name": "RSD", "description": "Serbian dinar" }, { "name": "RUB", "description": "Russian ruble" }, { "name": "RWF", "description": "Rwandan franc" }, { "name": "SAR", "description": "Saudi riyal" }, { "name": "SBD", "description": "Solomon Islands dollar" }, { "name": "SCR", "description": "Seychelles rupee" }, { "name": "SDG", "description": "Sudanese pound" }, { "name": "SEK", "description": "Swedish krona" }, { "name": "SGD", "description": "Singapore dollar" }, { "name": "SHP", "description": "Saint Helena pound" }, { "name": "SLL", "description": "Sierra Leonean leone" }, { "name": "SOS", "description": "Somali shilling" }, { "name": "SRD", "description": "Surinamese dollar" }, { "name": "SSP", "description": "South Sudanese pound" }, { "name": "STD", "description": "São Tomé and Príncipe dobra" }, { "name": "SVC", "description": "Salvadoran colón" }, { "name": "SYP", "description": "Syrian pound" }, { "name": "SZL", "description": "Swazi lilangeni" }, { "name": "THB", "description": "Thai baht" }, { "name": "TJS", "description": "Tajikstani somoni" }, { "name": "TMT", "description": "Turkmenistan manat" }, { "name": "TND", "description": "Tunisian dinar" }, { "name": "TOP", "description": "Tongan pa\u0027anga" }, { "name": "TRY", "description": "Turkish lira" }, { "name": "TTD", "description": "Trinidad and Tobago dollar" }, { "name": "TWD", "description": "New Taiwan dollar" }, { "name": "TZS", "description": "Tanzanian shilling" }, { "name": "UAH", "description": "Ukrainian hryvnia" }, { "name": "UGX", "description": "Ugandan shilling" }, { "name": "USD", "description": "United States dollar" }, { "name": "USN", "description": "United States dollar (next day)" }, { "name": "USS", "description": "United States dollar (same day)" }, { "name": "UYI", "description": "Uruguay Peso en Unidedades Indexadas" }, { "name": "UYU", "description": "Uruguyan peso" }, { "name": "UZS", "description": "Uzbekistan som" }, { "name": "VEF", "description": "Venezuelan bolívar soberano" }, { "name": "VND", "description": "Vietnamese đồng" }, { "name": "VUV", "description": "Vanuatu vatu" }, { "name": "WST", "description": "Samoan tala" }, { "name": "XAF", "description": "CFA franc BEAC" }, { "name": "XAG", "description": "Silver" }, { "name": "XAU", "description": "Gold" }, { "name": "XBA", "description": "European Composite Unit" }, { "name": "XBB", "description": "European Monetary Unit" }, { "name": "XBC", "description": "European Unit of Account 9" }, { "name": "XBD", "description": "European Unit of Account 17" }, { "name": "XCD", "description": "East Caribbean dollar" }, { "name": "XDR", "description": "Special drawing rights (International Monetary Fund)" }, { "name": "XOF", "description": "CFA franc BCEAO" }, { "name": "XPD", "description": "Palladium" }, { "name": "XPF", "description": "CFP franc" }, { "name": "XPT", "description": "Platinum" }, { "name": "XTS", "description": "Code reserved for testing" }, { "name": "XXX", "description": "No currency" }, { "name": "YER", "description": "Yemeni rial" }, { "name": "ZAR", "description": "South African rand" }, { "name": "ZMK", "description": "Zambian kwacha" }, { "name": "ZMW", "description": "Zambian kwacha" }, { "name": "BTC", "description": "Bitcoin" }, { "name": "XUS", "description": "USD Coin" } ], "description": "Indicates the associated currency for an amount of money. Values correspond\nto [ISO 4217](https://wikipedia.org/wiki/ISO_4217).", "x-release-status": "PUBLIC" }, "CustomAttributeDefinitionVisibility": { "type": "string", "enum": [ "VISIBILITY_HIDDEN", "VISIBILITY_READ_ONLY", "VISIBILITY_READ_WRITE_VALUES" ], "x-enum-elements": [ { "name": "VISIBILITY_HIDDEN", "description": "The custom attribute definition and values are hidden from the seller (except on export\nof all seller data) and other developers." }, { "name": "VISIBILITY_READ_ONLY", "description": "The seller and other developers can read the custom attribute definition and values\non resources." }, { "name": "VISIBILITY_READ_WRITE_VALUES", "description": "The seller and other developers can read the custom attribute definition,\nand can read and write values on resources. A custom attribute definition\ncan only be edited or deleted by the application that created it." } ], "description": "The level of permission that a seller or other applications requires to\nview this custom attribute definition.\nThe `Visibility` field controls who can read and write the custom attribute values\nand custom attribute definition.", "x-release-status": "PUBLIC" }, "CustomerCreationSource": { "type": "string", "enum": [ "OTHER", "APPOINTMENTS", "COUPON", "DELETION_RECOVERY", "DIRECTORY", "EGIFTING", "EMAIL_COLLECTION", "FEEDBACK", "IMPORT", "INVOICES", "LOYALTY", "MARKETING", "MERGE", "ONLINE_STORE", "INSTANT_PROFILE", "TERMINAL", "THIRD_PARTY", "THIRD_PARTY_IMPORT", "UNMERGE_RECOVERY" ], "x-enum-elements": [ { "name": "OTHER", "description": "The default creation source. This source is typically used for backward/future\ncompatibility when the original source of a customer profile is\nunrecognized. For example, when older clients do not support newer\nsource types." }, { "name": "APPOINTMENTS", "description": "The customer profile was created automatically when an appointment\nwas scheduled." }, { "name": "COUPON", "description": "The customer profile was created automatically when a coupon was issued\nusing Square Point of Sale." }, { "name": "DELETION_RECOVERY", "description": "The customer profile was restored through Square\u0027s deletion recovery\nprocess." }, { "name": "DIRECTORY", "description": "The customer profile was created manually through Square Seller Dashboard or the \nPoint of Sale application." }, { "name": "EGIFTING", "description": "The customer profile was created automatically when a gift card was\nissued using Square Point of Sale. Customer profiles are created for\nboth the buyer and the recipient of the gift card." }, { "name": "EMAIL_COLLECTION", "description": "The customer profile was created through Square Point of Sale when\nsigning up for marketing emails during checkout." }, { "name": "FEEDBACK", "description": "The customer profile was created automatically when providing feedback\nthrough a digital receipt." }, { "name": "IMPORT", "description": "The customer profile was created automatically when importing customer\ndata through Square Seller Dashboard." }, { "name": "INVOICES", "description": "The customer profile was created automatically during an invoice payment." }, { "name": "LOYALTY", "description": "The customer profile was created automatically when customers provide a\nphone number for loyalty reward programs during checkout." }, { "name": "MARKETING", "description": "The customer profile was created as the result of a campaign managed\nthrough Square’s Facebook integration." }, { "name": "MERGE", "description": "The customer profile was created as the result of explicitly merging\nmultiple customer profiles through the Square Seller Dashboard or the Point of\nSale application." }, { "name": "ONLINE_STORE", "description": "The customer profile was created through Square\u0027s Online Store solution\n(legacy service)." }, { "name": "INSTANT_PROFILE", "description": "The customer profile was created automatically as the result of a successful\ntransaction that did not explicitly link to an existing customer profile." }, { "name": "TERMINAL", "description": "The customer profile was created through Square\u0027s Virtual Terminal." }, { "name": "THIRD_PARTY", "description": "The customer profile was created through a Square API call." }, { "name": "THIRD_PARTY_IMPORT", "description": "The customer profile was created by a third-party product and imported\nthrough an official integration." }, { "name": "UNMERGE_RECOVERY", "description": "The customer profile was restored through Square\u0027s unmerge recovery\nprocess." } ], "description": "Indicates the method used to create the customer profile.", "x-release-status": "PUBLIC" }, "CustomerInclusionExclusion": { "type": "string", "enum": [ "INCLUDE", "EXCLUDE" ], "x-enum-elements": [ { "name": "INCLUDE", "description": "Customers should be included in the result set when they match the\nfiltering criteria." }, { "name": "EXCLUDE", "description": "Customers should be excluded from the result set when they match\nthe filtering criteria." } ], "description": "Indicates whether customers should be included in, or excluded from,\nthe result set when they match the filtering criteria.", "x-release-status": "PUBLIC" }, "CustomerSortField": { "type": "string", "enum": [ "DEFAULT", "CREATED_AT" ], "x-enum-elements": [ { "name": "DEFAULT", "description": "Use the default sort key. By default, customers are sorted\nalphanumerically by concatenating their `given_name` and `family_name`. If\nneither name field is set, string comparison is performed using one of the\nremaining fields in the following order: `company_name`, `email`,\n`phone_number`." }, { "name": "CREATED_AT", "description": "Use the creation date attribute (`created_at`) of customer profiles as the sort key." } ], "description": "Specifies customer attributes as the sort key to customer profiles returned from a search.", "x-release-status": "PUBLIC" }, "DataCollectionOptionsInputType": { "type": "string", "enum": [ "EMAIL", "PHONE_NUMBER" ], "x-enum-elements": [ { "name": "EMAIL", "description": "This value is used to represent an input text that contains a email validation on the\nclient." }, { "name": "PHONE_NUMBER", "description": "This value is used to represent an input text that contains a phone number validation on\nthe client." } ], "description": "Describes the input type of the data.", "x-release-status": "BETA", "x-is-beta": true }, "DayOfWeek": { "type": "string", "enum": [ "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" ], "x-enum-elements": [ { "name": "SUN", "description": "Sunday" }, { "name": "MON", "description": "Monday" }, { "name": "TUE", "description": "Tuesday" }, { "name": "WED", "description": "Wednesday" }, { "name": "THU", "description": "Thursday" }, { "name": "FRI", "description": "Friday" }, { "name": "SAT", "description": "Saturday" } ], "description": "Indicates the specific day of the week.", "x-release-status": "PUBLIC" }, "DestinationType": { "type": "string", "enum": [ "BANK_ACCOUNT", "CARD", "SQUARE_BALANCE", "SQUARE_STORED_BALANCE" ], "x-enum-elements": [ { "name": "BANK_ACCOUNT", "description": "An external bank account outside of Square." }, { "name": "CARD", "description": "An external card outside of Square used for the transfer." }, { "name": "SQUARE_BALANCE", "description": "" }, { "name": "SQUARE_STORED_BALANCE", "description": "Square Checking or Savings account (US), Square Card (CA)" } ], "description": "List of possible destinations against which a payout can be made.", "x-release-status": "PUBLIC" }, "DeviceAttributesDeviceType": { "type": "string", "enum": [ "TERMINAL" ], "x-enum-elements": [ { "name": "TERMINAL", "description": "" } ], "description": "An enum identifier of the device type.", "x-release-status": "BETA", "x-is-beta": true }, "DeviceCodeStatus": { "type": "string", "enum": [ "UNKNOWN", "UNPAIRED", "PAIRED", "EXPIRED" ], "x-enum-elements": [ { "name": "UNKNOWN", "description": "The status cannot be determined or does not exist." }, { "name": "UNPAIRED", "description": "The device code is just created and unpaired." }, { "name": "PAIRED", "description": "The device code has been signed in and paired to a device." }, { "name": "EXPIRED", "description": "The device code was unpaired and expired before it was paired." } ], "description": "DeviceCode.Status enum.", "x-release-status": "PUBLIC" }, "DeviceComponentDetailsExternalPower": { "type": "string", "enum": [ "AVAILABLE_CHARGING", "AVAILABLE_NOT_IN_USE", "UNAVAILABLE", "AVAILABLE_INSUFFICIENT" ], "x-enum-elements": [ { "name": "AVAILABLE_CHARGING", "description": "Plugged in and charging." }, { "name": "AVAILABLE_NOT_IN_USE", "description": "Fully charged." }, { "name": "UNAVAILABLE", "description": "On battery power." }, { "name": "AVAILABLE_INSUFFICIENT", "description": "Not providing enough power for the device." } ], "description": "An enum for ExternalPower.", "x-release-status": "BETA", "x-is-beta": true }, "DeviceStatusCategory": { "type": "string", "enum": [ "AVAILABLE", "NEEDS_ATTENTION", "OFFLINE" ], "x-enum-elements": [ { "name": "AVAILABLE", "description": "" }, { "name": "NEEDS_ATTENTION", "description": "" }, { "name": "OFFLINE", "description": "" } ], "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DisputeEvidenceType": { "type": "string", "enum": [ "GENERIC_EVIDENCE", "ONLINE_OR_APP_ACCESS_LOG", "AUTHORIZATION_DOCUMENTATION", "CANCELLATION_OR_REFUND_DOCUMENTATION", "CARDHOLDER_COMMUNICATION", "CARDHOLDER_INFORMATION", "PURCHASE_ACKNOWLEDGEMENT", "DUPLICATE_CHARGE_DOCUMENTATION", "PRODUCT_OR_SERVICE_DESCRIPTION", "RECEIPT", "SERVICE_RECEIVED_DOCUMENTATION", "PROOF_OF_DELIVERY_DOCUMENTATION", "RELATED_TRANSACTION_DOCUMENTATION", "REBUTTAL_EXPLANATION", "TRACKING_NUMBER" ], "x-enum-elements": [ { "name": "GENERIC_EVIDENCE", "description": "Square assumes this evidence type if you do not provide a type when uploading evidence.\n\nUse when uploading evidence as a file or string." }, { "name": "ONLINE_OR_APP_ACCESS_LOG", "description": "Server or activity logs that show proof of the cardholder’s identity and that the\ncardholder successfully ordered and received the goods (digitally or otherwise).\nExample evidence includes IP addresses, corresponding timestamps/dates, cardholder’s name and email\naddress linked to a cardholder profile held by the seller, proof the same device and card (used\nin dispute) were previously used in prior undisputed transaction, and any related detailed activity.\n\nUse when uploading evidence as a file or string." }, { "name": "AUTHORIZATION_DOCUMENTATION", "description": "Evidence that the cardholder did provide authorization for the charge.\nExample evidence includes a signed credit card authorization.\n\nUse when uploading evidence as a file." }, { "name": "CANCELLATION_OR_REFUND_DOCUMENTATION", "description": "Evidence that the cardholder acknowledged your refund or cancellation policy.\nExample evidence includes a signature or checkbox showing the cardholder’s acknowledgement of your\nrefund or cancellation policy.\n\nUse when uploading evidence as a file or string." }, { "name": "CARDHOLDER_COMMUNICATION", "description": "Evidence that shows relevant communication with the cardholder.\nExample evidence includes emails or texts that show the cardholder received goods/services or\ndemonstrate cardholder satisfaction.\n\nUse when uploading evidence as a file." }, { "name": "CARDHOLDER_INFORMATION", "description": "Evidence that validates the customer\u0027s identity.\nExample evidence includes personally identifiable details such as name, email address, purchaser IP\naddress, and a copy of the cardholder ID.\n\nUse when uploading evidence as a file or string." }, { "name": "PURCHASE_ACKNOWLEDGEMENT", "description": "Evidence that shows proof of the sale/transaction.\nExample evidence includes an invoice, contract, or other item showing the customer’s acknowledgement\nof the purchase and your terms.\n\nUse when uploading evidence as a file or string." }, { "name": "DUPLICATE_CHARGE_DOCUMENTATION", "description": "Evidence that shows the charges in question are valid and distinct from one another.\nExample evidence includes receipts, shipping labels, and invoices along with their distinct payment IDs.\n\nUse when uploading evidence as a file." }, { "name": "PRODUCT_OR_SERVICE_DESCRIPTION", "description": "A description of the product or service sold.\n\nUse when uploading evidence as a file or string." }, { "name": "RECEIPT", "description": "A receipt or message sent to the cardholder detailing the charge.\nNote: You do not need to upload the Square receipt; Square submits the receipt on your behalf.\n\nUse when uploading evidence as a file or string." }, { "name": "SERVICE_RECEIVED_DOCUMENTATION", "description": "Evidence that the service was provided to the cardholder or the expected date that services will be rendered.\nExample evidence includes a signed delivery form, work order, expected delivery date, or other written agreements.\n\nUse when uploading evidence as a file or string." }, { "name": "PROOF_OF_DELIVERY_DOCUMENTATION", "description": "Evidence that shows the product was provided to the cardholder or the expected date of delivery.\nExample evidence includes a signed delivery form or written agreement acknowledging receipt of the goods or services.\n\nUse when uploading evidence as a file or string." }, { "name": "RELATED_TRANSACTION_DOCUMENTATION", "description": "Evidence that shows the cardholder previously processed transactions on the same card and did not dispute them.\nNote: Square automatically provides up to five distinct Square receipts for related transactions, when available.\n\nUse when uploading evidence as a file or string." }, { "name": "REBUTTAL_EXPLANATION", "description": "An explanation of why the cardholder’s claim is invalid.\nExample evidence includes an explanation of why each distinct charge is a legitimate purchase, why the cardholder’s claim\nfor credit owed due to their attempt to cancel, return, or refund is invalid per your stated policy and cardholder\nagreement, or an explanation of how the cardholder did not attempt to remedy the issue with you first to receive credit.\n\nUse when uploading evidence as a file or string." }, { "name": "TRACKING_NUMBER", "description": "The tracking number for the order provided by the shipping carrier. If you have multiple numbers, they need to be\nsubmitted individually as separate pieces of evidence.\n\nUse when uploading evidence as a string." } ], "description": "The type of the dispute evidence.", "x-release-status": "PUBLIC" }, "DisputeReason": { "type": "string", "enum": [ "AMOUNT_DIFFERS", "CANCELLED", "DUPLICATE", "NO_KNOWLEDGE", "NOT_AS_DESCRIBED", "NOT_RECEIVED", "PAID_BY_OTHER_MEANS", "CUSTOMER_REQUESTS_CREDIT", "EMV_LIABILITY_SHIFT" ], "x-enum-elements": [ { "name": "AMOUNT_DIFFERS", "description": "The cardholder claims that they were charged the wrong amount for the purchase.\nTo challenge this dispute, provide specific and concrete evidence that the cardholder agreed\nto the amount charged." }, { "name": "CANCELLED", "description": "The cardholder claims that they attempted to return the goods or cancel the service.\nTo challenge this dispute, provide specific and concrete evidence to prove that the cardholder\nis not due a refund and that the cardholder acknowledged your cancellation policy." }, { "name": "DUPLICATE", "description": "The cardholder claims that they were charged twice for the same purchase.\nTo challenge this dispute, provide specific and concrete evidence that shows both charges are\nlegitimate and independent of one another." }, { "name": "NO_KNOWLEDGE", "description": "The cardholder claims that they did not make this purchase nor authorized the charge.\nTo challenge this dispute, provide specific and concrete evidence that proves that the cardholder\nidentity was verified at the time of purchase and that the purchase was authorized." }, { "name": "NOT_AS_DESCRIBED", "description": "The cardholder claims the product or service was provided, but the quality of the deliverable\ndid not align with the expectations of the cardholder based on the description.\nTo challenge this dispute, provide specific and concrete evidence that shows the cardholder is in\npossession of the product as described or received the service as described and agreed on." }, { "name": "NOT_RECEIVED", "description": "The cardholder claims the product or service was not received by the cardholder within the\nstated time frame.\nTo challenge this dispute, provide specific and concrete evidence to prove that the cardholder is\nin possession of or received the product or service sold." }, { "name": "PAID_BY_OTHER_MEANS", "description": "The cardholder claims that they previously paid for this purchase.\nTo challenge this dispute, provide specific and concrete evidence that shows both charges are\nlegitimate and independent of one another or proof that you already provided a credit for the charge." }, { "name": "CUSTOMER_REQUESTS_CREDIT", "description": "The cardholder claims that the purchase was canceled or returned, but they have not yet received\nthe credit.\nTo challenge this dispute, provide specific and concrete evidence to prove that the cardholder is not\ndue a refund and that they acknowledged your cancellation and/or refund policy." }, { "name": "EMV_LIABILITY_SHIFT", "description": "A chip-enabled card was not processed through a compliant chip-card reader (for example, it was swiped\ninstead of dipped into a chip-card reader).\nYou cannot challenge this dispute because the payment did not comply with EMV security requirements.\nFor more information, see [What Is EMV?](https://squareup.com/emv)" } ], "description": "The list of possible reasons why a cardholder might initiate a\ndispute with their bank.", "x-release-status": "PUBLIC" }, "DisputeState": { "type": "string", "enum": [ "INQUIRY_EVIDENCE_REQUIRED", "INQUIRY_PROCESSING", "INQUIRY_CLOSED", "EVIDENCE_REQUIRED", "PROCESSING", "WON", "LOST", "ACCEPTED" ], "x-enum-elements": [ { "name": "INQUIRY_EVIDENCE_REQUIRED", "description": "The initial state of an inquiry with evidence required" }, { "name": "INQUIRY_PROCESSING", "description": "Inquiry evidence has been submitted and the bank is processing the inquiry" }, { "name": "INQUIRY_CLOSED", "description": "The inquiry is complete" }, { "name": "EVIDENCE_REQUIRED", "description": "The initial state of a dispute with evidence required" }, { "name": "PROCESSING", "description": "Dispute evidence has been submitted and the bank is processing the dispute" }, { "name": "WON", "description": "The bank has completed processing the dispute and the seller has won" }, { "name": "LOST", "description": "The bank has completed processing the dispute and the seller has lost" }, { "name": "ACCEPTED", "description": "The seller has accepted the dispute" } ], "description": "The list of possible dispute states.", "x-release-status": "PUBLIC" }, "EcomVisibility": { "type": "string", "enum": [ "UNINDEXED", "UNAVAILABLE", "HIDDEN", "VISIBLE" ], "x-enum-elements": [ { "name": "UNINDEXED", "description": "Item is not synced with Ecom (Weebly). This is the default state" }, { "name": "UNAVAILABLE", "description": "Item is synced but is unavailable within Ecom (Weebly) and Online Checkout" }, { "name": "HIDDEN", "description": "Option for seller to choose manually created Quick Amounts." }, { "name": "VISIBLE", "description": "Item is synced but available within Ecom (Weebly) and Online Checkout but is hidden from Ecom Store." } ], "description": "Determines item visibility in Ecom (Online Store) and Online Checkout.", "x-release-status": "PUBLIC" }, "EmployeeStatus": { "type": "string", "enum": [ "ACTIVE", "INACTIVE" ], "x-enum-elements": [ { "name": "ACTIVE", "description": "Specifies that the employee is in the Active state." }, { "name": "INACTIVE", "description": "Specifies that the employee is in the Inactive state." } ], "description": "The status of the Employee being retrieved.\n\nDEPRECATED at version 2020-08-26. Replaced by [TeamMemberStatus](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMemberStatus).", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "ErrorCategory": { "type": "string", "enum": [ "API_ERROR", "AUTHENTICATION_ERROR", "INVALID_REQUEST_ERROR", "RATE_LIMIT_ERROR", "PAYMENT_METHOD_ERROR", "REFUND_ERROR", "MERCHANT_SUBSCRIPTION_ERROR", "EXTERNAL_VENDOR_ERROR" ], "x-enum-elements": [ { "name": "API_ERROR", "description": "An error occurred with the Connect API itself." }, { "name": "AUTHENTICATION_ERROR", "description": "An authentication error occurred. Most commonly, the request had\na missing, malformed, or otherwise invalid `Authorization` header." }, { "name": "INVALID_REQUEST_ERROR", "description": "The request was invalid. Most commonly, a required parameter was\nmissing, or a provided parameter had an invalid value." }, { "name": "RATE_LIMIT_ERROR", "description": "Your application reached the Square API rate limit. You might receive this error if your application sends a high number of requests\nto Square APIs in a short period of time.\n\nYour application should monitor responses for `429 RATE_LIMITED` errors and use a retry mechanism with an [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff)\nschedule to resend the requests at an increasingly slower rate. It is also a good practice to use a randomized delay (jitter) in your retry schedule." }, { "name": "PAYMENT_METHOD_ERROR", "description": "An error occurred while processing a payment method. Most commonly,\nthe details of the payment method were invalid (such as a card\u0027s CVV\nor expiration date)." }, { "name": "REFUND_ERROR", "description": "An error occurred while attempting to process a refund." }, { "name": "MERCHANT_SUBSCRIPTION_ERROR", "description": "An error occurred when checking a merchant subscription status" }, { "name": "EXTERNAL_VENDOR_ERROR", "description": "An error that is returned from an external vendor\u0027s API" } ], "description": "Indicates which high-level category of error has occurred during a\nrequest to the Connect API.", "x-release-status": "PUBLIC" }, "ErrorCode": { "type": "string", "enum": [ "INTERNAL_SERVER_ERROR", "UNAUTHORIZED", "ACCESS_TOKEN_EXPIRED", "ACCESS_TOKEN_REVOKED", "CLIENT_DISABLED", "FORBIDDEN", "INSUFFICIENT_SCOPES", "APPLICATION_DISABLED", "V1_APPLICATION", "V1_ACCESS_TOKEN", "CARD_PROCESSING_NOT_ENABLED", "MERCHANT_SUBSCRIPTION_NOT_FOUND", "BAD_REQUEST", "MISSING_REQUIRED_PARAMETER", "INCORRECT_TYPE", "INVALID_TIME", "INVALID_TIME_RANGE", "INVALID_VALUE", "INVALID_CURSOR", "UNKNOWN_QUERY_PARAMETER", "CONFLICTING_PARAMETERS", "EXPECTED_JSON_BODY", "INVALID_SORT_ORDER", "VALUE_REGEX_MISMATCH", "VALUE_TOO_SHORT", "VALUE_TOO_LONG", "VALUE_TOO_LOW", "VALUE_TOO_HIGH", "VALUE_EMPTY", "ARRAY_LENGTH_TOO_LONG", "ARRAY_LENGTH_TOO_SHORT", "ARRAY_EMPTY", "EXPECTED_BOOLEAN", "EXPECTED_INTEGER", "EXPECTED_FLOAT", "EXPECTED_STRING", "EXPECTED_OBJECT", "EXPECTED_ARRAY", "EXPECTED_MAP", "EXPECTED_BASE64_ENCODED_BYTE_ARRAY", "INVALID_ARRAY_VALUE", "INVALID_ENUM_VALUE", "INVALID_CONTENT_TYPE", "INVALID_FORM_VALUE", "CUSTOMER_NOT_FOUND", "ONE_INSTRUMENT_EXPECTED", "NO_FIELDS_SET", "TOO_MANY_MAP_ENTRIES", "MAP_KEY_LENGTH_TOO_SHORT", "MAP_KEY_LENGTH_TOO_LONG", "CUSTOMER_MISSING_NAME", "CUSTOMER_MISSING_EMAIL", "INVALID_PAUSE_LENGTH", "INVALID_DATE", "UNSUPPORTED_COUNTRY", "UNSUPPORTED_CURRENCY", "APPLE_TTP_PIN_TOKEN", "CARD_EXPIRED", "INVALID_EXPIRATION", "INVALID_EXPIRATION_YEAR", "INVALID_EXPIRATION_DATE", "UNSUPPORTED_CARD_BRAND", "UNSUPPORTED_ENTRY_METHOD", "INVALID_ENCRYPTED_CARD", "INVALID_CARD", "PAYMENT_AMOUNT_MISMATCH", "GENERIC_DECLINE", "CVV_FAILURE", "ADDRESS_VERIFICATION_FAILURE", "INVALID_ACCOUNT", "CURRENCY_MISMATCH", "INSUFFICIENT_FUNDS", "INSUFFICIENT_PERMISSIONS", "CARDHOLDER_INSUFFICIENT_PERMISSIONS", "INVALID_LOCATION", "TRANSACTION_LIMIT", "VOICE_FAILURE", "PAN_FAILURE", "EXPIRATION_FAILURE", "CARD_NOT_SUPPORTED", "INVALID_PIN", "MISSING_PIN", "MISSING_ACCOUNT_TYPE", "INVALID_POSTAL_CODE", "INVALID_FEES", "MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED", "PAYMENT_LIMIT_EXCEEDED", "GIFT_CARD_AVAILABLE_AMOUNT", "ACCOUNT_UNUSABLE", "BUYER_REFUSED_PAYMENT", "DELAYED_TRANSACTION_EXPIRED", "DELAYED_TRANSACTION_CANCELED", "DELAYED_TRANSACTION_CAPTURED", "DELAYED_TRANSACTION_FAILED", "CARD_TOKEN_EXPIRED", "CARD_TOKEN_USED", "AMOUNT_TOO_HIGH", "UNSUPPORTED_INSTRUMENT_TYPE", "REFUND_AMOUNT_INVALID", "REFUND_ALREADY_PENDING", "PAYMENT_NOT_REFUNDABLE", "REFUND_DECLINED", "INSUFFICIENT_PERMISSIONS_FOR_REFUND", "INVALID_CARD_DATA", "SOURCE_USED", "SOURCE_EXPIRED", "UNSUPPORTED_LOYALTY_REWARD_TIER", "LOCATION_MISMATCH", "IDEMPOTENCY_KEY_REUSED", "UNEXPECTED_VALUE", "SANDBOX_NOT_SUPPORTED", "INVALID_EMAIL_ADDRESS", "INVALID_PHONE_NUMBER", "CHECKOUT_EXPIRED", "BAD_CERTIFICATE", "INVALID_SQUARE_VERSION_FORMAT", "API_VERSION_INCOMPATIBLE", "CARD_PRESENCE_REQUIRED", "UNSUPPORTED_SOURCE_TYPE", "CARD_MISMATCH", "PLAID_ERROR", "PLAID_ERROR_ITEM_LOGIN_REQUIRED", "PLAID_ERROR_RATE_LIMIT", "CARD_DECLINED", "VERIFY_CVV_FAILURE", "VERIFY_AVS_FAILURE", "CARD_DECLINED_CALL_ISSUER", "CARD_DECLINED_VERIFICATION_REQUIRED", "BAD_EXPIRATION", "CHIP_INSERTION_REQUIRED", "ALLOWABLE_PIN_TRIES_EXCEEDED", "RESERVATION_DECLINED", "UNKNOWN_BODY_PARAMETER", "NOT_FOUND", "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "REQUEST_TIMEOUT", "CONFLICT", "GONE", "REQUEST_ENTITY_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "UNPROCESSABLE_ENTITY", "RATE_LIMITED", "NOT_IMPLEMENTED", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "TEMPORARY_ERROR", "GATEWAY_TIMEOUT" ], "x-enum-elements": [ { "name": "INTERNAL_SERVER_ERROR", "description": "A general server error occurred." }, { "name": "UNAUTHORIZED", "description": "A general authorization error occurred." }, { "name": "ACCESS_TOKEN_EXPIRED", "description": "The provided access token has expired." }, { "name": "ACCESS_TOKEN_REVOKED", "description": "The provided access token has been revoked." }, { "name": "CLIENT_DISABLED", "description": "The provided client has been disabled." }, { "name": "FORBIDDEN", "description": "A general access error occurred." }, { "name": "INSUFFICIENT_SCOPES", "description": "The provided access token does not have permission\nto execute the requested action." }, { "name": "APPLICATION_DISABLED", "description": "The calling application was disabled." }, { "name": "V1_APPLICATION", "description": "The calling application was created prior to\n2016-03-30 and is not compatible with v2 Square API calls." }, { "name": "V1_ACCESS_TOKEN", "description": "The calling application is using an access token\ncreated prior to 2016-03-30 and is not compatible with v2 Square API\ncalls." }, { "name": "CARD_PROCESSING_NOT_ENABLED", "description": "The location provided in the API call is not\nenabled for credit card processing." }, { "name": "MERCHANT_SUBSCRIPTION_NOT_FOUND", "description": "A required subscription was not found for the merchant" }, { "name": "BAD_REQUEST", "description": "A general error occurred with the request." }, { "name": "MISSING_REQUIRED_PARAMETER", "description": "The request is missing a required path, query, or\nbody parameter." }, { "name": "INCORRECT_TYPE", "description": "The value provided in the request is the wrong\ntype. For example, a string instead of an integer." }, { "name": "INVALID_TIME", "description": "Formatting for the provided time value is\nincorrect." }, { "name": "INVALID_TIME_RANGE", "description": "The time range provided in the request is invalid.\nFor example, the end time is before the start time." }, { "name": "INVALID_VALUE", "description": "The provided value is invalid. For example,\nincluding `%` in a phone number." }, { "name": "INVALID_CURSOR", "description": "The pagination cursor included in the request is\ninvalid." }, { "name": "UNKNOWN_QUERY_PARAMETER", "description": "The query parameters provided is invalid for the\nrequested endpoint." }, { "name": "CONFLICTING_PARAMETERS", "description": "One or more of the request parameters conflict with\neach other." }, { "name": "EXPECTED_JSON_BODY", "description": "The request body is not a JSON object." }, { "name": "INVALID_SORT_ORDER", "description": "The provided sort order is not a valid key.\nCurrently, sort order must be `ASC` or `DESC`." }, { "name": "VALUE_REGEX_MISMATCH", "description": "The provided value does not match an expected\nregular expression." }, { "name": "VALUE_TOO_SHORT", "description": "The provided string value is shorter than the\nminimum length allowed." }, { "name": "VALUE_TOO_LONG", "description": "The provided string value is longer than the\nmaximum length allowed." }, { "name": "VALUE_TOO_LOW", "description": "The provided value is less than the supported\nminimum." }, { "name": "VALUE_TOO_HIGH", "description": "The provided value is greater than the supported\nmaximum." }, { "name": "VALUE_EMPTY", "description": "The provided value has a default (empty) value\nsuch as a blank string." }, { "name": "ARRAY_LENGTH_TOO_LONG", "description": "The provided array has too many elements." }, { "name": "ARRAY_LENGTH_TOO_SHORT", "description": "The provided array has too few elements." }, { "name": "ARRAY_EMPTY", "description": "The provided array is empty." }, { "name": "EXPECTED_BOOLEAN", "description": "The endpoint expected the provided value to be a\nboolean." }, { "name": "EXPECTED_INTEGER", "description": "The endpoint expected the provided value to be an\ninteger." }, { "name": "EXPECTED_FLOAT", "description": "The endpoint expected the provided value to be a\nfloat." }, { "name": "EXPECTED_STRING", "description": "The endpoint expected the provided value to be a\nstring." }, { "name": "EXPECTED_OBJECT", "description": "The endpoint expected the provided value to be a\nJSON object." }, { "name": "EXPECTED_ARRAY", "description": "The endpoint expected the provided value to be an\narray or list." }, { "name": "EXPECTED_MAP", "description": "The endpoint expected the provided value to be a\nmap or associative array." }, { "name": "EXPECTED_BASE64_ENCODED_BYTE_ARRAY", "description": "The endpoint expected the provided value to be an\narray encoded in base64." }, { "name": "INVALID_ARRAY_VALUE", "description": "One or more objects in the array does not match the\narray type." }, { "name": "INVALID_ENUM_VALUE", "description": "The provided static string is not valid for the\nfield." }, { "name": "INVALID_CONTENT_TYPE", "description": "Invalid content type header." }, { "name": "INVALID_FORM_VALUE", "description": "Only relevant for applications created prior to\n2016-03-30. Indicates there was an error while parsing form values." }, { "name": "CUSTOMER_NOT_FOUND", "description": "The provided customer id can\u0027t be found in the merchant\u0027s customers list." }, { "name": "ONE_INSTRUMENT_EXPECTED", "description": "A general error occurred." }, { "name": "NO_FIELDS_SET", "description": "A general error occurred." }, { "name": "TOO_MANY_MAP_ENTRIES", "description": "Too many entries in the map field." }, { "name": "MAP_KEY_LENGTH_TOO_SHORT", "description": "The length of one of the provided keys in the map is too short." }, { "name": "MAP_KEY_LENGTH_TOO_LONG", "description": "The length of one of the provided keys in the map is too long." }, { "name": "CUSTOMER_MISSING_NAME", "description": "The provided customer does not have a recorded name." }, { "name": "CUSTOMER_MISSING_EMAIL", "description": "The provided customer does not have a recorded email." }, { "name": "INVALID_PAUSE_LENGTH", "description": "The subscription cannot be paused longer than the duration of the current phase." }, { "name": "INVALID_DATE", "description": "The subscription cannot be paused/resumed on the given date." }, { "name": "UNSUPPORTED_COUNTRY", "description": "The API request references an unsupported country." }, { "name": "UNSUPPORTED_CURRENCY", "description": "The API request references an unsupported currency." }, { "name": "APPLE_TTP_PIN_TOKEN", "description": "The payment was declined by the card issuer during an Apple Tap to Pay (TTP)\ntransaction with a request for the card\u0027s PIN. This code will be returned alongside\n`CARD_DECLINED_VERIFICATION_REQUIRED` as a supplemental error, and will include an\nissuer-provided token in the `details` field that is needed to initiate the PIN\ncollection flow on the iOS device." }, { "name": "CARD_EXPIRED", "description": "The card issuer declined the request because the card is expired." }, { "name": "INVALID_EXPIRATION", "description": "The expiration date for the payment card is invalid. For example,\nit indicates a date in the past." }, { "name": "INVALID_EXPIRATION_YEAR", "description": "The expiration year for the payment card is invalid. For example,\nit indicates a year in the past or contains invalid characters." }, { "name": "INVALID_EXPIRATION_DATE", "description": "The expiration date for the payment card is invalid. For example,\nit contains invalid characters." }, { "name": "UNSUPPORTED_CARD_BRAND", "description": "The credit card provided is not from a supported issuer." }, { "name": "UNSUPPORTED_ENTRY_METHOD", "description": "The entry method for the credit card (swipe, dip, tap) is not supported." }, { "name": "INVALID_ENCRYPTED_CARD", "description": "The encrypted card information is invalid." }, { "name": "INVALID_CARD", "description": "The credit card cannot be validated based on the provided details." }, { "name": "PAYMENT_AMOUNT_MISMATCH", "description": "The payment was declined because there was a payment amount mismatch.\nThe money amount Square was expecting does not match the amount provided." }, { "name": "GENERIC_DECLINE", "description": "Square received a decline without any additional information.\nIf the payment information seems correct, the buyer can contact their\nissuer to ask for more information." }, { "name": "CVV_FAILURE", "description": "The card issuer declined the request because the CVV value is invalid." }, { "name": "ADDRESS_VERIFICATION_FAILURE", "description": "The card issuer declined the request because the postal code is invalid." }, { "name": "INVALID_ACCOUNT", "description": "The issuer was not able to locate the account on record." }, { "name": "CURRENCY_MISMATCH", "description": "The currency associated with the payment is not valid for the provided\nfunding source. For example, a gift card funded in USD cannot be used to process\npayments in GBP." }, { "name": "INSUFFICIENT_FUNDS", "description": "The funding source has insufficient funds to cover the payment." }, { "name": "INSUFFICIENT_PERMISSIONS", "description": "The Square account does not have the permissions to accept\nthis payment. For example, Square may limit which merchants are\nallowed to receive gift card payments." }, { "name": "CARDHOLDER_INSUFFICIENT_PERMISSIONS", "description": "The card issuer has declined the transaction due to restrictions on where the card can be used.\nFor example, a gift card is limited to a single merchant." }, { "name": "INVALID_LOCATION", "description": "The Square account cannot take payments in the specified region.\nA Square account can take payments only from the region where the account was created." }, { "name": "TRANSACTION_LIMIT", "description": "The card issuer has determined the payment amount is either too high or too low.\nThe API returns the error code mostly for credit cards (for example, the card reached\nthe credit limit). However, sometimes the issuer bank can indicate the error for debit\nor prepaid cards (for example, card has insufficient funds)." }, { "name": "VOICE_FAILURE", "description": "The card issuer declined the request because the issuer requires voice authorization from the cardholder. The seller should ask the customer to contact the card issuing bank to authorize the payment." }, { "name": "PAN_FAILURE", "description": "The specified card number is invalid. For example, it is of\nincorrect length or is incorrectly formatted." }, { "name": "EXPIRATION_FAILURE", "description": "The card expiration date is either invalid or indicates that the\ncard is expired." }, { "name": "CARD_NOT_SUPPORTED", "description": "The card is not supported either in the geographic region or by\nthe [merchant category code](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) (MCC)." }, { "name": "INVALID_PIN", "description": "The card issuer declined the request because the PIN is invalid." }, { "name": "MISSING_PIN", "description": "The payment is missing a required PIN." }, { "name": "MISSING_ACCOUNT_TYPE", "description": "The payment is missing a required ACCOUNT_TYPE parameter." }, { "name": "INVALID_POSTAL_CODE", "description": "The postal code is incorrectly formatted." }, { "name": "INVALID_FEES", "description": "The app_fee_money on a payment is too high." }, { "name": "MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED", "description": "The card must be swiped, tapped, or dipped. Payments attempted by manually entering the card number are declined." }, { "name": "PAYMENT_LIMIT_EXCEEDED", "description": "Square declined the request because the payment amount exceeded the processing limit for this merchant." }, { "name": "GIFT_CARD_AVAILABLE_AMOUNT", "description": "When a Gift Card is a payment source, you can allow taking a partial payment\nby adding the `accept_partial_authorization` parameter in the request.\nHowever, taking such a partial payment does not work if your request also includes\n`tip_money`, `app_fee_money`, or both. Square declines such payments and returns\nthe `GIFT_CARD_AVAILABLE_AMOUNT` error.\nFor more information, see\n[CreatePayment errors (additional information)](https://developer.squareup.com/docs/payments-api/error-codes#createpayment-errors-additional-information)." }, { "name": "ACCOUNT_UNUSABLE", "description": "The account provided cannot carry out transactions." }, { "name": "BUYER_REFUSED_PAYMENT", "description": "Bank account rejected or was not authorized for the payment." }, { "name": "DELAYED_TRANSACTION_EXPIRED", "description": "The application tried to update a delayed-capture payment that has expired." }, { "name": "DELAYED_TRANSACTION_CANCELED", "description": "The application tried to cancel a delayed-capture payment that was already cancelled." }, { "name": "DELAYED_TRANSACTION_CAPTURED", "description": "The application tried to capture a delayed-capture payment that was already captured." }, { "name": "DELAYED_TRANSACTION_FAILED", "description": "The application tried to update a delayed-capture payment that failed." }, { "name": "CARD_TOKEN_EXPIRED", "description": "The provided card token (nonce) has expired." }, { "name": "CARD_TOKEN_USED", "description": "The provided card token (nonce) was already used to process the payment or refund." }, { "name": "AMOUNT_TOO_HIGH", "description": "The requested payment amount is too high for the provided payment source." }, { "name": "UNSUPPORTED_INSTRUMENT_TYPE", "description": "The API request references an unsupported instrument type." }, { "name": "REFUND_AMOUNT_INVALID", "description": "The requested refund amount exceeds the amount available to refund." }, { "name": "REFUND_ALREADY_PENDING", "description": "The payment already has a pending refund." }, { "name": "PAYMENT_NOT_REFUNDABLE", "description": "The payment is not refundable. For example, the payment has been disputed and is no longer eligible for\nrefunds." }, { "name": "REFUND_DECLINED", "description": "Request failed - The card issuer declined the refund." }, { "name": "INSUFFICIENT_PERMISSIONS_FOR_REFUND", "description": "The Square account does not have the permissions to process this refund." }, { "name": "INVALID_CARD_DATA", "description": "Generic error - the provided card data is invalid." }, { "name": "SOURCE_USED", "description": "The provided source id was already used to create a card." }, { "name": "SOURCE_EXPIRED", "description": "The provided source id has expired." }, { "name": "UNSUPPORTED_LOYALTY_REWARD_TIER", "description": "The referenced loyalty program reward tier is not supported.\nThis could happen if the reward tier created in a first party\napplication is incompatible with the Loyalty API." }, { "name": "LOCATION_MISMATCH", "description": "Generic error - the given location does not matching what is expected." }, { "name": "IDEMPOTENCY_KEY_REUSED", "description": "The provided idempotency key has already been used." }, { "name": "UNEXPECTED_VALUE", "description": "General error - the value provided was unexpected." }, { "name": "SANDBOX_NOT_SUPPORTED", "description": "The API request is not supported in sandbox." }, { "name": "INVALID_EMAIL_ADDRESS", "description": "The provided email address is invalid." }, { "name": "INVALID_PHONE_NUMBER", "description": "The provided phone number is invalid." }, { "name": "CHECKOUT_EXPIRED", "description": "The provided checkout URL has expired." }, { "name": "BAD_CERTIFICATE", "description": "Bad certificate." }, { "name": "INVALID_SQUARE_VERSION_FORMAT", "description": "The provided Square-Version is incorrectly formatted." }, { "name": "API_VERSION_INCOMPATIBLE", "description": "The provided Square-Version is incompatible with the requested action." }, { "name": "CARD_PRESENCE_REQUIRED", "description": "The transaction requires that a card be present." }, { "name": "UNSUPPORTED_SOURCE_TYPE", "description": "The API request references an unsupported source type." }, { "name": "CARD_MISMATCH", "description": "The provided card does not match what is expected." }, { "name": "PLAID_ERROR", "description": "Generic plaid error" }, { "name": "PLAID_ERROR_ITEM_LOGIN_REQUIRED", "description": "Plaid error - ITEM_LOGIN_REQUIRED" }, { "name": "PLAID_ERROR_RATE_LIMIT", "description": "Plaid error - RATE_LIMIT" }, { "name": "CARD_DECLINED", "description": "The card was declined." }, { "name": "VERIFY_CVV_FAILURE", "description": "The CVV could not be verified." }, { "name": "VERIFY_AVS_FAILURE", "description": "The AVS could not be verified." }, { "name": "CARD_DECLINED_CALL_ISSUER", "description": "The payment card was declined with a request\nfor the card holder to call the issuer." }, { "name": "CARD_DECLINED_VERIFICATION_REQUIRED", "description": "The payment card was declined with a request\nfor additional verification." }, { "name": "BAD_EXPIRATION", "description": "The card expiration date is either missing or\nincorrectly formatted." }, { "name": "CHIP_INSERTION_REQUIRED", "description": "The card issuer requires that the card be read\nusing a chip reader." }, { "name": "ALLOWABLE_PIN_TRIES_EXCEEDED", "description": "The card has exhausted its available pin entry\nretries set by the card issuer. Resolving the error typically requires the\ncard holder to contact the card issuer." }, { "name": "RESERVATION_DECLINED", "description": "The card issuer declined the refund." }, { "name": "UNKNOWN_BODY_PARAMETER", "description": "The body parameter is not recognized by the requested endpoint." }, { "name": "NOT_FOUND", "description": "Not Found - a general error occurred." }, { "name": "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND", "description": "Square could not find the associated Apple Pay certificate." }, { "name": "METHOD_NOT_ALLOWED", "description": "Method Not Allowed - a general error occurred." }, { "name": "NOT_ACCEPTABLE", "description": "Not Acceptable - a general error occurred." }, { "name": "REQUEST_TIMEOUT", "description": "Request Timeout - a general error occurred." }, { "name": "CONFLICT", "description": "Conflict - a general error occurred." }, { "name": "GONE", "description": "The target resource is no longer available and this\ncondition is likely to be permanent." }, { "name": "REQUEST_ENTITY_TOO_LARGE", "description": "Request Entity Too Large - a general error occurred." }, { "name": "UNSUPPORTED_MEDIA_TYPE", "description": "Unsupported Media Type - a general error occurred." }, { "name": "UNPROCESSABLE_ENTITY", "description": "Unprocessable Entity - a general error occurred." }, { "name": "RATE_LIMITED", "description": "Rate Limited - a general error occurred." }, { "name": "NOT_IMPLEMENTED", "description": "Not Implemented - a general error occurred." }, { "name": "BAD_GATEWAY", "description": "Bad Gateway - a general error occurred." }, { "name": "SERVICE_UNAVAILABLE", "description": "Service Unavailable - a general error occurred." }, { "name": "TEMPORARY_ERROR", "description": "A temporary internal error occurred. You can safely retry your call\nusing the same idempotency key." }, { "name": "GATEWAY_TIMEOUT", "description": "Gateway Timeout - a general error occurred." } ], "description": "Indicates the specific error that occurred during a request to a\nSquare API.", "x-release-status": "PUBLIC" }, "ExcludeStrategy": { "type": "string", "enum": [ "LEAST_EXPENSIVE", "MOST_EXPENSIVE" ], "x-enum-elements": [ { "name": "LEAST_EXPENSIVE", "description": "The least expensive matched products are excluded from the pricing. If\nthe pricing rule is set to exclude one product and multiple products in the\nmatch set qualify as least expensive, then one will be excluded at random.\n\nExcluding the least expensive product gives the best discount value to the buyer." }, { "name": "MOST_EXPENSIVE", "description": "The most expensive matched product is excluded from the pricing rule.\nIf multiple products have the same price and all qualify as least expensive,\none will be excluded at random.\n\nThis guarantees that the most expensive product is purchased at full price." } ], "description": "Indicates which products matched by a CatalogPricingRule\nwill be excluded if the pricing rule uses an exclude set.", "x-release-status": "BETA", "x-is-beta": true }, "FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType": { "type": "string", "enum": [ "SCHEDULED", "ASAP" ], "x-enum-elements": [ { "name": "SCHEDULED", "description": "Indicates the fulfillment to deliver at a scheduled deliver time." }, { "name": "ASAP", "description": "Indicates that the fulfillment to deliver as soon as possible and should be prepared\nimmediately." } ], "description": "The schedule type of the delivery fulfillment.", "x-release-status": "BETA", "x-is-beta": true }, "FulfillmentFulfillmentLineItemApplication": { "type": "string", "enum": [ "ALL", "ENTRY_LIST" ], "x-enum-elements": [ { "name": "ALL", "description": "If `ALL`, `entries` must be unset." }, { "name": "ENTRY_LIST", "description": "If `ENTRY_LIST`, supply a list of `entries`." } ], "description": "The `line_item_application` describes what order line items this fulfillment applies\nto. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.", "x-release-status": "BETA", "x-is-beta": true }, "FulfillmentPickupDetailsScheduleType": { "type": "string", "enum": [ "SCHEDULED", "ASAP" ], "x-enum-elements": [ { "name": "SCHEDULED", "description": "Indicates that the fulfillment will be picked up at a scheduled pickup time." }, { "name": "ASAP", "description": "Indicates that the fulfillment will be picked up as soon as possible and\nshould be prepared immediately." } ], "description": "The schedule type of the pickup fulfillment.", "x-release-status": "PUBLIC" }, "FulfillmentState": { "type": "string", "enum": [ "PROPOSED", "RESERVED", "PREPARED", "COMPLETED", "CANCELED", "FAILED" ], "x-enum-elements": [ { "name": "PROPOSED", "description": "Indicates that the fulfillment has been proposed." }, { "name": "RESERVED", "description": "Indicates that the fulfillment has been reserved." }, { "name": "PREPARED", "description": "Indicates that the fulfillment has been prepared." }, { "name": "COMPLETED", "description": "Indicates that the fulfillment was successfully completed." }, { "name": "CANCELED", "description": "Indicates that the fulfillment was canceled." }, { "name": "FAILED", "description": "Indicates that the fulfillment failed to be completed, but was not explicitly\ncanceled." } ], "description": "The current state of this fulfillment.", "x-release-status": "PUBLIC" }, "FulfillmentType": { "type": "string", "enum": [ "PICKUP", "SHIPMENT", "DELIVERY" ], "x-enum-elements": [ { "name": "PICKUP", "description": "A recipient to pick up the fulfillment from a physical [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location)." }, { "name": "SHIPMENT", "description": "A shipping carrier to ship the fulfillment." }, { "name": "DELIVERY", "description": "A courier to deliver the fulfillment." } ], "description": "The type of fulfillment.", "x-release-status": "PUBLIC" }, "GiftCardActivityAdjustDecrementReason": { "type": "string", "enum": [ "SUSPICIOUS_ACTIVITY", "BALANCE_ACCIDENTALLY_INCREASED", "SUPPORT_ISSUE", "PURCHASE_WAS_REFUNDED" ], "x-enum-elements": [ { "name": "SUSPICIOUS_ACTIVITY", "description": "The balance was decreased because the seller detected suspicious or fraudulent activity\non the gift card." }, { "name": "BALANCE_ACCIDENTALLY_INCREASED", "description": "The balance was decreased to reverse an unintentional balance increase." }, { "name": "SUPPORT_ISSUE", "description": "The balance was decreased to accommodate support issues." }, { "name": "PURCHASE_WAS_REFUNDED", "description": "The balance was decreased because the order used to purchase or reload the\ngift card was refunded." } ], "description": "Indicates the reason for deducting money from a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard).", "x-release-status": "PUBLIC" }, "GiftCardActivityAdjustIncrementReason": { "type": "string", "enum": [ "COMPLIMENTARY", "SUPPORT_ISSUE", "TRANSACTION_VOIDED" ], "x-enum-elements": [ { "name": "COMPLIMENTARY", "description": "The seller gifted a complimentary gift card balance increase." }, { "name": "SUPPORT_ISSUE", "description": "The seller increased the gift card balance \nto accommodate support issues." }, { "name": "TRANSACTION_VOIDED", "description": "The transaction is voided." } ], "description": "Indicates the reason for adding money to a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard).", "x-release-status": "PUBLIC" }, "GiftCardActivityBlockReason": { "type": "string", "enum": [ "CHARGEBACK_BLOCK" ], "x-enum-elements": [ { "name": "CHARGEBACK_BLOCK", "description": "The gift card is blocked because the buyer initiated a chargeback on the gift card purchase." } ], "description": "Indicates the reason for blocking a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard).", "x-release-status": "PUBLIC" }, "GiftCardActivityClearBalanceReason": { "type": "string", "enum": [ "SUSPICIOUS_ACTIVITY", "REUSE_GIFTCARD", "UNKNOWN_REASON" ], "x-enum-elements": [ { "name": "SUSPICIOUS_ACTIVITY", "description": "The seller suspects suspicious activity." }, { "name": "REUSE_GIFTCARD", "description": "The seller cleared the balance to reuse the gift card." }, { "name": "UNKNOWN_REASON", "description": "The gift card balance was cleared for an unknown reason.\n\nThis reason is read-only and cannot be used to create a `CLEAR_BALANCE` activity using the Gift Card Activities API." } ], "description": "Indicates the reason for clearing the balance of a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard).", "x-release-status": "PUBLIC" }, "GiftCardActivityDeactivateReason": { "type": "string", "enum": [ "SUSPICIOUS_ACTIVITY", "UNKNOWN_REASON", "CHARGEBACK_DEACTIVATE" ], "x-enum-elements": [ { "name": "SUSPICIOUS_ACTIVITY", "description": "The seller suspects suspicious activity." }, { "name": "UNKNOWN_REASON", "description": "The gift card was deactivated for an unknown reason.\n\nThis reason is read-only and cannot be used to create a `DEACTIVATE` activity using the Gift Card Activities API." }, { "name": "CHARGEBACK_DEACTIVATE", "description": "A chargeback on the gift card purchase (or the gift card load) was ruled in favor of the buyer.\n\nThis reason is read-only and cannot be used to create a `DEACTIVATE` activity using the Gift Card Activities API." } ], "description": "Indicates the reason for deactivating a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard).", "x-release-status": "PUBLIC" }, "GiftCardActivityRedeemStatus": { "type": "string", "enum": [ "PENDING", "COMPLETED", "CANCELED" ], "x-enum-elements": [ { "name": "PENDING", "description": "The gift card redemption is pending. `PENDING` is a temporary status that applies when a \ngift card is redeemed from Square Point of Sale or another Square product. A `PENDING` status is updated to \n`COMPLETED` if the payment is captured or `CANCELED` if the authorization is voided." }, { "name": "COMPLETED", "description": "The gift card redemption is completed." }, { "name": "CANCELED", "description": "The gift card redemption is canceled. A redemption is canceled if the authorization \non the gift card is voided." } ], "description": "Indicates the status of a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard) redemption. This status is relevant only for\nredemptions made from Square products (such as Square Point of Sale) because Square products use a \ntwo-state process. Gift cards redeemed using the Gift Card Activities API always have a `COMPLETED` status.", "x-release-status": "PUBLIC" }, "GiftCardActivityType": { "type": "string", "enum": [ "ACTIVATE", "LOAD", "REDEEM", "CLEAR_BALANCE", "DEACTIVATE", "ADJUST_INCREMENT", "ADJUST_DECREMENT", "REFUND", "UNLINKED_ACTIVITY_REFUND", "IMPORT", "BLOCK", "UNBLOCK", "IMPORT_REVERSAL", "TRANSFER_BALANCE_FROM", "TRANSFER_BALANCE_TO" ], "x-enum-elements": [ { "name": "ACTIVATE", "description": "Activated a gift card with a balance. When a gift card is activated, Square changes \nthe gift card state from `PENDING` to `ACTIVE`. A gift card must be in the `ACTIVE` state \nto be used for other balance-changing activities." }, { "name": "LOAD", "description": "Loaded a gift card with additional funds." }, { "name": "REDEEM", "description": "Redeemed a gift card for a purchase." }, { "name": "CLEAR_BALANCE", "description": "Set the balance of a gift card to zero." }, { "name": "DEACTIVATE", "description": "Permanently blocked a gift card from balance-changing activities." }, { "name": "ADJUST_INCREMENT", "description": "Added money to a gift card outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow." }, { "name": "ADJUST_DECREMENT", "description": "Deducted money from a gift card outside of a typical `REDEEM` activity flow." }, { "name": "REFUND", "description": "Added money to a gift card from a refunded transaction. A `REFUND` activity might be linked to \na Square payment, depending on how the payment and refund are processed. For example:\n- A gift card payment processed by Square can be refunded to the same gift card using Square Point of Sale,\nthe Square Seller Dashboard, or the Refunds API.\n- A cross-tender payment processed by Square can be refunded to a gift card using Square Point of Sale or the\nSquare Seller Dashboard. The payment source might be a credit card or different gift card.\n- A payment processed using a custom payment processing system can be refunded to the same gift card." }, { "name": "UNLINKED_ACTIVITY_REFUND", "description": "Added money to a gift card from a refunded transaction that was processed using a custom payment\nprocessing system and not linked to the gift card." }, { "name": "IMPORT", "description": "Imported a third-party gift card with a balance. `IMPORT` activities are managed \nby Square and cannot be created using the Gift Card Activities API." }, { "name": "BLOCK", "description": "Temporarily blocked a gift card from balance-changing activities. `BLOCK` activities \nare managed by Square and cannot be created using the Gift Card Activities API." }, { "name": "UNBLOCK", "description": "Unblocked a gift card, which enables it to resume balance-changing activities. `UNBLOCK` \nactivities are managed by Square and cannot be created using the Gift Card Activities API." }, { "name": "IMPORT_REVERSAL", "description": "Reversed the import of a third-party gift card, which sets the gift card state to \n`PENDING` and clears the balance. `IMPORT_REVERSAL` activities are managed by Square and \ncannot be created using the Gift Card Activities API." }, { "name": "TRANSFER_BALANCE_FROM", "description": "Deducted money from a gift card as the result of a transfer to the balance of another gift card.\n`TRANSFER_BALANCE_FROM` activities are managed by Square and cannot be created using the Gift Card Activities API." }, { "name": "TRANSFER_BALANCE_TO", "description": "Added money to a gift card as the result of a transfer from the balance of another gift card.\n`TRANSFER_BALANCE_TO` activities are managed by Square and cannot be created using the Gift Card Activities API." } ], "description": "Indicates the type of [gift card activity](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivity).", "x-release-status": "PUBLIC" }, "GiftCardActivityUnblockReason": { "type": "string", "enum": [ "CHARGEBACK_UNBLOCK" ], "x-enum-elements": [ { "name": "CHARGEBACK_UNBLOCK", "description": "The gift card is unblocked because a chargeback was ruled in favor of the seller." } ], "description": "Indicates the reason for unblocking a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard).", "x-release-status": "PUBLIC" }, "GiftCardGANSource": { "type": "string", "enum": [ "SQUARE", "OTHER" ], "x-enum-elements": [ { "name": "SQUARE", "description": "The GAN is generated by Square." }, { "name": "OTHER", "description": "The GAN is provided by a non-Square system. For more information, see \n[Custom GANs](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#custom-gans) or \n[Third-party gift cards](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#third-party-gift-cards)." } ], "description": "Indicates the source that generated the gift card \naccount number (GAN).", "x-release-status": "PUBLIC" }, "GiftCardStatus": { "type": "string", "enum": [ "ACTIVE", "DEACTIVATED", "BLOCKED", "PENDING" ], "x-enum-elements": [ { "name": "ACTIVE", "description": "The gift card is active and can be used as a payment source." }, { "name": "DEACTIVATED", "description": "Any activity that changes the gift card balance is permanently forbidden." }, { "name": "BLOCKED", "description": "Any activity that changes the gift card balance is temporarily forbidden." }, { "name": "PENDING", "description": "The gift card is pending activation.\nThis is the initial state when a gift card is created. You must activate the gift card\nbefore it can be used." } ], "description": "Indicates the gift card state.", "x-release-status": "PUBLIC" }, "GiftCardType": { "type": "string", "enum": [ "PHYSICAL", "DIGITAL" ], "x-enum-elements": [ { "name": "PHYSICAL", "description": "A plastic gift card." }, { "name": "DIGITAL", "description": "A digital gift card." } ], "description": "Indicates the gift card type.", "x-release-status": "PUBLIC" }, "InventoryAlertType": { "type": "string", "enum": [ "NONE", "LOW_QUANTITY" ], "x-enum-elements": [ { "name": "NONE", "description": "The variation does not display an alert." }, { "name": "LOW_QUANTITY", "description": "The variation generates an alert when its quantity is low." } ], "description": "Indicates whether Square should alert the merchant when the inventory quantity of a CatalogItemVariation is low.", "x-release-status": "PUBLIC" }, "InventoryChangeType": { "type": "string", "enum": [ "PHYSICAL_COUNT", "ADJUSTMENT", "TRANSFER" ], "x-enum-elements": [ { "name": "PHYSICAL_COUNT", "description": "The change occurred as part of a physical count update." }, { "name": "ADJUSTMENT", "description": "The change occurred as part of the normal lifecycle of goods\n(e.g., as an inventory adjustment)." }, { "name": "TRANSFER", "description": "The change occurred as part of an inventory transfer." } ], "description": "Indicates how the inventory change was applied to a tracked product quantity.", "x-release-status": "PUBLIC" }, "InventoryState": { "type": "string", "enum": [ "CUSTOM", "IN_STOCK", "SOLD", "RETURNED_BY_CUSTOMER", "RESERVED_FOR_SALE", "SOLD_ONLINE", "ORDERED_FROM_VENDOR", "RECEIVED_FROM_VENDOR", "IN_TRANSIT_TO", "NONE", "WASTE", "UNLINKED_RETURN", "COMPOSED", "DECOMPOSED", "SUPPORTED_BY_NEWER_VERSION", "IN_TRANSIT" ], "x-enum-elements": [ { "name": "CUSTOM", "description": "The related quantity of items are in a custom state. **READ-ONLY**:\nthe Inventory API cannot move quantities to or from this state." }, { "name": "IN_STOCK", "description": "The related quantity of items are on hand and available for sale." }, { "name": "SOLD", "description": "The related quantity of items were sold as part of an itemized\ntransaction. Quantities in the `SOLD` state are no longer tracked." }, { "name": "RETURNED_BY_CUSTOMER", "description": "The related quantity of items were returned through the Square Point\nof Sale application, but are not yet available for sale. **READ-ONLY**:\nthe Inventory API cannot move quantities to or from this state." }, { "name": "RESERVED_FOR_SALE", "description": "The related quantity of items are on hand, but not currently\navailable for sale. **READ-ONLY**: the Inventory API cannot move\nquantities to or from this state." }, { "name": "SOLD_ONLINE", "description": "The related quantity of items were sold online. **READ-ONLY**: the\nInventory API cannot move quantities to or from this state." }, { "name": "ORDERED_FROM_VENDOR", "description": "The related quantity of items were ordered from a vendor but not yet\nreceived. **READ-ONLY**: the Inventory API cannot move quantities to or\nfrom this state." }, { "name": "RECEIVED_FROM_VENDOR", "description": "The related quantity of items were received from a vendor but are\nnot yet available for sale. **READ-ONLY**: the Inventory API cannot move\nquantities to or from this state." }, { "name": "IN_TRANSIT_TO", "description": "Replaced by `IN_TRANSIT` to represent quantities\nof items that are in transit between locations." }, { "name": "NONE", "description": "A placeholder indicating that the related quantity of items are not\ncurrently tracked in Square. Transferring quantities from the `NONE` state\nto a tracked state (e.g., `IN_STOCK`) introduces stock into the system." }, { "name": "WASTE", "description": "The related quantity of items are lost or damaged and cannot be\nsold." }, { "name": "UNLINKED_RETURN", "description": "The related quantity of items were returned but not linked to a\nprevious transaction. Unlinked returns are not tracked in Square.\nTransferring a quantity from `UNLINKED_RETURN` to a tracked state (e.g.,\n`IN_STOCK`) introduces new stock into the system." }, { "name": "COMPOSED", "description": "The related quantity of items that are part of a composition consisting one or more components." }, { "name": "DECOMPOSED", "description": "The related quantity of items that are part of a component." }, { "name": "SUPPORTED_BY_NEWER_VERSION", "description": "This state is not supported by this version of the Square API. We recommend that you upgrade the client to use the appropriate version of the Square API supporting this state." }, { "name": "IN_TRANSIT", "description": "The related quantity of items are in transit between locations. **READ-ONLY:** the Inventory API cannot currently be used to move quantities to or from this inventory state." } ], "description": "Indicates the state of a tracked item quantity in the lifecycle of goods.", "x-release-status": "PUBLIC" }, "InvoiceAutomaticPaymentSource": { "type": "string", "enum": [ "NONE", "CARD_ON_FILE", "BANK_ON_FILE" ], "x-enum-elements": [ { "name": "NONE", "description": "An automatic payment is not configured for the payment request." }, { "name": "CARD_ON_FILE", "description": "Use a card on file as the automatic payment method. On the due date, Square charges the card\nfor the amount of the payment request.\n\nFor `CARD_ON_FILE` payments, the invoice delivery method must be `EMAIL` and `card_id` must be\nspecified for the payment request before the invoice can be published." }, { "name": "BANK_ON_FILE", "description": "Use a bank account on file as the automatic payment method. On the due date, Square charges the bank\naccount for the amount of the payment request if the buyer has approved the payment. The buyer receives a\nrequest to approve the payment when the invoice is sent or the invoice is updated.\n\nThis payment method applies only to invoices that sellers create in the Seller Dashboard or other\nSquare product. The bank account is provided by the customer during the payment flow. \n\nYou cannot set `BANK_ON_FILE` as a payment method using the Invoices API, but you can change a `BANK_ON_FILE`\npayment method to `NONE` or `CARD_ON_FILE`. For `BANK_ON_FILE` payments, the invoice delivery method must be `EMAIL`." } ], "description": "Indicates the automatic payment method for an [invoice payment request](https://developer.squareup.com/reference/square_2024-04-17/objects/InvoicePaymentRequest).", "x-release-status": "PUBLIC" }, "InvoiceCustomFieldPlacement": { "type": "string", "enum": [ "ABOVE_LINE_ITEMS", "BELOW_LINE_ITEMS" ], "x-enum-elements": [ { "name": "ABOVE_LINE_ITEMS", "description": "Render the custom field above the invoice line items." }, { "name": "BELOW_LINE_ITEMS", "description": "Render the custom field below the invoice line items." } ], "description": "Indicates where to render a custom field on the Square-hosted invoice page and in emailed or PDF \ncopies of the invoice.", "x-release-status": "PUBLIC" }, "InvoiceDeliveryMethod": { "type": "string", "enum": [ "EMAIL", "SHARE_MANUALLY", "SMS" ], "x-enum-elements": [ { "name": "EMAIL", "description": "Directs Square to send invoices, reminders, and receipts to the customer using email." }, { "name": "SHARE_MANUALLY", "description": "Directs Square to take no action on the invoice. In this case, the seller\nor application developer follows up with the customer for payment. For example,\na seller might collect a payment in the Seller Dashboard or Point of Sale (POS) application.\nThe seller might also share the URL of the Square-hosted invoice page (`public_url`) with the customer to request payment." }, { "name": "SMS", "description": "Directs Square to send invoices and receipts to the customer using SMS (text message).\n\nYou cannot set `SMS` as a delivery method using the Invoices API, but you can change an `SMS` delivery method to `EMAIL` or `SHARE_MANUALLY`." } ], "description": "Indicates how Square delivers the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) to the customer.", "x-release-status": "PUBLIC" }, "InvoicePaymentReminderStatus": { "type": "string", "enum": [ "PENDING", "NOT_APPLICABLE", "SENT" ], "x-enum-elements": [ { "name": "PENDING", "description": "The reminder will be sent on the `relative_scheduled_date` (if the invoice is published)." }, { "name": "NOT_APPLICABLE", "description": "The reminder is not applicable and is not sent. The following are examples\nof when reminders are not applicable and are not sent:\n- You schedule a reminder to be sent before the invoice is published.\n- The invoice is configured with multiple payment requests and a payment request reminder\nis configured to be sent after the next payment request `due_date`.\n- Two reminders (for different payment requests) are configured to be sent on the\nsame date. Therefore, only one reminder is sent.\n- You configure a reminder to be sent on the date that the invoice is scheduled to be sent.\n- The payment request is already paid.\n- The invoice status is `CANCELED` or `FAILED`." }, { "name": "SENT", "description": "The reminder is sent." } ], "description": "The status of a payment request reminder.", "x-release-status": "PUBLIC" }, "InvoiceRequestMethod": { "type": "string", "enum": [ "EMAIL", "CHARGE_CARD_ON_FILE", "SHARE_MANUALLY", "CHARGE_BANK_ON_FILE", "SMS", "SMS_CHARGE_CARD_ON_FILE", "SMS_CHARGE_BANK_ON_FILE" ], "x-enum-elements": [ { "name": "EMAIL", "description": "Directs Square to send invoices, reminders, and receipts to the customer using email.\nSquare sends the invoice after it is published (either immediately or at the `scheduled_at`\ntime, if specified in the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice))." }, { "name": "CHARGE_CARD_ON_FILE", "description": "Directs Square to charge the card on file on the `due_date` specified in the payment request\nand to use email to send invoices, reminders, and receipts." }, { "name": "SHARE_MANUALLY", "description": "Directs Square to take no specific action on the invoice. In this case, the seller \n(or the application developer) follows up with the customer for payment. For example, \na seller might collect a payment in the Seller Dashboard or use the Point of Sale (POS) application. \nThe seller might also share the URL of the Square-hosted invoice page (`public_url`) with the customer requesting payment." }, { "name": "CHARGE_BANK_ON_FILE", "description": "Directs Square to charge the customer\u0027s bank account on file and to use email to send invoices, reminders, and receipts.\nThe customer must approve the payment.\n\nThe bank on file payment method applies only to invoices that sellers create in the Seller Dashboard or other\nSquare product. The bank account is provided by the customer during the payment flow. You \ncannot set `CHARGE_BANK_ON_FILE` as a request method using the Invoices API." }, { "name": "SMS", "description": "Directs Square to send invoices and receipts to the customer using SMS (text message). Square sends the invoice\nafter it is published (either immediately or at the `scheduled_at` time, if specified in the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice)). \n\nYou cannot set `SMS` as a request method using the Invoices API." }, { "name": "SMS_CHARGE_CARD_ON_FILE", "description": "Directs Square to charge the card on file on the `due_date` specified in the payment request and to\nuse SMS (text message) to send invoices and receipts. \n\nYou cannot set `SMS_CHARGE_CARD_ON_FILE` as a request method using the Invoices API." }, { "name": "SMS_CHARGE_BANK_ON_FILE", "description": "Directs Square to charge the customer\u0027s bank account on file and to use SMS (text message) to send invoices and receipts.\nThe customer must approve the payment.\n\nThe bank on file payment method applies only to invoices that sellers create in the Seller Dashboard\nor other Square product. The bank account is provided by the customer during the payment flow. \nYou cannot set `SMS_CHARGE_BANK_ON_FILE` as a request method using the Invoices API." } ], "description": "Specifies the action for Square to take for processing the invoice. For example, \nemail the invoice, charge a customer\u0027s card on file, or do nothing. DEPRECATED at\nversion 2021-01-21. The corresponding `request_method` field is replaced by the\n`Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "InvoiceRequestType": { "type": "string", "enum": [ "BALANCE", "DEPOSIT", "INSTALLMENT" ], "x-enum-elements": [ { "name": "BALANCE", "description": "A request for a balance payment. The balance amount is computed as follows: \n\n- If the invoice specifies only a balance payment request, the balance amount is the \ntotal amount of the associated order. \n- If the invoice also specifies a deposit request, the balance amount is the amount \nremaining after the deposit.\n\n`INSTALLMENT` and `BALANCE` payment requests are not allowed in the same invoice." }, { "name": "DEPOSIT", "description": "A request for a deposit payment. You have the option of specifying \nan exact amount or a percentage of the total order amount. If you request a deposit, \nit must be due before any other payment requests." }, { "name": "INSTALLMENT", "description": "A request for an installment payment. Installments allow buyers to pay the invoice over time. Installments can optionally be combined with a deposit. \n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription)." } ], "description": "Indicates the type of the payment request. For more information, see \n[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).", "x-release-status": "PUBLIC" }, "InvoiceSortField": { "type": "string", "enum": [ "INVOICE_SORT_DATE" ], "x-enum-elements": [ { "name": "INVOICE_SORT_DATE", "description": "The field works as follows:\n\n- If the invoice is a draft, it uses the invoice `created_at` date.\n- If the invoice is scheduled for publication, it uses the `scheduled_at` date.\n- If the invoice is published, it uses the invoice publication date." } ], "description": "The field to use for sorting.", "x-release-status": "PUBLIC" }, "InvoiceStatus": { "type": "string", "enum": [ "DRAFT", "UNPAID", "SCHEDULED", "PARTIALLY_PAID", "PAID", "PARTIALLY_REFUNDED", "REFUNDED", "CANCELED", "FAILED", "PAYMENT_PENDING" ], "x-enum-elements": [ { "name": "DRAFT", "description": "The invoice is a draft. You must publish a draft invoice before Square can process it.\nA draft invoice has no `public_url`, so it is not available to customers." }, { "name": "UNPAID", "description": "The invoice is published but not yet paid." }, { "name": "SCHEDULED", "description": "The invoice is scheduled to be processed. On the scheduled date,\nSquare sends the invoice, initiates an automatic payment, or takes no action, depending on\nthe delivery method and payment request settings. Square also sets the invoice status to the\nappropriate state: `UNPAID`, `PAID`, `PARTIALLY_PAID`, or `PAYMENT_PENDING`." }, { "name": "PARTIALLY_PAID", "description": "A partial payment is received for the invoice." }, { "name": "PAID", "description": "The customer paid the invoice in full." }, { "name": "PARTIALLY_REFUNDED", "description": "The invoice is paid (or partially paid) and some but not all the amount paid is\nrefunded." }, { "name": "REFUNDED", "description": "The full amount that the customer paid for the invoice is refunded." }, { "name": "CANCELED", "description": "The invoice is canceled. Square no longer requests payments from the customer.\nThe `public_url` page remains and is accessible, but it displays the invoice\nas canceled and does not accept payment." }, { "name": "FAILED", "description": "Square canceled the invoice due to suspicious activity." }, { "name": "PAYMENT_PENDING", "description": "A payment on the invoice was initiated but has not yet been processed.\n\nWhen in this state, invoices cannot be updated and other payments cannot be initiated." } ], "description": "Indicates the status of an invoice.", "x-release-status": "PUBLIC" }, "JobAssignmentPayType": { "type": "string", "enum": [ "NONE", "HOURLY", "SALARY" ], "x-enum-elements": [ { "name": "NONE", "description": "The job does not have a defined pay type." }, { "name": "HOURLY", "description": "The job pays an hourly rate." }, { "name": "SALARY", "description": "The job pays an annual salary." } ], "description": "Enumerates the possible pay types that a job can be assigned.", "x-release-status": "PUBLIC" }, "LocationCapability": { "type": "string", "enum": [ "CREDIT_CARD_PROCESSING", "AUTOMATIC_TRANSFERS", "UNLINKED_REFUNDS" ], "x-enum-elements": [ { "name": "CREDIT_CARD_PROCESSING", "description": "The capability to process credit card transactions with Square." }, { "name": "AUTOMATIC_TRANSFERS", "description": "The capability to receive automatic transfers from Square." }, { "name": "UNLINKED_REFUNDS", "description": "The capability to process unlinked refunds with Square." } ], "description": "The capabilities a location might have.", "x-release-status": "PUBLIC" }, "LocationStatus": { "type": "string", "enum": [ "ACTIVE", "INACTIVE" ], "x-enum-elements": [ { "name": "ACTIVE", "description": "A location that is active for business." }, { "name": "INACTIVE", "description": "A location that is not active for business. Inactive locations provide historical\ninformation. Hide inactive locations unless the user has requested to see them." } ], "description": "A location\u0027s status.", "x-release-status": "PUBLIC" }, "LocationType": { "type": "string", "enum": [ "PHYSICAL", "MOBILE" ], "x-enum-elements": [ { "name": "PHYSICAL", "description": "A place of business with a physical location." }, { "name": "MOBILE", "description": "A place of business that is mobile, such as a food truck or online store." } ], "description": "A location\u0027s type.", "x-release-status": "PUBLIC" }, "LoyaltyAccountMappingType": { "type": "string", "enum": [ "PHONE" ], "x-enum-elements": [ { "name": "PHONE", "description": "The loyalty account is mapped by phone." } ], "description": "The type of mapping.", "x-release-status": "PUBLIC" }, "LoyaltyEventSource": { "type": "string", "enum": [ "SQUARE", "LOYALTY_API" ], "x-enum-elements": [ { "name": "SQUARE", "description": "The event is generated by the Square Point of Sale (POS)." }, { "name": "LOYALTY_API", "description": "The event is generated by something other than the Square Point of Sale that used the Loyalty API." } ], "description": "Defines whether the event was generated by the Square Point of Sale.", "x-release-status": "PUBLIC" }, "LoyaltyEventType": { "type": "string", "enum": [ "ACCUMULATE_POINTS", "CREATE_REWARD", "REDEEM_REWARD", "DELETE_REWARD", "ADJUST_POINTS", "EXPIRE_POINTS", "OTHER", "ACCUMULATE_PROMOTION_POINTS" ], "x-enum-elements": [ { "name": "ACCUMULATE_POINTS", "description": "Points are added to a loyalty account for a purchase that\nqualified for points based on an [accrual rule](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgramAccrualRule)." }, { "name": "CREATE_REWARD", "description": "A [loyalty reward](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyReward) is created." }, { "name": "REDEEM_REWARD", "description": "A loyalty reward is redeemed." }, { "name": "DELETE_REWARD", "description": "A loyalty reward is deleted." }, { "name": "ADJUST_POINTS", "description": "Loyalty points are manually adjusted." }, { "name": "EXPIRE_POINTS", "description": "Loyalty points are expired according to the \nexpiration policy of the loyalty program." }, { "name": "OTHER", "description": "Some other loyalty event occurred." }, { "name": "ACCUMULATE_PROMOTION_POINTS", "description": " Points are added to a loyalty account for a purchase that\nqualified for a [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion)." } ], "description": "The type of the loyalty event.", "x-release-status": "PUBLIC" }, "LoyaltyProgramAccrualRuleTaxMode": { "type": "string", "enum": [ "BEFORE_TAX", "AFTER_TAX" ], "x-enum-elements": [ { "name": "BEFORE_TAX", "description": "Exclude taxes from the purchase amount used for loyalty points accrual." }, { "name": "AFTER_TAX", "description": "Include taxes in the purchase amount used for loyalty points accrual." } ], "description": "Indicates how taxes should be treated when calculating the purchase amount used for loyalty points accrual. \nThis setting applies only to `SPEND` accrual rules or `VISIT` accrual rules that have a minimum spend requirement.", "x-release-status": "PUBLIC" }, "LoyaltyProgramAccrualRuleType": { "type": "string", "enum": [ "VISIT", "SPEND", "ITEM_VARIATION", "CATEGORY" ], "x-enum-elements": [ { "name": "VISIT", "description": "A visit-based accrual rule. A buyer earns points for each visit. \nYou can specify the minimum purchase required." }, { "name": "SPEND", "description": "A spend-based accrual rule. A buyer earns points based on the amount \nspent." }, { "name": "ITEM_VARIATION", "description": "An accrual rule based on an item variation. For example, accrue \npoints for purchasing a coffee." }, { "name": "CATEGORY", "description": "An accrual rule based on an item category. For example, accrue points \nfor purchasing any item in the \"hot drink\" category: coffee, tea, or hot cocoa." } ], "description": "The type of the accrual rule that defines how buyers can earn points.", "x-release-status": "PUBLIC" }, "LoyaltyProgramRewardDefinitionScope": { "type": "string", "enum": [ "ORDER", "ITEM_VARIATION", "CATEGORY" ], "x-enum-elements": [ { "name": "ORDER", "description": "The discount applies to the entire order." }, { "name": "ITEM_VARIATION", "description": "The discount applies only to specific item variations." }, { "name": "CATEGORY", "description": "The discount applies only to items in the given categories." } ], "description": "Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. Discount details\nare now defined using a catalog pricing rule and other catalog objects. For more information, see\n[Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "LoyaltyProgramRewardDefinitionType": { "type": "string", "enum": [ "FIXED_AMOUNT", "FIXED_PERCENTAGE" ], "x-enum-elements": [ { "name": "FIXED_AMOUNT", "description": "The fixed amount discounted." }, { "name": "FIXED_PERCENTAGE", "description": "The fixed percentage discounted." } ], "description": "The type of discount the reward tier offers. DEPRECATED at version 2020-12-16. Discount details\nare now defined using a catalog pricing rule and other catalog objects. For more information, see\n[Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "LoyaltyProgramStatus": { "type": "string", "enum": [ "INACTIVE", "ACTIVE" ], "x-enum-elements": [ { "name": "INACTIVE", "description": "The loyalty program does not have an active subscription. \nLoyalty API requests fail." }, { "name": "ACTIVE", "description": "The program is fully functional. The program has an active subscription." } ], "description": "Indicates whether the program is currently active.", "x-release-status": "PUBLIC" }, "LoyaltyPromotionIncentiveType": { "type": "string", "enum": [ "POINTS_MULTIPLIER", "POINTS_ADDITION" ], "x-enum-elements": [ { "name": "POINTS_MULTIPLIER", "description": "Multiply the number of points earned from the base loyalty program.\nFor example, \"Earn double points.\"" }, { "name": "POINTS_ADDITION", "description": "Add a specified number of points to those earned from the base loyalty program.\nFor example, \"Earn 10 additional points.\"" } ], "description": "Indicates the type of points incentive for a [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion),\nwhich is used to determine how buyers can earn points from the promotion.", "x-release-status": "PUBLIC" }, "LoyaltyPromotionStatus": { "type": "string", "enum": [ "ACTIVE", "ENDED", "CANCELED", "SCHEDULED" ], "x-enum-elements": [ { "name": "ACTIVE", "description": "The loyalty promotion is currently active. Buyers can earn points for purchases\nthat meet the promotion conditions, such as the promotion\u0027s `available_time`." }, { "name": "ENDED", "description": "The loyalty promotion has ended because the specified `end_date` was reached.\n`ENDED` is a terminal status." }, { "name": "CANCELED", "description": "The loyalty promotion was canceled. `CANCELED` is a terminal status." }, { "name": "SCHEDULED", "description": "The loyalty promotion is scheduled to start in the future. Square changes the\npromotion status to `ACTIVE` when the `start_date` is reached." } ], "description": "Indicates the status of a [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion).", "x-release-status": "PUBLIC" }, "LoyaltyPromotionTriggerLimitInterval": { "type": "string", "enum": [ "ALL_TIME", "DAY" ], "x-enum-elements": [ { "name": "ALL_TIME", "description": "The limit applies to the entire time that the promotion is active. For example, if `times`\nis set to 1 and `time_period` is set to `ALL_TIME`, a buyer can earn promotion points a maximum\nof one time during the promotion." }, { "name": "DAY", "description": "The limit applies per day, according to the `available_time` schedule specified for the promotion.\nFor example, if the `times` field of the trigger limit is set to 1, a buyer can trigger the promotion\na maximum of once per day." } ], "description": "Indicates the time period that the [trigger limit](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotionTriggerLimit) applies to,\nwhich is used to determine the number of times a buyer can earn points for a [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion).", "x-release-status": "PUBLIC" }, "LoyaltyRewardStatus": { "type": "string", "enum": [ "ISSUED", "REDEEMED", "DELETED" ], "x-enum-elements": [ { "name": "ISSUED", "description": "The reward is issued." }, { "name": "REDEEMED", "description": "The reward is redeemed." }, { "name": "DELETED", "description": "The reward is deleted." } ], "description": "The status of the loyalty reward.", "x-release-status": "PUBLIC" }, "MeasurementUnitArea": { "type": "string", "enum": [ "IMPERIAL_ACRE", "IMPERIAL_SQUARE_INCH", "IMPERIAL_SQUARE_FOOT", "IMPERIAL_SQUARE_YARD", "IMPERIAL_SQUARE_MILE", "METRIC_SQUARE_CENTIMETER", "METRIC_SQUARE_METER", "METRIC_SQUARE_KILOMETER" ], "x-enum-elements": [ { "name": "IMPERIAL_ACRE", "description": "The area is measured in acres." }, { "name": "IMPERIAL_SQUARE_INCH", "description": "The area is measured in square inches." }, { "name": "IMPERIAL_SQUARE_FOOT", "description": "The area is measured in square feet." }, { "name": "IMPERIAL_SQUARE_YARD", "description": "The area is measured in square yards." }, { "name": "IMPERIAL_SQUARE_MILE", "description": "The area is measured in square miles." }, { "name": "METRIC_SQUARE_CENTIMETER", "description": "The area is measured in square centimeters." }, { "name": "METRIC_SQUARE_METER", "description": "The area is measured in square meters." }, { "name": "METRIC_SQUARE_KILOMETER", "description": "The area is measured in square kilometers." } ], "description": "Unit of area used to measure a quantity.", "x-release-status": "PUBLIC" }, "MeasurementUnitGeneric": { "type": "string", "enum": [ "UNIT" ], "x-enum-elements": [ { "name": "UNIT", "description": "The generic unit." } ], "description": "", "x-release-status": "PUBLIC" }, "MeasurementUnitLength": { "type": "string", "enum": [ "IMPERIAL_INCH", "IMPERIAL_FOOT", "IMPERIAL_YARD", "IMPERIAL_MILE", "METRIC_MILLIMETER", "METRIC_CENTIMETER", "METRIC_METER", "METRIC_KILOMETER" ], "x-enum-elements": [ { "name": "IMPERIAL_INCH", "description": "The length is measured in inches." }, { "name": "IMPERIAL_FOOT", "description": "The length is measured in feet." }, { "name": "IMPERIAL_YARD", "description": "The length is measured in yards." }, { "name": "IMPERIAL_MILE", "description": "The length is measured in miles." }, { "name": "METRIC_MILLIMETER", "description": "The length is measured in millimeters." }, { "name": "METRIC_CENTIMETER", "description": "The length is measured in centimeters." }, { "name": "METRIC_METER", "description": "The length is measured in meters." }, { "name": "METRIC_KILOMETER", "description": "The length is measured in kilometers." } ], "description": "The unit of length used to measure a quantity.", "x-release-status": "PUBLIC" }, "MeasurementUnitTime": { "type": "string", "enum": [ "GENERIC_MILLISECOND", "GENERIC_SECOND", "GENERIC_MINUTE", "GENERIC_HOUR", "GENERIC_DAY" ], "x-enum-elements": [ { "name": "GENERIC_MILLISECOND", "description": "The time is measured in milliseconds." }, { "name": "GENERIC_SECOND", "description": "The time is measured in seconds." }, { "name": "GENERIC_MINUTE", "description": "The time is measured in minutes." }, { "name": "GENERIC_HOUR", "description": "The time is measured in hours." }, { "name": "GENERIC_DAY", "description": "The time is measured in days." } ], "description": "Unit of time used to measure a quantity (a duration).", "x-release-status": "PUBLIC" }, "MeasurementUnitUnitType": { "type": "string", "enum": [ "TYPE_CUSTOM", "TYPE_AREA", "TYPE_LENGTH", "TYPE_VOLUME", "TYPE_WEIGHT", "TYPE_GENERIC" ], "x-enum-elements": [ { "name": "TYPE_CUSTOM", "description": "The unit details are contained in the custom_unit field." }, { "name": "TYPE_AREA", "description": "The unit details are contained in the area_unit field." }, { "name": "TYPE_LENGTH", "description": "The unit details are contained in the length_unit field." }, { "name": "TYPE_VOLUME", "description": "The unit details are contained in the volume_unit field." }, { "name": "TYPE_WEIGHT", "description": "The unit details are contained in the weight_unit field." }, { "name": "TYPE_GENERIC", "description": "The unit details are contained in the generic_unit field." } ], "description": "Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum.", "x-release-status": "PUBLIC" }, "MeasurementUnitVolume": { "type": "string", "enum": [ "GENERIC_FLUID_OUNCE", "GENERIC_SHOT", "GENERIC_CUP", "GENERIC_PINT", "GENERIC_QUART", "GENERIC_GALLON", "IMPERIAL_CUBIC_INCH", "IMPERIAL_CUBIC_FOOT", "IMPERIAL_CUBIC_YARD", "METRIC_MILLILITER", "METRIC_LITER" ], "x-enum-elements": [ { "name": "GENERIC_FLUID_OUNCE", "description": "The volume is measured in ounces." }, { "name": "GENERIC_SHOT", "description": "The volume is measured in shots." }, { "name": "GENERIC_CUP", "description": "The volume is measured in cups." }, { "name": "GENERIC_PINT", "description": "The volume is measured in pints." }, { "name": "GENERIC_QUART", "description": "The volume is measured in quarts." }, { "name": "GENERIC_GALLON", "description": "The volume is measured in gallons." }, { "name": "IMPERIAL_CUBIC_INCH", "description": "The volume is measured in cubic inches." }, { "name": "IMPERIAL_CUBIC_FOOT", "description": "The volume is measured in cubic feet." }, { "name": "IMPERIAL_CUBIC_YARD", "description": "The volume is measured in cubic yards." }, { "name": "METRIC_MILLILITER", "description": "The volume is measured in metric milliliters." }, { "name": "METRIC_LITER", "description": "The volume is measured in metric liters." } ], "description": "The unit of volume used to measure a quantity.", "x-release-status": "PUBLIC" }, "MeasurementUnitWeight": { "type": "string", "enum": [ "IMPERIAL_WEIGHT_OUNCE", "IMPERIAL_POUND", "IMPERIAL_STONE", "METRIC_MILLIGRAM", "METRIC_GRAM", "METRIC_KILOGRAM" ], "x-enum-elements": [ { "name": "IMPERIAL_WEIGHT_OUNCE", "description": "The weight is measured in ounces." }, { "name": "IMPERIAL_POUND", "description": "The weight is measured in pounds." }, { "name": "IMPERIAL_STONE", "description": "The weight is measured in stones." }, { "name": "METRIC_MILLIGRAM", "description": "The weight is measured in milligrams." }, { "name": "METRIC_GRAM", "description": "The weight is measured in grams." }, { "name": "METRIC_KILOGRAM", "description": "The weight is measured in kilograms." } ], "description": "Unit of weight used to measure a quantity.", "x-release-status": "PUBLIC" }, "MerchantStatus": { "type": "string", "enum": [ "ACTIVE", "INACTIVE" ], "x-enum-elements": [ { "name": "ACTIVE", "description": "A fully operational merchant account. The merchant can interact with Square products and APIs." }, { "name": "INACTIVE", "description": "A functionally limited merchant account. The merchant can only have limited interaction\nvia Square APIs. The merchant cannot log in or access the seller dashboard." } ], "description": "", "x-release-status": "PUBLIC" }, "OrderFulfillmentDeliveryDetailsScheduleType": { "type": "string", "enum": [ "SCHEDULED", "ASAP" ], "x-enum-elements": [ { "name": "SCHEDULED", "description": "Indicates the fulfillment to deliver at a scheduled deliver time." }, { "name": "ASAP", "description": "Indicates that the fulfillment to deliver as soon as possible and should be prepared\nimmediately." } ], "description": "The schedule type of the delivery fulfillment.", "x-release-status": "BETA", "x-is-beta": true }, "OrderFulfillmentFulfillmentLineItemApplication": { "type": "string", "enum": [ "ALL", "ENTRY_LIST" ], "x-enum-elements": [ { "name": "ALL", "description": "If `ALL`, `entries` must be unset." }, { "name": "ENTRY_LIST", "description": "If `ENTRY_LIST`, supply a list of `entries`." } ], "description": "The `line_item_application` describes what order line items this fulfillment applies\nto. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.", "x-release-status": "BETA", "x-is-beta": true }, "OrderFulfillmentPickupDetailsScheduleType": { "type": "string", "enum": [ "SCHEDULED", "ASAP" ], "x-enum-elements": [ { "name": "SCHEDULED", "description": "Indicates that the fulfillment will be picked up at a scheduled pickup time." }, { "name": "ASAP", "description": "Indicates that the fulfillment will be picked up as soon as possible and\nshould be prepared immediately." } ], "description": "The schedule type of the pickup fulfillment.", "x-release-status": "PUBLIC" }, "OrderFulfillmentState": { "type": "string", "enum": [ "PROPOSED", "RESERVED", "PREPARED", "COMPLETED", "CANCELED", "FAILED" ], "x-enum-elements": [ { "name": "PROPOSED", "description": "Indicates that the fulfillment has been proposed." }, { "name": "RESERVED", "description": "Indicates that the fulfillment has been reserved." }, { "name": "PREPARED", "description": "Indicates that the fulfillment has been prepared." }, { "name": "COMPLETED", "description": "Indicates that the fulfillment was successfully completed." }, { "name": "CANCELED", "description": "Indicates that the fulfillment was canceled." }, { "name": "FAILED", "description": "Indicates that the fulfillment failed to be completed, but was not explicitly\ncanceled." } ], "description": "The current state of this fulfillment.", "x-release-status": "PUBLIC" }, "OrderFulfillmentType": { "type": "string", "enum": [ "PICKUP", "SHIPMENT", "DELIVERY" ], "x-enum-elements": [ { "name": "PICKUP", "description": "A recipient to pick up the fulfillment from a physical [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location)." }, { "name": "SHIPMENT", "description": "A shipping carrier to ship the fulfillment." }, { "name": "DELIVERY", "description": "A courier to deliver the fulfillment." } ], "description": "The type of fulfillment.", "x-release-status": "PUBLIC" }, "OrderLineItemDiscountScope": { "type": "string", "enum": [ "OTHER_DISCOUNT_SCOPE", "LINE_ITEM", "ORDER" ], "x-enum-elements": [ { "name": "OTHER_DISCOUNT_SCOPE", "description": "Used for reporting only.\nThe original transaction discount scope is currently not supported by the API." }, { "name": "LINE_ITEM", "description": "The discount should be applied to only line items specified by\n`OrderLineItemAppliedDiscount` reference records." }, { "name": "ORDER", "description": "The discount should be applied to the entire order." } ], "description": "Indicates whether this is a line-item or order-level discount.", "x-release-status": "PUBLIC" }, "OrderLineItemDiscountType": { "type": "string", "enum": [ "UNKNOWN_DISCOUNT", "FIXED_PERCENTAGE", "FIXED_AMOUNT", "VARIABLE_PERCENTAGE", "VARIABLE_AMOUNT" ], "x-enum-elements": [ { "name": "UNKNOWN_DISCOUNT", "description": "Used for reporting only.\nThe original transaction discount type is currently not supported by the API." }, { "name": "FIXED_PERCENTAGE", "description": "Apply the discount as a fixed percentage (such as 5%) off the item price." }, { "name": "FIXED_AMOUNT", "description": "Apply the discount as a fixed monetary value (such as $1.00) off the item price." }, { "name": "VARIABLE_PERCENTAGE", "description": "Apply the discount as a variable percentage based on the item\nprice.\n\nThe specific discount percentage of a `VARIABLE_PERCENTAGE` discount\nis assigned at the time of the purchase." }, { "name": "VARIABLE_AMOUNT", "description": "Apply the discount as a variable amount based on the item price.\n\nThe specific discount amount of a `VARIABLE_AMOUNT` discount\nis assigned at the time of the purchase." } ], "description": "Indicates how the discount is applied to the associated line item or order.", "x-release-status": "PUBLIC" }, "OrderLineItemItemType": { "type": "string", "enum": [ "ITEM", "CUSTOM_AMOUNT", "GIFT_CARD" ], "x-enum-elements": [ { "name": "ITEM", "description": "Indicates that the line item is an itemized sale." }, { "name": "CUSTOM_AMOUNT", "description": "Indicates that the line item is a non-itemized sale." }, { "name": "GIFT_CARD", "description": "Indicates that the line item is a gift card sale. Gift cards sold through\nthe Orders API are sold in an unactivated state and can be activated through the\nGift Cards API using the line item `uid`." } ], "description": "Represents the line item type.", "x-release-status": "BETA", "x-is-beta": true }, "OrderLineItemTaxScope": { "type": "string", "enum": [ "OTHER_TAX_SCOPE", "LINE_ITEM", "ORDER" ], "x-enum-elements": [ { "name": "OTHER_TAX_SCOPE", "description": "Used for reporting only.\nThe original transaction tax scope is currently not supported by the API." }, { "name": "LINE_ITEM", "description": "The tax should be applied only to line items specified by\nthe `OrderLineItemAppliedTax` reference records." }, { "name": "ORDER", "description": "The tax should be applied to the entire order." } ], "description": "Indicates whether this is a line-item or order-level tax.", "x-release-status": "PUBLIC" }, "OrderLineItemTaxType": { "type": "string", "enum": [ "UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE" ], "x-enum-elements": [ { "name": "UNKNOWN_TAX", "description": "Used for reporting only.\nThe original transaction tax type is currently not supported by the API." }, { "name": "ADDITIVE", "description": "The tax is an additive tax. The tax amount is added on top of the price.\nFor example, an item with a cost of 1.00 USD and a 10% additive tax has a total\ncost to the buyer of 1.10 USD." }, { "name": "INCLUSIVE", "description": "The tax is an inclusive tax. Inclusive taxes are already included\nin the line item price or order total. For example, an item with a cost of\n1.00 USD and a 10% inclusive tax has a pretax cost of 0.91 USD\n(91 cents) and a 0.09 (9 cents) tax for a total cost of 1.00 USD to\nthe buyer." } ], "description": "Indicates how the tax is applied to the associated line item or order.", "x-release-status": "PUBLIC" }, "OrderServiceChargeCalculationPhase": { "type": "string", "enum": [ "SUBTOTAL_PHASE", "TOTAL_PHASE", "APPORTIONED_PERCENTAGE_PHASE", "APPORTIONED_AMOUNT_PHASE" ], "x-enum-elements": [ { "name": "SUBTOTAL_PHASE", "description": "The service charge is applied after discounts, but before\ntaxes." }, { "name": "TOTAL_PHASE", "description": "The service charge is applied after all discounts and taxes\nare applied." }, { "name": "APPORTIONED_PERCENTAGE_PHASE", "description": "The service charge is calculated as a compounding adjustment\nafter any discounts, but before amount based apportioned service charges\nand any tax considerations." }, { "name": "APPORTIONED_AMOUNT_PHASE", "description": "The service charge is calculated as a compounding adjustment\nafter any discounts and percentage based apportioned service charges,\nbut before any tax considerations." } ], "description": "Represents a phase in the process of calculating order totals.\nService charges are applied after the indicated phase.\n\n[Read more about how order totals are calculated.](https://developer.squareup.com/docs/orders-api/how-it-works#how-totals-are-calculated)", "x-release-status": "PUBLIC" }, "OrderServiceChargeScope": { "type": "string", "enum": [ "OTHER_SERVICE_CHARGE_SCOPE", "LINE_ITEM", "ORDER" ], "x-enum-elements": [ { "name": "OTHER_SERVICE_CHARGE_SCOPE", "description": "Used for reporting only.\nThe original transaction service charge scope is currently not supported by the API." }, { "name": "LINE_ITEM", "description": "The service charge should be applied to only line items specified by\n`OrderLineItemAppliedServiceCharge` reference records." }, { "name": "ORDER", "description": "The service charge should be applied to the entire order." } ], "description": "Indicates whether this is a line-item or order-level apportioned\nservice charge.", "x-release-status": "BETA", "x-is-beta": true }, "OrderServiceChargeTreatmentType": { "type": "string", "enum": [ "LINE_ITEM_TREATMENT", "APPORTIONED_TREATMENT" ], "x-enum-elements": [ { "name": "LINE_ITEM_TREATMENT", "description": "" }, { "name": "APPORTIONED_TREATMENT", "description": "" } ], "description": "Indicates whether the service charge will be treated as a value-holding line item or\napportioned toward a line item.", "x-release-status": "BETA", "x-is-beta": true }, "OrderServiceChargeType": { "type": "string", "enum": [ "AUTO_GRATUITY", "CUSTOM" ], "x-enum-elements": [ { "name": "AUTO_GRATUITY", "description": "" }, { "name": "CUSTOM", "description": "" } ], "description": "", "x-release-status": "PUBLIC" }, "OrderState": { "type": "string", "enum": [ "OPEN", "COMPLETED", "CANCELED", "DRAFT" ], "x-enum-elements": [ { "name": "OPEN", "description": "Indicates that the order is open. Open orders can be updated." }, { "name": "COMPLETED", "description": "Indicates that the order is completed. Completed orders are fully paid. This is a terminal state." }, { "name": "CANCELED", "description": "Indicates that the order is canceled. Canceled orders are not paid. This is a terminal state." }, { "name": "DRAFT", "description": "Indicates that the order is in a draft state. Draft orders can be updated,\nbut cannot be paid or fulfilled.\nFor more information, see [Create Orders](https://developer.squareup.com/docs/orders-api/create-orders)." } ], "description": "The state of the order.", "x-release-status": "PUBLIC" }, "PaymentOptionsDelayAction": { "type": "string", "enum": [ "CANCEL", "COMPLETE" ], "x-enum-elements": [ { "name": "CANCEL", "description": "Indicates that the payment should be automatically canceled when the delay duration\nelapses." }, { "name": "COMPLETE", "description": "Indicates that the payment should be automatically completed when the delay duration\nelapses." } ], "description": "Describes the action to be applied to a delayed capture payment when the delay_duration\nhas elapsed.", "x-release-status": "BETA", "x-is-beta": true }, "PayoutFeeType": { "type": "string", "enum": [ "TRANSFER_FEE", "TAX_ON_TRANSFER_FEE" ], "x-enum-elements": [ { "name": "TRANSFER_FEE", "description": "Fee type associated with transfers." }, { "name": "TAX_ON_TRANSFER_FEE", "description": "Taxes associated with the transfer fee." } ], "description": "Represents the type of payout fee that can incur as part of a payout.", "x-release-status": "PUBLIC" }, "PayoutStatus": { "type": "string", "enum": [ "SENT", "FAILED", "PAID" ], "x-enum-elements": [ { "name": "SENT", "description": "Indicates that the payout was successfully sent to the banking destination." }, { "name": "FAILED", "description": "Indicates that the payout was rejected by the banking destination." }, { "name": "PAID", "description": "Indicates that the payout has successfully completed." } ], "description": "Payout status types", "x-release-status": "PUBLIC" }, "PayoutType": { "type": "string", "enum": [ "BATCH", "SIMPLE" ], "x-enum-elements": [ { "name": "BATCH", "description": "Payouts that include a list of payout entries that can be considered settled." }, { "name": "SIMPLE", "description": "Payouts that do not have any payout entries associated with them and will\nshow up as one of the payout entries in a future BATCH payout." } ], "description": "The type of payout: “BATCH” or “SIMPLE”.\nBATCH payouts include a list of payout entries that can be considered settled.\nSIMPLE payouts do not have any payout entries associated with them\nand will show up as one of the payout entries in a future BATCH payout.", "x-release-status": "PUBLIC" }, "Product": { "type": "string", "enum": [ "SQUARE_POS", "EXTERNAL_API", "BILLING", "APPOINTMENTS", "INVOICES", "ONLINE_STORE", "PAYROLL", "DASHBOARD", "ITEM_LIBRARY_IMPORT", "OTHER" ], "x-enum-elements": [ { "name": "SQUARE_POS", "description": "Square Point of Sale application." }, { "name": "EXTERNAL_API", "description": "Square Connect APIs (for example, Orders API or Checkout API)." }, { "name": "BILLING", "description": "A Square subscription (various products)." }, { "name": "APPOINTMENTS", "description": "Square Appointments." }, { "name": "INVOICES", "description": "Square Invoices." }, { "name": "ONLINE_STORE", "description": "Square Online Store." }, { "name": "PAYROLL", "description": "Square Payroll." }, { "name": "DASHBOARD", "description": "Square Dashboard." }, { "name": "ITEM_LIBRARY_IMPORT", "description": "Item Library Import." }, { "name": "OTHER", "description": "A Square product that does not match any other value." } ], "description": "Indicates the Square product used to generate a change.", "x-release-status": "PUBLIC" }, "ProductType": { "type": "string", "enum": [ "TERMINAL_API" ], "x-enum-elements": [ { "name": "TERMINAL_API", "description": "" } ], "description": "", "x-release-status": "PUBLIC" }, "RefundStatus": { "type": "string", "enum": [ "PENDING", "APPROVED", "REJECTED", "FAILED" ], "x-enum-elements": [ { "name": "PENDING", "description": "The refund is pending." }, { "name": "APPROVED", "description": "The refund has been approved by Square." }, { "name": "REJECTED", "description": "The refund has been rejected by Square." }, { "name": "FAILED", "description": "The refund failed." } ], "description": "Indicates a refund\u0027s current status.", "x-release-status": "PUBLIC" }, "RegisterDomainResponseStatus": { "type": "string", "enum": [ "PENDING", "VERIFIED" ], "x-enum-elements": [ { "name": "PENDING", "description": "The domain is added, but not verified." }, { "name": "VERIFIED", "description": "The domain is added and verified. It can be used to accept Apple Pay transactions." } ], "description": "The status of the domain registration.", "x-release-status": "PUBLIC" }, "RiskEvaluationRiskLevel": { "type": "string", "enum": [ "PENDING", "NORMAL", "MODERATE", "HIGH" ], "x-enum-elements": [ { "name": "PENDING", "description": "Indicates Square is still evaluating the payment." }, { "name": "NORMAL", "description": "Indicates payment risk is within the normal range." }, { "name": "MODERATE", "description": "Indicates elevated risk level associated with the payment." }, { "name": "HIGH", "description": "Indicates significantly elevated risk level with the payment." } ], "description": "", "x-release-status": "BETA", "x-is-beta": true }, "SearchCatalogItemsRequestStockLevel": { "type": "string", "enum": [ "OUT", "LOW" ], "x-enum-elements": [ { "name": "OUT", "description": "The item inventory is empty." }, { "name": "LOW", "description": "The item inventory is low." } ], "description": "Defines supported stock levels of the item inventory.", "x-release-status": "PUBLIC" }, "SearchOrdersSortField": { "type": "string", "enum": [ "CREATED_AT", "UPDATED_AT", "CLOSED_AT" ], "x-enum-elements": [ { "name": "CREATED_AT", "description": "The time when the order was created, in RFC-3339 format. If you are also\nfiltering for a time range in this query, you must set the `CREATED_AT`\nfield in your `DateTimeFilter`." }, { "name": "UPDATED_AT", "description": "The time when the order last updated, in RFC-3339 format. If you are also\nfiltering for a time range in this query, you must set the `UPDATED_AT`\nfield in your `DateTimeFilter`." }, { "name": "CLOSED_AT", "description": "The time when the order was closed, in RFC-3339 format. If you use this\nvalue, you must also set a `StateFilter` with closed states. If you are also\nfiltering for a time range in this query, you must set the `CLOSED_AT`\nfield in your `DateTimeFilter`." } ], "description": "Specifies which timestamp to use to sort `SearchOrder` results.", "x-release-status": "PUBLIC" }, "SearchVendorsRequestSortField": { "type": "string", "enum": [ "NAME", "CREATED_AT" ], "x-enum-elements": [ { "name": "NAME", "description": "To sort the result by the name of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects." }, { "name": "CREATED_AT", "description": "To sort the result by the creation time of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects." } ], "description": "The field to sort the returned [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects by.", "x-release-status": "BETA", "x-is-beta": true }, "ShiftFilterStatus": { "type": "string", "enum": [ "OPEN", "CLOSED" ], "x-enum-elements": [ { "name": "OPEN", "description": "Shifts that have been started and not ended." }, { "name": "CLOSED", "description": "Shifts that have been started and ended." } ], "description": "Specifies the `status` of `Shift` records to be returned.", "x-release-status": "PUBLIC" }, "ShiftSortField": { "type": "string", "enum": [ "START_AT", "END_AT", "CREATED_AT", "UPDATED_AT" ], "x-enum-elements": [ { "name": "START_AT", "description": "The start date/time of a `Shift`" }, { "name": "END_AT", "description": "The end date/time of a `Shift`" }, { "name": "CREATED_AT", "description": "The date/time that a `Shift` is created" }, { "name": "UPDATED_AT", "description": "The most recent date/time that a `Shift` is updated" } ], "description": "Enumerates the `Shift` fields to sort on.", "x-release-status": "PUBLIC" }, "ShiftStatus": { "type": "string", "enum": [ "OPEN", "CLOSED" ], "x-enum-elements": [ { "name": "OPEN", "description": "Employee started a work shift and the shift is not complete" }, { "name": "CLOSED", "description": "Employee started and ended a work shift." } ], "description": "Enumerates the possible status of a `Shift`.", "x-release-status": "PUBLIC" }, "ShiftWorkdayMatcher": { "type": "string", "enum": [ "START_AT", "END_AT", "INTERSECTION" ], "x-enum-elements": [ { "name": "START_AT", "description": "All shifts that start on or after the specified workday" }, { "name": "END_AT", "description": "All shifts that end on or before the specified workday" }, { "name": "INTERSECTION", "description": "All shifts that start between the start and end workdays (inclusive)" } ], "description": "Defines the logic used to apply a workday filter.", "x-release-status": "PUBLIC" }, "SortOrder": { "type": "string", "enum": [ "DESC", "ASC" ], "x-enum-elements": [ { "name": "DESC", "description": "The results are returned in descending (e.g., newest-first or Z-A) order." }, { "name": "ASC", "description": "The results are returned in ascending (e.g., oldest-first or A-Z) order." } ], "description": "The order (e.g., chronological or alphabetical) in which results from a request are returned.", "x-release-status": "PUBLIC" }, "SubscriptionActionType": { "type": "string", "enum": [ "CANCEL", "PAUSE", "RESUME", "SWAP_PLAN", "CHANGE_BILLING_ANCHOR_DATE" ], "x-enum-elements": [ { "name": "CANCEL", "description": "The action to execute a scheduled cancellation of a subscription." }, { "name": "PAUSE", "description": "The action to execute a scheduled pause of a subscription." }, { "name": "RESUME", "description": "The action to execute a scheduled resumption of a subscription." }, { "name": "SWAP_PLAN", "description": "The action to execute a scheduled swap of a subscription plan in a subscription." }, { "name": "CHANGE_BILLING_ANCHOR_DATE", "description": "A billing anchor date change action." } ], "description": "Supported types of an action as a pending change to a subscription.", "x-release-status": "BETA", "x-is-beta": true }, "SubscriptionCadence": { "type": "string", "enum": [ "DAILY", "WEEKLY", "EVERY_TWO_WEEKS", "THIRTY_DAYS", "SIXTY_DAYS", "NINETY_DAYS", "MONTHLY", "EVERY_TWO_MONTHS", "QUARTERLY", "EVERY_FOUR_MONTHS", "EVERY_SIX_MONTHS", "ANNUAL", "EVERY_TWO_YEARS" ], "x-enum-elements": [ { "name": "DAILY", "description": "Once per day" }, { "name": "WEEKLY", "description": "Once per week" }, { "name": "EVERY_TWO_WEEKS", "description": "Every two weeks" }, { "name": "THIRTY_DAYS", "description": "Once every 30 days" }, { "name": "SIXTY_DAYS", "description": "Once every 60 days" }, { "name": "NINETY_DAYS", "description": "Once every 90 days" }, { "name": "MONTHLY", "description": "Once per month" }, { "name": "EVERY_TWO_MONTHS", "description": "Once every two months" }, { "name": "QUARTERLY", "description": "Once every three months" }, { "name": "EVERY_FOUR_MONTHS", "description": "Once every four months" }, { "name": "EVERY_SIX_MONTHS", "description": "Once every six months" }, { "name": "ANNUAL", "description": "Once per year" }, { "name": "EVERY_TWO_YEARS", "description": "Once every two years" } ], "description": "Determines the billing cadence of a [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/Subscription)", "x-release-status": "PUBLIC" }, "SubscriptionEventInfoCode": { "type": "string", "enum": [ "LOCATION_NOT_ACTIVE", "LOCATION_CANNOT_ACCEPT_PAYMENT", "CUSTOMER_DELETED", "CUSTOMER_NO_EMAIL", "CUSTOMER_NO_NAME", "USER_PROVIDED" ], "x-enum-elements": [ { "name": "LOCATION_NOT_ACTIVE", "description": "The location is not active." }, { "name": "LOCATION_CANNOT_ACCEPT_PAYMENT", "description": "The location cannot accept payments." }, { "name": "CUSTOMER_DELETED", "description": "The subscribing customer profile has been deleted." }, { "name": "CUSTOMER_NO_EMAIL", "description": "The subscribing customer does not have an email." }, { "name": "CUSTOMER_NO_NAME", "description": "The subscribing customer does not have a name." }, { "name": "USER_PROVIDED", "description": "User-provided detail." } ], "description": "Supported info codes of a subscription event.", "x-release-status": "PUBLIC" }, "SubscriptionEventSubscriptionEventType": { "type": "string", "enum": [ "START_SUBSCRIPTION", "PLAN_CHANGE", "STOP_SUBSCRIPTION", "DEACTIVATE_SUBSCRIPTION", "RESUME_SUBSCRIPTION", "PAUSE_SUBSCRIPTION", "BILLING_ANCHOR_DATE_CHANGED" ], "x-enum-elements": [ { "name": "START_SUBSCRIPTION", "description": "The subscription was started." }, { "name": "PLAN_CHANGE", "description": "The subscription plan was changed." }, { "name": "STOP_SUBSCRIPTION", "description": "The subscription was stopped." }, { "name": "DEACTIVATE_SUBSCRIPTION", "description": "The subscription was deactivated" }, { "name": "RESUME_SUBSCRIPTION", "description": "The subscription was resumed." }, { "name": "PAUSE_SUBSCRIPTION", "description": "The subscription was paused." }, { "name": "BILLING_ANCHOR_DATE_CHANGED", "description": "The billing anchor date was changed." } ], "description": "Supported types of an event occurred to a subscription.", "x-release-status": "PUBLIC" }, "SubscriptionPricingType": { "type": "string", "enum": [ "STATIC", "RELATIVE" ], "x-enum-elements": [ { "name": "STATIC", "description": "Static pricing" }, { "name": "RELATIVE", "description": "Relative pricing" } ], "description": "Determines the pricing of a [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/Subscription)", "x-release-status": "PUBLIC" }, "SubscriptionStatus": { "type": "string", "enum": [ "PENDING", "ACTIVE", "CANCELED", "DEACTIVATED", "PAUSED" ], "x-enum-elements": [ { "name": "PENDING", "description": "The subscription is pending to start in the future." }, { "name": "ACTIVE", "description": "The subscription is active." }, { "name": "CANCELED", "description": "The subscription is canceled." }, { "name": "DEACTIVATED", "description": "The subscription is deactivated." }, { "name": "PAUSED", "description": "The subscription is paused." } ], "description": "Supported subscription statuses.", "x-release-status": "PUBLIC" }, "TaxCalculationPhase": { "type": "string", "enum": [ "TAX_SUBTOTAL_PHASE", "TAX_TOTAL_PHASE" ], "x-enum-elements": [ { "name": "TAX_SUBTOTAL_PHASE", "description": "The fee is calculated based on the payment\u0027s subtotal." }, { "name": "TAX_TOTAL_PHASE", "description": "The fee is calculated based on the payment\u0027s total." } ], "description": "When to calculate the taxes due on a cart.", "x-release-status": "PUBLIC" }, "TaxInclusionType": { "type": "string", "enum": [ "ADDITIVE", "INCLUSIVE" ], "x-enum-elements": [ { "name": "ADDITIVE", "description": "The tax is an additive tax. The tax amount is added on top of the\nCatalogItemVariation price. For example, a $1.00 item with a 10% additive\ntax would have a total cost to the buyer of $1.10." }, { "name": "INCLUSIVE", "description": "The tax is an inclusive tax. The tax amount is included in the\nCatalogItemVariation price. For example, a $1.00 item with a 10% inclusive\ntax would have a total cost to the buyer of $1.00, with $0.91 (91 cents) of\nthat total being the cost of the item and $0.09 (9 cents) being tax." } ], "description": "Whether to the tax amount should be additional to or included in the CatalogItem price.", "x-release-status": "PUBLIC" }, "TeamMemberAssignedLocationsAssignmentType": { "type": "string", "enum": [ "ALL_CURRENT_AND_FUTURE_LOCATIONS", "EXPLICIT_LOCATIONS" ], "x-enum-elements": [ { "name": "ALL_CURRENT_AND_FUTURE_LOCATIONS", "description": "The team member is assigned to all current and future locations. The `location_ids` field\nis empty if the team member has this assignment type." }, { "name": "EXPLICIT_LOCATIONS", "description": "The team member is assigned to an explicit subset of locations. The `location_ids` field\nis the list of locations that the team member is assigned to." } ], "description": "Enumerates the possible assignment types that the team member can have.", "x-release-status": "PUBLIC" }, "TeamMemberInvitationStatus": { "type": "string", "enum": [ "UNINVITED", "PENDING", "ACCEPTED" ], "x-enum-elements": [ { "name": "UNINVITED", "description": "The team member has not received an invitation." }, { "name": "PENDING", "description": "The team member has received an invitation, but had not accepted it." }, { "name": "ACCEPTED", "description": "The team member has both received and accepted an invitation." } ], "description": "Enumerates the possible invitation statuses the team member can have within a business.", "x-release-status": "PUBLIC" }, "TeamMemberStatus": { "type": "string", "enum": [ "ACTIVE", "INACTIVE" ], "x-enum-elements": [ { "name": "ACTIVE", "description": "The team member can sign in to Point of Sale and the Seller Dashboard." }, { "name": "INACTIVE", "description": "The team member can no longer sign in to Point of Sale or the Seller Dashboard,\nbut the team member\u0027s sales reports remain available." } ], "description": "Enumerates the possible statuses the team member can have within a business.", "x-release-status": "PUBLIC" }, "TenderBankAccountDetailsStatus": { "type": "string", "enum": [ "PENDING", "COMPLETED", "FAILED" ], "x-enum-elements": [ { "name": "PENDING", "description": "The bank account payment is in progress." }, { "name": "COMPLETED", "description": "The bank account payment has been completed." }, { "name": "FAILED", "description": "The bank account payment failed." } ], "description": "Indicates the bank account payment\u0027s current status.", "x-release-status": "PUBLIC" }, "TenderBuyNowPayLaterDetailsBrand": { "type": "string", "enum": [ "OTHER_BRAND", "AFTERPAY" ], "x-enum-elements": [ { "name": "OTHER_BRAND", "description": "" }, { "name": "AFTERPAY", "description": "" } ], "description": "", "x-release-status": "PUBLIC" }, "TenderBuyNowPayLaterDetailsStatus": { "type": "string", "enum": [ "AUTHORIZED", "CAPTURED", "VOIDED", "FAILED" ], "x-enum-elements": [ { "name": "AUTHORIZED", "description": "The buy now pay later payment has been authorized but not yet captured." }, { "name": "CAPTURED", "description": "The buy now pay later payment was authorized and subsequently captured (i.e., completed)." }, { "name": "VOIDED", "description": "The buy now pay later payment was authorized and subsequently voided (i.e., canceled)." }, { "name": "FAILED", "description": "The buy now pay later payment failed." } ], "description": "", "x-release-status": "PUBLIC" }, "TenderCardDetailsEntryMethod": { "type": "string", "enum": [ "SWIPED", "KEYED", "EMV", "ON_FILE", "CONTACTLESS" ], "x-enum-elements": [ { "name": "SWIPED", "description": "The card was swiped through a Square reader or Square stand." }, { "name": "KEYED", "description": "The card information was keyed manually into Square Point of Sale or a\nSquare-hosted web form." }, { "name": "EMV", "description": "The card was processed via EMV with a Square reader." }, { "name": "ON_FILE", "description": "The buyer\u0027s card details were already on file with Square." }, { "name": "CONTACTLESS", "description": "The card was processed via a contactless (i.e., NFC) transaction\nwith a Square reader." } ], "description": "Indicates the method used to enter the card\u0027s details.", "x-release-status": "PUBLIC" }, "TenderCardDetailsStatus": { "type": "string", "enum": [ "AUTHORIZED", "CAPTURED", "VOIDED", "FAILED" ], "x-enum-elements": [ { "name": "AUTHORIZED", "description": "The card transaction has been authorized but not yet captured." }, { "name": "CAPTURED", "description": "The card transaction was authorized and subsequently captured (i.e., completed)." }, { "name": "VOIDED", "description": "The card transaction was authorized and subsequently voided (i.e., canceled)." }, { "name": "FAILED", "description": "The card transaction failed." } ], "description": "Indicates the card transaction\u0027s current status.", "x-release-status": "PUBLIC" }, "TenderSquareAccountDetailsStatus": { "type": "string", "enum": [ "AUTHORIZED", "CAPTURED", "VOIDED", "FAILED" ], "x-enum-elements": [ { "name": "AUTHORIZED", "description": "The Square Account payment has been authorized but not yet captured." }, { "name": "CAPTURED", "description": "The Square Account payment was authorized and subsequently captured (i.e., completed)." }, { "name": "VOIDED", "description": "The Square Account payment was authorized and subsequently voided (i.e., canceled)." }, { "name": "FAILED", "description": "The Square Account payment failed." } ], "description": "", "x-release-status": "PUBLIC" }, "TenderType": { "type": "string", "enum": [ "CARD", "CASH", "THIRD_PARTY_CARD", "SQUARE_GIFT_CARD", "NO_SALE", "BANK_ACCOUNT", "WALLET", "BUY_NOW_PAY_LATER", "SQUARE_ACCOUNT", "OTHER" ], "x-enum-elements": [ { "name": "CARD", "description": "A credit card." }, { "name": "CASH", "description": "Cash." }, { "name": "THIRD_PARTY_CARD", "description": "A credit card processed with a card processor other than Square.\n\nThis value applies only to merchants in countries where Square does not\nyet provide card processing." }, { "name": "SQUARE_GIFT_CARD", "description": "A Square gift card." }, { "name": "NO_SALE", "description": "This tender represents the register being opened for a \"no sale\" event." }, { "name": "BANK_ACCOUNT", "description": "A bank account payment." }, { "name": "WALLET", "description": "A payment from a digital wallet, e.g. Cash App, Paypay, Rakuten Pay,\nAu Pay, D Barai, Merpay, Wechat Pay, Alipay.\n\nNote: Some \"digital wallets\", including Google Pay and Apple Pay, facilitate\ncard payments. Those payments have the `CARD` type." }, { "name": "BUY_NOW_PAY_LATER", "description": "A Buy Now Pay Later payment." }, { "name": "SQUARE_ACCOUNT", "description": "A Square House Account payment." }, { "name": "OTHER", "description": "A form of tender that does not match any other value." } ], "description": "Indicates a tender\u0027s type.", "x-release-status": "PUBLIC" }, "TerminalActionActionType": { "type": "string", "enum": [ "QR_CODE", "PING", "SAVE_CARD", "SIGNATURE", "CONFIRMATION", "RECEIPT", "DATA_COLLECTION", "SELECT" ], "x-enum-elements": [ { "name": "QR_CODE", "description": "The action represents a request to display a QR code. Details are contained in\nthe `qr_code_options` object." }, { "name": "PING", "description": "The action represents a request to check if the specific device is\nonline or currently active with the merchant in question. Does not require an action options value." }, { "name": "SAVE_CARD", "description": "Represents a request to save a card for future card-on-file use. Details are contained\nin the `save_card_options` object." }, { "name": "SIGNATURE", "description": "The action represents a request to capture a buyer\u0027s signature. Details are contained\nin the `signature_options` object." }, { "name": "CONFIRMATION", "description": "The action represents a request to collect a buyer\u0027s confirmation decision to the\ndisplayed terms. Details are contained in the `confirmation_options` object." }, { "name": "RECEIPT", "description": "The action represents a request to display the receipt screen options. Details are\ncontained in the `receipt_options` object." }, { "name": "DATA_COLLECTION", "description": "The action represents a request to collect a buyer\u0027s text data. Details\nare contained in the `data_collection_options` object." }, { "name": "SELECT", "description": "The action represents a request to allow the buyer to select from provided options.\nDetails are contained in the `select_options` object." } ], "description": "Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum.", "x-release-status": "BETA", "x-is-beta": true }, "TransactionProduct": { "type": "string", "enum": [ "REGISTER", "EXTERNAL_API", "BILLING", "APPOINTMENTS", "INVOICES", "ONLINE_STORE", "PAYROLL", "OTHER" ], "x-enum-elements": [ { "name": "REGISTER", "description": "Square Point of Sale." }, { "name": "EXTERNAL_API", "description": "The Square Connect API." }, { "name": "BILLING", "description": "A Square subscription for one of multiple products." }, { "name": "APPOINTMENTS", "description": "Square Appointments." }, { "name": "INVOICES", "description": "Square Invoices." }, { "name": "ONLINE_STORE", "description": "Square Online Store." }, { "name": "PAYROLL", "description": "Square Payroll." }, { "name": "OTHER", "description": "A Square product that does not match any other value." } ], "description": "Indicates the Square product used to process a transaction.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "TransactionType": { "type": "string", "enum": [ "DEBIT", "CREDIT" ], "x-enum-elements": [ { "name": "DEBIT", "description": "" }, { "name": "CREDIT", "description": "" } ], "description": "The transaction type used in the disputed payment.", "x-release-status": "PUBLIC" }, "V1OrderHistoryEntryAction": { "type": "string", "enum": [ "ORDER_PLACED", "DECLINED", "PAYMENT_RECEIVED", "CANCELED", "COMPLETED", "REFUNDED", "EXPIRED" ], "x-enum-elements": [ { "name": "ORDER_PLACED", "description": "" }, { "name": "DECLINED", "description": "" }, { "name": "PAYMENT_RECEIVED", "description": "" }, { "name": "CANCELED", "description": "" }, { "name": "COMPLETED", "description": "" }, { "name": "REFUNDED", "description": "" }, { "name": "EXPIRED", "description": "" } ], "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "V1OrderState": { "type": "string", "enum": [ "PENDING", "OPEN", "COMPLETED", "CANCELED", "REFUNDED", "REJECTED" ], "x-enum-elements": [ { "name": "PENDING", "description": "" }, { "name": "OPEN", "description": "" }, { "name": "COMPLETED", "description": "" }, { "name": "CANCELED", "description": "" }, { "name": "REFUNDED", "description": "" }, { "name": "REJECTED", "description": "" } ], "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "V1TenderCardBrand": { "type": "string", "enum": [ "OTHER_BRAND", "VISA", "MASTER_CARD", "AMERICAN_EXPRESS", "DISCOVER", "DISCOVER_DINERS", "JCB", "CHINA_UNIONPAY", "SQUARE_GIFT_CARD" ], "x-enum-elements": [ { "name": "OTHER_BRAND", "description": "" }, { "name": "VISA", "description": "" }, { "name": "MASTER_CARD", "description": "" }, { "name": "AMERICAN_EXPRESS", "description": "" }, { "name": "DISCOVER", "description": "" }, { "name": "DISCOVER_DINERS", "description": "" }, { "name": "JCB", "description": "" }, { "name": "CHINA_UNIONPAY", "description": "" }, { "name": "SQUARE_GIFT_CARD", "description": "" } ], "description": "The brand of a credit card.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "V1TenderEntryMethod": { "type": "string", "enum": [ "MANUAL", "SCANNED", "SQUARE_CASH", "SQUARE_WALLET", "SWIPED", "WEB_FORM", "OTHER" ], "x-enum-elements": [ { "name": "MANUAL", "description": "" }, { "name": "SCANNED", "description": "" }, { "name": "SQUARE_CASH", "description": "" }, { "name": "SQUARE_WALLET", "description": "" }, { "name": "SWIPED", "description": "" }, { "name": "WEB_FORM", "description": "" }, { "name": "OTHER", "description": "" } ], "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "V1TenderType": { "type": "string", "enum": [ "CREDIT_CARD", "CASH", "THIRD_PARTY_CARD", "NO_SALE", "SQUARE_WALLET", "SQUARE_GIFT_CARD", "UNKNOWN", "OTHER" ], "x-enum-elements": [ { "name": "CREDIT_CARD", "description": "" }, { "name": "CASH", "description": "" }, { "name": "THIRD_PARTY_CARD", "description": "" }, { "name": "NO_SALE", "description": "" }, { "name": "SQUARE_WALLET", "description": "" }, { "name": "SQUARE_GIFT_CARD", "description": "" }, { "name": "UNKNOWN", "description": "" }, { "name": "OTHER", "description": "" } ], "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "V1UpdateOrderRequestAction": { "type": "string", "enum": [ "COMPLETE", "CANCEL", "REFUND" ], "x-enum-elements": [ { "name": "COMPLETE", "description": "" }, { "name": "CANCEL", "description": "" }, { "name": "REFUND", "description": "" } ], "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "VendorStatus": { "type": "string", "enum": [ "ACTIVE", "INACTIVE" ], "x-enum-elements": [ { "name": "ACTIVE", "description": "Vendor is active and can receive purchase orders." }, { "name": "INACTIVE", "description": "Vendor is inactive and cannot receive purchase orders." } ], "description": "The status of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor),\nwhether a [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) is active or inactive.", "x-release-status": "BETA", "x-is-beta": true }, "VisibilityFilter": { "type": "string", "enum": [ "ALL", "READ", "READ_WRITE" ], "x-enum-elements": [ { "name": "ALL", "description": "All custom attributes or custom attribute definitions." }, { "name": "READ", "description": "All custom attributes or custom attribute definitions with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`." }, { "name": "READ_WRITE", "description": "All custom attributes or custom attribute definitions with the `visibility` field set to `VISIBILITY_READ_WRITE_VALUES`." } ], "description": "Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions.", "x-release-status": "PUBLIC" }, "Weekday": { "type": "string", "enum": [ "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN" ], "x-enum-elements": [ { "name": "MON", "description": "Monday" }, { "name": "TUE", "description": "Tuesday" }, { "name": "WED", "description": "Wednesday" }, { "name": "THU", "description": "Thursday" }, { "name": "FRI", "description": "Friday" }, { "name": "SAT", "description": "Saturday" }, { "name": "SUN", "description": "Sunday" } ], "description": "The days of the week.", "x-release-status": "PUBLIC" }, "ACHDetails": { "type": "object", "properties": { "routing_number": { "maxLength": 50, "type": "string", "description": "The routing number for the bank account." }, "account_number_suffix": { "minLength": 1, "maxLength": 4, "type": "string", "description": "The last few digits of the bank account number." }, "account_type": { "maxLength": 50, "type": "string", "description": "The type of the bank account performing the transfer. The account type can be `CHECKING`,\n`SAVINGS`, or `UNKNOWN`." } }, "description": "ACH-specific details about `BANK_ACCOUNT` type payments with the `transfer_type` of `ACH`.", "x-release-status": "PUBLIC" }, "AcceptDisputeRequest": { "type": "object", "properties": {}, "description": "Defines the request parameters for the `AcceptDispute` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "AcceptDisputeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "dispute": { "$ref": "#/definitions/Dispute", "description": "Details about the accepted dispute." } }, "description": "Defines the fields in an `AcceptDispute` response.", "x-release-status": "PUBLIC", "example": { "dispute": { "amount_money": { "amount": 2500, "currency": "USD" }, "reason": "NO_KNOWLEDGE", "state": "ACCEPTED", "due_at": "2022-07-13T00:00:00.000Z", "disputed_payment": { "payment_id": "zhyh1ch64kRBrrlfVhwjCEjZWzNZY" }, "card_brand": "VISA", "created_at": "2022-06-29T18:45:22.265Z", "updated_at": "2022-07-07T19:14:42.650Z", "brand_dispute_id": "100000809947", "version": 2, "location_id": "L1HN3ZMQK64X9", "id": "XDgyFu7yo1E2S5lQGGpYn", "reported_at": "2022-06-29T00:00:00.000Z" } } }, "AcceptedPaymentMethods": { "type": "object", "properties": { "apple_pay": { "type": "boolean", "description": "Whether Apple Pay is accepted at checkout." }, "google_pay": { "type": "boolean", "description": "Whether Google Pay is accepted at checkout." }, "cash_app_pay": { "type": "boolean", "description": "Whether Cash App Pay is accepted at checkout." }, "afterpay_clearpay": { "type": "boolean", "description": "Whether Afterpay/Clearpay is accepted at checkout." } }, "description": "", "x-release-status": "PUBLIC" }, "AccumulateLoyaltyPointsRequest": { "type": "object", "required": [ "accumulate_points", "idempotency_key", "location_id" ], "properties": { "accumulate_points": { "$ref": "#/definitions/LoyaltyEventAccumulatePoints", "description": "The points to add to the account. \nIf you are using the Orders API to manage orders, specify the order ID.\nOtherwise, specify the points to add." }, "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique string that identifies the `AccumulateLoyaltyPoints` request. \nKeys can be any valid string but must be unique for every request." }, "location_id": { "type": "string", "description": "The [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the purchase was made." } }, "description": "Represents an [AccumulateLoyaltyPoints](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/accumulate-loyalty-points) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?account_id\u003d5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "request_body": { "accumulate_points": { "order_id": "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY" }, "location_id": "P034NEENMD09F", "idempotency_key": "58b90739-c3e8-4b11-85f7-e636d48d72cb" } } }, "AccumulateLoyaltyPointsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "event": { "$ref": "#/definitions/LoyaltyEvent", "description": "The resulting loyalty event. Starting in Square version 2022-08-17, this field is no longer returned.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "events": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyEvent" }, "description": "The resulting loyalty events. If the purchase qualifies for points, the `ACCUMULATE_POINTS` event\nis always included. When using the Orders API, the `ACCUMULATE_PROMOTION_POINTS` event is included\nif the purchase also qualifies for a loyalty promotion." } }, "description": "Represents an [AccumulateLoyaltyPoints](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/accumulate-loyalty-points) response.", "x-release-status": "PUBLIC", "example": { "events": [ { "id": "ee46aafd-1af6-3695-a385-276e2ef0be26", "type": "ACCUMULATE_POINTS", "created_at": "2020-05-08T21:41:12Z", "accumulate_points": { "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "points": 6, "order_id": "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY" }, "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "location_id": "P034NEENMD09F", "source": "LOYALTY_API" } ] } }, "AddGroupToCustomerRequest": { "type": "object", "properties": {}, "description": "Defines the fields that are included in the request body of\na request to the [AddGroupToCustomer](https://developer.squareup.com/reference/square_2024-04-17/customers-api/add-group-to-customer) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "AddGroupToCustomerResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [AddGroupToCustomer](https://developer.squareup.com/reference/square_2024-04-17/customers-api/add-group-to-customer) endpoint.", "x-release-status": "PUBLIC", "example": {} }, "AdditionalRecipient": { "type": "object", "required": [ "location_id", "amount_money" ], "properties": { "location_id": { "minLength": 1, "maxLength": 50, "type": "string", "description": "The location ID for a recipient (other than the merchant) receiving a portion of this tender." }, "description": { "maxLength": 100, "type": "string", "description": "The description of the additional recipient." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money distributed to the recipient." }, "receivable_id": { "maxLength": 192, "type": "string", "description": "The unique ID for the RETIRED `AdditionalRecipientReceivable` object. This field should be empty for any `AdditionalRecipient` objects created after the retirement." } }, "description": "Represents an additional recipient (other than the merchant) receiving a portion of this tender.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "Address": { "type": "object", "properties": { "address_line_1": { "type": "string", "description": "The first line of the address.\n\nFields that start with `address_line` provide the address\u0027s 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." }, "locality": { "type": "string", "description": "The city or town of the address. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses)." }, "sublocality": { "type": "string", "description": "A civil region within the address\u0027s `locality`, if any." }, "sublocality_2": { "type": "string", "description": "A civil region within the address\u0027s `sublocality`, if any." }, "sublocality_3": { "type": "string", "description": "A civil region within the address\u0027s `sublocality_2`, if any." }, "administrative_district_level_1": { "type": "string", "description": "A civil entity within the address\u0027s country. In the US, this\nis the state. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses)." }, "administrative_district_level_2": { "type": "string", "description": "A civil entity within the address\u0027s `administrative_district_level_1`.\nIn the US, this is the county." }, "administrative_district_level_3": { "type": "string", "description": "A civil entity within the address\u0027s `administrative_district_level_2`,\nif any." }, "postal_code": { "type": "string", "description": "The address\u0027s postal code. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses)." }, "country": { "type": "string", "description": "The address\u0027s country, in the two-letter format of ISO 3166. For example, `US` or `FR`." }, "first_name": { "type": "string", "description": "Optional first name when it\u0027s representing recipient." }, "last_name": { "type": "string", "description": "Optional last name when it\u0027s representing recipient." } }, "description": "Represents a postal address in a country. \nFor more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses).", "x-release-status": "PUBLIC" }, "AdjustLoyaltyPointsRequest": { "type": "object", "required": [ "idempotency_key", "adjust_points" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique string that identifies this `AdjustLoyaltyPoints` request. \nKeys can be any valid string, but must be unique for every request." }, "adjust_points": { "$ref": "#/definitions/LoyaltyEventAdjustPoints", "description": "The points to add or subtract and the reason for the adjustment. To add points, specify a positive integer.\nTo subtract points, specify a negative integer." }, "allow_negative_balance": { "type": "boolean", "description": "Indicates whether to allow a negative adjustment to result in a negative balance. If `true`, a negative\nbalance is allowed when subtracting points. If `false`, Square returns a `BAD_REQUEST` error when subtracting\nthe specified number of points would result in a negative balance. The default value is `false`." } }, "description": "Represents an [AdjustLoyaltyPoints](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/adjust-loyalty-points) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?account_id\u003d5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "request_body": { "adjust_points": { "points": 10, "reason": "Complimentary points" }, "idempotency_key": "bc29a517-3dc9-450e-aa76-fae39ee849d1" } } }, "AdjustLoyaltyPointsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "event": { "$ref": "#/definitions/LoyaltyEvent", "description": "The resulting event data for the adjustment." } }, "description": "Represents an [AdjustLoyaltyPoints](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/adjust-loyalty-points) request.", "x-release-status": "PUBLIC", "example": { "event": { "id": "613a6fca-8d67-39d0-bad2-3b4bc45c8637", "type": "ADJUST_POINTS", "created_at": "2020-05-08T21:42:32Z", "adjust_points": { "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "points": 10, "reason": "Complimentary points" }, "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "source": "LOYALTY_API" } } }, "AfterpayDetails": { "type": "object", "properties": { "email_address": { "maxLength": 255, "type": "string", "description": "Email address on the buyer\u0027s Afterpay account." } }, "description": "Additional details about Afterpay payments.", "x-release-status": "PUBLIC" }, "ApplicationDetails": { "type": "object", "properties": { "square_product": { "type": "string", "description": "The Square product, such as Square Point of Sale (POS), \nSquare Invoices, or Square Virtual Terminal." }, "application_id": { "type": "string", "description": "The Square ID assigned to the application used to take the payment. \nApplication developers can use this information to identify payments that \ntheir application processed. \nFor example, if a developer uses a custom application to process payments, \nthis field contains the application ID from the Developer Dashboard. \nIf a seller uses a [Square App Marketplace](https://developer.squareup.com/docs/app-marketplace) \napplication to process payments, the field contains the corresponding application ID." } }, "description": "Details about the application that took the payment.", "x-release-status": "PUBLIC" }, "AppointmentSegment": { "type": "object", "required": [ "team_member_id" ], "properties": { "duration_minutes": { "maximum": 1500, "minimum": 0, "type": "integer", "description": "The time span in minutes of an appointment segment." }, "service_variation_id": { "minLength": 0, "maxLength": 36, "type": "string", "description": "The ID of the [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) object representing the service booked in this segment." }, "team_member_id": { "minLength": 1, "maxLength": 32, "type": "string", "description": "The ID of the [TeamMember](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember) object representing the team member booked in this segment." }, "service_variation_version": { "type": "integer", "format": "int64", "description": "The current version of the item variation representing the service booked in this segment." }, "intermission_minutes": { "type": "integer", "description": "Time between the end of this segment and the beginning of the subsequent segment.", "x-read-only": true }, "any_team_member": { "type": "boolean", "description": "Whether the customer accepts any team member, instead of a specific one, to serve this segment.", "x-read-only": true }, "resource_ids": { "type": "array", "items": { "minLength": 0, "maxLength": 65536, "type": "string" }, "description": "The IDs of the seller-accessible resources used for this appointment segment.", "x-read-only": true } }, "description": "Defines an appointment segment of a booking.", "x-release-status": "PUBLIC" }, "Availability": { "type": "object", "properties": { "start_at": { "type": "string", "description": "The RFC 3339 timestamp specifying the beginning time of the slot available for booking." }, "location_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "The ID of the location available for booking.", "x-read-only": true }, "appointment_segments": { "type": "array", "items": { "$ref": "#/definitions/AppointmentSegment" }, "description": "The list of appointment segments available for booking" } }, "description": "Defines an appointment slot that encapsulates the appointment segments, location and starting time available for booking.", "x-release-status": "PUBLIC" }, "BankAccount": { "type": "object", "required": [ "id", "account_number_suffix", "country", "currency", "account_type", "holder_name", "primary_bank_identification_number", "status", "creditable", "debitable" ], "properties": { "id": { "minLength": 1, "maxLength": 30, "type": "string", "description": "The unique, Square-issued identifier for the bank account." }, "account_number_suffix": { "minLength": 1, "type": "string", "description": "The last few digits of the account number." }, "country": { "type": "string", "description": "The ISO 3166 Alpha-2 country code where the bank account is based." }, "currency": { "type": "string", "description": "The 3-character ISO 4217 currency code indicating the operating\ncurrency of the bank account. For example, the currency code for US dollars\nis `USD`." }, "account_type": { "type": "string", "description": "The financial purpose of the associated bank account." }, "holder_name": { "minLength": 1, "type": "string", "description": "Name of the account holder. This name must match the name \non the targeted bank account record." }, "primary_bank_identification_number": { "maxLength": 40, "type": "string", "description": "Primary identifier for the bank. For more information, see \n[Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api)." }, "secondary_bank_identification_number": { "maxLength": 40, "type": "string", "description": "Secondary identifier for the bank. For more information, see \n[Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api)." }, "debit_mandate_reference_id": { "type": "string", "description": "Reference identifier that will be displayed to UK bank account owners\nwhen collecting direct debit authorization. Only required for UK bank accounts." }, "reference_id": { "type": "string", "description": "Client-provided identifier for linking the banking account to an entity\nin a third-party system (for example, a bank account number or a user identifier)." }, "location_id": { "type": "string", "description": "The location to which the bank account belongs." }, "status": { "type": "string", "description": "Read-only. The current verification status of this BankAccount object." }, "creditable": { "type": "boolean", "description": "Indicates whether it is possible for Square to send money to this bank account." }, "debitable": { "type": "boolean", "description": "Indicates whether it is possible for Square to take money from this \nbank account." }, "fingerprint": { "type": "string", "description": "A Square-assigned, unique identifier for the bank account based on the\naccount information. The account fingerprint can be used to compare account\nentries and determine if the they represent the same real-world bank account." }, "version": { "type": "integer", "description": "The current version of the `BankAccount`." }, "bank_name": { "maxLength": 100, "type": "string", "description": "Read only. Name of actual financial institution. \nFor example \"Bank of America\"." } }, "description": "Represents a bank account. For more information about \nlinking a bank account to a Square account, see \n[Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).", "x-release-status": "PUBLIC" }, "BankAccountPaymentDetails": { "type": "object", "properties": { "bank_name": { "maxLength": 100, "type": "string", "description": "The name of the bank associated with the bank account." }, "transfer_type": { "maxLength": 50, "type": "string", "description": "The type of the bank transfer. The type can be `ACH` or `UNKNOWN`." }, "account_ownership_type": { "maxLength": 50, "type": "string", "description": "The ownership type of the bank account performing the transfer.\nThe type can be `INDIVIDUAL`, `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`." }, "fingerprint": { "maxLength": 255, "type": "string", "description": "Uniquely identifies the bank account for this seller and can be used\nto determine if payments are from the same bank account." }, "country": { "minLength": 2, "maxLength": 2, "type": "string", "description": "The two-letter ISO code representing the country the bank account is located in." }, "statement_description": { "maxLength": 1000, "type": "string", "description": "The statement description as sent to the bank." }, "ach_details": { "$ref": "#/definitions/ACHDetails", "description": "ACH-specific information about the transfer. The information is only populated\nif the `transfer_type` is `ACH`." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Additional details about BANK_ACCOUNT type payments.", "x-release-status": "PUBLIC" }, "BatchChangeInventoryRequest": { "type": "object", "required": [ "idempotency_key" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A client-supplied, universally unique identifier (UUID) for the\nrequest.\n\nSee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the\n[API Development 101](https://developer.squareup.com/docs/buildbasics) section for more\ninformation." }, "changes": { "type": "array", "items": { "$ref": "#/definitions/InventoryChange" }, "description": "The set of physical counts and inventory adjustments to be made.\nChanges are applied based on the client-supplied timestamp and may be sent\nout of order." }, "ignore_unchanged_counts": { "type": "boolean", "description": "Indicates whether the current physical count should be ignored if\nthe quantity is unchanged since the last physical count. Default: `true`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", "changes": [ { "type": "PHYSICAL_COUNT", "physical_count": { "reference_id": "1536bfbf-efed-48bf-b17d-a197141b2a92", "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "state": "IN_STOCK", "location_id": "C6W5YS5QM06F5", "quantity": "53", "team_member_id": "LRK57NSQ5X7PUD05", "occurred_at": "2016-11-16T22:25:24.878Z" } } ], "ignore_unchanged_counts": true } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Inventory/BatchChangeInventory/BatchChangeInventoryRequest.python", "csharp": "/sdk_samples/Inventory/BatchChangeInventory/BatchChangeInventoryRequest.csharp", "java": "/sdk_samples/Inventory/BatchChangeInventory/BatchChangeInventoryRequest.java", "php": "/sdk_samples/Inventory/BatchChangeInventory/BatchChangeInventoryRequest.php", "javascript": "/sdk_samples/Inventory/BatchChangeInventory/BatchChangeInventoryRequest.javascript", "ruby": "/sdk_samples/Inventory/BatchChangeInventory/BatchChangeInventoryRequest.ruby" } }, "BatchChangeInventoryResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "counts": { "type": "array", "items": { "$ref": "#/definitions/InventoryCount" }, "description": "The current counts for all objects referenced in the request." }, "changes": { "type": "array", "items": { "$ref": "#/definitions/InventoryChange" }, "description": "Changes created for the request.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "", "x-release-status": "PUBLIC", "example": { "errors": [], "counts": [ { "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "catalog_object_type": "ITEM_VARIATION", "state": "IN_STOCK", "location_id": "C6W5YS5QM06F5", "quantity": "53", "calculated_at": "2016-11-16T22:28:01.223Z" } ] } }, "BatchDeleteCatalogObjectsRequest": { "type": "object", "properties": { "object_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the CatalogObjects to be deleted. When an object is deleted, other objects\nin the graph that depend on that object will be deleted as well (for example, deleting a\nCatalogItem will delete its CatalogItemVariation." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "object_ids": [ "W62UWFY35CWMYGVWK6TWJDNI", "AA27W3M2GGTF3H6AVPNB77CK" ] } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsRequest.python", "csharp": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsRequest.csharp", "java": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsRequest.java", "php": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsRequest.php", "javascript": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsRequest.javascript", "ruby": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsRequest.ruby" } }, "BatchDeleteCatalogObjectsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "deleted_object_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of all CatalogObjects deleted by this request." }, "deleted_at": { "type": "string", "description": "The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this deletion in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\"." } }, "description": "", "x-release-status": "PUBLIC", "example": { "deleted_object_ids": [ "W62UWFY35CWMYGVWK6TWJDNI", "AA27W3M2GGTF3H6AVPNB77CK" ], "deleted_at": "2016-11-16T22:25:24.878Z" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsResponse.python", "csharp": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsResponse.csharp", "java": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsResponse.java", "php": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsResponse.php", "javascript": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsResponse.javascript", "ruby": "/sdk_samples/Catalog/BatchDeleteCatalogObjects/BatchDeleteCatalogObjectsResponse.ruby" } }, "BatchRetrieveCatalogObjectsRequest": { "type": "object", "required": [ "object_ids" ], "properties": { "object_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the CatalogObjects to be retrieved." }, "include_related_objects": { "type": "boolean", "description": "If `true`, the response will include additional objects that are related to the\nrequested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field\nof the response. These objects are put in the `related_objects` field. Setting this to `true` is\nhelpful when the objects are needed for immediate display to a user.\nThis process only goes one level deep. Objects referenced by the related objects will not be included. For example,\n\nif the `objects` field of the response contains a CatalogItem, its associated\nCatalogCategory objects, CatalogTax objects, CatalogImage objects and\nCatalogModifierLists will be returned in the `related_objects` field of the\nresponse. If the `objects` field of the response contains a CatalogItemVariation,\nits parent CatalogItem will be returned in the `related_objects` field of\nthe response.\n\nDefault value: `false`" }, "catalog_version": { "type": "integer", "format": "int64", "description": "The specific version of the catalog objects to be included in the response. \nThis allows you to retrieve historical versions of objects. The specified version value is matched against\nthe [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s\u0027 `version` attribute. If not included, results will\nbe from the current version of the catalog.", "x-release-status": "BETA", "x-is-beta": true }, "include_deleted_objects": { "type": "boolean", "description": "Indicates whether to include (`true`) or not (`false`) in the response deleted objects, namely, those with the `is_deleted` attribute set to `true`." }, "include_category_path_to_root": { "type": "boolean", "description": "Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists\nof `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category\nand ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned\nin the response payload.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "object_ids": [ "W62UWFY35CWMYGVWK6TWJDNI", "AA27W3M2GGTF3H6AVPNB77CK" ], "include_related_objects": true } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsRequest.python", "csharp": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsRequest.csharp", "java": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsRequest.java", "php": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsRequest.php", "javascript": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsRequest.javascript", "ruby": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsRequest.ruby" } }, "BatchRetrieveCatalogObjectsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "objects": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "A list of [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s returned." }, "related_objects": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "A list of [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s referenced by the object in the `objects` field." } }, "description": "", "x-release-status": "PUBLIC", "example": { "objects": [ { "type": "ITEM", "id": "W62UWFY35CWMYGVWK6TWJDNI", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "item_data": { "name": "Tea", "description": "Hot Leaf Juice", "categories": [ { "id": "BJNQCF2FJ6S6UIDT65ABHLRX", "ordinal": 0 } ], "tax_ids": [ "HURXQOOAIC4IZSI2BEXQRYFY" ], "variations": [ { "type": "ITEM_VARIATION", "id": "2TZFAOHWGG7PAK2QEXWYPZSP", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "W62UWFY35CWMYGVWK6TWJDNI", "name": "Mug", "ordinal": 0, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 150, "currency": "USD" } } } ] } }, { "type": "ITEM", "id": "AA27W3M2GGTF3H6AVPNB77CK", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "item_data": { "name": "Coffee", "description": "Hot Bean Juice", "categories": [ { "id": "BJNQCF2FJ6S6UIDT65ABHLRX", "ordinal": 0 } ], "tax_ids": [ "HURXQOOAIC4IZSI2BEXQRYFY" ], "variations": [ { "type": "ITEM_VARIATION", "id": "LBTYIHNHU52WOIHWT7SNRIYH", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "AA27W3M2GGTF3H6AVPNB77CK", "name": "Regular", "ordinal": 0, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 250, "currency": "USD" } } }, { "type": "ITEM_VARIATION", "id": "PKYIC7HGGKW5CYVSCVDEIMHY", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "AA27W3M2GGTF3H6AVPNB77CK", "name": "Large", "ordinal": 1, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 350, "currency": "USD" } } } ] } } ], "related_objects": [ { "type": "CATEGORY", "id": "BJNQCF2FJ6S6UIDT65ABHLRX", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "category_data": { "name": "Beverages" } }, { "type": "TAX", "id": "HURXQOOAIC4IZSI2BEXQRYFY", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "tax_data": { "name": "Sales Tax", "calculation_phase": "TAX_SUBTOTAL_PHASE", "inclusion_type": "ADDITIVE", "percentage": "5.0", "enabled": true } } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsResponse.python", "csharp": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsResponse.csharp", "java": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsResponse.java", "php": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsResponse.php", "javascript": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsResponse.javascript", "ruby": "/sdk_samples/Catalog/BatchRetrieveCatalogObjects/BatchRetrieveCatalogObjectsResponse.ruby" } }, "BatchRetrieveInventoryChangesRequest": { "type": "object", "properties": { "catalog_object_ids": { "type": "array", "items": { "type": "string" }, "description": "The filter to return results by `CatalogObject` ID.\nThe filter is only applicable when set. The default value is null." }, "location_ids": { "type": "array", "items": { "type": "string" }, "description": "The filter to return results by `Location` ID.\nThe filter is only applicable when set. The default value is null." }, "types": { "type": "array", "items": { "type": "string" }, "description": "The filter to return results by `InventoryChangeType` values other than `TRANSFER`.\nThe default value is `[PHYSICAL_COUNT, ADJUSTMENT]`." }, "states": { "type": "array", "items": { "type": "string" }, "description": "The filter to return `ADJUSTMENT` query results by\n`InventoryState`. This filter is only applied when set.\nThe default value is null." }, "updated_after": { "type": "string", "description": "The filter to return results with their `calculated_at` value\nafter the given time as specified in an RFC 3339 timestamp.\nThe default value is the UNIX epoch of (`1970-01-01T00:00:00Z`)." }, "updated_before": { "type": "string", "description": "The filter to return results with their `created_at` or `calculated_at` value\nstrictly before the given time as specified in an RFC 3339 timestamp.\nThe default value is the UNIX epoch of (`1970-01-01T00:00:00Z`)." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." }, "limit": { "maximum": 1000, "minimum": 1, "type": "integer", "description": "The number of [records](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryChange) to return." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "catalog_object_ids": [ "W62UWFY35CWMYGVWK6TWJDNI" ], "location_ids": [ "C6W5YS5QM06F5" ], "types": [ "PHYSICAL_COUNT" ], "states": [ "IN_STOCK" ], "updated_after": "2016-11-01T00:00:00.000Z", "updated_before": "2016-12-01T00:00:00.000Z" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Inventory/BatchRetrieveInventoryChanges/BatchRetrieveInventoryChangesRequest.python", "csharp": "/sdk_samples/Inventory/BatchRetrieveInventoryChanges/BatchRetrieveInventoryChangesRequest.csharp", "java": "/sdk_samples/Inventory/BatchRetrieveInventoryChanges/BatchRetrieveInventoryChangesRequest.java", "php": "/sdk_samples/Inventory/BatchRetrieveInventoryChanges/BatchRetrieveInventoryChangesRequest.php", "javascript": "/sdk_samples/Inventory/BatchRetrieveInventoryChanges/BatchRetrieveInventoryChangesRequest.javascript", "ruby": "/sdk_samples/Inventory/BatchRetrieveInventoryChanges/BatchRetrieveInventoryChangesRequest.ruby" } }, "BatchRetrieveInventoryChangesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "changes": { "type": "array", "items": { "$ref": "#/definitions/InventoryChange" }, "description": "The current calculated inventory changes for the requested objects\nand locations." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If unset,\nthis is the final response.\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "errors": [], "changes": [ { "type": "PHYSICAL_COUNT", "physical_count": { "id": "46YDTW253DWGGK9HMAE6XCAO", "reference_id": "22c07cf4-5626-4224-89f9-691112019399", "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "catalog_object_type": "ITEM_VARIATION", "state": "IN_STOCK", "location_id": "C6W5YS5QM06F5", "quantity": "86", "source": { "product": "SQUARE_POS", "application_id": "416ff29c-86c4-4feb-b58c-9705f21f3ea0", "name": "Square Point of Sale 4.37" }, "team_member_id": "LRK57NSQ5X7PUD05", "occurred_at": "2016-11-16T22:24:49.028Z", "created_at": "2016-11-16T22:25:24.878Z" } } ] } }, "BatchRetrieveInventoryCountsRequest": { "type": "object", "properties": { "catalog_object_ids": { "type": "array", "items": { "type": "string" }, "description": "The filter to return results by `CatalogObject` ID.\nThe filter is applicable only when set. The default is null." }, "location_ids": { "type": "array", "items": { "type": "string" }, "description": "The filter to return results by `Location` ID.\nThis filter is applicable only when set. The default is null." }, "updated_after": { "type": "string", "description": "The filter to return results with their `calculated_at` value\nafter the given time as specified in an RFC 3339 timestamp.\nThe default value is the UNIX epoch of (`1970-01-01T00:00:00Z`)." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." }, "states": { "type": "array", "items": { "type": "string" }, "description": "The filter to return results by `InventoryState`. The filter is only applicable when set.\nIgnored are untracked states of `NONE`, `SOLD`, and `UNLINKED_RETURN`.\nThe default is null." }, "limit": { "maximum": 1000, "minimum": 1, "type": "integer", "description": "The number of [records](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryCount) to return." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "catalog_object_ids": [ "W62UWFY35CWMYGVWK6TWJDNI" ], "location_ids": [ "59TNP9SA8VGDA" ], "updated_after": "2016-11-16T00:00:00.000Z" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Inventory/BatchRetrieveInventoryCounts/BatchRetrieveInventoryCountsRequest.python", "csharp": "/sdk_samples/Inventory/BatchRetrieveInventoryCounts/BatchRetrieveInventoryCountsRequest.csharp", "java": "/sdk_samples/Inventory/BatchRetrieveInventoryCounts/BatchRetrieveInventoryCountsRequest.java", "php": "/sdk_samples/Inventory/BatchRetrieveInventoryCounts/BatchRetrieveInventoryCountsRequest.php", "javascript": "/sdk_samples/Inventory/BatchRetrieveInventoryCounts/BatchRetrieveInventoryCountsRequest.javascript", "ruby": "/sdk_samples/Inventory/BatchRetrieveInventoryCounts/BatchRetrieveInventoryCountsRequest.ruby" } }, "BatchRetrieveInventoryCountsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "counts": { "type": "array", "items": { "$ref": "#/definitions/InventoryCount" }, "description": "The current calculated inventory counts for the requested objects\nand locations." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If unset,\nthis is the final response.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "errors": [], "counts": [ { "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "catalog_object_type": "ITEM_VARIATION", "state": "IN_STOCK", "location_id": "59TNP9SA8VGDA", "quantity": "79", "calculated_at": "2016-11-16T22:28:01.223Z" } ] } }, "BatchRetrieveOrdersRequest": { "type": "object", "required": [ "order_ids" ], "properties": { "location_id": { "type": "string", "description": "The ID of the location for these orders. This field is optional: omit it to retrieve\norders within the scope of the current authorization\u0027s merchant ID." }, "order_ids": { "type": "array", "items": { "minLength": 1, "type": "string" }, "description": "The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request." } }, "description": "Defines the fields that are included in requests to the\n`BatchRetrieveOrders` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "location_id": "057P5VYJ4A5X1", "order_ids": [ "CAISEM82RcpmcFBM0TfOyiHV3es", "CAISENgvlJ6jLWAzERDzjyHVybY" ] } } }, "BatchRetrieveOrdersResponse": { "type": "object", "properties": { "orders": { "type": "array", "items": { "$ref": "#/definitions/Order" }, "description": "The requested orders. This will omit any requested orders that do not exist." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `BatchRetrieveOrders` endpoint.", "x-release-status": "PUBLIC", "example": { "orders": [ { "id": "CAISEM82RcpmcFBM0TfOyiHV3es", "location_id": "057P5VYJ4A5X1", "reference_id": "my-order-001", "line_items": [ { "uid": "945986d1-9586-11e6-ad5a-28cfe92138cf", "name": "Awesome product", "quantity": "1", "base_price_money": { "amount": 1599, "currency": "USD" }, "total_money": { "amount": 1599, "currency": "USD" } }, { "uid": "a8f4168c-9586-11e6-bdf0-28cfe92138cf", "name": "Another awesome product", "quantity": "3", "base_price_money": { "amount": 2000, "currency": "USD" }, "total_money": { "amount": 6000, "currency": "USD" } } ], "total_money": { "amount": 7599, "currency": "USD" } } ] } }, "BatchUpsertCatalogObjectsRequest": { "type": "object", "required": [ "idempotency_key", "batches" ], "properties": { "idempotency_key": { "minLength": 1, "type": "string", "description": "A value you specify that uniquely identifies this\nrequest among all your requests. A common way to create\na valid idempotency key is to use a Universally unique\nidentifier (UUID).\n\nIf you\u0027re unsure whether a particular request was successful,\nyou can reattempt it with the same idempotency key without\nworrying about creating duplicate objects.\n\nSee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information." }, "batches": { "type": "array", "items": { "$ref": "#/definitions/CatalogObjectBatch" }, "description": "A batch of CatalogObjects to be inserted/updated atomically.\nThe objects within a batch will be inserted in an all-or-nothing fashion, i.e., if an error occurs\nattempting to insert or update an object within a batch, the entire batch will be rejected. However, an error\nin one batch will not affect other batches within the same request.\n\nFor each object, its `updated_at` field is ignored and replaced with a current [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), and its\n`is_deleted` field must not be set to `true`.\n\nTo modify an existing object, supply its ID. To create a new object, use an ID starting\nwith `#`. These IDs may be used to create relationships between an object and attributes of\nother objects that reference it. For example, you can create a CatalogItem with\nID `#ABC` and a CatalogItemVariation with its `item_id` attribute set to\n`#ABC` in order to associate the CatalogItemVariation with its parent\nCatalogItem.\n\nAny `#`-prefixed IDs are valid only within a single atomic batch, and will be replaced by server-generated IDs.\n\nEach batch may contain up to 1,000 objects. The total number of objects across all batches for a single request\nmay not exceed 10,000. If either of these limits is violated, an error will be returned and no objects will\nbe inserted or updated." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "789ff020-f723-43a9-b4b5-43b5dc1fa3dc", "batches": [ { "objects": [ { "type": "ITEM", "id": "#Tea", "present_at_all_locations": true, "item_data": { "name": "Tea", "description_html": "\u003cp\u003e\u003cstrong\u003eHot\u003c/strong\u003e Leaf Juice\u003c/p\u003e", "categories": [ { "id": "#Beverages" } ], "tax_ids": [ "#SalesTax" ], "variations": [ { "type": "ITEM_VARIATION", "id": "#Tea_Mug", "present_at_all_locations": true, "item_variation_data": { "item_id": "#Tea", "name": "Mug", "pricing_type": "FIXED_PRICING", "price_money": { "amount": 150, "currency": "USD" } } } ] } }, { "type": "ITEM", "id": "#Coffee", "present_at_all_locations": true, "item_data": { "name": "Coffee", "description_html": "\u003cp\u003eHot \u003cem\u003eBean Juice\u003c/em\u003e\u003c/p\u003e", "categories": [ { "id": "#Beverages" } ], "tax_ids": [ "#SalesTax" ], "variations": [ { "type": "ITEM_VARIATION", "id": "#Coffee_Regular", "present_at_all_locations": true, "item_variation_data": { "item_id": "#Coffee", "name": "Regular", "pricing_type": "FIXED_PRICING", "price_money": { "amount": 250, "currency": "USD" } } }, { "type": "ITEM_VARIATION", "id": "#Coffee_Large", "present_at_all_locations": true, "item_variation_data": { "item_id": "#Coffee", "name": "Large", "pricing_type": "FIXED_PRICING", "price_money": { "amount": 350, "currency": "USD" } } } ] } }, { "type": "CATEGORY", "id": "#Beverages", "present_at_all_locations": true, "category_data": { "name": "Beverages" } }, { "type": "TAX", "id": "#SalesTax", "present_at_all_locations": true, "tax_data": { "name": "Sales Tax", "calculation_phase": "TAX_SUBTOTAL_PHASE", "inclusion_type": "ADDITIVE", "percentage": "5.0", "applies_to_custom_amounts": true, "enabled": true } } ] } ] } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsRequest.python", "csharp": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsRequest.csharp", "java": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsRequest.java", "php": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsRequest.php", "javascript": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsRequest.javascript", "ruby": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsRequest.ruby" } }, "BatchUpsertCatalogObjectsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "objects": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "The created successfully created CatalogObjects." }, "updated_at": { "type": "string", "description": "The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this update in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\"." }, "id_mappings": { "type": "array", "items": { "$ref": "#/definitions/CatalogIdMapping" }, "description": "The mapping between client and server IDs for this upsert." } }, "description": "", "x-release-status": "PUBLIC", "example": { "objects": [ { "type": "ITEM", "id": "67GA7XA2FWMRYY2VCONTYZJR", "updated_at": "2023-11-30T19:24:35.4Z", "created_at": "2023-11-30T19:24:35.4Z", "version": 1701372275400, "is_deleted": false, "present_at_all_locations": true, "item_data": { "name": "Tea", "description": "Hot Leaf Juice", "is_taxable": true, "tax_ids": [ "HP5VNYPKZKTNCKZ2Z5NPUH6A" ], "variations": [ { "type": "ITEM_VARIATION", "id": "CAJBHUIQH7ONTSZI2KTVOUP6", "updated_at": "2023-11-30T19:24:35.4Z", "created_at": "2023-11-30T19:24:35.4Z", "version": 1701372275400, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "67GA7XA2FWMRYY2VCONTYZJR", "name": "Mug", "ordinal": 0, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 150, "currency": "USD" }, "sellable": true, "stockable": true } } ], "product_type": "REGULAR", "categories": [ { "id": "XCS4SCGN4WQYE2VU4U3TKXEH", "ordinal": -2251731094208512 } ], "description_html": "\u003cp\u003e\u003cstrong\u003eHot\u003c/strong\u003e Leaf Juice\u003c/p\u003e", "description_plaintext": "Hot Leaf Juice", "is_archived": false } }, { "type": "ITEM", "id": "MQ4TZKOG3SR2EQI3TWEK4AH7", "updated_at": "2023-11-30T19:24:35.4Z", "created_at": "2023-11-30T19:24:35.4Z", "version": 1701372275400, "is_deleted": false, "present_at_all_locations": true, "item_data": { "name": "Coffee", "description": "Hot Bean Juice", "is_taxable": true, "tax_ids": [ "HP5VNYPKZKTNCKZ2Z5NPUH6A" ], "variations": [ { "type": "ITEM_VARIATION", "id": "GY2GXJTVVPQAPW43GFRR3NG6", "updated_at": "2023-11-30T19:24:35.4Z", "created_at": "2023-11-30T19:24:35.4Z", "version": 1701372275400, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "MQ4TZKOG3SR2EQI3TWEK4AH7", "name": "Regular", "ordinal": 0, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 250, "currency": "USD" }, "sellable": true, "stockable": true } }, { "type": "ITEM_VARIATION", "id": "JE6VHPSRQL6IWSN26C36CJ7W", "updated_at": "2023-11-30T19:24:35.4Z", "created_at": "2023-11-30T19:24:35.4Z", "version": 1701372275400, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "MQ4TZKOG3SR2EQI3TWEK4AH7", "name": "Large", "ordinal": 1, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 350, "currency": "USD" }, "sellable": true, "stockable": true } } ], "product_type": "REGULAR", "categories": [ { "id": "XCS4SCGN4WQYE2VU4U3TKXEH", "ordinal": -2251662374731776 } ], "description_html": "\u003cp\u003eHot \u003cem\u003eBean Juice\u003c/em\u003e\u003c/p\u003e", "description_plaintext": "Hot Bean Juice", "is_archived": false } }, { "type": "CATEGORY", "id": "XCS4SCGN4WQYE2VU4U3TKXEH", "updated_at": "2023-11-30T19:24:35.4Z", "created_at": "2023-11-30T19:24:35.4Z", "version": 1701372275400, "is_deleted": false, "present_at_all_locations": true, "category_data": { "name": "Beverages", "category_type": "REGULAR_CATEGORY", "parent_category": { "ordinal": -2250837741010944 }, "is_top_level": true, "online_visibility": true } }, { "type": "TAX", "id": "HP5VNYPKZKTNCKZ2Z5NPUH6A", "updated_at": "2023-11-30T19:24:35.4Z", "created_at": "2023-11-30T19:24:35.4Z", "version": 1701372275400, "is_deleted": false, "present_at_all_locations": true, "tax_data": { "name": "Sales Tax", "calculation_phase": "TAX_SUBTOTAL_PHASE", "inclusion_type": "ADDITIVE", "percentage": "5.0", "applies_to_custom_amounts": true, "enabled": true } } ], "id_mappings": [ { "client_object_id": "#Tea", "object_id": "67GA7XA2FWMRYY2VCONTYZJR" }, { "client_object_id": "#Coffee", "object_id": "MQ4TZKOG3SR2EQI3TWEK4AH7" }, { "client_object_id": "#Beverages", "object_id": "XCS4SCGN4WQYE2VU4U3TKXEH" }, { "client_object_id": "#SalesTax", "object_id": "HP5VNYPKZKTNCKZ2Z5NPUH6A" }, { "client_object_id": "#Tea_Mug", "object_id": "CAJBHUIQH7ONTSZI2KTVOUP6" }, { "client_object_id": "#Coffee_Regular", "object_id": "GY2GXJTVVPQAPW43GFRR3NG6" }, { "client_object_id": "#Coffee_Large", "object_id": "JE6VHPSRQL6IWSN26C36CJ7W" } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsResponse.python", "csharp": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsResponse.csharp", "java": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsResponse.java", "php": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsResponse.php", "javascript": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsResponse.javascript", "ruby": "/sdk_samples/Catalog/BatchUpsertCatalogObjects/BatchUpsertCatalogObjectsResponse.ruby" } }, "Booking": { "type": "object", "properties": { "id": { "minLength": 0, "maxLength": 36, "type": "string", "description": "A unique ID of this object representing a booking.", "x-read-only": true }, "version": { "minimum": 0, "type": "integer", "description": "The revision number for the booking used for optimistic concurrency." }, "status": { "type": "string", "description": "The status of the booking, describing where the booking stands with respect to the booking state machine.", "x-read-only": true }, "created_at": { "type": "string", "description": "The RFC 3339 timestamp specifying the creation time of this booking.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The RFC 3339 timestamp specifying the most recent update time of this booking.", "x-read-only": true }, "start_at": { "type": "string", "description": "The RFC 3339 timestamp specifying the starting time of this booking." }, "location_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "The ID of the [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) object representing the location where the booked service is provided. Once set when the booking is created, its value cannot be changed." }, "customer_id": { "minLength": 0, "maxLength": 192, "type": "string", "description": "The ID of the [Customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) object representing the customer receiving the booked service." }, "customer_note": { "minLength": 0, "maxLength": 4096, "type": "string", "description": "The free-text field for the customer to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a relevant [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) instance." }, "seller_note": { "minLength": 0, "maxLength": 4096, "type": "string", "description": "The free-text field for the seller to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a specific [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) instance.\nThis field should not be visible to customers." }, "appointment_segments": { "type": "array", "items": { "$ref": "#/definitions/AppointmentSegment" }, "description": "A list of appointment segments for this booking." }, "transition_time_minutes": { "type": "integer", "description": "Additional time at the end of a booking.\nApplications should not make this field visible to customers of a seller.", "x-read-only": true }, "all_day": { "type": "boolean", "description": "Whether the booking is of a full business day.", "x-read-only": true }, "location_type": { "type": "string", "description": "The type of location where the booking is held.\nAccess to this field requires seller-level permissions." }, "creator_details": { "$ref": "#/definitions/BookingCreatorDetails", "description": "Information about the booking creator.", "x-read-only": true }, "source": { "type": "string", "description": "The source of the booking.\nAccess to this field requires seller-level permissions.", "x-read-only": true } }, "description": "Represents a booking as a time-bound service contract for a seller\u0027s staff member to provide a specified service\nat a given location to a requesting customer in one or more appointment segments.", "x-release-status": "PUBLIC" }, "BookingCreatorDetails": { "type": "object", "properties": { "creator_type": { "type": "string", "description": "The seller-accessible type of the creator of the booking.", "x-read-only": true }, "team_member_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "The ID of the team member who created the booking, when the booking creator is of the `TEAM_MEMBER` type.\nAccess to this field requires seller-level permissions.", "x-read-only": true }, "customer_id": { "minLength": 0, "maxLength": 192, "type": "string", "description": "The ID of the customer who created the booking, when the booking creator is of the `CUSTOMER` type.\nAccess to this field requires seller-level permissions.", "x-read-only": true } }, "description": "Information about a booking creator.", "x-release-status": "PUBLIC" }, "BookingCustomAttributeDeleteRequest": { "type": "object", "required": [ "booking_id", "key" ], "properties": { "booking_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The ID of the target [booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking)." }, "key": { "minLength": 1, "type": "string", "description": "The key of the custom attribute to delete. This key must match the `key` of a\ncustom attribute definition in the Square seller account. If the requesting application is not\nthe definition owner, you must use the qualified key." } }, "description": "Represents an individual delete request in a [BulkDeleteBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/bulk-delete-booking-custom-attributes)\nrequest. An individual request contains a booking ID, the custom attribute to delete, and an optional idempotency key.", "x-release-status": "PUBLIC", "example": { "booking_id": "Z57QXKM2FGXEQDV42W8RBZY7BR", "key": "favoriteShampoo" } }, "BookingCustomAttributeDeleteResponse": { "type": "object", "properties": { "booking_id": { "type": "string", "description": "The ID of the [booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking) associated with the custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred while processing the individual request." } }, "description": "Represents a response for an individual upsert request in a [BulkDeleteBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/bulk-delete-booking-custom-attributes) operation.", "x-release-status": "PUBLIC", "example": { "booking_id": "N3NCVYY3WS27HF0HKANA3R9FP8", "errors": [] } }, "BookingCustomAttributeUpsertRequest": { "type": "object", "required": [ "booking_id", "custom_attribute" ], "properties": { "booking_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The ID of the target [booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking)." }, "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with following fields:\n\n- `key`. This key must match the `key` of a custom attribute definition in the Square seller\naccount. If the requesting application is not the definition owner, you must provide the qualified key.\n\n- `value`. This value must conform to the `schema` specified by the definition.\nFor more information, see [Value data types](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types).\n\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol for update operations, include this optional field in the request and set the\nvalue to the current version of the custom attribute." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this individual upsert request, used to ensure idempotency.\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an individual upsert request in a [BulkUpsertBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/bulk-upsert-booking-custom-attributes)\nrequest. An individual request contains a booking ID, the custom attribute to create or update,\nand an optional idempotency key.", "x-release-status": "PUBLIC", "example": { "custom_attribute": { "key": "favoriteShampoo", "visibility": "VISIBILITY_READ_WRITE_VALUES", "value": "Spring Fresh" } } }, "BookingCustomAttributeUpsertResponse": { "type": "object", "properties": { "booking_id": { "type": "string", "description": "The ID of the [booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking) associated with the custom attribute." }, "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The new or updated custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred while processing the individual request." } }, "description": "Represents a response for an individual upsert request in a [BulkUpsertBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/bulk-upsert-booking-custom-attributes) operation.", "x-release-status": "PUBLIC", "example": { "custom_attribute": { "key": "favoriteShampoo", "version": 1, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2022-11-16T00:16:23Z", "value": "Spring Fresh", "created_at": "2022-11-16T00:14:47Z" }, "errors": [] } }, "Break": { "type": "object", "required": [ "start_at", "break_type_id", "name", "expected_duration", "is_paid" ], "properties": { "id": { "type": "string", "description": "The UUID for this object." }, "start_at": { "minLength": 1, "type": "string", "description": "RFC 3339; follows the same timezone information as `Shift`. Precision up to\nthe minute is respected; seconds are truncated." }, "end_at": { "type": "string", "description": "RFC 3339; follows the same timezone information as `Shift`. Precision up to\nthe minute is respected; seconds are truncated." }, "break_type_id": { "minLength": 1, "type": "string", "description": "The `BreakType` that this `Break` was templated on." }, "name": { "minLength": 1, "type": "string", "description": "A human-readable name." }, "expected_duration": { "minLength": 1, "type": "string", "description": "Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of\nthe break." }, "is_paid": { "type": "boolean", "description": "Whether this break counts towards time worked for compensation\npurposes." } }, "description": "A record of an employee\u0027s break during a shift.", "x-release-status": "PUBLIC" }, "BreakType": { "type": "object", "required": [ "location_id", "break_name", "expected_duration", "is_paid" ], "properties": { "id": { "maxLength": 255, "type": "string", "description": "The UUID for this object." }, "location_id": { "minLength": 1, "type": "string", "description": "The ID of the business location this type of break applies to." }, "break_name": { "minLength": 1, "type": "string", "description": "A human-readable name for this type of break. The name is displayed to\nemployees in Square products." }, "expected_duration": { "minLength": 1, "type": "string", "description": "Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of\nthis break. Precision less than minutes is truncated.\n\nExample for break expected duration of 15 minutes: T15M" }, "is_paid": { "type": "boolean", "description": "Whether this break counts towards time worked for compensation\npurposes." }, "version": { "type": "integer", "description": "Used for resolving concurrency issues. The request fails if the version\nprovided does not match the server version at the time of the request. If a value is not\nprovided, Square\u0027s servers execute a \"blind\" write; potentially\noverwriting another writer\u0027s data." }, "created_at": { "type": "string", "description": "A read-only timestamp in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "A read-only timestamp in RFC 3339 format.", "x-read-only": true } }, "description": "A defined break template that sets an expectation for possible `Break`\ninstances on a `Shift`.", "x-release-status": "PUBLIC" }, "BulkCreateCustomerData": { "type": "object", "properties": { "given_name": { "maxLength": 300, "type": "string", "description": "The given name (that is, the first name) associated with the customer profile." }, "family_name": { "maxLength": 300, "type": "string", "description": "The family name (that is, the last name) associated with the customer profile." }, "company_name": { "maxLength": 500, "type": "string", "description": "A business name associated with the customer profile." }, "nickname": { "maxLength": 100, "type": "string", "description": "A nickname for the customer profile." }, "email_address": { "maxLength": 254, "type": "string", "description": "The email address associated with the customer profile." }, "address": { "$ref": "#/definitions/Address", "description": "The physical address associated with the customer profile. For maximum length constraints,\nsee [Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address).\nThe `first_name` and `last_name` fields are ignored if they are present in the request." }, "phone_number": { "type": "string", "description": "The phone number associated with the customer profile. The phone number must be valid\nand can contain 9–16 digits, with an optional `+` prefix and country code. For more information,\nsee [Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number)." }, "reference_id": { "maxLength": 100, "type": "string", "description": "An optional second ID used to associate the customer profile with an\nentity in another system." }, "note": { "type": "string", "description": "A custom note associated with the customer profile." }, "birthday": { "type": "string", "description": "The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format.\nFor example, specify `1998-09-21` for September 21, 1998, or `09-21` for September 21.\nBirthdays are returned in `YYYY-MM-DD` format, where `YYYY` is the specified birth year or\n`0000` if a birth year is not specified." }, "tax_ids": { "$ref": "#/definitions/CustomerTaxIds", "description": "The tax ID associated with the customer profile. This field is available only for\ncustomers of sellers in EU countries or the United Kingdom. For more information, see\n[Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids)." } }, "description": "Defines the customer data provided in individual create requests for a\n[BulkCreateCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-create-customers) operation.", "x-release-status": "PUBLIC" }, "BulkCreateCustomersRequest": { "type": "object", "required": [ "customers" ], "properties": { "customers": { "type": "object", "additionalProperties": { "$ref": "#/definitions/BulkCreateCustomerData" }, "description": "A map of 1 to 100 individual create requests, represented by `idempotency key: { customer data }`\nkey-value pairs.\n\nEach key is an [idempotency key](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)\nthat uniquely identifies the create request. Each value contains the customer data used to create the\ncustomer profile." } }, "description": "Defines the body parameters that can be included in requests to the\n[BulkCreateCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-create-customers) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "customers": { "8bb76c4f-e35d-4c5b-90de-1194cd9179f0": { "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-555-4240", "reference_id": "YOUR_REFERENCE_ID", "note": "a customer" }, "d1689f23-b25d-4932-b2f0-aed00f5e2029": { "given_name": "Marie", "family_name": "Curie", "email_address": "Marie.Curie@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 601", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-444-4240", "reference_id": "YOUR_REFERENCE_ID", "note": "another customer" } } } } }, "BulkCreateCustomersResponse": { "type": "object", "properties": { "responses": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CreateCustomerResponse" }, "description": "A map of responses that correspond to individual create requests, represented by\nkey-value pairs.\n\nEach key is the idempotency key that was provided for a create request and each value\nis the corresponding response.\nIf the request succeeds, the value is the new customer profile.\nIf the request fails, the value contains any errors that occurred during the request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any top-level errors that prevented the bulk operation from running." } }, "description": "Defines the fields included in the response body from the\n[BulkCreateCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-create-customers) endpoint.", "x-release-status": "PUBLIC", "example": { "responses": { "8bb76c4f-e35d-4c5b-90de-1194cd9179f4": { "customer": { "id": "8DDA5NZVBZFGAX0V3HPF81HHE0", "created_at": "2024-03-23T20:21:54.859Z", "updated_at": "2024-03-23T20:21:54.859Z", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-555-4240", "reference_id": "YOUR_REFERENCE_ID", "note": "a customer", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "version": 0 } }, "d1689f23-b25d-4932-b2f0-aed00f5e2029": { "customer": { "id": "N18CPRVXR5214XPBBA6BZQWF3C", "created_at": "2024-03-23T20:21:54.859Z", "updated_at": "2024-03-23T20:21:54.859Z", "given_name": "Marie", "family_name": "Curie", "email_address": "Marie.Curie@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 601", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-444-4240", "reference_id": "YOUR_REFERENCE_ID", "note": "another customer", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "version": 0 } } } } }, "BulkCreateTeamMembersRequest": { "type": "object", "required": [ "team_members" ], "properties": { "team_members": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CreateTeamMemberRequest" }, "description": "The data used to create the `TeamMember` objects. Each key is the `idempotency_key` that maps to the `CreateTeamMemberRequest`. The maximum number of create objects is 25." } }, "description": "Represents a bulk create request for `TeamMember` objects.", "x-release-status": "PUBLIC", "example": { "request_body": { "team_members": { "idempotency-key-1": { "team_member": { "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@gmail.com", "reference_id": "reference_id_1", "phone_number": "+14159283333", "assigned_locations": { "location_ids": [ "YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT" ], "assignment_type": "EXPLICIT_LOCATIONS" } } }, "idempotency-key-2": { "team_member": { "given_name": "Jane", "family_name": "Smith", "email_address": "jane_smith@gmail.com", "reference_id": "reference_id_2", "phone_number": "+14159223334", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } } } } } } }, "BulkCreateTeamMembersResponse": { "type": "object", "properties": { "team_members": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CreateTeamMemberResponse" }, "description": "The successfully created `TeamMember` objects. Each key is the `idempotency_key` that maps to the `CreateTeamMemberRequest`." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "The errors that occurred during the request." } }, "description": "Represents a response from a bulk create request containing the created `TeamMember` objects or error messages.", "x-release-status": "PUBLIC", "example": { "team_members": { "idempotency-key-1": { "team_member": { "id": "ywhG1qfIOoqsHfVRubFV", "reference_id": "reference_id_1", "is_owner": false, "status": "ACTIVE", "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@gmail.com", "phone_number": "+14159283333", "assigned_locations": { "assignment_type": "EXPLICIT_LOCATIONS", "location_ids": [ "GA2Y9HSJ8KRYT", "YSGH2WBKG94QZ" ] } } }, "idempotency-key-2": { "team_member": { "id": "IF_Ncrg7fHhCqxVI9T6R", "reference_id": "reference_id_2", "is_owner": false, "status": "ACTIVE", "given_name": "Jane", "family_name": "Smith", "email_address": "jane_smith@gmail.com", "phone_number": "+14159223334", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } } } } } }, "BulkCreateVendorsRequest": { "type": "object", "required": [ "vendors" ], "properties": { "vendors": { "type": "object", "additionalProperties": { "$ref": "#/definitions/Vendor" }, "description": "Specifies a set of new [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects as represented by a collection of idempotency-key/`Vendor`-object pairs." } }, "description": "Represents an input to a call to [BulkCreateVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/bulk-create-vendors).", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "vendors": { "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe": { "name": "Joe\u0027s Fresh Seafood", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250" } ], "account_number": "4025391", "note": "a vendor" } }, "47bb76a8-c9fb-4f33-9df8-25ce02ca4505": { "name": "Annie’s Hot Sauce", "contacts": [ { "name": "Annie Thomas", "email_address": "annie@annieshotsauce.com", "phone_number": "1-212-555-4250" } ] } } } }, "BulkCreateVendorsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "responses": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CreateVendorResponse" }, "description": "A set of [CreateVendorResponse](https://developer.squareup.com/reference/square_2024-04-17/objects/CreateVendorResponse) objects encapsulating successfully created [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)\nobjects or error responses for failed attempts. The set is represented by \na collection of idempotency-key/`Vendor`-object or idempotency-key/error-object pairs. The idempotency keys correspond to those specified\nin the input." } }, "description": "Represents an output from a call to [BulkCreateVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/bulk-create-vendors).", "x-release-status": "BETA", "x-is-beta": true, "example": { "errors": [], "vendors": { "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe": { "vendor": { "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2022-03-16T10:21:54.859Z", "updated_at": "2022-03-16T10:21:54.859Z", "name": "Joe\u0027s Fresh Seafood", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "id": "INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A", "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250" } ], "account_number": "4025391", "note": "a vendor", "version": 0, "status": "ACTIVE" } } }, "47bb76a8-c9fb-4f33-9df8-25ce02ca4505": { "vendor": { "id": "INV_V_FMCYHBWT1TPL8MFH52PBMEN92A", "created_at": "2022-03-16T10:21:54.859Z", "updated_at": "2022-03-16T10:21:54.859Z", "name": "Annie’s Hot Sauce", "contacts": [ { "id": "INV_VC_ABYYHBWT1TPL8MFH52PBMENPJ4", "name": "Annie Thomas", "email_address": "annie@annieshotsauce.com", "phone_number": "1-212-555-4250" } ], "version": 1, "status": "ACTIVE" } } } }, "BulkDeleteBookingCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/BookingCustomAttributeDeleteRequest" }, "description": "A map containing 1 to 25 individual Delete requests. For each request, provide an\narbitrary ID that is unique for this `BulkDeleteBookingCustomAttributes` request and the\ninformation needed to delete a custom attribute." } }, "description": "Represents a [BulkDeleteBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/bulk-delete-booking-custom-attributes) request.", "x-release-status": "PUBLIC", "example": { "values": { "id1": { "key": "favoriteShampoo", "booking_id": "N3NCVYY3WS27HF0HKANA3R9FP8" }, "id2": { "key": "ownsShampoo", "booking_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM" }, "id3": { "key": "favoriteShampoo", "booking_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM" } } } }, "BulkDeleteBookingCustomAttributesResponse": { "type": "object", "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/BookingCustomAttributeDeleteResponse" }, "description": "A map of responses that correspond to individual delete requests. Each response has the\nsame ID as the corresponding request and contains `booking_id` and `errors` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [BulkDeleteBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/bulk-delete-booking-custom-attributes) response,\nwhich contains a map of responses that each corresponds to an individual delete request.", "x-release-status": "PUBLIC", "example": { "values": { "id1": { "booking_id": "N3NCVYY3WS27HF0HKANA3R9FP8", "errors": [] }, "id2": { "booking_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM", "errors": [] }, "id3": { "booking_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM", "errors": [] } }, "errors": [] } }, "BulkDeleteCustomersRequest": { "type": "object", "required": [ "customer_ids" ], "properties": { "customer_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the [customer profiles](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) to delete." } }, "description": "Defines the body parameters that can be included in requests to the\n[BulkDeleteCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-delete-customers) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "customer_ids": [ "8DDA5NZVBZFGAX0V3HPF81HHE0", "N18CPRVXR5214XPBBA6BZQWF3C", "2GYD7WNXF7BJZW1PMGNXZ3Y8M8" ] } } }, "BulkDeleteCustomersResponse": { "type": "object", "properties": { "responses": { "type": "object", "additionalProperties": { "$ref": "#/definitions/DeleteCustomerResponse" }, "description": "A map of responses that correspond to individual delete requests, represented by\nkey-value pairs.\n\nEach key is the customer ID that was specified for a delete request and each value\nis the corresponding response.\nIf the request succeeds, the value is an empty object (`{ }`).\nIf the request fails, the value contains any errors that occurred during the request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any top-level errors that prevented the bulk operation from running." } }, "description": "Defines the fields included in the response body from the\n[BulkDeleteCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-delete-customers) endpoint.", "x-release-status": "PUBLIC", "example": { "responses": { "8DDA5NZVBZFGAX0V3HPF81HHE0": {}, "2GYD7WNXF7BJZW1PMGNXZ3Y8M8": { "errors": [ { "code": "NOT_FOUND", "detail": "Customer with ID `2GYD7WNXF7BJZW1PMGNXZ3Y8M8` not found.", "category": "INVALID_REQUEST_ERROR" } ] }, "N18CPRVXR5214XPBBA6BZQWF3C": {} } } }, "BulkDeleteLocationCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/LocationCustomAttributeDeleteRequest" }, "description": "The data used to update the `CustomAttribute` objects.\nThe keys must be unique and are used to map to the corresponding response." } }, "description": "Represents a [BulkDeleteLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-delete-location-custom-attributes) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "values": { "id1": { "location_id": "L0TBCBTB7P8RQ", "key": "bestseller" }, "id2": { "location_id": "L9XMD04V3STJX", "key": "bestseller" }, "id3": { "location_id": "L0TBCBTB7P8RQ", "key": "phone-number" } } } } }, "BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest": { "type": "object", "properties": { "key": { "pattern": "^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$", "type": "string", "description": "The key of the associated custom attribute definition.\nRepresented as a qualified key if the requesting app is not the definition owner.", "x-read-only": true } }, "description": "Represents an individual delete request in a [BulkDeleteLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-delete-location-custom-attributes)\nrequest. An individual request contains an optional ID of the associated custom attribute definition\nand optional key of the associated custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true }, "BulkDeleteLocationCustomAttributesResponse": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/LocationCustomAttributeDeleteResponse" }, "description": "A map of responses that correspond to individual delete requests. Each response has the\nsame key as the corresponding request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [BulkDeleteLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-delete-location-custom-attributes) response,\nwhich contains a map of responses that each corresponds to an individual delete request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "values": { "id1": { "location_id": "L0TBCBTB7P8RQ", "errors": [] }, "id2": { "location_id": "L9XMD04V3STJX", "errors": [] }, "id3": { "location_id": "L0TBCBTB7P8RQ", "errors": [] } } } }, "BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse": { "type": "object", "properties": { "location_id": { "type": "string", "description": "The ID of the location associated with the custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred while processing the individual LocationCustomAttributeDeleteRequest request" } }, "description": "Represents an individual delete response in a [BulkDeleteLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-delete-location-custom-attributes)\nrequest.", "x-release-status": "BETA", "x-is-beta": true, "example": { "location_id": "L0TBCBTB7P8RQ", "errors": [] } }, "BulkDeleteMerchantCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/MerchantCustomAttributeDeleteRequest" }, "description": "The data used to update the `CustomAttribute` objects.\nThe keys must be unique and are used to map to the corresponding response." } }, "description": "Represents a [BulkDeleteMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-delete-merchant-custom-attributes) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "values": { "id1": { "merchant_id": "DM7VKY8Q63GNP", "key": "alternative_seller_name" }, "id2": { "merchant_id": "DM7VKY8Q63GNP", "key": "has_seen_tutorial" } } } } }, "BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest": { "type": "object", "properties": { "key": { "pattern": "^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$", "type": "string", "description": "The key of the associated custom attribute definition.\nRepresented as a qualified key if the requesting app is not the definition owner.", "x-read-only": true } }, "description": "Represents an individual delete request in a [BulkDeleteMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-delete-merchant-custom-attributes)\nrequest. An individual request contains an optional ID of the associated custom attribute definition\nand optional key of the associated custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true }, "BulkDeleteMerchantCustomAttributesResponse": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/MerchantCustomAttributeDeleteResponse" }, "description": "A map of responses that correspond to individual delete requests. Each response has the\nsame key as the corresponding request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [BulkDeleteMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-delete-merchant-custom-attributes) response,\nwhich contains a map of responses that each corresponds to an individual delete request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "values": { "id1": { "merchant_id": "DM7VKY8Q63GNP", "errors": [] }, "id2": { "merchant_id": "DM7VKY8Q63GNP", "errors": [] } } } }, "BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred while processing the individual MerchantCustomAttributeDeleteRequest request" } }, "description": "Represents an individual delete response in a [BulkDeleteMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-delete-merchant-custom-attributes)\nrequest.", "x-release-status": "BETA", "x-is-beta": true, "example": { "merchant_id": "DM7VKY8Q63GNP", "errors": [] } }, "BulkDeleteOrderCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/DeleteCustomAttribute" }, "description": "A map of requests that correspond to individual delete operations for custom attributes." } }, "description": "Represents a bulk delete request for one or more order custom attributes.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "values": { "table-number": { "key": "table-number", "order_id": "7BbXGEIWNldxAzrtGf9GPVZTwZ4F" }, "cover-count": { "key": "cover-count", "order_id": "7BbXGEIWNldxAzrtGf9GPVZTwZ4F" } } } } }, "BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute": { "type": "object", "required": [ "order_id" ], "properties": { "key": { "minLength": 1, "pattern": "^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$", "type": "string", "description": "The key of the custom attribute to delete. This key must match the key \nof an existing custom attribute definition.", "x-read-only": true }, "order_id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The ID of the target [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order)." } }, "description": "Represents one delete within the bulk operation.", "x-release-status": "BETA", "x-is-beta": true }, "BulkDeleteOrderCustomAttributesResponse": { "type": "object", "required": [ "values" ], "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/DeleteOrderCustomAttributeResponse" }, "description": " A map of responses that correspond to individual delete requests. Each response has the same ID \nas the corresponding request and contains either a `custom_attribute` or an `errors` field." } }, "description": "Represents a response from deleting one or more order custom attributes.", "x-release-status": "BETA", "x-is-beta": true, "example": { "values": { "table-number": {}, "cover-count": {} } } }, "BulkRetrieveBookingsRequest": { "type": "object", "required": [ "booking_ids" ], "properties": { "booking_ids": { "type": "array", "items": { "minLength": 1, "maxLength": 36, "type": "string" }, "description": "A non-empty list of [Booking](https://developer.squareup.com/reference/square_2024-04-17/objects/Booking) IDs specifying bookings to retrieve." } }, "description": "Request payload for bulk retrieval of bookings.", "x-release-status": "PUBLIC", "example": { "booking_ids": [ "sc3p3m7dvctfr1", "tdegug1dvctdef", "tdegug1fqni3wh" ] } }, "BulkRetrieveBookingsResponse": { "type": "object", "properties": { "bookings": { "type": "object", "additionalProperties": { "$ref": "#/definitions/RetrieveBookingResponse" }, "description": "Requested bookings returned as a map containing `booking_id` as the key and `RetrieveBookingResponse` as the value." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "Response payload for bulk retrieval of bookings.", "x-release-status": "PUBLIC", "example": { "bookings": { "sc3p3m7dvctfr1": { "booking": { "id": "sc3p3m7dvctfr1", "version": 0, "status": "ACCEPTED", "created_at": "2023-04-26T18:19:21Z", "updated_at": "2023-04-26T18:19:21Z", "location_id": "LY6WNBPVM6VGV", "customer_id": "4TDWKN9E8165X8Z77MRS0VFMJM", "start_at": "2023-05-01T14:00:00Z", "all_day": false, "appointment_segments": [ { "duration_minutes": 60, "service_variation_id": "VG4FYBKK3UL6UITOEYQ6MFLS", "team_member_id": "TMjiqI3PxyLMKr4k", "service_variation_version": 1641341724039, "any_team_member": false } ] }, "errors": [] }, "tdegug1dvctdef": { "errors": [ { "category": "INVALID_REQUEST_ERROR", "code": "NOT_FOUND", "detail": "Specified booking was not found.", "field": "booking_id" } ] }, "tdegug1fqni3wh": { "booking": { "id": "tdegug1fqni3wh", "version": 0, "status": "ACCEPTED", "created_at": "2023-04-26T18:19:30Z", "updated_at": "2023-04-26T18:19:30Z", "location_id": "LY6WNBPVM6VGV", "customer_id": "4TDWKN9E8165X8Z77MRS0VFMJM", "start_at": "2023-05-02T14:00:00Z", "all_day": false, "appointment_segments": [ { "duration_minutes": 60, "service_variation_id": "VG4FYBKK3UL6UITOEYQ6MFLS", "team_member_id": "TMjiqI3PxyLMKr4k", "service_variation_version": 1641341724039, "any_team_member": false } ] }, "errors": [] } }, "errors": [] } }, "BulkRetrieveCustomersRequest": { "type": "object", "required": [ "customer_ids" ], "properties": { "customer_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the [customer profiles](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) to retrieve." } }, "description": "Defines the body parameters that can be included in requests to the\n[BulkRetrieveCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-retrieve-customers) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "customer_ids": [ "8DDA5NZVBZFGAX0V3HPF81HHE0", "N18CPRVXR5214XPBBA6BZQWF3C", "2GYD7WNXF7BJZW1PMGNXZ3Y8M8" ] } } }, "BulkRetrieveCustomersResponse": { "type": "object", "properties": { "responses": { "type": "object", "additionalProperties": { "$ref": "#/definitions/RetrieveCustomerResponse" }, "description": "A map of responses that correspond to individual retrieve requests, represented by\nkey-value pairs.\n\nEach key is the customer ID that was specified for a retrieve request and each value\nis the corresponding response.\nIf the request succeeds, the value is the requested customer profile.\nIf the request fails, the value contains any errors that occurred during the request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any top-level errors that prevented the bulk operation from running." } }, "description": "Defines the fields included in the response body from the\n[BulkRetrieveCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-retrieve-customers) endpoint.", "x-release-status": "PUBLIC", "example": { "responses": { "8DDA5NZVBZFGAX0V3HPF81HHE0": { "customer": { "id": "8DDA5NZVBZFGAX0V3HPF81HHE0", "created_at": "2024-01-19T00:27:54.59Z", "updated_at": "2024-01-19T00:38:06Z", "given_name": "Amelia", "family_name": "Earhart", "email_address": "New.Amelia.Earhart@example.com", "note": "updated customer note", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "birthday": "1897-07-24", "version": 3 } }, "N18CPRVXR5214XPBBA6BZQWF3C": { "customer": { "id": "N18CPRVXR5214XPBBA6BZQWF3C", "created_at": "2024-01-19T00:27:54.59Z", "updated_at": "2024-01-19T00:38:06Z", "given_name": "Marie", "family_name": "Curie", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "version": 1 } }, "2GYD7WNXF7BJZW1PMGNXZ3Y8M8": { "errors": [ { "code": "NOT_FOUND", "detail": "Customer with ID `2GYD7WNXF7BJZW1PMGNXZ3Y8M8` not found.", "category": "INVALID_REQUEST_ERROR" } ] } } } }, "BulkRetrieveTeamMemberBookingProfilesRequest": { "type": "object", "required": [ "team_member_ids" ], "properties": { "team_member_ids": { "type": "array", "items": { "minLength": 1, "maxLength": 32, "type": "string" }, "description": "A non-empty list of IDs of team members whose booking profiles you want to retrieve." } }, "description": "Request payload for the [BulkRetrieveTeamMemberBookingProfiles](https://developer.squareup.com/reference/square_2024-04-17/bookings-api/bulk-retrieve-team-member-booking-profiles) endpoint.", "x-release-status": "PUBLIC", "example": { "team_member_ids": [ "TMaJcbiRqPIGZuS9", "TMXUrsBWWcHTt79t", "TMtdegug1fqni3wh" ] } }, "BulkRetrieveTeamMemberBookingProfilesResponse": { "type": "object", "properties": { "team_member_booking_profiles": { "type": "object", "additionalProperties": { "$ref": "#/definitions/RetrieveTeamMemberBookingProfileResponse" }, "description": "The returned team members\u0027 booking profiles, as a map with `team_member_id` as the key and [TeamMemberBookingProfile](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMemberBookingProfile) the value." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "Response payload for the [BulkRetrieveTeamMemberBookingProfiles](https://developer.squareup.com/reference/square_2024-04-17/bookings-api/bulk-retrieve-team-member-booking-profiles) endpoint.", "x-release-status": "PUBLIC", "example": { "team_member_booking_profiles": { "TMaJcbiRqPIGZuS9": { "team_member_booking_profile": { "team_member_id": "TMaJcbiRqPIGZuS9", "display_name": "Sandbox Staff 1", "is_bookable": true }, "errors": [] }, "TMXUrsBWWcHTt79t": { "errors": [ { "category": "INVALID_REQUEST_ERROR", "code": "NOT_FOUND", "detail": "Resource not found." } ] }, "TMtdegug1fqni3wh": { "team_member_booking_profile": { "team_member_id": "TMtdegug1fqni3wh", "display_name": "Sandbox Staff 2", "is_bookable": true }, "errors": [] } }, "errors": [] } }, "BulkRetrieveVendorsRequest": { "type": "object", "properties": { "vendor_ids": { "type": "array", "items": { "type": "string" }, "description": "IDs of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects to retrieve." } }, "description": "Represents an input to a call to [BulkRetrieveVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/bulk-retrieve-vendors).", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "vendor_ids": [ "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4" ] } } }, "BulkRetrieveVendorsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "responses": { "type": "object", "additionalProperties": { "$ref": "#/definitions/RetrieveVendorResponse" }, "description": "The set of [RetrieveVendorResponse](https://developer.squareup.com/reference/square_2024-04-17/objects/RetrieveVendorResponse) objects encapsulating successfully retrieved [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)\nobjects or error responses for failed attempts. The set is represented by \na collection of `Vendor`-ID/`Vendor`-object or `Vendor`-ID/error-object pairs." } }, "description": "Represents an output from a call to [BulkRetrieveVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/bulk-retrieve-vendors).", "x-release-status": "BETA", "x-is-beta": true, "example": { "errors": [], "vendors": { "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4": { "vendor": { "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2022-03-16T10:21:54.859Z", "updated_at": "2022-03-16T10:21:54.859Z", "name": "Joe\u0027s Fresh Seafood", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "id": "INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A", "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250" } ], "account_number": "4025391", "note": "a vendor", "version": 1, "status": "ACTIVE" } } } } }, "BulkSwapPlanRequest": { "type": "object", "required": [ "new_plan_variation_id", "old_plan_variation_id", "location_id" ], "properties": { "new_plan_variation_id": { "minLength": 1, "type": "string", "description": "The ID of the new subscription plan variation.\n\nThis field is required." }, "old_plan_variation_id": { "minLength": 1, "type": "string", "description": "The ID of the plan variation whose subscriptions should be swapped. Active subscriptions\nusing this plan variation will be subscribed to the new plan variation on their next billing\nday." }, "location_id": { "minLength": 1, "type": "string", "description": "The ID of the location to associate with the swapped subscriptions." } }, "description": "Defines input parameters in a call to the\n[BulkSwapPlan](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/bulk-swap-plan) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "new_plan_variation_id": "FQ7CDXXWSLUJRPM3GFJSJGZ7", "old_plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "location_id": "S8GWD5R9QB376" } } }, "BulkSwapPlanResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "affected_subscriptions": { "type": "integer", "description": "The number of affected subscriptions." } }, "description": "Defines output parameters in a response of the\n[BulkSwapPlan](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/bulk-swap-plan) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "affected_subscriptions": 12 } }, "BulkUpdateCustomerData": { "type": "object", "properties": { "given_name": { "maxLength": 300, "type": "string", "description": "The given name (that is, the first name) associated with the customer profile." }, "family_name": { "maxLength": 300, "type": "string", "description": "The family name (that is, the last name) associated with the customer profile." }, "company_name": { "maxLength": 500, "type": "string", "description": "A business name associated with the customer profile." }, "nickname": { "maxLength": 100, "type": "string", "description": "A nickname for the customer profile." }, "email_address": { "maxLength": 254, "type": "string", "description": "The email address associated with the customer profile." }, "address": { "$ref": "#/definitions/Address", "description": "The physical address associated with the customer profile. For maximum length constraints,\nsee [Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address).\nThe `first_name` and `last_name` fields are ignored if they are present in the request." }, "phone_number": { "type": "string", "description": "The phone number associated with the customer profile. The phone number must be valid\nand can contain 9–16 digits, with an optional `+` prefix and country code. For more information,\nsee [Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number)." }, "reference_id": { "maxLength": 100, "type": "string", "description": "An optional second ID used to associate the customer profile with an\nentity in another system." }, "note": { "type": "string", "description": "An custom note associates with the customer profile." }, "birthday": { "type": "string", "description": "The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format.\nFor example, specify `1998-09-21` for September 21, 1998, or `09-21` for September 21.\nBirthdays are returned in `YYYY-MM-DD` format, where `YYYY` is the specified birth year or\n`0000` if a birth year is not specified." }, "tax_ids": { "$ref": "#/definitions/CustomerTaxIds", "description": "The tax ID associated with the customer profile. This field is available only for\ncustomers of sellers in EU countries or the United Kingdom. For more information, see\n[Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids)." }, "version": { "type": "integer", "format": "int64", "description": "The current version of the customer profile.\n\nAs a best practice, you should include this field to enable\n[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol." } }, "description": "Defines the customer data provided in individual update requests for a\n[BulkUpdateCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-update-customers) operation.", "x-release-status": "PUBLIC" }, "BulkUpdateCustomersRequest": { "type": "object", "required": [ "customers" ], "properties": { "customers": { "type": "object", "additionalProperties": { "$ref": "#/definitions/BulkUpdateCustomerData" }, "description": "A map of 1 to 100 individual update requests, represented by `customer ID: { customer data }`\nkey-value pairs.\n\nEach key is the ID of the [customer profile](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) to update. To update a customer profile\nthat was created by merging existing profiles, provide the ID of the newly created profile.\n\nEach value contains the updated customer data. Only new or changed fields are required. To add or\nupdate a field, specify the new value. To remove a field, specify `null`." } }, "description": "Defines the body parameters that can be included in requests to the\n[BulkUpdateCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-update-customers) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "customers": { "8DDA5NZVBZFGAX0V3HPF81HHE0": { "phone_number": null, "email_address": "New.Amelia.Earhart@example.com", "note": "updated customer note", "version": 2 }, "N18CPRVXR5214XPBBA6BZQWF3C": { "given_name": "Marie", "family_name": "Curie", "version": 0 } } } } }, "BulkUpdateCustomersResponse": { "type": "object", "properties": { "responses": { "type": "object", "additionalProperties": { "$ref": "#/definitions/UpdateCustomerResponse" }, "description": "A map of responses that correspond to individual update requests, represented by\nkey-value pairs.\n\nEach key is the customer ID that was specified for an update request and each value\nis the corresponding response.\nIf the request succeeds, the value is the updated customer profile.\nIf the request fails, the value contains any errors that occurred during the request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any top-level errors that prevented the bulk operation from running." } }, "description": "Defines the fields included in the response body from the\n[BulkUpdateCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-update-customers) endpoint.", "x-release-status": "PUBLIC", "example": { "responses": { "8DDA5NZVBZFGAX0V3HPF81HHE0": { "customer": { "id": "8DDA5NZVBZFGAX0V3HPF81HHE0", "created_at": "2024-01-19T00:27:54.59Z", "updated_at": "2024-01-19T00:38:06Z", "given_name": "Amelia", "family_name": "Earhart", "email_address": "New.Amelia.Earhart@example.com", "note": "updated customer note", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "birthday": "1897-07-24", "version": 3 } }, "N18CPRVXR5214XPBBA6BZQWF3C": { "customer": { "id": "N18CPRVXR5214XPBBA6BZQWF3C", "created_at": "2024-01-19T00:27:54.59Z", "updated_at": "2024-01-19T00:38:06Z", "given_name": "Marie", "family_name": "Curie", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "version": 1 } } } } }, "BulkUpdateTeamMembersRequest": { "type": "object", "required": [ "team_members" ], "properties": { "team_members": { "type": "object", "additionalProperties": { "$ref": "#/definitions/UpdateTeamMemberRequest" }, "description": "The data used to update the `TeamMember` objects. Each key is the `team_member_id` that maps to the `UpdateTeamMemberRequest`. The maximum number of update objects is 25." } }, "description": "Represents a bulk update request for `TeamMember` objects.", "x-release-status": "PUBLIC", "example": { "request_body": { "team_members": { "fpgteZNMaf0qOK-a4t6P": { "team_member": { "reference_id": "reference_id_1", "is_owner": false, "status": "ACTIVE", "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@gmail.com", "phone_number": "+14159283333", "assigned_locations": { "location_ids": [ "YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT" ], "assignment_type": "EXPLICIT_LOCATIONS" } } }, "AFMwA08kR-MIF-3Vs0OE": { "team_member": { "reference_id": "reference_id_2", "is_owner": false, "status": "ACTIVE", "given_name": "Jane", "family_name": "Smith", "email_address": "jane_smith@gmail.com", "phone_number": "+14159223334", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } } } } } } }, "BulkUpdateTeamMembersResponse": { "type": "object", "properties": { "team_members": { "type": "object", "additionalProperties": { "$ref": "#/definitions/UpdateTeamMemberResponse" }, "description": "The successfully updated `TeamMember` objects. Each key is the `team_member_id` that maps to the `UpdateTeamMemberRequest`." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "The errors that occurred during the request." } }, "description": "Represents a response from a bulk update request containing the updated `TeamMember` objects or error messages.", "x-release-status": "PUBLIC", "example": { "team_members": { "fpgteZNMaf0qOK-a4t6P": { "team_member": { "id": "fpgteZNMaf0qOK-a4t6P", "reference_id": "reference_id_1", "is_owner": false, "status": "ACTIVE", "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@example.com", "phone_number": "+14159283333", "created_at": "2020-03-24T18:14:00Z", "updated_at": "2020-03-24T18:18:00Z", "assigned_locations": { "assignment_type": "EXPLICIT_LOCATIONS", "location_ids": [ "GA2Y9HSJ8KRYT", "YSGH2WBKG94QZ" ] } } }, "AFMwA08kR-MIF-3Vs0OE": { "team_member": { "id": "AFMwA08kR-MIF-3Vs0OE", "reference_id": "reference_id_2", "is_owner": false, "status": "ACTIVE", "given_name": "Jane", "family_name": "Smith", "email_address": "jane_smith@example.com", "phone_number": "+14159223334", "created_at": "2020-03-24T18:14:00Z", "updated_at": "2020-03-24T18:18:00Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } } } } } }, "BulkUpdateVendorsRequest": { "type": "object", "required": [ "vendors" ], "properties": { "vendors": { "type": "object", "additionalProperties": { "$ref": "#/definitions/UpdateVendorRequest" }, "description": "A set of [UpdateVendorRequest](https://developer.squareup.com/reference/square_2024-04-17/objects/UpdateVendorRequest) objects encapsulating to-be-updated [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)\nobjects. The set is represented by a collection of `Vendor`-ID/`UpdateVendorRequest`-object pairs." } }, "description": "Represents an input to a call to [BulkUpdateVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/bulk-update-vendors).", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "vendors": { "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4": { "note": "favorite vendor", "version": 30, "status": "ACTIVE" }, "FMCYHBWT1TPL8MFH52PBMEN92A": { "address": { "address_line_1": "202 Mill St", "locality": "Moorestown", "administrative_district_level_1": "NJ", "postal_code": "08057", "country": "US" }, "version": 10, "status": "ACTIVE" } } } } }, "BulkUpdateVendorsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered when the request fails." }, "responses": { "type": "object", "additionalProperties": { "$ref": "#/definitions/UpdateVendorResponse" }, "description": "A set of [UpdateVendorResponse](https://developer.squareup.com/reference/square_2024-04-17/objects/UpdateVendorResponse) objects encapsulating successfully created [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)\nobjects or error responses for failed attempts. The set is represented by a collection of `Vendor`-ID/`UpdateVendorResponse`-object or \n`Vendor`-ID/error-object pairs." } }, "description": "Represents an output from a call to [BulkUpdateVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/bulk-update-vendors).", "x-release-status": "BETA", "x-is-beta": true, "example": { "vendors": { "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4": { "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2022-03-16T10:10:54.859Z", "updated_at": "2022-03-16T20:21:54.859Z", "name": "Joe\u0027s Fresh Seafood", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "id": "INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A", "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250", "ordinal": 0 } ], "account_number": "4025391", "note": "favorite vendor", "version": 31, "status": "ACTIVE" }, "INV_V_FMCYHBWT1TPL8MFH52PBMEN92A": { "id": "INV_V_FMCYHBWT1TPL8MFH52PBMEN92A", "created_at": "2022-03-16T10:21:54.859Z", "updated_at": "2022-03-16T20:21:54.859Z", "name": "Annie’s Hot Sauce", "contacts": [ { "id": "INV_VC_ABYYHBWT1TPL8MFH52PBMENPJ4", "name": "Annie Thomas", "email_address": "annie@annieshotsauce.com", "phone_number": "1-212-555-4250", "ordinal": 0 } ], "address": { "address_line_1": "202 Mill St", "locality": "Moorestown", "administrative_district_level_1": "NJ", "postal_code": "08057", "country": "US" }, "version": 11, "status": "ACTIVE" } } } }, "BulkUpsertBookingCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/BookingCustomAttributeUpsertRequest" }, "description": "A map containing 1 to 25 individual upsert requests. For each request, provide an\narbitrary ID that is unique for this `BulkUpsertBookingCustomAttributes` request and the\ninformation needed to create or update a custom attribute." } }, "description": "Represents a [BulkUpsertBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/bulk-upsert-booking-custom-attributes) request.", "x-release-status": "PUBLIC", "example": { "values": { "id1": { "custom_attribute": { "key": "favoriteShampoo", "value": "Spring Fresh" }, "booking_id": "N3NCVYY3WS27HF0HKANA3R9FP8" }, "id2": { "custom_attribute": { "key": "ownsShampoo", "value": false }, "booking_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM" }, "id3": { "custom_attribute": { "key": "favoriteShampoo", "value": "Hydro-Cool" }, "booking_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM" }, "id4": { "custom_attribute": { "key": "hasShoes", "value": true }, "booking_id": "N3NCVYY3WS27HF0HKANA3R9FP8" }, "id5": { "custom_attribute": { "key": "partySize", "value": "4" }, "booking_id": "70548QG1HN43B05G0KCZ4MMC1G" } } } }, "BulkUpsertBookingCustomAttributesResponse": { "type": "object", "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/BookingCustomAttributeUpsertResponse" }, "description": "A map of responses that correspond to individual upsert requests. Each response has the\nsame ID as the corresponding request and contains either a `booking_id` and `custom_attribute` or an `errors` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [BulkUpsertBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/bulk-upsert-booking-custom-attributes) response,\nwhich contains a map of responses that each corresponds to an individual upsert request.", "x-release-status": "PUBLIC", "example": { "values": { "id2": { "booking_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM", "custom_attribute": { "key": "hasShoes", "version": 2, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2022-11-16T00:16:23Z", "value": false, "created_at": "2022-11-16T00:16:20Z" }, "errors": [] }, "id1": { "booking_id": "N3NCVYY3WS27HF0HKANA3R9FP8", "custom_attribute": { "key": "favoriteShampoo", "version": 1, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2022-11-16T00:16:23Z", "value": "Spring Fresh", "created_at": "2022-11-16T23:14:47Z" }, "errors": [] }, "id3": { "booking_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM", "custom_attribute": { "key": "favoriteShampoo", "version": 2, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2022-11-16T00:16:23Z", "value": "Hydro-Cool", "created_at": "2022-11-16T00:16:20Z" }, "errors": [] }, "id4": { "booking_id": "N3NCVYY3WS27HF0HKANA3R9FP8", "custom_attribute": { "key": "partySize", "version": 1, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2022-11-16T00:16:23Z", "value": 4, "created_at": "2022-11-16T23:14:47Z" }, "errors": [] }, "id5": { "booking_id": "70548QG1HN43B05G0KCZ4MMC1G", "custom_attribute": { "key": "celebrating", "version": 2, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2022-11-16T00:16:23Z", "value": "birthday", "created_at": "2022-11-16T00:16:20Z" }, "errors": [] } }, "errors": [] } }, "BulkUpsertCustomerCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CustomerCustomAttributeUpsertRequest" }, "description": "A map containing 1 to 25 individual upsert requests. For each request, provide an\narbitrary ID that is unique for this `BulkUpsertCustomerCustomAttributes` request and the\ninformation needed to create or update a custom attribute." } }, "description": "Represents a [BulkUpsertCustomerCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/bulk-upsert-customer-custom-attributes) request.", "x-release-status": "PUBLIC", "example": { "request_body": { "values": { "id1": { "custom_attribute": { "key": "favoritemovie", "value": "Dune" }, "customer_id": "N3NCVYY3WS27HF0HKANA3R9FP8" }, "id2": { "custom_attribute": { "key": "ownsmovie", "value": false }, "customer_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM" }, "id3": { "custom_attribute": { "key": "favoritemovie", "value": "Star Wars" }, "customer_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM" }, "id4": { "custom_attribute": { "key": "square:a0f1505a-2aa1-490d-91a8-8d31ff181808", "value": "10.5" }, "customer_id": "N3NCVYY3WS27HF0HKANA3R9FP8" }, "id5": { "custom_attribute": { "key": "sq0ids-0evKIskIGaY45fCyNL66aw:backupemail", "value": "fake-email@squareup.com" }, "customer_id": "70548QG1HN43B05G0KCZ4MMC1G" } } } } }, "BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest": { "type": "object", "required": [ "customer_id", "custom_attribute" ], "properties": { "customer_id": { "minLength": 1, "type": "string", "description": "The ID of the target [customer profile](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer)." }, "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with following fields:\n\n- `key`. This key must match the `key` of a custom attribute definition in the Square seller \naccount. If the requesting application is not the definition owner, you must provide the qualified key.\n\n- `value`. This value must conform to the `schema` specified by the definition. \nFor more information, see [Value data types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types).\n\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol for update operations, include this optional field in the request and set the\nvalue to the current version of the custom attribute." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this individual upsert request, used to ensure idempotency.\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an individual upsert request in a [BulkUpsertCustomerCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/bulk-upsert-customer-custom-attributes)\nrequest. An individual request contains a customer ID, the custom attribute to create or update,\nand an optional idempotency key.", "x-release-status": "PUBLIC" }, "BulkUpsertCustomerCustomAttributesResponse": { "type": "object", "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CustomerCustomAttributeUpsertResponse" }, "description": "A map of responses that correspond to individual upsert requests. Each response has the\nsame ID as the corresponding request and contains either a `customer_id` and `custom_attribute` or an `errors` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [BulkUpsertCustomerCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/bulk-upsert-customer-custom-attributes) response,\nwhich contains a map of responses that each corresponds to an individual upsert request.", "x-release-status": "PUBLIC", "example": { "values": { "id2": { "customer_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM", "custom_attribute": { "key": "ownsmovie", "version": 2, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2021-12-09T00:16:23Z", "value": false, "created_at": "2021-12-09T00:16:20Z" } }, "id1": { "customer_id": "N3NCVYY3WS27HF0HKANA3R9FP8", "custom_attribute": { "key": "favoritemovie", "version": 1, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2021-12-09T00:16:23Z", "value": "Dune", "created_at": "2021-12-08T23:14:47Z" } }, "id3": { "customer_id": "SY8EMWRNDN3TQDP2H4KS1QWMMM", "custom_attribute": { "key": "favoritemovie", "version": 2, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2021-12-09T00:16:23Z", "value": "Star Wars", "created_at": "2021-12-09T00:16:20Z" } }, "id4": { "customer_id": "N3NCVYY3WS27HF0HKANA3R9FP8", "custom_attribute": { "key": "square:a0f1505a-2aa1-490d-91a8-8d31ff181808", "version": 1, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2021-12-09T00:16:23Z", "value": "10.5", "created_at": "2021-12-08T23:14:47Z" } }, "id5": { "customer_id": "70548QG1HN43B05G0KCZ4MMC1G", "custom_attribute": { "key": "sq0ids-0evKIskIGaY45fCyNL66aw:backupemail", "version": 2, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2021-12-09T00:16:23Z", "value": "fake-email@squareup.com", "created_at": "2021-12-09T00:16:20Z" } } } } }, "BulkUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse": { "type": "object", "properties": { "customer_id": { "type": "string", "description": "The ID of the customer profile associated with the custom attribute." }, "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The new or updated custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred while processing the individual request." } }, "description": "Represents a response for an individual upsert request in a [BulkUpsertCustomerCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/bulk-upsert-customer-custom-attributes) operation.", "x-release-status": "PUBLIC", "example": { "customer_id": "N3NCVYY3WS27HF0HKANA3R9FP8", "custom_attribute": { "key": "favoritemovie", "version": 1, "visibility": "VISIBILITY_READ_WRITE_VALUES", "updated_at": "2021-12-09T00:16:23Z", "value": "Dune", "created_at": "2021-12-08T23:14:47Z" } } }, "BulkUpsertLocationCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/LocationCustomAttributeUpsertRequest" }, "description": "A map containing 1 to 25 individual upsert requests. For each request, provide an\narbitrary ID that is unique for this `BulkUpsertLocationCustomAttributes` request and the\ninformation needed to create or update a custom attribute." } }, "description": "Represents a [BulkUpsertLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-upsert-location-custom-attributes) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "values": { "id1": { "custom_attribute": { "key": "bestseller", "value": "hot cocoa" }, "location_id": "L0TBCBTB7P8RQ" }, "id2": { "custom_attribute": { "key": "bestseller", "value": "berry smoothie" }, "location_id": "L9XMD04V3STJX" }, "id3": { "custom_attribute": { "key": "phone-number", "value": "+12223334444" }, "location_id": "L0TBCBTB7P8RQ" } } } } }, "BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest": { "type": "object", "required": [ "location_id", "custom_attribute" ], "properties": { "location_id": { "minLength": 1, "type": "string", "description": "The ID of the target [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location)." }, "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with following fields:\n- `key`. This key must match the `key` of a custom attribute definition in the Square seller\naccount. If the requesting application is not the definition owner, you must provide the qualified key.\n- `value`. This value must conform to the `schema` specified by the definition.\nFor more information, see [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types)..\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, specify the current version of the custom attribute. \nIf this is not important for your application, `version` can be set to -1." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this individual upsert request, used to ensure idempotency.\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an individual upsert request in a [BulkUpsertLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-upsert-location-custom-attributes)\nrequest. An individual request contains a location ID, the custom attribute to create or update,\nand an optional idempotency key.", "x-release-status": "BETA", "x-is-beta": true }, "BulkUpsertLocationCustomAttributesResponse": { "type": "object", "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/LocationCustomAttributeUpsertResponse" }, "description": "A map of responses that correspond to individual upsert requests. Each response has the\nsame ID as the corresponding request and contains either a `location_id` and `custom_attribute` or an `errors` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [BulkUpsertLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-upsert-location-custom-attributes) response,\nwhich contains a map of responses that each corresponds to an individual upsert request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "values": { "id1": { "location_id": "L0TBCBTB7P8RQ", "custom_attribute": { "key": "bestseller", "version": 2, "updated_at": "2023-01-09T19:21:04.551Z", "value": "hot cocoa", "created_at": "2023-01-09T19:02:58.647Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } }, "id2": { "location_id": "L9XMD04V3STJX", "custom_attribute": { "key": "bestseller", "version": 1, "updated_at": "2023-01-09T19:21:04.551Z", "value": "berry smoothie", "created_at": "2023-01-09T19:02:58.647Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } }, "id3": { "location_id": "L0TBCBTB7P8RQ", "custom_attribute": { "key": "phone-number", "version": 2, "updated_at": "2023-01-09T19:21:04.563Z", "value": "+12239903892", "created_at": "2023-01-09T19:04:57.985Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } } } }, "BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse": { "type": "object", "properties": { "location_id": { "type": "string", "description": "The ID of the location associated with the custom attribute." }, "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The new or updated custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred while processing the individual request." } }, "description": "Represents a response for an individual upsert request in a [BulkUpsertLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/bulk-upsert-location-custom-attributes) operation.", "x-release-status": "BETA", "x-is-beta": true, "example": { "location_id": "L0TBCBTB7P8RQ", "custom_attribute": { "key": "bestseller", "version": 2, "updated_at": "2023-01-09T19:21:04.551Z", "value": "hot cocoa", "created_at": "2023-01-09T19:02:58.647Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "BulkUpsertMerchantCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/MerchantCustomAttributeUpsertRequest" }, "description": "A map containing 1 to 25 individual upsert requests. For each request, provide an\narbitrary ID that is unique for this `BulkUpsertMerchantCustomAttributes` request and the\ninformation needed to create or update a custom attribute." } }, "description": "Represents a [BulkUpsertMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-upsert-merchant-custom-attributes) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "values": { "id1": { "custom_attribute": { "key": "alternative_seller_name", "value": "Ultimate Sneaker Store" }, "merchant_id": "DM7VKY8Q63GNP" }, "id2": { "custom_attribute": { "key": "has_seen_tutorial", "value": true }, "merchant_id": "DM7VKY8Q63GNP" } } } } }, "BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest": { "type": "object", "required": [ "merchant_id", "custom_attribute" ], "properties": { "merchant_id": { "minLength": 1, "type": "string", "description": "The ID of the target [merchant](https://developer.squareup.com/reference/square_2024-04-17/objects/Merchant)." }, "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with following fields:\n- `key`. This key must match the `key` of a custom attribute definition in the Square seller\naccount. If the requesting application is not the definition owner, you must provide the qualified key.\n- `value`. This value must conform to the `schema` specified by the definition.\nFor more information, see [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).\n- The version field must match the current version of the custom attribute definition to enable\n[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\nIf this is not important for your application, version can be set to -1. For any other values, the request fails with a BAD_REQUEST error." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this individual upsert request, used to ensure idempotency.\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an individual upsert request in a [BulkUpsertMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-upsert-merchant-custom-attributes)\nrequest. An individual request contains a merchant ID, the custom attribute to create or update,\nand an optional idempotency key.", "x-release-status": "BETA", "x-is-beta": true }, "BulkUpsertMerchantCustomAttributesResponse": { "type": "object", "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/MerchantCustomAttributeUpsertResponse" }, "description": "A map of responses that correspond to individual upsert requests. Each response has the\nsame ID as the corresponding request and contains either a `merchant_id` and `custom_attribute` or an `errors` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [BulkUpsertMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-upsert-merchant-custom-attributes) response,\nwhich contains a map of responses that each corresponds to an individual upsert request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "values": { "id1": { "merchant_id": "DM7VKY8Q63GNP", "custom_attribute": { "key": "alternative_seller_name", "version": 2, "updated_at": "2023-05-06T19:21:04.551Z", "value": "Ultimate Sneaker Store", "created_at": "2023-05-06T19:02:58.647Z", "visibility": "VISIBILITY_READ_ONLY" } }, "id2": { "merchant_id": "DM7VKY8Q63GNP", "custom_attribute": { "key": "has_seen_tutorial", "version": 1, "updated_at": "2023-05-06T19:21:04.551Z", "value": true, "created_at": "2023-05-06T19:02:58.647Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } } } }, "BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse": { "type": "object", "properties": { "merchant_id": { "type": "string", "description": "The ID of the merchant associated with the custom attribute." }, "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The new or updated custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred while processing the individual request." } }, "description": "Represents a response for an individual upsert request in a [BulkUpsertMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/bulk-upsert-merchant-custom-attributes) operation.", "x-release-status": "BETA", "x-is-beta": true, "example": { "merchant_id": "DM7VKY8Q63GNP", "custom_attribute": { "key": "alternative_seller_name", "version": 2, "updated_at": "2023-05-06T19:21:04.551Z", "value": "Ultimate Sneaker Store", "created_at": "2023-05-06T19:02:58.647Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "BulkUpsertOrderCustomAttributesRequest": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/UpsertCustomAttribute" }, "description": "A map of requests that correspond to individual upsert operations for custom attributes." } }, "description": "Represents a bulk upsert request for one or more order custom attributes.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "values": { "table-number": { "order_id": "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", "custom_attribute": { "key": "table-number", "value": "11", "version": 4 } }, "cover-count": { "order_id": "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", "custom_attribute": { "key": "cover-count", "value": "6", "version": 2 } } } } } }, "BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute": { "type": "object", "required": [ "custom_attribute", "order_id" ], "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with the following fields:\n\n- `value`. This value must conform to the `schema` specified by the definition. \nFor more information, see [Value data types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types).\n\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include this optional field and specify the current version of the custom attribute." }, "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. \nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." }, "order_id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The ID of the target [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order)." } }, "description": "Represents one upsert within the bulk operation.", "x-release-status": "BETA", "x-is-beta": true }, "BulkUpsertOrderCustomAttributesResponse": { "type": "object", "required": [ "values" ], "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/UpsertOrderCustomAttributeResponse" }, "description": " A map of responses that correspond to individual upsert operations for custom attributes." } }, "description": "Represents a response from a bulk upsert of order custom attributes.", "x-release-status": "BETA", "x-is-beta": true, "example": { "values": { "table-number": { "custom_attribute": { "key": "table-number", "updated_at": "2022-11-22T21:28:35.726Z", "value": "11", "created_at": "2022-11-22T21:24:57.823Z", "visibility": "VISIBILITY_HIDDEN" } }, "cover-count": { "custom_attribute": { "key": "cover-count", "updated_at": "2022-11-22T21:28:35.721Z", "value": "6", "created_at": "2022-11-22T21:27:33.429Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } } } }, "BusinessAppointmentSettings": { "type": "object", "properties": { "location_types": { "type": "array", "items": { "type": "string" }, "description": "Types of the location allowed for bookings." }, "alignment_time": { "type": "string", "description": "The time unit of the service duration for bookings." }, "min_booking_lead_time_seconds": { "type": "integer", "description": "The minimum lead time in seconds before a service can be booked. A booking must be created at least this amount of time before its starting time." }, "max_booking_lead_time_seconds": { "type": "integer", "description": "The maximum lead time in seconds before a service can be booked. A booking must be created at most this amount of time before its starting time." }, "any_team_member_booking_enabled": { "type": "boolean", "description": "Indicates whether a customer can choose from all available time slots and have a staff member assigned\nautomatically (`true`) or not (`false`)." }, "multiple_service_booking_enabled": { "type": "boolean", "description": "Indicates whether a customer can book multiple services in a single online booking." }, "max_appointments_per_day_limit_type": { "type": "string", "description": "Indicates whether the daily appointment limit applies to team members or to\nbusiness locations." }, "max_appointments_per_day_limit": { "type": "integer", "description": "The maximum number of daily appointments per team member or per location." }, "cancellation_window_seconds": { "type": "integer", "description": "The cut-off time in seconds for allowing clients to cancel or reschedule an appointment." }, "cancellation_fee_money": { "$ref": "#/definitions/Money", "description": "The flat-fee amount charged for a no-show booking." }, "cancellation_policy": { "type": "string", "description": "The cancellation policy adopted by the seller." }, "cancellation_policy_text": { "minLength": 0, "maxLength": 65536, "type": "string", "description": "The free-form text of the seller\u0027s cancellation policy." }, "skip_booking_flow_staff_selection": { "type": "boolean", "description": "Indicates whether customers has an assigned staff member (`true`) or can select s staff member of their choice (`false`)." } }, "description": "The service appointment settings, including where and how the service is provided.", "x-release-status": "PUBLIC" }, "BusinessBookingProfile": { "type": "object", "properties": { "seller_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "The ID of the seller, obtainable using the Merchants API." }, "created_at": { "type": "string", "description": "The RFC 3339 timestamp specifying the booking\u0027s creation time.", "x-read-only": true }, "booking_enabled": { "type": "boolean", "description": "Indicates whether the seller is open for booking." }, "customer_timezone_choice": { "type": "string", "description": "The choice of customer\u0027s time zone information of a booking.\nThe Square online booking site and all notifications to customers uses either the seller location’s time zone\nor the time zone the customer chooses at booking." }, "booking_policy": { "type": "string", "description": "The policy for the seller to automatically accept booking requests (`ACCEPT_ALL`) or not (`REQUIRES_ACCEPTANCE`)." }, "allow_user_cancel": { "type": "boolean", "description": "Indicates whether customers can cancel or reschedule their own bookings (`true`) or not (`false`)." }, "business_appointment_settings": { "$ref": "#/definitions/BusinessAppointmentSettings", "description": "Settings for appointment-type bookings." }, "support_seller_level_writes": { "type": "boolean", "description": "Indicates whether the seller\u0027s subscription to Square Appointments supports creating, updating or canceling an appointment through the API (`true`) or not (`false`) using seller permission." } }, "description": "A seller\u0027s business booking profile, including booking policy, appointment settings, etc.", "x-release-status": "PUBLIC" }, "BusinessHours": { "type": "object", "properties": { "periods": { "type": "array", "items": { "$ref": "#/definitions/BusinessHoursPeriod" }, "description": "The list of time periods during which the business is open. There can be at most 10 periods per day." } }, "description": "The hours of operation for a location.", "x-release-status": "PUBLIC" }, "BusinessHoursPeriod": { "type": "object", "properties": { "day_of_week": { "type": "string", "description": "The day of the week for this time period." }, "start_local_time": { "type": "string", "description": "The start time of a business hours period, specified in local time using partial-time\nRFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.\nNote that the seconds value is always :00, but it is appended for conformance to the RFC." }, "end_local_time": { "type": "string", "description": "The end time of a business hours period, specified in local time using partial-time\nRFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.\nNote that the seconds value is always :00, but it is appended for conformance to the RFC." } }, "description": "Represents a period of time during which a business location is open.", "x-release-status": "PUBLIC" }, "BuyNowPayLaterDetails": { "type": "object", "properties": { "brand": { "maxLength": 50, "type": "string", "description": "The brand used for the Buy Now Pay Later payment.\nThe brand can be `AFTERPAY`, `CLEARPAY` or `UNKNOWN`." }, "afterpay_details": { "$ref": "#/definitions/AfterpayDetails", "description": "Details about an Afterpay payment. These details are only populated if the `brand` is\n`AFTERPAY`." }, "clearpay_details": { "$ref": "#/definitions/ClearpayDetails", "description": "Details about a Clearpay payment. These details are only populated if the `brand` is\n`CLEARPAY`." } }, "description": "Additional details about a Buy Now Pay Later payment type.", "x-release-status": "PUBLIC" }, "CalculateLoyaltyPointsRequest": { "type": "object", "properties": { "order_id": { "type": "string", "description": "The [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) ID for which to calculate the points.\nSpecify this field if your application uses the Orders API to process orders.\nOtherwise, specify the `transaction_amount_money`." }, "transaction_amount_money": { "$ref": "#/definitions/Money", "description": "The purchase amount for which to calculate the points. \nSpecify this field if your application does not use the Orders API to process orders.\nOtherwise, specify the `order_id`." }, "loyalty_account_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The ID of the target [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount). Optionally specify this field\nif your application uses the Orders API to process orders.\n\nIf specified, the `promotion_points` field in the response shows the number of points the buyer would\nearn from the purchase. In this case, Square uses the account ID to determine whether the promotion\u0027s\n`trigger_limit` (the maximum number of times that a buyer can trigger the promotion) has been reached.\nIf not specified, the `promotion_points` field shows the number of points the purchase qualifies\nfor regardless of the trigger limit." } }, "description": "Represents a [CalculateLoyaltyPoints](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/calculate-loyalty-points) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?program_id\u003dd619f755-2d17-41f3-990d-c04ecedd64dd", "request_body": { "order_id": "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", "loyalty_account_id": "79b807d2-d786-46a9-933b-918028d7a8c5" } } }, "CalculateLoyaltyPointsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "points": { "minimum": 0, "type": "integer", "description": "The number of points that the buyer can earn from the base loyalty program." }, "promotion_points": { "minimum": 0, "type": "integer", "description": "The number of points that the buyer can earn from a loyalty promotion. To be eligible\nto earn promotion points, the purchase must first qualify for program points. When `order_id`\nis not provided in the request, this value is always 0." } }, "description": "Represents a [CalculateLoyaltyPoints](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/calculate-loyalty-points) response.", "x-release-status": "PUBLIC", "example": { "points": 6, "promotion_points": 12 } }, "CalculateOrderRequest": { "type": "object", "required": [ "order" ], "properties": { "order": { "$ref": "#/definitions/Order", "description": "The order to be calculated. Expects the entire order, not a sparse update." }, "proposed_rewards": { "type": "array", "items": { "$ref": "#/definitions/OrderReward" }, "description": "Identifies one or more loyalty reward tiers to apply during the order calculation.\nThe discounts defined by the reward tiers are added to the order only to preview the\neffect of applying the specified rewards. The rewards do not correspond to actual\nredemptions; that is, no `reward`s are created. Therefore, the reward `id`s are\nrandom strings used only to reference the reward tier." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "idempotency_key": "b3e98fe3-b8de-471c-82f1-545f371e637c", "order": { "location_id": "D7AVYMEAPJ3A3", "discounts": [ { "name": "50% Off", "percentage": "50", "scope": "ORDER" } ], "line_items": [ { "name": "Item 1", "quantity": "1", "base_price_money": { "amount": 500, "currency": "USD" } }, { "name": "Item 2", "quantity": "2", "base_price_money": { "amount": 300, "currency": "USD" } } ] } } } }, "CalculateOrderResponse": { "type": "object", "properties": { "order": { "$ref": "#/definitions/Order", "description": "The calculated version of the order provided in the request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "order": { "location_id": "D7AVYMEAPJ3A3", "line_items": [ { "uid": "ULkg0tQTRK2bkU9fNv3IJD", "quantity": "1", "name": "Item 1", "base_price_money": { "amount": 500, "currency": "USD" }, "gross_sales_money": { "amount": 500, "currency": "USD" }, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 250, "currency": "USD" }, "total_money": { "amount": 250, "currency": "USD" }, "variation_total_price_money": { "amount": 500, "currency": "USD" }, "applied_discounts": [ { "uid": "9zr9S4dxvPAixvn0lpa1VC", "discount_uid": "zGsRZP69aqSSR9lq9euSPB", "applied_money": { "amount": 250, "currency": "USD" } } ] }, { "uid": "mumY8Nun4BC5aKe2yyx5a", "quantity": "2", "name": "Item 2", "base_price_money": { "amount": 300, "currency": "USD" }, "gross_sales_money": { "amount": 600, "currency": "USD" }, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 300, "currency": "USD" }, "total_money": { "amount": 300, "currency": "USD" }, "variation_total_price_money": { "amount": 600, "currency": "USD" }, "applied_discounts": [ { "uid": "qa8LwwZK82FgSEkQc2HYVC", "discount_uid": "zGsRZP69aqSSR9lq9euSPB", "applied_money": { "amount": 300, "currency": "USD" } } ] } ], "discounts": [ { "uid": "zGsRZP69aqSSR9lq9euSPB", "name": "50% Off", "percentage": "50", "applied_money": { "amount": 550, "currency": "USD" }, "type": "FIXED_PERCENTAGE", "scope": "ORDER" } ], "created_at": "2020-05-18T16:30:49.614Z", "updated_at": "2020-05-18T16:30:49.614Z", "state": "OPEN", "version": 1, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 550, "currency": "USD" }, "total_tip_money": { "amount": 0, "currency": "USD" }, "total_money": { "amount": 550, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "net_amounts": { "total_money": { "amount": 550, "currency": "USD" }, "tax_money": { "amount": 0, "currency": "USD" }, "discount_money": { "amount": 550, "currency": "USD" }, "tip_money": { "amount": 0, "currency": "USD" }, "service_charge_money": { "amount": 0, "currency": "USD" } } } } }, "CancelBookingRequest": { "type": "object", "properties": { "idempotency_key": { "minLength": 0, "maxLength": 255, "type": "string", "description": "A unique key to make this request an idempotent operation." }, "booking_version": { "minimum": 0, "type": "integer", "description": "The revision number for the booking used for optimistic concurrency." } }, "description": "", "x-release-status": "PUBLIC", "example": { "booking_version": 1 } }, "CancelBookingResponse": { "type": "object", "properties": { "booking": { "$ref": "#/definitions/Booking", "description": "The booking that was cancelled." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "booking": { "id": "zkras0xv0xwswx", "version": 1, "status": "CANCELLED_BY_CUSTOMER", "created_at": "2020-10-28T15:47:41Z", "updated_at": "2020-10-28T15:49:25Z", "location_id": "LEQHH0YY8B42M", "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M", "customer_note": "", "seller_note": "", "start_at": "2020-11-26T13:00:00Z", "appointment_segments": [ { "duration_minutes": 60, "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_version": 1599775456731 } ] }, "errors": [] } }, "CancelInvoiceRequest": { "type": "object", "required": [ "version" ], "properties": { "version": { "type": "integer", "description": "The version of the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) to cancel.\nIf you do not know the version, you can call \n[GetInvoice](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/get-invoice) or [ListInvoices](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/list-invoices)." } }, "description": "Describes a `CancelInvoice` request.", "x-release-status": "PUBLIC", "example": { "request_body": { "version": 0 } } }, "CancelInvoiceResponse": { "type": "object", "properties": { "invoice": { "$ref": "#/definitions/Invoice", "description": "The canceled invoice." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "The response returned by the `CancelInvoice` request.", "x-release-status": "PUBLIC", "example": { "invoice": { "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "version": 1, "location_id": "ES0RJRZYEC39A", "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "payment_requests": [ { "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355", "request_type": "BALANCE", "due_date": "2030-01-24", "tipping_enabled": true, "reminders": [ { "uid": "beebd363-e47f-4075-8785-c235aaa7df11", "relative_scheduled_days": -1, "message": "Your invoice is due tomorrow", "status": "PENDING" } ], "computed_amount_money": { "amount": 10000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "NONE" } ], "invoice_number": "inv-100", "title": "Event Planning Services", "description": "We appreciate your business!", "scheduled_at": "2030-01-13T10:00:00Z", "status": "CANCELED", "timezone": "America/Los_Angeles", "created_at": "2020-06-18T17:45:13Z", "updated_at": "2020-06-18T18:23:11Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "accepted_payment_methods": { "card": true, "square_gift_card": false, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "custom_fields": [ { "label": "Event Reference Number", "value": "Ref. #1234", "placement": "ABOVE_LINE_ITEMS" }, { "label": "Terms of Service", "value": "The terms of service are...", "placement": "BELOW_LINE_ITEMS" } ], "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false } } }, "CancelLoyaltyPromotionRequest": { "type": "object", "properties": {}, "description": "Represents a [CancelLoyaltyPromotion](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/cancel-loyalty-promotion) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?program_id\u003dd619f755-2d17-41f3-990d-c04ecedd64dd\u0026promotion_id\u003dloypromo_f0f9b849-725e-378d-b810-511237e07b67", "request_body": {} } }, "CancelLoyaltyPromotionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "loyalty_promotion": { "$ref": "#/definitions/LoyaltyPromotion", "description": "The canceled loyalty promotion." } }, "description": "Represents a [CancelLoyaltyPromotion](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/cancel-loyalty-promotion) response.\nEither `loyalty_promotion` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "loyalty_promotion": { "id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67", "name": "Tuesday Happy Hour Promo", "incentive": { "type": "POINTS_MULTIPLIER", "points_multiplier_data": { "multiplier": "3.000", "points_multiplier": 3 } }, "available_time": { "start_date": "2022-08-16", "time_periods": [ "BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ\u003dWEEKLY;BYDAY\u003dTU\nEND:VEVENT" ] }, "trigger_limit": { "times": 1, "interval": "DAY" }, "minimum_spend_amount_money": { "currency": "USD", "amount": 2000 }, "qualifying_category_ids": [ "XTQPYLR3IIU9C44VRCB3XD12" ], "status": "CANCELED", "created_at": "2022-08-16T08:38:54Z", "canceled_at": "2022-08-17T12:42:49Z", "updated_at": "2022-08-17T12:42:49Z", "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd" } } }, "CancelPaymentByIdempotencyKeyRequest": { "type": "object", "required": [ "idempotency_key" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "The `idempotency_key` identifying the payment to be canceled." } }, "description": "Describes a request to cancel a payment using \n[CancelPaymentByIdempotencyKey](https://developer.squareup.com/reference/square_2024-04-17/payments-api/cancel-payment-by-idempotency-key).", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "a7e36d40-d24b-11e8-b568-0800200c9a66" } } }, "CancelPaymentByIdempotencyKeyResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the response returned by \n[CancelPaymentByIdempotencyKey](https://developer.squareup.com/reference/square_2024-04-17/payments-api/cancel-payment-by-idempotency-key).\nOn success, `errors` is empty.", "x-release-status": "PUBLIC", "example": {} }, "CancelPaymentRequest": { "type": "object", "properties": {}, "description": "Describes the request to cancel (void) a payment using\n[CancelPayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/cancel-payment).\nYou can only cancel a payment that is approved (not completed).\nFor more information, see\n[Delayed capture of a payment](https://developer.squareup.com/docs/payments-api/take-payments/card-payments#delayed-capture-of-a-card-payment).", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "CancelPaymentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "payment": { "$ref": "#/definitions/Payment", "description": "The successfully canceled `Payment` object." } }, "description": "Defines the response returned by [CancelPayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/cancel-payment).", "x-release-status": "PUBLIC", "example": { "payment": { "id": "1QjqpBVyrI9S4H9sTGDWU9JeiWdZY", "created_at": "2021-10-13T20:26:44.191Z", "updated_at": "2021-10-13T20:31:21.597Z", "amount_money": { "amount": 1000, "currency": "USD" }, "tip_money": { "amount": 100, "currency": "USD" }, "status": "CANCELED", "delay_duration": "PT168H", "source_type": "CARD", "card_details": { "status": "VOIDED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 11, "exp_year": 2022, "fingerprint": "sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "entry_method": "ON_FILE", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "auth_result_code": "68aLBM", "statement_description": "SQ *EXAMPLE TEST GOSQ.C", "card_payment_timeline": { "authorized_at": "2021-10-13T20:26:44.364Z", "voided_at": "2021-10-13T20:31:21.597Z" } }, "location_id": "L88917AVBK2S5", "order_id": "nUSN9TdxpiK3SrQg3wzmf6r8LP9YY", "risk_evaluation": { "created_at": "2021-10-13T20:26:45.271Z", "risk_level": "NORMAL" }, "note": "Example Note", "customer_id": "W92WH6P11H4Z77CTET0RNTGFW8", "total_money": { "amount": 1100, "currency": "USD" }, "approved_money": { "amount": 1000, "currency": "USD" }, "delay_action": "CANCEL", "delayed_until": "2021-10-20T20:26:44.191Z", "application_details": { "square_product": "ECOMMERCE_API", "application_id": "sq0ids-TcgftTEtKxJTRF1lCFJ9TA" }, "version_token": "N8AGYgEjCiY9Q57Jw7aVHEpBq8bzGCDCQMRX8Vs56N06o" } } }, "CancelSubscriptionRequest": { "type": "object", "properties": {}, "description": "Defines input parameters in a request to the \n[CancelSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/cancel-subscription) endpoint.", "x-release-status": "PUBLIC" }, "CancelSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The specified subscription scheduled for cancellation according to the action created by the request." }, "actions": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionAction" }, "description": "A list of a single `CANCEL` action scheduled for the subscription.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Defines output parameters in a response from the \n[CancelSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/cancel-subscription) endpoint.", "x-release-status": "PUBLIC", "example": { "subscription": { "id": "910afd30-464a-4e00-a8d8-2296e", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "card_id": "ccof:qy5x8hHGYsgLrp4Q4GB", "start_date": "2022-01-19", "canceled_date": "2023-06-05", "paid_until_date": "2023-12-31", "status": "ACTIVE", "invoice_ids": [ "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA" ], "created_at": "2022-01-19T21:53:10Z", "version": 3, "timezone": "America/Los_Angeles", "source": { "name": "My Application" } } } }, "CancelTerminalActionRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": {} } }, "CancelTerminalActionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "action": { "$ref": "#/definitions/TerminalAction", "description": "The canceled `TerminalAction`" } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "action": { "id": "termapia:jveJIAkkAjILHkdCE", "device_id": "DEVICE_ID", "deadline_duration": "PT5M", "created_at": "2021-07-28T23:22:07.476Z", "updated_at": "2021-07-28T23:22:29.511Z", "status": "CANCELED", "cancel_reason": "SELLER_CANCELED", "location_id": "LOCATION_ID", "type": "SAVE_CARD", "app_id": "APP_ID", "save_card_options": { "customer_id": "CUSTOMER_ID", "reference_id": "user-id-1" } } } }, "CancelTerminalCheckoutRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "CancelTerminalCheckoutResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "checkout": { "$ref": "#/definitions/TerminalCheckout", "description": "The canceled `TerminalCheckout`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "checkout": { "id": "S1yDlPQx7slqO", "amount_money": { "amount": 123, "currency": "USD" }, "reference_id": "id36815", "device_options": { "device_id": "dbb5d83a-7838-11ea-bc55-0242ac130003", "tip_settings": { "allow_tipping": true }, "skip_receipt_screen": true }, "location_id": "LOCATION_ID", "status": "CANCELED", "cancel_reason": "SELLER_CANCELED", "created_at": "2020-03-16T15:31:19.934Z", "updated_at": "2020-03-16T15:31:45.787Z", "app_id": "APP_ID", "deadline_duration": "PT5M" } } }, "CancelTerminalRefundRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "CancelTerminalRefundResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "refund": { "$ref": "#/definitions/TerminalRefund", "description": "The updated `TerminalRefund`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "refund": { "id": "g6ycb6HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY", "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY", "amount_money": { "amount": 100, "currency": "CAD" }, "reason": "reason", "device_id": "42690809-faa2-4701-a24b-19d3d34c9aaa", "deadline_duration": "PT5M", "status": "CANCELED", "cancel_reason": "SELLER_CANCELED", "created_at": "2020-10-21T22:47:23.241Z", "updated_at": "2020-10-21T22:47:30.096Z", "app_id": "sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ", "card": { "card_brand": "INTERAC", "last_4": "1111", "exp_month": 1, "exp_year": 2022, "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw", "card_type": "CREDIT", "bin": "411111" }, "order_id": "kcuKDKreRaI4gF4TjmEgZjHk8Z7YY", "location_id": "76C9W6K8CNNQ5" } } }, "CaptureTransactionRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.python", "csharp": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.csharp", "java": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.java", "php": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.php", "javascript": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.javascript", "ruby": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.ruby" } }, "CaptureTransactionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [CaptureTransaction](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/capture-transaction) endpoint.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CaptureTransaction/CaptureTransactionResponse.python", "csharp": "/sdk_samples/CaptureTransaction/CaptureTransactionResponse.csharp", "java": "/sdk_samples/CaptureTransaction/CaptureTransactionResponse.java", "php": "/sdk_samples/CaptureTransaction/CaptureTransactionResponse.php", "javascript": "/sdk_samples/CaptureTransaction/CaptureTransactionResponse.javascript", "ruby": "/sdk_samples/CaptureTransaction/CaptureTransactionResponse.ruby" } }, "Card": { "type": "object", "properties": { "id": { "maxLength": 64, "type": "string", "description": "Unique ID for this card. Generated by Square.", "x-read-only": true }, "card_brand": { "type": "string", "description": "The card\u0027s brand.", "x-read-only": true }, "last_4": { "maxLength": 4, "type": "string", "description": "The last 4 digits of the card number.", "x-read-only": true }, "exp_month": { "type": "integer", "format": "int64", "description": "The expiration month of the associated card as an integer between 1 and 12." }, "exp_year": { "type": "integer", "format": "int64", "description": "The four-digit year of the card\u0027s expiration date." }, "cardholder_name": { "maxLength": 96, "type": "string", "description": "The name of the cardholder." }, "billing_address": { "$ref": "#/definitions/Address", "description": "The billing address for this card." }, "fingerprint": { "maxLength": 255, "type": "string", "description": "Intended as a Square-assigned identifier, based\non the card number, to identify the card across multiple locations within a\nsingle application.", "x-read-only": true }, "customer_id": { "type": "string", "description": "**Required** The ID of a customer created using the Customers API to be associated with the card." }, "merchant_id": { "type": "string", "description": "The ID of the merchant associated with the card.", "x-read-only": true }, "reference_id": { "maxLength": 128, "type": "string", "description": "An optional user-defined reference ID that associates this card with\nanother entity in an external system. For example, a customer ID from an\nexternal customer management system." }, "enabled": { "type": "boolean", "description": "Indicates whether or not a card can be used for payments.", "x-read-only": true }, "card_type": { "type": "string", "description": "The type of the card.\nThe Card object includes this field only in response to Payments API calls.", "x-read-only": true }, "prepaid_type": { "type": "string", "description": "Indicates whether the Card is prepaid or not.\nThe Card object includes this field only in response to Payments API calls.", "x-read-only": true }, "bin": { "maxLength": 6, "type": "string", "description": "The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API\nreturns this field.", "x-read-only": true }, "version": { "type": "integer", "format": "int64", "description": "Current version number of the card. Increments with each card update. Requests to update an\nexisting Card object will be rejected unless the version in the request matches the current\nversion for the Card." }, "card_co_brand": { "type": "string", "description": "The card\u0027s co-brand if available. For example, an Afterpay virtual card would have a\nco-brand of AFTERPAY.", "x-read-only": true } }, "description": "Represents the payment details of a card to be used for payments. These\ndetails are determined by the payment token generated by Web Payments SDK.", "x-release-status": "PUBLIC" }, "CardPaymentDetails": { "type": "object", "properties": { "status": { "maxLength": 50, "type": "string", "description": "The card payment\u0027s current state. The state can be AUTHORIZED, CAPTURED, VOIDED, or\nFAILED." }, "card": { "$ref": "#/definitions/Card", "description": "The credit card\u0027s non-confidential details." }, "entry_method": { "maxLength": 50, "type": "string", "description": "The method used to enter the card\u0027s details for the payment. The method can be\n`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`." }, "cvv_status": { "maxLength": 50, "type": "string", "description": "The status code returned from the Card Verification Value (CVV) check. The code can be\n`CVV_ACCEPTED`, `CVV_REJECTED`, or `CVV_NOT_CHECKED`." }, "avs_status": { "maxLength": 50, "type": "string", "description": "The status code returned from the Address Verification System (AVS) check. The code can be\n`AVS_ACCEPTED`, `AVS_REJECTED`, or `AVS_NOT_CHECKED`." }, "auth_result_code": { "maxLength": 10, "type": "string", "description": "The status code returned by the card issuer that describes the payment\u0027s\nauthorization status." }, "application_identifier": { "maxLength": 32, "type": "string", "description": "For EMV payments, the application ID identifies the EMV application used for the payment." }, "application_name": { "maxLength": 16, "type": "string", "description": "For EMV payments, the human-readable name of the EMV application used for the payment." }, "application_cryptogram": { "maxLength": 16, "type": "string", "description": "For EMV payments, the cryptogram generated for the payment." }, "verification_method": { "maxLength": 50, "type": "string", "description": "For EMV payments, the method used to verify the cardholder\u0027s identity. The method can be\n`PIN`, `SIGNATURE`, `PIN_AND_SIGNATURE`, `ON_DEVICE`, or `NONE`." }, "verification_results": { "maxLength": 50, "type": "string", "description": "For EMV payments, the results of the cardholder verification. The result can be\n`SUCCESS`, `FAILURE`, or `UNKNOWN`." }, "statement_description": { "maxLength": 50, "type": "string", "description": "The statement description sent to the card networks.\n\nNote: The actual statement description varies and is likely to be truncated and appended with\nadditional information on a per issuer basis." }, "device_details": { "$ref": "#/definitions/DeviceDetails", "description": "__Deprecated__: Use `Payment.device_details` instead.\n\nDetails about the device that took the payment.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "card_payment_timeline": { "$ref": "#/definitions/CardPaymentTimeline", "description": "The timeline for card payments." }, "refund_requires_card_presence": { "type": "boolean", "description": "Whether the card must be physically present for the payment to\nbe refunded. If set to `true`, the card must be present.", "x-release-status": "BETA", "x-is-beta": true }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Reflects the current status of a card payment. Contains only non-confidential information.", "x-release-status": "PUBLIC" }, "CardPaymentTimeline": { "type": "object", "properties": { "authorized_at": { "type": "string", "description": "The timestamp when the payment was authorized, in RFC 3339 format." }, "captured_at": { "type": "string", "description": "The timestamp when the payment was captured, in RFC 3339 format." }, "voided_at": { "type": "string", "description": "The timestamp when the payment was voided, in RFC 3339 format." } }, "description": "The timeline for card payments.", "x-release-status": "PUBLIC" }, "CashAppDetails": { "type": "object", "properties": { "buyer_full_name": { "maxLength": 255, "type": "string", "description": "The name of the Cash App account holder." }, "buyer_country_code": { "minLength": 2, "maxLength": 2, "type": "string", "description": "The country of the Cash App account holder, in ISO 3166-1-alpha-2 format.\n\nFor possible values, see [Country](https://developer.squareup.com/reference/square_2024-04-17/enums/Country)." }, "buyer_cashtag": { "minLength": 1, "maxLength": 21, "type": "string", "description": "$Cashtag of the Cash App account holder.", "x-read-only": true } }, "description": "Additional details about `WALLET` type payments with the `brand` of `CASH_APP`.", "x-release-status": "PUBLIC" }, "CashDrawerDevice": { "type": "object", "properties": { "id": { "type": "string", "description": "The device Square-issued ID" }, "name": { "type": "string", "description": "The device merchant-specified name." } }, "description": "", "x-release-status": "PUBLIC" }, "CashDrawerShift": { "type": "object", "properties": { "id": { "type": "string", "description": "The shift unique ID." }, "state": { "type": "string", "description": "The shift current state." }, "opened_at": { "type": "string", "description": "The time when the shift began, in ISO 8601 format." }, "ended_at": { "type": "string", "description": "The time when the shift ended, in ISO 8601 format." }, "closed_at": { "type": "string", "description": "The time when the shift was closed, in ISO 8601 format." }, "description": { "type": "string", "description": "The free-form text description of a cash drawer by an employee." }, "opened_cash_money": { "$ref": "#/definitions/Money", "description": "The amount of money in the cash drawer at the start of the shift.\nThe amount must be greater than or equal to zero." }, "cash_payment_money": { "$ref": "#/definitions/Money", "description": "The amount of money added to the cash drawer from cash payments.\nThis is computed by summing all events with the types CASH_TENDER_PAYMENT and\nCASH_TENDER_CANCELED_PAYMENT. The amount is always greater than or equal to\nzero." }, "cash_refunds_money": { "$ref": "#/definitions/Money", "description": "The amount of money removed from the cash drawer from cash refunds.\nIt is computed by summing the events of type CASH_TENDER_REFUND. The amount\nis always greater than or equal to zero." }, "cash_paid_in_money": { "$ref": "#/definitions/Money", "description": "The amount of money added to the cash drawer for reasons other than cash\npayments. It is computed by summing the events of type PAID_IN. The amount is\nalways greater than or equal to zero." }, "cash_paid_out_money": { "$ref": "#/definitions/Money", "description": "The amount of money removed from the cash drawer for reasons other than\ncash refunds. It is computed by summing the events of type PAID_OUT. The amount\nis always greater than or equal to zero." }, "expected_cash_money": { "$ref": "#/definitions/Money", "description": "The amount of money that should be in the cash drawer at the end of the\nshift, based on the shift\u0027s other money amounts.\nThis can be negative if employees have not correctly recorded all the events\non the cash drawer.\ncash_paid_out_money is a summation of amounts from cash_payment_money (zero\nor positive), cash_refunds_money (zero or negative), cash_paid_in_money (zero\nor positive), and cash_paid_out_money (zero or negative) event types." }, "closed_cash_money": { "$ref": "#/definitions/Money", "description": "The amount of money found in the cash drawer at the end of the shift\nby an auditing employee. The amount should be positive." }, "device": { "$ref": "#/definitions/CashDrawerDevice", "description": "The device running Square Point of Sale that was connected to the cash drawer." }, "created_at": { "type": "string", "description": "The shift start time in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The shift updated at time in RFC 3339 format.", "x-read-only": true }, "location_id": { "type": "string", "description": "The ID of the location the cash drawer shift belongs to.", "x-read-only": true }, "team_member_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of all team members that were logged into Square Point of Sale at any\npoint while the cash drawer shift was open.", "x-read-only": true }, "opening_team_member_id": { "type": "string", "description": "The ID of the team member that started the cash drawer shift.", "x-read-only": true }, "ending_team_member_id": { "type": "string", "description": "The ID of the team member that ended the cash drawer shift.", "x-read-only": true }, "closing_team_member_id": { "type": "string", "description": "The ID of the team member that closed the cash drawer shift by auditing\nthe cash drawer contents.", "x-read-only": true } }, "description": "This model gives the details of a cash drawer shift.\nThe cash_payment_money, cash_refund_money, cash_paid_in_money,\nand cash_paid_out_money fields are all computed by summing their respective\nevent types.", "x-release-status": "PUBLIC" }, "CashDrawerShiftEvent": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique ID of the event." }, "event_type": { "type": "string", "description": "The type of cash drawer shift event." }, "event_money": { "$ref": "#/definitions/Money", "description": "The amount of money that was added to or removed from the cash drawer\nin the event. The amount can be positive (for added money)\nor zero (for other tender type payments). The addition or removal of money can be determined by\nby the event type." }, "created_at": { "type": "string", "description": "The event time in RFC 3339 format.", "x-read-only": true }, "description": { "type": "string", "description": "An optional description of the event, entered by the employee that\ncreated the event." }, "team_member_id": { "type": "string", "description": "The ID of the team member that created the event.", "x-read-only": true } }, "description": "", "x-release-status": "PUBLIC" }, "CashDrawerShiftSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "The shift unique ID." }, "state": { "type": "string", "description": "The shift current state." }, "opened_at": { "type": "string", "description": "The shift start time in ISO 8601 format." }, "ended_at": { "type": "string", "description": "The shift end time in ISO 8601 format." }, "closed_at": { "type": "string", "description": "The shift close time in ISO 8601 format." }, "description": { "type": "string", "description": "An employee free-text description of a cash drawer shift." }, "opened_cash_money": { "$ref": "#/definitions/Money", "description": "The amount of money in the cash drawer at the start of the shift. This\nmust be a positive amount." }, "expected_cash_money": { "$ref": "#/definitions/Money", "description": "The amount of money that should be in the cash drawer at the end of the\nshift, based on the cash drawer events on the shift.\nThe amount is correct if all shift employees accurately recorded their\ncash drawer shift events. Unrecorded events and events with the wrong amount\nresult in an incorrect expected_cash_money amount that can be negative." }, "closed_cash_money": { "$ref": "#/definitions/Money", "description": "The amount of money found in the cash drawer at the end of the shift by\nan auditing employee. The amount must be greater than or equal to zero." }, "created_at": { "type": "string", "description": "The shift start time in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The shift updated at time in RFC 3339 format.", "x-read-only": true }, "location_id": { "type": "string", "description": "The ID of the location the cash drawer shift belongs to.", "x-read-only": true } }, "description": "The summary of a closed cash drawer shift.\nThis model contains only the money counted to start a cash drawer shift, counted\nat the end of the shift, and the amount that should be in the drawer at shift\nend based on summing all cash drawer shift events.", "x-release-status": "PUBLIC" }, "CashPaymentDetails": { "type": "object", "required": [ "buyer_supplied_money" ], "properties": { "buyer_supplied_money": { "$ref": "#/definitions/Money", "description": "The amount and currency of the money supplied by the buyer." }, "change_back_money": { "$ref": "#/definitions/Money", "description": "The amount of change due back to the buyer. \nThis read-only field is calculated\nfrom the `amount_money` and `buyer_supplied_money` fields." } }, "description": "Stores details about a cash payment. Contains only non-confidential information. For more information, see \n[Take Cash Payments](https://developer.squareup.com/docs/payments-api/take-payments/cash-payments).", "x-release-status": "PUBLIC" }, "CatalogAvailabilityPeriod": { "type": "object", "properties": { "start_local_time": { "type": "string", "description": "The start time of an availability period, specified in local time using partial-time\nRFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.\nNote that the seconds value is always :00, but it is appended for conformance to the RFC." }, "end_local_time": { "type": "string", "description": "The end time of an availability period, specified in local time using partial-time\nRFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.\nNote that the seconds value is always :00, but it is appended for conformance to the RFC." }, "day_of_week": { "type": "string", "description": "The day of the week for this availability period." } }, "description": "Represents a time period of availability.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogCategory": { "type": "object", "properties": { "name": { "maxLength": 255, "type": "string", "description": "The category name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points." }, "image_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of images associated with this `CatalogCategory` instance.\nCurrently these images are not displayed by Square, but are free to be displayed in 3rd party applications." }, "category_type": { "type": "string", "description": "The type of the category.", "x-release-status": "BETA", "x-is-beta": true }, "parent_category": { "$ref": "#/definitions/CatalogObjectCategory", "description": "The ID of the parent category of this category instance.", "x-release-status": "BETA", "x-is-beta": true }, "is_top_level": { "type": "boolean", "description": "Indicates whether a category is a top level category, which does not have any parent_category.", "x-release-status": "BETA", "x-is-beta": true }, "channels": { "type": "array", "items": { "type": "string" }, "description": "A list of IDs representing channels, such as a Square Online site, where the category can be made visible.", "x-release-status": "BETA", "x-is-beta": true }, "availability_period_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the `CatalogAvailabilityPeriod` objects associated with the category.", "x-release-status": "BETA", "x-is-beta": true }, "online_visibility": { "type": "boolean", "description": "Indicates whether the category is visible (`true`) or hidden (`false`) on all of the seller\u0027s Square Online sites.", "x-release-status": "BETA", "x-is-beta": true }, "root_category": { "type": "string", "description": "The top-level category in a category hierarchy.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "ecom_seo_data": { "$ref": "#/definitions/CatalogEcomSeoData", "description": "The SEO data for a seller\u0027s Square Online store.", "x-release-status": "BETA", "x-is-beta": true }, "path_to_root": { "type": "array", "items": { "$ref": "#/definitions/CategoryPathToRootNode" }, "description": "The path from the category to its root category. The first node of the path is the parent of the category\nand the last is the root category. The path is empty if the category is a root category.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "A category to which a `CatalogItem` instance belongs.", "x-release-status": "PUBLIC", "example": { "object": { "type": "CATEGORY", "id": "#Beverages", "present_at_all_locations": true, "category_data": { "name": "Beverages" } } } }, "CatalogCustomAttributeDefinition": { "type": "object", "required": [ "type", "name", "allowed_object_types" ], "properties": { "type": { "type": "string", "description": "The type of this custom attribute. Cannot be modified after creation.\nRequired." }, "name": { "minLength": 1, "maxLength": 255, "type": "string", "description": " The name of this definition for API and seller-facing UI purposes.\nThe name must be unique within the (merchant, application) pair. Required.\nMay not be empty and may not exceed 255 characters. Can be modified after creation." }, "description": { "maxLength": 255, "type": "string", "description": "Seller-oriented description of the meaning of this Custom Attribute,\nany constraints that the seller should observe, etc. May be displayed as a tooltip in Square UIs." }, "source_application": { "$ref": "#/definitions/SourceApplication", "description": "__Read only.__ Contains information about the application that\ncreated this custom attribute definition." }, "allowed_object_types": { "type": "array", "items": { "type": "string" }, "description": "The set of `CatalogObject` types that this custom atttribute may be applied to.\nCurrently, only `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, and `CATEGORY` are allowed. At least one type must be included." }, "seller_visibility": { "type": "string", "description": "The visibility of a custom attribute in seller-facing UIs (including Square Point\nof Sale applications and Square Dashboard). May be modified." }, "app_visibility": { "type": "string", "description": "The visibility of a custom attribute to applications other than the application\nthat created the attribute." }, "string_config": { "$ref": "#/definitions/CatalogCustomAttributeDefinitionStringConfig", "description": "Optionally, populated when `type` \u003d `STRING`, unset otherwise." }, "number_config": { "$ref": "#/definitions/CatalogCustomAttributeDefinitionNumberConfig", "description": "Optionally, populated when `type` \u003d `NUMBER`, unset otherwise." }, "selection_config": { "$ref": "#/definitions/CatalogCustomAttributeDefinitionSelectionConfig", "description": "Populated when `type` is set to `SELECTION`, unset otherwise." }, "custom_attribute_usage_count": { "type": "integer", "description": "The number of custom attributes that reference this\ncustom attribute definition. Set by the server in response to a ListCatalog\nrequest with `include_counts` set to `true`. If the actual count is greater\nthan 100, `custom_attribute_usage_count` will be set to `100`.", "x-read-only": true }, "key": { "minLength": 1, "pattern": "^[a-zA-Z0-9_-]*$", "maxLength": 60, "type": "string", "description": "The name of the desired custom attribute key that can be used to access\nthe custom attribute value on catalog objects. Cannot be modified after the\ncustom attribute definition has been created.\nMust be between 1 and 60 characters, and may only contain the characters `[a-zA-Z0-9_-]`." } }, "description": "Contains information defining a custom attribute. Custom attributes are\nintended to store additional information about a catalog object or to associate a\ncatalog object with an entity in another system. Do not use custom attributes\nto store any sensitive information (personally identifiable information, card details, etc.).\n[Read more about custom attributes](https://developer.squareup.com/docs/catalog-api/add-custom-attributes)", "x-release-status": "PUBLIC" }, "CatalogCustomAttributeDefinitionNumberConfig": { "type": "object", "properties": { "precision": { "maximum": 5, "minimum": 0, "type": "integer", "description": "An integer between 0 and 5 that represents the maximum number of\npositions allowed after the decimal in number custom attribute values\nFor example:\n\n- if the precision is 0, the quantity can be 1, 2, 3, etc.\n- if the precision is 1, the quantity can be 0.1, 0.2, etc.\n- if the precision is 2, the quantity can be 0.01, 0.12, etc.\n\nDefault: 5" } }, "description": "", "x-release-status": "PUBLIC" }, "CatalogCustomAttributeDefinitionSelectionConfig": { "type": "object", "properties": { "max_allowed_selections": { "maximum": 100, "type": "integer", "description": "The maximum number of selections that can be set. The maximum value for this\nattribute is 100. The default value is 1. The value can be modified, but changing the value will not\naffect existing custom attribute values on objects. Clients need to\nhandle custom attributes with more selected values than allowed by this limit." }, "allowed_selections": { "type": "array", "items": { "$ref": "#/definitions/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection" }, "description": "The set of valid `CatalogCustomAttributeSelections`. Up to a maximum of 100\nselections can be defined. Can be modified." } }, "description": "Configuration associated with `SELECTION`-type custom attribute definitions.", "x-release-status": "PUBLIC" }, "CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection": { "type": "object", "required": [ "name" ], "properties": { "uid": { "type": "string", "description": "Unique ID set by Square." }, "name": { "minLength": 1, "maxLength": 255, "type": "string", "description": "Selection name, unique within `allowed_selections`." } }, "description": "A named selection for this `SELECTION`-type custom attribute definition.", "x-release-status": "PUBLIC" }, "CatalogCustomAttributeDefinitionStringConfig": { "type": "object", "properties": { "enforce_uniqueness": { "type": "boolean", "description": "If true, each Custom Attribute instance associated with this Custom Attribute\nDefinition must have a unique value within the seller\u0027s catalog. For\nexample, this may be used for a value like a SKU that should not be\nduplicated within a seller\u0027s catalog. May not be modified after the\ndefinition has been created." } }, "description": "Configuration associated with Custom Attribute Definitions of type `STRING`.", "x-release-status": "PUBLIC" }, "CatalogCustomAttributeValue": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the custom attribute." }, "string_value": { "type": "string", "description": "The string value of the custom attribute. Populated if `type` \u003d `STRING`." }, "custom_attribute_definition_id": { "type": "string", "description": "The id of the [CatalogCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogCustomAttributeDefinition) this value belongs to.", "x-read-only": true }, "type": { "type": "string", "description": "A copy of type from the associated `CatalogCustomAttributeDefinition`.", "x-read-only": true }, "number_value": { "type": "string", "description": "Populated if `type` \u003d `NUMBER`. Contains a string\nrepresentation of a decimal number, using a `.` as the decimal separator." }, "boolean_value": { "type": "boolean", "description": "A `true` or `false` value. Populated if `type` \u003d `BOOLEAN`." }, "selection_uid_values": { "type": "array", "items": { "type": "string" }, "description": "One or more choices from `allowed_selections`. Populated if `type` \u003d `SELECTION`." }, "key": { "type": "string", "description": "If the associated `CatalogCustomAttributeDefinition` object is defined by another application, this key is prefixed by the defining application ID.\nFor example, if the CatalogCustomAttributeDefinition has a key attribute of \"cocoa_brand\" and the defining application ID is \"abcd1234\", this key is \"abcd1234:cocoa_brand\"\nwhen the application making the request is different from the application defining the custom attribute definition. Otherwise, the key is simply \"cocoa_brand\".", "x-read-only": true } }, "description": "An instance of a custom attribute. Custom attributes can be defined and\nadded to `ITEM` and `ITEM_VARIATION` type catalog objects.\n[Read more about custom attributes](https://developer.squareup.com/docs/catalog-api/add-custom-attributes).", "x-release-status": "PUBLIC" }, "CatalogDiscount": { "type": "object", "properties": { "name": { "maxLength": 255, "type": "string", "description": "The discount name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points." }, "discount_type": { "type": "string", "description": "Indicates whether the discount is a fixed amount or percentage, or entered at the time of sale." }, "percentage": { "type": "string", "description": "The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal\nseparator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type`\nis `VARIABLE_PERCENTAGE`.\n\nDo not use this field for amount-based or variable discounts." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of the discount. Specify an amount of `0` if `discount_type` is `VARIABLE_AMOUNT`.\n\nDo not use this field for percentage-based or variable discounts." }, "pin_required": { "type": "boolean", "description": "Indicates whether a mobile staff member needs to enter their PIN to apply the\ndiscount to a payment in the Square Point of Sale app." }, "label_color": { "type": "string", "description": "The color of the discount display label in the Square Point of Sale app. This must be a valid hex color code." }, "modify_tax_basis": { "type": "string", "description": "Indicates whether this discount should reduce the price used to calculate tax.\n\nMost discounts should use `MODIFY_TAX_BASIS`. However, in some circumstances taxes must\nbe calculated based on an item\u0027s price, ignoring a particular discount. For example,\nin many US jurisdictions, a manufacturer coupon or instant rebate reduces the price a\ncustomer pays but does not reduce the sale price used to calculate how much sales tax is\ndue. In this case, the discount representing that manufacturer coupon should have\n`DO_NOT_MODIFY_TAX_BASIS` for this field.\n\nIf you are unsure whether you need to use this field, consult your tax professional." }, "maximum_amount_money": { "$ref": "#/definitions/Money", "description": "For a percentage discount, the maximum absolute value of the discount. For example, if a\n50% discount has a `maximum_amount_money` of $20, a $100 purchase will yield a $20 discount,\nnot a $50 discount." } }, "description": "A discount applicable to items.", "x-release-status": "PUBLIC", "example": { "object": { "type": "DISCOUNT", "id": "#Maythe4th", "present_at_all_locations": true, "discount_data": { "name": "Welcome to the Dark(Roast) Side!", "discount_type": "FIXED_PERCENTAGE", "percentage": "5.4", "pin_required": false, "label_color": "red" } } } }, "CatalogEcomSeoData": { "type": "object", "properties": { "page_title": { "type": "string", "description": "The SEO title used for the Square Online store." }, "page_description": { "type": "string", "description": "The SEO description used for the Square Online store." }, "permalink": { "type": "string", "description": "The SEO permalink used for the Square Online store." } }, "description": "SEO data for for a seller\u0027s Square Online store.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogIdMapping": { "type": "object", "properties": { "client_object_id": { "type": "string", "description": "The client-supplied temporary `#`-prefixed ID for a new `CatalogObject`." }, "object_id": { "type": "string", "description": "The permanent ID for the CatalogObject created by the server." } }, "description": "A mapping between a temporary client-supplied ID and a permanent server-generated ID.\n\nWhen calling [UpsertCatalogObject](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/upsert-catalog-object) or\n[BatchUpsertCatalogObjects](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/batch-upsert-catalog-objects) to\ncreate a [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) instance, you can supply\na temporary ID for the to-be-created object, especially when the object is to be referenced\nelsewhere in the same request body. This temporary ID can be any string unique within\nthe call, but must be prefixed by \"#\".\n\nAfter the request is submitted and the object created, a permanent server-generated ID is assigned\nto the new object. The permanent ID is unique across the Square catalog.", "x-release-status": "PUBLIC" }, "CatalogImage": { "type": "object", "properties": { "name": { "type": "string", "description": "The internal name to identify this image in calls to the Square API.\nThis is a searchable attribute for use in applicable query filters\nusing the [SearchCatalogObjects](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-objects).\nIt is not unique and should not be shown in a buyer facing context." }, "url": { "type": "string", "description": "The URL of this image, generated by Square after an image is uploaded\nusing the [CreateCatalogImage](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/create-catalog-image) endpoint.\nTo modify the image, use the UpdateCatalogImage endpoint. Do not change the URL field." }, "caption": { "type": "string", "description": "A caption that describes what is shown in the image. Displayed in the\nSquare Online Store. This is a searchable attribute for use in applicable query filters\nusing the [SearchCatalogObjects](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-objects)." }, "photo_studio_order_id": { "type": "string", "description": "The immutable order ID for this image object created by the Photo Studio service in Square Online Store." } }, "description": "An image file to use in Square catalogs. It can be associated with\n`CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, and `CatalogModifierList` objects.\nOnly the images on items and item variations are exposed in Dashboard.\nOnly the first image on an item is displayed in Square Point of Sale (SPOS).\nImages on items and variations are displayed through Square Online Store.\nImages on other object types are for use by 3rd party application developers.", "x-release-status": "PUBLIC" }, "CatalogInfoRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.python", "csharp": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.csharp", "java": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.java", "php": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.php", "javascript": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.javascript", "ruby": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.ruby" } }, "CatalogInfoResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "limits": { "$ref": "#/definitions/CatalogInfoResponseLimits", "description": "Limits that apply to this API." }, "standard_unit_description_group": { "$ref": "#/definitions/StandardUnitDescriptionGroup", "description": "Names and abbreviations for standard units." } }, "description": "", "x-release-status": "PUBLIC", "example": { "limits": { "batch_upsert_max_objects_per_batch": 1000, "batch_upsert_max_total_objects": 10000, "batch_retrieve_max_object_ids": 1000, "search_max_page_limit": 1000, "batch_delete_max_object_ids": 200, "update_item_taxes_max_item_ids": 1000, "update_item_taxes_max_taxes_to_enable": 1000, "update_item_taxes_max_taxes_to_disable": 1000, "update_item_modifier_lists_max_item_ids": 1000, "update_item_modifier_lists_max_modifier_lists_to_enable": 1000, "update_item_modifier_lists_max_modifier_lists_to_disable": 1000 } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoResponse.python", "csharp": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoResponse.csharp", "java": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoResponse.java", "php": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoResponse.php", "javascript": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoResponse.javascript", "ruby": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoResponse.ruby" } }, "CatalogInfoResponseLimits": { "type": "object", "properties": { "batch_upsert_max_objects_per_batch": { "type": "integer", "description": "The maximum number of objects that may appear within a single batch in a\n`/v2/catalog/batch-upsert` request." }, "batch_upsert_max_total_objects": { "type": "integer", "description": "The maximum number of objects that may appear across all batches in a\n`/v2/catalog/batch-upsert` request." }, "batch_retrieve_max_object_ids": { "type": "integer", "description": "The maximum number of object IDs that may appear in a `/v2/catalog/batch-retrieve`\nrequest." }, "search_max_page_limit": { "type": "integer", "description": "The maximum number of results that may be returned in a page of a\n`/v2/catalog/search` response." }, "batch_delete_max_object_ids": { "type": "integer", "description": "The maximum number of object IDs that may be included in a single\n`/v2/catalog/batch-delete` request." }, "update_item_taxes_max_item_ids": { "type": "integer", "description": "The maximum number of item IDs that may be included in a single\n`/v2/catalog/update-item-taxes` request." }, "update_item_taxes_max_taxes_to_enable": { "type": "integer", "description": "The maximum number of tax IDs to be enabled that may be included in a single\n`/v2/catalog/update-item-taxes` request." }, "update_item_taxes_max_taxes_to_disable": { "type": "integer", "description": "The maximum number of tax IDs to be disabled that may be included in a single\n`/v2/catalog/update-item-taxes` request." }, "update_item_modifier_lists_max_item_ids": { "type": "integer", "description": "The maximum number of item IDs that may be included in a single\n`/v2/catalog/update-item-modifier-lists` request." }, "update_item_modifier_lists_max_modifier_lists_to_enable": { "type": "integer", "description": "The maximum number of modifier list IDs to be enabled that may be included in\na single `/v2/catalog/update-item-modifier-lists` request." }, "update_item_modifier_lists_max_modifier_lists_to_disable": { "type": "integer", "description": "The maximum number of modifier list IDs to be disabled that may be included in\na single `/v2/catalog/update-item-modifier-lists` request." } }, "description": "", "x-release-status": "PUBLIC" }, "CatalogItem": { "type": "object", "properties": { "name": { "maxLength": 512, "type": "string", "description": "The item\u0027s name. This is a searchable attribute for use in applicable query filters, its value must not be empty, and the length is of Unicode code points." }, "description": { "maxLength": 4096, "type": "string", "description": "The item\u0027s description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.\n\nDeprecated at 2022-07-20, this field is planned to retire in 6 months. You should migrate to use `description_html` to set the description\nof the [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) instance. The `description` and `description_html` field values are kept in sync. If you try to\nset the both fields, the `description_html` text value overwrites the `description` value. Updates in one field are also reflected in the other,\nexcept for when you use an early version before Square API 2022-07-20 and `description_html` is set to blank, setting the `description` value to null\ndoes not nullify `description_html`.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "abbreviation": { "maxLength": 24, "type": "string", "description": "The text of the item\u0027s display label in the Square Point of Sale app. Only up to the first five characters of the string are used.\nThis attribute is searchable, and its value length is of Unicode code points." }, "label_color": { "type": "string", "description": "The color of the item\u0027s display label in the Square Point of Sale app. This must be a valid hex color code." }, "available_online": { "type": "boolean", "description": "If `true`, the item can be added to shipping orders from the merchant\u0027s online store." }, "available_for_pickup": { "type": "boolean", "description": "If `true`, the item can be added to pickup orders from the merchant\u0027s online store." }, "available_electronically": { "type": "boolean", "description": "If `true`, the item can be added to electronically fulfilled orders from the merchant\u0027s online store." }, "category_id": { "type": "string", "description": "The ID of the item\u0027s category, if any. Deprecated since 2023-12-13. Use `CatalogItem.categories`, instead.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "tax_ids": { "type": "array", "items": { "type": "string" }, "description": "A set of IDs indicating the taxes enabled for\nthis item. When updating an item, any taxes listed here will be added to the item.\nTaxes may also be added to or deleted from an item using `UpdateItemTaxes`." }, "modifier_list_info": { "type": "array", "items": { "$ref": "#/definitions/CatalogItemModifierListInfo" }, "description": "A set of `CatalogItemModifierListInfo` objects\nrepresenting the modifier lists that apply to this item, along with the overrides and min\nand max limits that are specific to this item. Modifier lists\nmay also be added to or deleted from an item using `UpdateItemModifierLists`." }, "variations": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "A list of [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) objects for this item. An item must have\nat least one variation." }, "product_type": { "type": "string", "description": "The product type of the item. Once set, the `product_type` value cannot be modified.\n\nItems of the `LEGACY_SQUARE_ONLINE_SERVICE` and `LEGACY_SQUARE_ONLINE_MEMBERSHIP` product types can be updated\nbut cannot be created using the API." }, "skip_modifier_screen": { "type": "boolean", "description": "If `false`, the Square Point of Sale app will present the `CatalogItem`\u0027s\ndetails screen immediately, allowing the merchant to choose `CatalogModifier`s\nbefore adding the item to the cart. This is the default behavior.\n\nIf `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected\nmodifiers, and merchants can edit modifiers by drilling down onto the item\u0027s details.\n\nThird-party clients are encouraged to implement similar behaviors." }, "item_options": { "type": "array", "items": { "$ref": "#/definitions/CatalogItemOptionForItem" }, "description": "List of item options IDs for this item. Used to manage and group item\nvariations in a specified order.\n\nMaximum: 6 item options." }, "image_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of images associated with this `CatalogItem` instance.\nThese images will be shown to customers in Square Online Store.\nThe first image will show up as the icon for this item in POS.", "x-release-status": "BETA", "x-is-beta": true }, "sort_name": { "type": "string", "description": "A name to sort the item by. If this name is unspecified, namely, the `sort_name` field is absent, the regular `name` field is used for sorting.\nIts value must not be empty.\n\nIt is currently supported for sellers of the Japanese locale only.", "x-release-status": "BETA", "x-is-beta": true }, "categories": { "type": "array", "items": { "$ref": "#/definitions/CatalogObjectCategory" }, "description": "The list of categories.", "x-release-status": "BETA", "x-is-beta": true }, "description_html": { "maxLength": 65535, "type": "string", "description": "The item\u0027s description as expressed in valid HTML elements. The length of this field value, including those of HTML tags,\nis of Unicode points. With application query filters, the text values of the HTML elements and attributes are searchable. Invalid or\nunsupported HTML elements or attributes are ignored.\n\nSupported HTML elements include:\n- `a`: Link. Supports linking to website URLs, email address, and telephone numbers.\n- `b`, `strong`: Bold text\n- `br`: Line break\n- `code`: Computer code\n- `div`: Section\n- `h1-h6`: Headings\n- `i`, `em`: Italics\n- `li`: List element\n- `ol`: Numbered list\n- `p`: Paragraph\n- `ul`: Bullet list\n- `u`: Underline\n\n\nSupported HTML attributes include:\n- `align`: Alignment of the text content\n- `href`: Link destination\n- `rel`: Relationship between link\u0027s target and source\n- `target`: Place to open the linked document" }, "description_plaintext": { "maxLength": 65535, "type": "string", "description": "A server-generated plaintext version of the `description_html` field, without formatting tags.", "x-read-only": true }, "channels": { "type": "array", "items": { "type": "string" }, "description": "A list of IDs representing channels, such as a Square Online site, where the item can be made visible or available.", "x-release-status": "BETA", "x-is-beta": true }, "is_archived": { "type": "boolean", "description": "Indicates whether this item is archived (`true`) or not (`false`)." }, "ecom_seo_data": { "$ref": "#/definitions/CatalogEcomSeoData", "description": "The SEO data for a seller\u0027s Square Online store.", "x-release-status": "BETA", "x-is-beta": true }, "food_and_beverage_details": { "$ref": "#/definitions/FoodAndBeverageDetails", "description": "The food and beverage-specific details for the `FOOD_AND_BEV` item." }, "reporting_category": { "$ref": "#/definitions/CatalogObjectCategory", "description": "The item\u0027s reporting category.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "A [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) instance of the `ITEM` type, also referred to as an item, in the catalog.", "x-release-status": "PUBLIC", "example": { "object": { "type": "ITEM", "id": "#Cocoa", "present_at_all_locations": true, "item_data": { "name": "Cocoa", "description": "Hot chocolate", "abbreviation": "Ch", "visibility": "PRIVATE" } } } }, "CatalogItemFoodAndBeverageDetails": { "type": "object", "properties": { "calorie_count": { "type": "integer", "description": "The calorie count (in the unit of kcal) for the `FOOD_AND_BEV` type of items." }, "dietary_preferences": { "type": "array", "items": { "$ref": "#/definitions/DietaryPreference" }, "description": "The dietary preferences for the `FOOD_AND_BEV` item." }, "ingredients": { "type": "array", "items": { "$ref": "#/definitions/Ingredient" }, "description": "The ingredients for the `FOOD_AND_BEV` type item." } }, "description": "The food and beverage-specific details of a `FOOD_AND_BEV` item.", "x-release-status": "PUBLIC" }, "CatalogItemFoodAndBeverageDetailsDietaryPreference": { "type": "object", "properties": { "type": { "$ref": "#/definitions/DietaryPreferenceType", "description": "The dietary preference type. Supported values include `STANDARD` and `CUSTOM` as specified in `FoodAndBeverageDetails.DietaryPreferenceType`." }, "standard_name": { "type": "string", "description": "The name of the dietary preference from a standard pre-defined list. This should be null if it\u0027s a custom dietary preference." }, "custom_name": { "type": "string", "description": "The name of a user-defined custom dietary preference. This should be null if it\u0027s a standard dietary preference." } }, "description": "Dietary preferences that can be assigned to an `FOOD_AND_BEV` item and its ingredients.", "x-release-status": "PUBLIC" }, "CatalogItemFoodAndBeverageDetailsIngredient": { "type": "object", "properties": { "type": { "$ref": "#/definitions/DietaryPreferenceType", "description": "The dietary preference type of the ingredient. Supported values include `STANDARD` and `CUSTOM` as specified in `FoodAndBeverageDetails.DietaryPreferenceType`." }, "standard_name": { "type": "string", "description": "The name of the ingredient from a standard pre-defined list. This should be null if it\u0027s a custom dietary preference." }, "custom_name": { "type": "string", "description": "The name of a custom user-defined ingredient. This should be null if it\u0027s a standard dietary preference." } }, "description": "Describes the ingredient used in a `FOOD_AND_BEV` item.", "x-release-status": "PUBLIC" }, "CatalogItemModifierListInfo": { "type": "object", "required": [ "modifier_list_id" ], "properties": { "modifier_list_id": { "minLength": 1, "type": "string", "description": "The ID of the `CatalogModifierList` controlled by this `CatalogModifierListInfo`." }, "modifier_overrides": { "type": "array", "items": { "$ref": "#/definitions/CatalogModifierOverride" }, "description": "A set of `CatalogModifierOverride` objects that override whether a given `CatalogModifier` is enabled by default." }, "min_selected_modifiers": { "type": "integer", "description": "If 0 or larger, the smallest number of `CatalogModifier`s that must be selected from this `CatalogModifierList`.\nThe default value is `-1`.\n\nWhen `CatalogModifierList.selection_type` is `MULTIPLE`, `CatalogModifierListInfo.min_selected_modifiers\u003d-1` \nand `CatalogModifierListInfo.max_selected_modifier\u003d-1` means that from zero to the maximum number of modifiers of\nthe `CatalogModifierList` can be selected from the `CatalogModifierList`. \n\nWhen the `CatalogModifierList.selection_type` is `SINGLE`, `CatalogModifierListInfo.min_selected_modifiers\u003d-1`\nand `CatalogModifierListInfo.max_selected_modifier\u003d-1` means that exactly one modifier must be present in \nand can be selected from the `CatalogModifierList`" }, "max_selected_modifiers": { "type": "integer", "description": "If 0 or larger, the largest number of `CatalogModifier`s that can be selected from this `CatalogModifierList`.\nThe default value is `-1`.\n\nWhen `CatalogModifierList.selection_type` is `MULTIPLE`, `CatalogModifierListInfo.min_selected_modifiers\u003d-1` \nand `CatalogModifierListInfo.max_selected_modifier\u003d-1` means that from zero to the maximum number of modifiers of\nthe `CatalogModifierList` can be selected from the `CatalogModifierList`. \n\nWhen the `CatalogModifierList.selection_type` is `SINGLE`, `CatalogModifierListInfo.min_selected_modifiers\u003d-1`\nand `CatalogModifierListInfo.max_selected_modifier\u003d-1` means that exactly one modifier must be present in \nand can be selected from the `CatalogModifierList`" }, "enabled": { "type": "boolean", "description": "If `true`, enable this `CatalogModifierList`. The default value is `true`." }, "ordinal": { "type": "integer", "description": "The position of this `CatalogItemModifierListInfo` object within the `modifier_list_info` list applied \nto a `CatalogItem` instance.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "References a text-based modifier or a list of non text-based modifiers applied to a `CatalogItem` instance\nand specifies supported behaviors of the application.", "x-release-status": "PUBLIC" }, "CatalogItemOption": { "type": "object", "properties": { "name": { "type": "string", "description": "The item option\u0027s display name for the seller. Must be unique across\nall item options. This is a searchable attribute for use in applicable query filters." }, "display_name": { "type": "string", "description": "The item option\u0027s display name for the customer. This is a searchable attribute for use in applicable query filters." }, "description": { "type": "string", "description": "The item option\u0027s human-readable description. Displayed in the Square\nPoint of Sale app for the seller and in the Online Store or on receipts for\nthe buyer. This is a searchable attribute for use in applicable query filters." }, "show_colors": { "type": "boolean", "description": "If true, display colors for entries in `values` when present." }, "values": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "A list of CatalogObjects containing the\n`CatalogItemOptionValue`s for this item." } }, "description": "A group of variations for a `CatalogItem`.", "x-release-status": "PUBLIC" }, "CatalogItemOptionForItem": { "type": "object", "properties": { "item_option_id": { "type": "string", "description": "The unique id of the item option, used to form the dimensions of the item option matrix in a specified order." } }, "description": " An option that can be assigned to an item.\nFor example, a t-shirt item may offer a color option or a size option.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogItemOptionValue": { "type": "object", "properties": { "item_option_id": { "type": "string", "description": "Unique ID of the associated item option." }, "name": { "type": "string", "description": "Name of this item option value. This is a searchable attribute for use in applicable query filters." }, "description": { "type": "string", "description": "A human-readable description for the option value. This is a searchable attribute for use in applicable query filters." }, "color": { "type": "string", "description": "The HTML-supported hex color for the item option (e.g., \"#ff8d4e85\").\nOnly displayed if `show_colors` is enabled on the parent `ItemOption`. When\nleft unset, `color` defaults to white (\"#ffffff\") when `show_colors` is\nenabled on the parent `ItemOption`." }, "ordinal": { "type": "integer", "description": "Determines where this option value appears in a list of option values." } }, "description": "An enumerated value that can link a\n`CatalogItemVariation` to an item option as one of\nits item option values.", "x-release-status": "PUBLIC" }, "CatalogItemOptionValueForItemVariation": { "type": "object", "properties": { "item_option_id": { "type": "string", "description": "The unique id of an item option." }, "item_option_value_id": { "type": "string", "description": "The unique id of the selected value for the item option." } }, "description": "A `CatalogItemOptionValue` links an item variation to an item option as\nan item option value. For example, a t-shirt item may offer a color option and\na size option. An item option value would represent each variation of t-shirt:\nFor example, \"Color:Red, Size:Small\" or \"Color:Blue, Size:Medium\".", "x-release-status": "PUBLIC" }, "CatalogItemVariation": { "type": "object", "properties": { "item_id": { "type": "string", "description": "The ID of the `CatalogItem` associated with this item variation." }, "name": { "type": "string", "description": "The item variation\u0027s name. This is a searchable attribute for use in applicable query filters.\n\nIts value has a maximum length of 255 Unicode code points. However, when the parent [item](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem)\nuses [item options](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemOption), this attribute is auto-generated, read-only, and can be\nlonger than 255 Unicode code points." }, "sku": { "type": "string", "description": "The item variation\u0027s SKU, if any. This is a searchable attribute for use in applicable query filters." }, "upc": { "type": "string", "description": "The universal product code (UPC) of the item variation, if any. This is a searchable attribute for use in applicable query filters.\n\nThe value of this attribute should be a number of 12-14 digits long. This restriction is enforced on the Square Seller Dashboard,\nSquare Point of Sale or Retail Point of Sale apps, where this attribute shows in the GTIN field. If a non-compliant UPC value is assigned\nto this attribute using the API, the value is not editable on the Seller Dashboard, Square Point of Sale or Retail Point of Sale apps\nunless it is updated to fit the expected format." }, "ordinal": { "type": "integer", "description": "The order in which this item variation should be displayed. This value is read-only. On writes, the ordinal\nfor each item variation within a parent `CatalogItem` is set according to the item variations\u0027s\nposition. On reads, the value is not guaranteed to be sequential or unique.", "x-read-only": true }, "pricing_type": { "type": "string", "description": "Indicates whether the item variation\u0027s price is fixed or determined at the time\nof sale." }, "price_money": { "$ref": "#/definitions/Money", "description": "The item variation\u0027s price, if fixed pricing is used." }, "location_overrides": { "type": "array", "items": { "$ref": "#/definitions/ItemVariationLocationOverrides" }, "description": "Per-location price and inventory overrides." }, "track_inventory": { "type": "boolean", "description": "If `true`, inventory tracking is active for the variation." }, "inventory_alert_type": { "type": "string", "description": "Indicates whether the item variation displays an alert when its inventory quantity is less than or equal\nto its `inventory_alert_threshold`." }, "inventory_alert_threshold": { "type": "integer", "format": "int64", "description": "If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`\nis `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.\n\nThis value is always an integer." }, "user_data": { "maxLength": 255, "type": "string", "description": "Arbitrary user metadata to associate with the item variation. This attribute value length is of Unicode code points." }, "service_duration": { "type": "integer", "format": "int64", "description": "If the `CatalogItem` that owns this item variation is of type\n`APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For\nexample, a 30 minute appointment would have the value `1800000`, which is equal to\n30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second)." }, "available_for_booking": { "type": "boolean", "description": "If the `CatalogItem` that owns this item variation is of type\n`APPOINTMENTS_SERVICE`, a bool representing whether this service is available for booking.", "x-release-status": "BETA", "x-is-beta": true }, "item_option_values": { "type": "array", "items": { "$ref": "#/definitions/CatalogItemOptionValueForItemVariation" }, "description": "List of item option values associated with this item variation. Listed\nin the same order as the item options of the parent item." }, "measurement_unit_id": { "type": "string", "description": "ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity\nsold of this item variation. If left unset, the item will be sold in\nwhole quantities." }, "sellable": { "type": "boolean", "description": "Whether this variation can be sold. The inventory count of a sellable variation indicates\nthe number of units available for sale. When a variation is both stockable and sellable,\nits sellable inventory count can be smaller than or equal to its stockable count.", "x-release-status": "BETA", "x-is-beta": true }, "stockable": { "type": "boolean", "description": "Whether stock is counted directly on this variation (TRUE) or only on its components (FALSE).\nWhen a variation is both stockable and sellable, the inventory count of a stockable variation keeps track of the number of units of this variation in stock\nand is not an indicator of the number of units of the variation that can be sold.", "x-release-status": "BETA", "x-is-beta": true }, "image_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of images associated with this `CatalogItemVariation` instance.\nThese images will be shown to customers in Square Online Store." }, "team_member_ids": { "type": "array", "items": { "type": "string" }, "description": "Tokens of employees that can perform the service represented by this variation. Only valid for\nvariations of type `APPOINTMENTS_SERVICE`.", "x-release-status": "BETA", "x-is-beta": true }, "stockable_conversion": { "$ref": "#/definitions/CatalogStockConversion", "description": "The unit conversion rule, as prescribed by the [CatalogStockConversion](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogStockConversion) type,\nthat describes how this non-stockable (i.e., sellable/receivable) item variation is converted\nto/from the stockable item variation sharing the same parent item. With the stock conversion,\nyou can accurately track inventory when an item variation is sold in one unit, but stocked in\nanother unit.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "An item variation, representing a product for sale, in the Catalog object model. Each [item](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) must have at least one\nitem variation and can have at most 250 item variations.\n\nAn item variation can be sellable, stockable, or both if it has a unit of measure for its count for the sold number of the variation, the stocked\nnumber of the variation, or both. For example, when a variation representing wine is stocked and sold by the bottle, the variation is both\nstockable and sellable. But when a variation of the wine is sold by the glass, the sold units cannot be used as a measure of the stocked units. This by-the-glass\nvariation is sellable, but not stockable. To accurately keep track of the wine\u0027s inventory count at any time, the sellable count must be\nconverted to stockable count. Typically, the seller defines this unit conversion. For example, 1 bottle equals 5 glasses. The Square API exposes\nthe `stockable_conversion` property on the variation to specify the conversion. Thus, when two glasses of the wine are sold, the sellable count\ndecreases by 2, and the stockable count automatically decreases by 0.4 bottle according to the conversion.", "x-release-status": "PUBLIC" }, "CatalogMeasurementUnit": { "type": "object", "properties": { "measurement_unit": { "$ref": "#/definitions/MeasurementUnit", "description": "Indicates the unit used to measure the quantity of a catalog item variation." }, "precision": { "type": "integer", "description": "An integer between 0 and 5 that represents the maximum number of\npositions allowed after the decimal in quantities measured with this unit.\nFor example:\n\n- if the precision is 0, the quantity can be 1, 2, 3, etc.\n- if the precision is 1, the quantity can be 0.1, 0.2, etc.\n- if the precision is 2, the quantity can be 0.01, 0.12, etc.\n\nDefault: 3" } }, "description": "Represents the unit used to measure a `CatalogItemVariation` and\nspecifies the precision for decimal quantities.", "x-release-status": "PUBLIC" }, "CatalogModifier": { "type": "object", "properties": { "name": { "maxLength": 255, "type": "string", "description": "The modifier name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points." }, "price_money": { "$ref": "#/definitions/Money", "description": "The modifier price." }, "ordinal": { "type": "integer", "description": "Determines where this `CatalogModifier` appears in the `CatalogModifierList`." }, "modifier_list_id": { "type": "string", "description": "The ID of the `CatalogModifierList` associated with this modifier." }, "location_overrides": { "type": "array", "items": { "$ref": "#/definitions/ModifierLocationOverrides" }, "description": "Location-specific price overrides." }, "image_id": { "type": "string", "description": "The ID of the image associated with this `CatalogModifier` instance.\nCurrently this image is not displayed by Square, but is free to be displayed in 3rd party applications.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "A modifier applicable to items at the time of sale. An example of a modifier is a Cheese add-on to a Burger item.", "x-release-status": "PUBLIC", "example": { "object": { "type": "MODIFIER", "present_at_all_locations": true, "modifier_data": { "name": "Almond Milk", "price_money": { "amount": 250, "currency": "USD" } } } } }, "CatalogModifierList": { "type": "object", "properties": { "name": { "maxLength": 255, "type": "string", "description": "The name of the `CatalogModifierList` instance. This is a searchable attribute for use in applicable query filters, and its value length is of \nUnicode code points." }, "ordinal": { "type": "integer", "description": "The position of this `CatalogModifierList` within a list of `CatalogModifierList` instances." }, "selection_type": { "type": "string", "description": "Indicates whether a single (`SINGLE`) or multiple (`MULTIPLE`) modifiers from the list\ncan be applied to a single `CatalogItem`.\n\nFor text-based modifiers, the `selection_type` attribute is always `SINGLE`. The other value is ignored." }, "modifiers": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "A non-empty list of `CatalogModifier` objects to be included in the `CatalogModifierList`, \nfor non text-based modifiers when the `modifier_type` attribute is `LIST`. Each element of this list \nis a `CatalogObject` instance of the `MODIFIER` type, containing the following attributes:\n```\n{\n\"id\": \"{{catalog_modifier_id}}\",\n\"type\": \"MODIFIER\", \n\"modifier_data\": {{a CatalogModifier instance\u003e}} \n}\n```" }, "image_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of images associated with this `CatalogModifierList` instance.\nCurrently these images are not displayed on Square products, but may be displayed in 3rd-party applications." }, "modifier_type": { "type": "string", "description": "The type of the modifier. \n\nWhen this `modifier_type` value is `TEXT`, the `CatalogModifierList` represents a text-based modifier. \nWhen this `modifier_type` value is `LIST`, the `CatalogModifierList` contains a list of `CatalogModifier` objects.", "x-release-status": "BETA", "x-is-beta": true }, "max_length": { "type": "integer", "description": "The maximum length, in Unicode points, of the text string of the text-based modifier as represented by \nthis `CatalogModifierList` object with the `modifier_type` set to `TEXT`.", "x-release-status": "BETA", "x-is-beta": true }, "text_required": { "type": "boolean", "description": "Whether the text string must be a non-empty string (`true`) or not (`false`) for a text-based modifier\nas represented by this `CatalogModifierList` object with the `modifier_type` set to `TEXT`.", "x-release-status": "BETA", "x-is-beta": true }, "internal_name": { "maxLength": 512, "type": "string", "description": "A note for internal use by the business. \n\nFor example, for a text-based modifier applied to a T-shirt item, if the buyer-supplied text of \"Hello, Kitty!\" \nis to be printed on the T-shirt, this `internal_name` attribute can be \"Use italic face\" as \nan instruction for the business to follow. \n\nFor non text-based modifiers, this `internal_name` attribute can be \nused to include SKUs, internal codes, or supplemental descriptions for internal use.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "For a text-based modifier, this encapsulates the modifier\u0027s text when its `modifier_type` is `TEXT`. \nFor example, to sell T-shirts with custom prints, a text-based modifier can be used to capture the buyer-supplied \ntext string to be selected for the T-shirt at the time of sale.\n\nFor non text-based modifiers, this encapsulates a non-empty list of modifiers applicable to items \nat the time of sale. Each element of the modifier list is a `CatalogObject` instance of the `MODIFIER` type. \nFor example, a \"Condiments\" modifier list applicable to a \"Hot Dog\" item\nmay contain \"Ketchup\", \"Mustard\", and \"Relish\" modifiers. \n\nA non text-based modifier can be applied to the modified item once or multiple times, if the `selection_type` field \nis set to `SINGLE` or `MULTIPLE`, respectively. On the other hand, a text-based modifier can be applied to the item \nonly once and the `selection_type` field is always set to `SINGLE`.", "x-release-status": "PUBLIC", "example": { "type": "MODIFIER_LIST", "id": "#MilkType", "present_at_all_locations": true, "modifier_list_data": { "name": "Milk Type", "selection_type": "SINGLE", "allow_quantities": false, "modifiers": [ { "type": "MODIFIER", "present_at_all_locations": true, "modifier_data": { "name": "Whole Milk", "price_money": { "amount": 0, "currency": "USD" } } }, { "type": "MODIFIER", "present_at_all_locations": true, "modifier_data": { "name": "Almond Milk", "price_money": { "amount": 250, "currency": "USD" } } }, { "type": "MODIFIER", "present_at_all_locations": true, "modifier_data": { "name": "Soy Milk", "price_money": { "amount": 250, "currency": "USD" } } } ] } } }, "CatalogModifierOverride": { "type": "object", "required": [ "modifier_id" ], "properties": { "modifier_id": { "minLength": 1, "type": "string", "description": "The ID of the `CatalogModifier` whose default behavior is being overridden." }, "on_by_default": { "type": "boolean", "description": "If `true`, this `CatalogModifier` should be selected by default for this `CatalogItem`." } }, "description": "Options to control how to override the default behavior of the specified modifier.", "x-release-status": "PUBLIC" }, "CatalogObject": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "type": "string", "description": "The type of this object. Each object type has expected\nproperties expressed in a structured format within its corresponding `*_data` field below." }, "id": { "minLength": 1, "type": "string", "description": "An identifier to reference this object in the catalog. When a new `CatalogObject`\nis inserted, the client should set the id to a temporary identifier starting with\na \"`#`\" character. Other objects being inserted or updated within the same request\nmay use this identifier to refer to the new object.\n\nWhen the server receives the new object, it will supply a unique identifier that\nreplaces the temporary identifier for all future references." }, "updated_at": { "type": "string", "description": "Last modification [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"`\nwould indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds.", "x-read-only": true }, "version": { "type": "integer", "format": "int64", "description": "The version of the object. When updating an object, the version supplied\nmust match the version in the database, otherwise the write will be rejected as conflicting." }, "is_deleted": { "type": "boolean", "description": "If `true`, the object has been deleted from the database. Must be `false` for new objects\nbeing inserted. When deleted, the `updated_at` field will equal the deletion time." }, "custom_attribute_values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CatalogCustomAttributeValue" }, "description": "A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair\nis a [CatalogCustomAttributeValue](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogCustomAttributeValue) object. The key is the `key` attribute\nvalue defined in the associated [CatalogCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogCustomAttributeDefinition)\nobject defined by the application making the request.\n\nIf the `CatalogCustomAttributeDefinition` object is\ndefined by another application, the `CatalogCustomAttributeDefinition`\u0027s key attribute value is prefixed by\nthe defining application ID. For example, if the `CatalogCustomAttributeDefinition` has a `key` attribute of\n`\"cocoa_brand\"` and the defining application ID is `\"abcd1234\"`, the key in the map is `\"abcd1234:cocoa_brand\"`\nif the application making the request is different from the application defining the custom attribute definition.\nOtherwise, the key used in the map is simply `\"cocoa_brand\"`.\n\nApplication-defined custom attributes are set at a global (location-independent) level.\nCustom attribute values are intended to store additional information about a catalog object\nor associations with an entity in another system. Do not use custom attributes\nto store any sensitive information (personally identifiable information, card details, etc.)." }, "catalog_v1_ids": { "type": "array", "items": { "$ref": "#/definitions/CatalogV1Id" }, "description": "The Connect v1 IDs for this object at each location where it is present, where they\ndiffer from the object\u0027s Connect V2 ID. The field will only be present for objects that\nhave been created or modified by legacy APIs." }, "present_at_all_locations": { "type": "boolean", "description": "If `true`, this object is present at all locations (including future locations), except where specified in\nthe `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations),\nexcept where specified in the `present_at_location_ids` field. If not specified, defaults to `true`." }, "present_at_location_ids": { "type": "array", "items": { "type": "string" }, "description": "A list of locations where the object is present, even if `present_at_all_locations` is `false`.\nThis can include locations that are deactivated." }, "absent_at_location_ids": { "type": "array", "items": { "type": "string" }, "description": "A list of locations where the object is not present, even if `present_at_all_locations` is `true`.\nThis can include locations that are deactivated." }, "item_data": { "$ref": "#/definitions/CatalogItem", "description": "Structured data for a `CatalogItem`, set for CatalogObjects of type `ITEM`." }, "category_data": { "$ref": "#/definitions/CatalogCategory", "description": "Structured data for a `CatalogCategory`, set for CatalogObjects of type `CATEGORY`." }, "item_variation_data": { "$ref": "#/definitions/CatalogItemVariation", "description": "Structured data for a `CatalogItemVariation`, set for CatalogObjects of type `ITEM_VARIATION`." }, "tax_data": { "$ref": "#/definitions/CatalogTax", "description": "Structured data for a `CatalogTax`, set for CatalogObjects of type `TAX`." }, "discount_data": { "$ref": "#/definitions/CatalogDiscount", "description": "Structured data for a `CatalogDiscount`, set for CatalogObjects of type `DISCOUNT`." }, "modifier_list_data": { "$ref": "#/definitions/CatalogModifierList", "description": "Structured data for a `CatalogModifierList`, set for CatalogObjects of type `MODIFIER_LIST`." }, "modifier_data": { "$ref": "#/definitions/CatalogModifier", "description": "Structured data for a `CatalogModifier`, set for CatalogObjects of type `MODIFIER`." }, "time_period_data": { "$ref": "#/definitions/CatalogTimePeriod", "description": "Structured data for a `CatalogTimePeriod`, set for CatalogObjects of type `TIME_PERIOD`." }, "product_set_data": { "$ref": "#/definitions/CatalogProductSet", "description": "Structured data for a `CatalogProductSet`, set for CatalogObjects of type `PRODUCT_SET`." }, "pricing_rule_data": { "$ref": "#/definitions/CatalogPricingRule", "description": "Structured data for a `CatalogPricingRule`, set for CatalogObjects of type `PRICING_RULE`.\nA `CatalogPricingRule` object often works with a `CatalogProductSet` object or a `CatalogTimePeriod` object." }, "image_data": { "$ref": "#/definitions/CatalogImage", "description": "Structured data for a `CatalogImage`, set for CatalogObjects of type `IMAGE`." }, "measurement_unit_data": { "$ref": "#/definitions/CatalogMeasurementUnit", "description": "Structured data for a `CatalogMeasurementUnit`, set for CatalogObjects of type `MEASUREMENT_UNIT`." }, "subscription_plan_data": { "$ref": "#/definitions/CatalogSubscriptionPlan", "description": "Structured data for a `CatalogSubscriptionPlan`, set for CatalogObjects of type `SUBSCRIPTION_PLAN`." }, "item_option_data": { "$ref": "#/definitions/CatalogItemOption", "description": "Structured data for a `CatalogItemOption`, set for CatalogObjects of type `ITEM_OPTION`." }, "item_option_value_data": { "$ref": "#/definitions/CatalogItemOptionValue", "description": "Structured data for a `CatalogItemOptionValue`, set for CatalogObjects of type `ITEM_OPTION_VAL`." }, "custom_attribute_definition_data": { "$ref": "#/definitions/CatalogCustomAttributeDefinition", "description": "Structured data for a `CatalogCustomAttributeDefinition`, set for CatalogObjects of type `CUSTOM_ATTRIBUTE_DEFINITION`." }, "quick_amounts_settings_data": { "$ref": "#/definitions/CatalogQuickAmountsSettings", "description": "Structured data for a `CatalogQuickAmountsSettings`, set for CatalogObjects of type `QUICK_AMOUNTS_SETTINGS`.", "x-release-status": "BETA", "x-is-beta": true }, "subscription_plan_variation_data": { "$ref": "#/definitions/CatalogSubscriptionPlanVariation", "description": "Structured data for a `CatalogSubscriptionPlanVariation`, set for CatalogObjects of type `SUBSCRIPTION_PLAN_VARIATION`." }, "availability_period_data": { "$ref": "#/definitions/CatalogAvailabilityPeriod", "description": "Structured data for a `CatalogAvailabilityPeriod`, set for CatalogObjects of type `AVAILABILITY_PERIOD`.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "The wrapper object for the catalog entries of a given object type.\n\nDepending on the `type` attribute value, a `CatalogObject` instance assumes a type-specific data to yield the corresponding type of catalog object.\n\nFor example, if `type\u003dITEM`, the `CatalogObject` instance must have the ITEM-specific data set on the `item_data` attribute. The resulting `CatalogObject` instance is also a `CatalogItem` instance.\n\nIn general, if `type\u003d\u003cOBJECT_TYPE\u003e`, the `CatalogObject` instance must have the `\u003cOBJECT_TYPE\u003e`-specific data set on the `\u003cobject_type\u003e_data` attribute. The resulting `CatalogObject` instance is also a `Catalog\u003cObjectType\u003e` instance.\n\nFor a more detailed discussion of the Catalog data model, please see the\n[Design a Catalog](https://developer.squareup.com/docs/catalog-api/design-a-catalog) guide.", "x-release-status": "PUBLIC", "example": { "catalog_object": { "type": "{{ [ITEM | ITEM_VARIATION | MODIFIER | MODIFIER_LIST | CATEGORY | DISCOUNT | TAX] }}", "id": "{{ set by Catalog during object creation }}", "updated_at": "{{ date \u0026 time of most recent update }}", "version": "{{ version of the CatalogObject }}", "is_deleted": "{{ [true | false] }}", "connect_v1_ids": { "catalog_v1_id": "{{ itemID from Catalog v1 }}", "location_id": "{{ location where v1 ID is used }}" }, "present_at_all_locations": "{{ [true | false] }}", "present_at_location_ids": [ "{{ LOCATIONID-1 }}", "{{ LOCATIONID-N }}" ], "absent_at_location_ids": [ "{{ LOCATIONID-1 }}", "{{ LOCATIONID-N }}" ], "item_data": "{{ CatalogItem object only if type\u003dITEM }}", "item_variation_data": "{{ CatalogItemVariation object only if type\u003dITEM_VARIATION }}", "modifier_data": "{{ CatalogModifier object only if type\u003dMODIFIER }}", "modifier_list_data": "{{ CatalogModifierList object only if type\u003dMODIFIER_LIST }}", "category_data": "{{ CatalogCategory object only if type\u003dCATEGORY }}", "discount_data": "{{ CatalogDiscount object only if type\u003dDISCOUNT }}", "tax_data": "{{ CatalogTax object only if type\u003dTAX }}" } } }, "CatalogObjectBatch": { "type": "object", "required": [ "objects" ], "properties": { "objects": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "A list of CatalogObjects belonging to this batch." } }, "description": "A batch of catalog objects.", "x-release-status": "PUBLIC" }, "CatalogObjectCategory": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the object\u0027s category." }, "ordinal": { "type": "integer", "format": "int64", "description": "The order of the object within the context of the category." } }, "description": "A category that can be assigned to an item or a parent category that can be assigned \nto another category. For example, a clothing category can be assigned to a t-shirt item or \nbe made as the parent category to the pants category.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogObjectReference": { "type": "object", "properties": { "object_id": { "type": "string", "description": "The ID of the referenced object." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the object." } }, "description": "A reference to a Catalog object at a specific version. In general this is\nused as an entry point into a graph of catalog objects, where the objects exist\nat a specific version.", "x-release-status": "PUBLIC" }, "CatalogPricingRule": { "type": "object", "properties": { "name": { "type": "string", "description": "User-defined name for the pricing rule. For example, \"Buy one get one\nfree\" or \"10% off\"." }, "time_period_ids": { "type": "array", "items": { "type": "string" }, "description": "A list of unique IDs for the catalog time periods when\nthis pricing rule is in effect. If left unset, the pricing rule is always\nin effect." }, "discount_id": { "type": "string", "description": "Unique ID for the `CatalogDiscount` to take off\nthe price of all matched items." }, "match_products_id": { "type": "string", "description": "Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule\nmatches within the entire cart, and can match multiple times. This field will always be set." }, "apply_products_id": { "type": "string", "description": "__Deprecated__: Please use the `exclude_products_id` field to apply\nan exclude set instead. Exclude sets allow better control over quantity\nranges and offer more flexibility for which matched items receive a discount.\n\n`CatalogProductSet` to apply the pricing to.\nAn apply rule matches within the subset of the cart that fits the match rules (the match set).\nAn apply rule can only match once in the match set.\nIf not supplied, the pricing will be applied to all products in the match set.\nOther products retain their base price, or a price generated by other rules.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "exclude_products_id": { "type": "string", "description": "`CatalogProductSet` to exclude from the pricing rule.\nAn exclude rule matches within the subset of the cart that fits the match rules (the match set).\nAn exclude rule can only match once in the match set.\nIf not supplied, the pricing will be applied to all products in the match set.\nOther products retain their base price, or a price generated by other rules." }, "valid_from_date": { "type": "string", "description": "Represents the date the Pricing Rule is valid from. Represented in RFC 3339 full-date format (YYYY-MM-DD)." }, "valid_from_local_time": { "type": "string", "description": "Represents the local time the pricing rule should be valid from. Represented in RFC 3339 partial-time format\n(HH:MM:SS). Partial seconds will be truncated." }, "valid_until_date": { "type": "string", "description": "Represents the date the Pricing Rule is valid until. Represented in RFC 3339 full-date format (YYYY-MM-DD)." }, "valid_until_local_time": { "type": "string", "description": "Represents the local time the pricing rule should be valid until. Represented in RFC 3339 partial-time format\n(HH:MM:SS). Partial seconds will be truncated." }, "exclude_strategy": { "type": "string", "description": "If an `exclude_products_id` was given, controls which subset of matched\nproducts is excluded from any discounts.\n\nDefault value: `LEAST_EXPENSIVE`" }, "minimum_order_subtotal_money": { "$ref": "#/definitions/Money", "description": "The minimum order subtotal (before discounts or taxes are applied)\nthat must be met before this rule may be applied." }, "customer_group_ids_any": { "type": "array", "items": { "type": "string" }, "description": "A list of IDs of customer groups, the members of which are eligible for discounts specified in this pricing rule.\nNotice that a group ID is generated by the Customers API.\nIf this field is not set, the specified discount applies to matched products sold to anyone whether the buyer\nhas a customer profile created or not. If this `customer_group_ids_any` field is set, the specified discount\napplies only to matched products sold to customers belonging to the specified customer groups." } }, "description": "Defines how discounts are automatically applied to a set of items that match the pricing rule\nduring the active time period.", "x-release-status": "PUBLIC" }, "CatalogProductSet": { "type": "object", "properties": { "name": { "type": "string", "description": "User-defined name for the product set. For example, \"Clearance Items\"\nor \"Winter Sale Items\"." }, "product_ids_any": { "type": "array", "items": { "type": "string" }, "description": " Unique IDs for any `CatalogObject` included in this product set. Any\nnumber of these catalog objects can be in an order for a pricing rule to apply.\n\nThis can be used with `product_ids_all` in a parent `CatalogProductSet` to\nmatch groups of products for a bulk discount, such as a discount for an\nentree and side combo.\n\nOnly one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.\n\nMax: 500 catalog object IDs." }, "product_ids_all": { "type": "array", "items": { "type": "string" }, "description": "Unique IDs for any `CatalogObject` included in this product set.\nAll objects in this set must be included in an order for a pricing rule to apply.\n\nOnly one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.\n\nMax: 500 catalog object IDs." }, "quantity_exact": { "type": "integer", "format": "int64", "description": "If set, there must be exactly this many items from `products_any` or `products_all`\nin the cart for the discount to apply.\n\nCannot be combined with either `quantity_min` or `quantity_max`." }, "quantity_min": { "type": "integer", "format": "int64", "description": "If set, there must be at least this many items from `products_any` or `products_all`\nin a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if\n`quantity_exact`, `quantity_min` and `quantity_max` are all unspecified." }, "quantity_max": { "type": "integer", "format": "int64", "description": "If set, the pricing rule will apply to a maximum of this many items from\n`products_any` or `products_all`." }, "all_products": { "type": "boolean", "description": "If set to `true`, the product set will include every item in the catalog.\nOnly one of `product_ids_all`, `product_ids_any`, or `all_products` can be set." } }, "description": "Represents a collection of catalog objects for the purpose of applying a\n`PricingRule`. Including a catalog object will include all of its subtypes.\nFor example, including a category in a product set will include all of its\nitems and associated item variations in the product set. Including an item in\na product set will also include its item variations.", "x-release-status": "PUBLIC" }, "CatalogQuery": { "type": "object", "properties": { "sorted_attribute_query": { "$ref": "#/definitions/CatalogQuerySortedAttribute", "description": "A query expression to sort returned query result by the given attribute." }, "exact_query": { "$ref": "#/definitions/CatalogQueryExact", "description": "An exact query expression to return objects with attribute name and value\nmatching the specified attribute name and value exactly. Value matching is case insensitive." }, "set_query": { "$ref": "#/definitions/CatalogQuerySet", "description": "A set query expression to return objects with attribute name and value\nmatching the specified attribute name and any of the specified attribute values exactly.\nValue matching is case insensitive." }, "prefix_query": { "$ref": "#/definitions/CatalogQueryPrefix", "description": "A prefix query expression to return objects with attribute values\nthat have a prefix matching the specified string value. Value matching is case insensitive." }, "range_query": { "$ref": "#/definitions/CatalogQueryRange", "description": "A range query expression to return objects with numeric values\nthat lie in the specified range." }, "text_query": { "$ref": "#/definitions/CatalogQueryText", "description": "A text query expression to return objects whose searchable attributes contain all of the given\nkeywords, irrespective of their order. For example, if a `CatalogItem` contains custom attribute values of\n`{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, the query filter of `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}`\nreturns this item." }, "items_for_tax_query": { "$ref": "#/definitions/CatalogQueryItemsForTax", "description": "A query expression to return items that have any of the specified taxes (as identified by the corresponding `CatalogTax` object IDs) enabled." }, "items_for_modifier_list_query": { "$ref": "#/definitions/CatalogQueryItemsForModifierList", "description": "A query expression to return items that have any of the given modifier list (as identified by the corresponding `CatalogModifierList`s IDs) enabled." }, "items_for_item_options_query": { "$ref": "#/definitions/CatalogQueryItemsForItemOptions", "description": "A query expression to return items that contains the specified item options (as identified the corresponding `CatalogItemOption` IDs)." }, "item_variations_for_item_option_values_query": { "$ref": "#/definitions/CatalogQueryItemVariationsForItemOptionValues", "description": "A query expression to return item variations (of the [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) type) that\ncontain all of the specified `CatalogItemOption` IDs." } }, "description": "A query composed of one or more different types of filters to narrow the scope of targeted objects when calling the `SearchCatalogObjects` endpoint.\n\nAlthough a query can have multiple filters, only certain query types can be combined per call to [SearchCatalogObjects](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-objects).\nAny combination of the following types may be used together:\n- [exact_query](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogQueryExact)\n- [prefix_query](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogQueryPrefix)\n- [range_query](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogQueryRange)\n- [sorted_attribute_query](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogQuerySortedAttribute)\n- [text_query](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogQueryText)\n\nAll other query types cannot be combined with any others.\n\nWhen a query filter is based on an attribute, the attribute must be searchable.\nSearchable attributes are listed as follows, along their parent types that can be searched for with applicable query filters.\n\nSearchable attribute and objects queryable by searchable attributes:\n- `name`: `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, `CatalogTax`, `CatalogDiscount`, `CatalogModifier`, `CatalogModifierList`, `CatalogItemOption`, `CatalogItemOptionValue`\n- `description`: `CatalogItem`, `CatalogItemOptionValue`\n- `abbreviation`: `CatalogItem`\n- `upc`: `CatalogItemVariation`\n- `sku`: `CatalogItemVariation`\n- `caption`: `CatalogImage`\n- `display_name`: `CatalogItemOption`\n\nFor example, to search for [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) objects by searchable attributes, you can use\nthe `\"name\"`, `\"description\"`, or `\"abbreviation\"` attribute in an applicable query filter.", "x-release-status": "PUBLIC" }, "CatalogQueryExact": { "type": "object", "required": [ "attribute_name", "attribute_value" ], "properties": { "attribute_name": { "minLength": 1, "type": "string", "description": "The name of the attribute to be searched. Matching of the attribute name is exact." }, "attribute_value": { "type": "string", "description": "The desired value of the search attribute. Matching of the attribute value is case insensitive and can be partial.\nFor example, if a specified value of \"sma\", objects with the named attribute value of \"Small\", \"small\" are both matched." } }, "description": "The query filter to return the search result by exact match of the specified attribute name and value.", "x-release-status": "PUBLIC" }, "CatalogQueryItemVariationsForItemOptionValues": { "type": "object", "properties": { "item_option_value_ids": { "type": "array", "items": { "type": "string" }, "description": "A set of `CatalogItemOptionValue` IDs to be used to find associated\n`CatalogItemVariation`s. All ItemVariations that contain all of the given\nItem Option Values (in any order) will be returned." } }, "description": "The query filter to return the item variations containing the specified item option value IDs.", "x-release-status": "PUBLIC" }, "CatalogQueryItemsForItemOptions": { "type": "object", "properties": { "item_option_ids": { "type": "array", "items": { "type": "string" }, "description": "A set of `CatalogItemOption` IDs to be used to find associated\n`CatalogItem`s. All Items that contain all of the given Item Options (in any order)\nwill be returned." } }, "description": "The query filter to return the items containing the specified item option IDs.", "x-release-status": "PUBLIC" }, "CatalogQueryItemsForModifierList": { "type": "object", "required": [ "modifier_list_ids" ], "properties": { "modifier_list_ids": { "type": "array", "items": { "type": "string" }, "description": "A set of `CatalogModifierList` IDs to be used to find associated `CatalogItem`s." } }, "description": "The query filter to return the items containing the specified modifier list IDs.", "x-release-status": "PUBLIC" }, "CatalogQueryItemsForTax": { "type": "object", "required": [ "tax_ids" ], "properties": { "tax_ids": { "type": "array", "items": { "type": "string" }, "description": "A set of `CatalogTax` IDs to be used to find associated `CatalogItem`s." } }, "description": "The query filter to return the items containing the specified tax IDs.", "x-release-status": "PUBLIC" }, "CatalogQueryPrefix": { "type": "object", "required": [ "attribute_name", "attribute_prefix" ], "properties": { "attribute_name": { "minLength": 1, "type": "string", "description": "The name of the attribute to be searched." }, "attribute_prefix": { "minLength": 1, "type": "string", "description": "The desired prefix of the search attribute value." } }, "description": "The query filter to return the search result whose named attribute values are prefixed by the specified attribute value.", "x-release-status": "PUBLIC" }, "CatalogQueryRange": { "type": "object", "required": [ "attribute_name" ], "properties": { "attribute_name": { "minLength": 1, "type": "string", "description": "The name of the attribute to be searched." }, "attribute_min_value": { "type": "integer", "format": "int64", "description": "The desired minimum value for the search attribute (inclusive)." }, "attribute_max_value": { "type": "integer", "format": "int64", "description": "The desired maximum value for the search attribute (inclusive)." } }, "description": "The query filter to return the search result whose named attribute values fall between the specified range.", "x-release-status": "PUBLIC" }, "CatalogQuerySet": { "type": "object", "required": [ "attribute_name", "attribute_values" ], "properties": { "attribute_name": { "minLength": 1, "type": "string", "description": "The name of the attribute to be searched. Matching of the attribute name is exact." }, "attribute_values": { "type": "array", "items": { "type": "string" }, "description": "The desired values of the search attribute. Matching of the attribute values is exact and case insensitive.\nA maximum of 250 values may be searched in a request." } }, "description": "The query filter to return the search result(s) by exact match of the specified `attribute_name` and any of\nthe `attribute_values`.", "x-release-status": "PUBLIC" }, "CatalogQuerySortedAttribute": { "type": "object", "required": [ "attribute_name" ], "properties": { "attribute_name": { "minLength": 1, "type": "string", "description": "The attribute whose value is used as the sort key." }, "initial_attribute_value": { "type": "string", "description": "The first attribute value to be returned by the query. Ascending sorts will return only\nobjects with this value or greater, while descending sorts will return only objects with this value\nor less. If unset, start at the beginning (for ascending sorts) or end (for descending sorts)." }, "sort_order": { "type": "string", "description": "The desired sort order, `\"ASC\"` (ascending) or `\"DESC\"` (descending)." } }, "description": "The query expression to specify the key to sort search results.", "x-release-status": "PUBLIC" }, "CatalogQueryText": { "type": "object", "required": [ "keywords" ], "properties": { "keywords": { "type": "array", "items": { "type": "string" }, "description": "A list of 1, 2, or 3 search keywords. Keywords with fewer than 3 alphanumeric characters are ignored." } }, "description": "The query filter to return the search result whose searchable attribute values contain all of the specified keywords or tokens, independent of the token order or case.", "x-release-status": "PUBLIC" }, "CatalogQuickAmount": { "type": "object", "required": [ "type", "amount" ], "properties": { "type": { "type": "string", "description": "Represents the type of the Quick Amount." }, "amount": { "$ref": "#/definitions/Money", "description": "Represents the actual amount of the Quick Amount with Money type." }, "score": { "type": "integer", "format": "int64", "description": "Describes the ranking of the Quick Amount provided by machine learning model, in the range [0, 100].\nMANUAL type amount will always have score \u003d 100." }, "ordinal": { "type": "integer", "format": "int64", "description": "The order in which this Quick Amount should be displayed." } }, "description": "Represents a Quick Amount in the Catalog.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogQuickAmountsSettings": { "type": "object", "required": [ "option" ], "properties": { "option": { "type": "string", "description": "Represents the option seller currently uses on Quick Amounts." }, "eligible_for_auto_amounts": { "type": "boolean", "description": "Represents location\u0027s eligibility for auto amounts\nThe boolean should be consistent with whether there are AUTO amounts in the `amounts`." }, "amounts": { "type": "array", "items": { "$ref": "#/definitions/CatalogQuickAmount" }, "description": "Represents a set of Quick Amounts at this location." } }, "description": "A parent Catalog Object model represents a set of Quick Amounts and the settings control the amounts.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogStockConversion": { "type": "object", "required": [ "stockable_item_variation_id", "stockable_quantity", "nonstockable_quantity" ], "properties": { "stockable_item_variation_id": { "minLength": 1, "type": "string", "description": "References to the stockable [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation)\nfor this stock conversion. Selling, receiving or recounting the non-stockable `CatalogItemVariation`\ndefined with a stock conversion results in adjustments of this stockable `CatalogItemVariation`.\nThis immutable field must reference a stockable `CatalogItemVariation`\nthat shares the parent [CatalogItem](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItem) of the converted `CatalogItemVariation.`" }, "stockable_quantity": { "minLength": 1, "maxLength": 16, "type": "string", "description": "The quantity of the stockable item variation (as identified by `stockable_item_variation_id`)\nequivalent to the non-stockable item variation quantity (as specified in `nonstockable_quantity`)\nas defined by this stock conversion. It accepts a decimal number in a string format that can take\nup to 10 digits before the decimal point and up to 5 digits after the decimal point." }, "nonstockable_quantity": { "minLength": 1, "maxLength": 16, "type": "string", "description": "The converted equivalent quantity of the non-stockable [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation)\nin its measurement unit. The `stockable_quantity` value and this `nonstockable_quantity` value together\ndefine the conversion ratio between stockable item variation and the non-stockable item variation.\nIt accepts a decimal number in a string format that can take up to 10 digits before the decimal point\nand up to 5 digits after the decimal point." } }, "description": "Represents the rule of conversion between a stockable [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation)\nand a non-stockable sell-by or receive-by `CatalogItemVariation` that\nshare the same underlying stock.", "x-release-status": "BETA", "x-is-beta": true }, "CatalogSubscriptionPlan": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "The name of the plan." }, "phases": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionPhase" }, "description": "A list of SubscriptionPhase containing the [SubscriptionPhase](https://developer.squareup.com/reference/square_2024-04-17/objects/SubscriptionPhase) for this plan.\nThis field it required. Not including this field will throw a REQUIRED_FIELD_MISSING error" }, "subscription_plan_variations": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "The list of subscription plan variations available for this product" }, "eligible_item_ids": { "type": "array", "items": { "type": "string" }, "description": "The list of IDs of `CatalogItems` that are eligible for subscription by this SubscriptionPlan\u0027s variations." }, "eligible_category_ids": { "type": "array", "items": { "type": "string" }, "description": "The list of IDs of `CatalogCategory` that are eligible for subscription by this SubscriptionPlan\u0027s variations." }, "all_items": { "type": "boolean", "description": "If true, all items in the merchant\u0027s catalog are subscribable by this SubscriptionPlan." } }, "description": "Describes a subscription plan. A subscription plan represents what you want to sell in a subscription model, and includes references to each of the associated subscription plan variations.\nFor more information, see [Subscription Plans and Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).", "x-release-status": "PUBLIC" }, "CatalogSubscriptionPlanVariation": { "type": "object", "required": [ "name", "phases" ], "properties": { "name": { "type": "string", "description": "The name of the plan variation." }, "phases": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionPhase" }, "description": "A list containing each [SubscriptionPhase](https://developer.squareup.com/reference/square_2024-04-17/objects/SubscriptionPhase) for this plan variation." }, "subscription_plan_id": { "type": "string", "description": "The id of the subscription plan, if there is one." }, "monthly_billing_anchor_date": { "maximum": 31, "minimum": 1, "type": "integer", "format": "int64", "description": "The day of the month the billing period starts." }, "can_prorate": { "type": "boolean", "description": "Whether bills for this plan variation can be split for proration." }, "successor_plan_variation_id": { "type": "string", "description": "The ID of a \"successor\" plan variation to this one. If the field is set, and this object is disabled at all\nlocations, it indicates that this variation is deprecated and the object identified by the successor ID be used in\nits stead." } }, "description": "Describes a subscription plan variation. A subscription plan variation represents how the subscription for a product or service is sold.\nFor more information, see [Subscription Plans and Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).", "x-release-status": "PUBLIC" }, "CatalogTax": { "type": "object", "properties": { "name": { "maxLength": 255, "type": "string", "description": "The tax\u0027s name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points." }, "calculation_phase": { "type": "string", "description": "Whether the tax is calculated based on a payment\u0027s subtotal or total." }, "inclusion_type": { "type": "string", "description": "Whether the tax is `ADDITIVE` or `INCLUSIVE`." }, "percentage": { "type": "string", "description": "The percentage of the tax in decimal form, using a `\u0027.\u0027` as the decimal separator and without a `\u0027%\u0027` sign.\nA value of `7.5` corresponds to 7.5%. For a location-specific tax rate, contact the tax authority of the location or a tax consultant." }, "applies_to_custom_amounts": { "type": "boolean", "description": "If `true`, the fee applies to custom amounts entered into the Square Point of Sale\napp that are not associated with a particular `CatalogItem`." }, "enabled": { "type": "boolean", "description": "A Boolean flag to indicate whether the tax is displayed as enabled (`true`) in the Square Point of Sale app or not (`false`)." }, "applies_to_product_set_id": { "type": "string", "description": "The ID of a `CatalogProductSet` object. If set, the tax is applicable to all products in the product set.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "A tax applicable to an item.", "x-release-status": "PUBLIC", "example": { "object": { "type": "TAX", "id": "#SalesTax", "present_at_all_locations": true, "tax_data": { "name": "Sales Tax", "calculation_phase": "TAX_SUBTOTAL_PHASE", "inclusion_type": "ADDITIVE", "percentage": "5.0", "fee_applies_to_custom_amounts": true, "enabled": true } } } }, "CatalogTimePeriod": { "type": "object", "properties": { "event": { "type": "string", "description": "An iCalendar (RFC 5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which\nspecifies the name, timing, duration and recurrence of this time period.\n\nExample:\n\n```\nDTSTART:20190707T180000\nDURATION:P2H\nRRULE:FREQ\u003dWEEKLY;BYDAY\u003dMO,WE,FR\n```\n\nOnly `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported.\n`DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT`\nand `END:VEVENT` is not required in the request. The response will always\ninclude them." } }, "description": "Represents a time period - either a single period or a repeating period.", "x-release-status": "PUBLIC" }, "CatalogV1Id": { "type": "object", "properties": { "catalog_v1_id": { "type": "string", "description": "The ID for an object used in the Square API V1, if the object ID differs from the Square API V2 object ID." }, "location_id": { "type": "string", "description": "The ID of the `Location` this Connect V1 ID is associated with." } }, "description": "A Square API V1 identifier of an item, including the object ID and its associated location ID.", "x-release-status": "PUBLIC" }, "CategoryPathToRootNode": { "type": "object", "properties": { "category_id": { "type": "string", "description": "The category\u0027s ID." }, "category_name": { "type": "string", "description": "The category\u0027s name." } }, "description": "A node in the path from a retrieved category to its root node.", "x-release-status": "BETA", "x-is-beta": true }, "ChangeBillingAnchorDateRequest": { "type": "object", "properties": { "monthly_billing_anchor_date": { "maximum": 31, "minimum": 1, "type": "integer", "description": "The anchor day for the billing cycle." }, "effective_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date when the scheduled `BILLING_ANCHOR_CHANGE` action takes\nplace on the subscription.\n\nWhen this date is unspecified or falls within the current billing cycle, the billing anchor date\nis changed immediately." } }, "description": "Defines input parameters in a request to the\n[ChangeBillingAnchorDate](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/change-billing-anchor-date) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "monthly_billing_anchor_date": 1 } } }, "ChangeBillingAnchorDateResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The specified subscription for updating billing anchor date." }, "actions": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionAction" }, "description": "A list of a single billing anchor date change for the subscription." } }, "description": "Defines output parameters in a request to the\n[ChangeBillingAnchorDate](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/change-billing-anchor-date) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "subscription": { "id": "9ba40961-995a-4a3d-8c53-048c40cafc13", "location_id": "S8GWD5R9QB376", "plan_variation_id": "FQ7CDXXWSLUJRPM3GFJSJGZ7", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "status": "ACTIVE", "price_override_money": { "amount": 2000, "currency": "USD" }, "version": 3, "created_at": "2023-06-20T21:53:10Z", "timezone": "America/Los_Angeles", "source": { "name": "My Application" }, "phases": [ { "uid": "98d6f53b-40e1-4714-8827-032fd923be25", "ordinal": 0, "order_template_id": "E6oBY5WfQ2eN4pkYZwq4ka6n7KeZY", "plan_phase_uid": "C66BKH3ASTDYGJJCEZXQQSS7" } ], "monthly_billing_anchor_date": 20 }, "actions": [ { "id": "f0a1dfdc-675b-3a14-a640-99f7ac1cee83", "type": "CHANGE_BILLING_ANCHOR_DATE", "effective_date": "2023-11-01", "monthly_billing_anchor_date": 1 } ] } }, "ChargeRequest": { "type": "object", "required": [ "idempotency_key", "amount_money" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 192, "type": "string", "description": "A value you specify that uniquely identifies this\ntransaction among transactions you\u0027ve created.\n\nIf you\u0027re unsure whether a particular transaction succeeded,\nyou can reattempt it with the same idempotency key without\nworrying about double-charging the buyer.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/working-with-apis/idempotency) for more information." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money to charge.\n\nNote that you specify the amount in the\n__smallest denomination of the applicable currency__. For example, US dollar\namounts are specified in cents. See\n[Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details.\n\nThe value of `currency` must match the currency associated with the business\nthat is charging the card." }, "card_nonce": { "maxLength": 192, "type": "string", "description": "A payment token generated from the [Card.tokenize()](https://developer.squareup.com/reference/sdks/web/payments/objects/Card#Card.tokenize) that represents the card\nto charge.\n\nThe application that provides a payment token to this endpoint must be the\n_same application_ that generated the payment token with the Web Payments SDK.\nOtherwise, the nonce is invalid.\n\nDo not provide a value for this field if you provide a value for\n`customer_card_id`." }, "customer_card_id": { "maxLength": 192, "type": "string", "description": "The ID of the customer card on file to charge. Do\nnot provide a value for this field if you provide a value for `card_nonce`.\n\nIf you provide this value, you _must_ also provide a value for\n`customer_id`." }, "delay_capture": { "type": "boolean", "description": "If `true`, the request will only perform an Auth on the provided\ncard. You can then later perform either a Capture (with the\n[CaptureTransaction](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/capture-transaction) endpoint) or a Void\n(with the [VoidTransaction](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/void-transaction) endpoint).\n\nDefault value: `false`" }, "reference_id": { "maxLength": 40, "type": "string", "description": "An optional ID you can associate with the transaction for your own\npurposes (such as to associate the transaction with an entity ID in your\nown database).\n\nThis value cannot exceed 40 characters." }, "note": { "maxLength": 60, "type": "string", "description": "An optional note to associate with the transaction.\n\nThis value cannot exceed 60 characters." }, "customer_id": { "maxLength": 50, "type": "string", "description": "The ID of the customer to associate this transaction with. This field\nis required if you provide a value for `customer_card_id`, and optional\notherwise." }, "billing_address": { "$ref": "#/definitions/Address", "description": "The buyer\u0027s billing address. This value is optional, but this transaction\nis ineligible for chargeback protection if neither this parameter nor\n`shipping_address` is provided." }, "shipping_address": { "$ref": "#/definitions/Address", "description": "The buyer\u0027s shipping address, if available. This value is optional,\nbut this transaction is ineligible for chargeback protection if neither this\nparameter nor `billing_address` is provided." }, "buyer_email_address": { "type": "string", "description": "The buyer\u0027s email address, if available. This value is optional,\nbut this transaction is ineligible for chargeback protection if it is not\nprovided." }, "order_id": { "maxLength": 192, "type": "string", "description": "The ID of the order to associate with this transaction.\n\nIf you provide this value, the `amount_money` value of your request must\n__exactly match__ the value of the order\u0027s `total_money` field." }, "additional_recipients": { "type": "array", "items": { "$ref": "#/definitions/AdditionalRecipient" }, "description": "The basic primitive of multi-party transaction. The value is optional.\nThe transaction facilitated by you can be split from here.\n\nIf you provide this value, the `amount_money` value in your additional_recipients\nmust not be more than 90% of the `amount_money` value in the charge request.\nThe `location_id` must be the valid location of the app owner merchant.\n\nThis field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission.\n\nThis field is currently not supported in sandbox." }, "verification_token": { "type": "string", "description": "A token generated by SqPaymentForm\u0027s verifyBuyer() that represents\ncustomer\u0027s device info and 3ds challenge result." } }, "description": "Defines the parameters that can be included in the body of\na request to the [Charge](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/charge) endpoint.\n\nDeprecated - recommend using [CreatePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/create-payment)", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "request_body": { "idempotency_key": "74ae1696-b1e3-4328-af6d-f1e04d947a13", "shipping_address": { "address_line_1": "123 Main St", "locality": "San Francisco", "administrative_district_level_1": "CA", "postal_code": "94114", "country": "US" }, "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "administrative_district_level_1": "NY", "locality": "New York", "postal_code": "10003", "country": "US" }, "amount_money": { "amount": 200, "currency": "USD" }, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 20, "currency": "USD" } } ], "card_nonce": "card_nonce_from_square_123", "reference_id": "some optional reference id", "note": "some optional note", "delay_capture": false } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Charge/ChargeRequest.python", "csharp": "/sdk_samples/Charge/ChargeRequest.csharp", "java": "/sdk_samples/Charge/ChargeRequest.java", "php": "/sdk_samples/Charge/ChargeRequest.php", "javascript": "/sdk_samples/Charge/ChargeRequest.javascript", "ruby": "/sdk_samples/Charge/ChargeRequest.ruby" } }, "ChargeRequestAdditionalRecipient": { "type": "object", "required": [ "location_id", "description", "amount_money" ], "properties": { "location_id": { "minLength": 1, "maxLength": 50, "type": "string", "description": "The location ID for a recipient (other than the merchant) receiving a portion of the tender." }, "description": { "minLength": 1, "maxLength": 100, "type": "string", "description": "The description of the additional recipient." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money distributed to the recipient." } }, "description": "Represents an additional recipient (other than the merchant) entitled to a portion of the tender.\nSupport is currently limited to USD, CAD and GBP currencies", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "ChargeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "transaction": { "$ref": "#/definitions/Transaction", "description": "The created transaction." } }, "description": "Defines the fields that are included in the response body of\na request to the [Charge](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/charge) endpoint.\n\nOne of `errors` or `transaction` is present in a given response (never both).", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "transaction": { "id": "KnL67ZIwXCPtzOrqj0HrkxMF", "location_id": "18YC4JDH91E1H", "created_at": "2016-03-10T22:57:56Z", "tenders": [ { "id": "MtZRYYdDrYNQbOvV7nbuBvMF", "location_id": "18YC4JDH91E1H", "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF", "created_at": "2016-03-10T22:57:56Z", "note": "some optional note", "amount_money": { "amount": 200, "currency": "USD" }, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 20, "currency": "USD" }, "receivable_id": "ISu5xwxJ5v0CMJTQq7RvqyMF" } ], "type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111" }, "entry_method": "KEYED" } } ], "reference_id": "some optional reference id", "product": "EXTERNAL_API" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Charge/ChargeResponse.python", "csharp": "/sdk_samples/Charge/ChargeResponse.csharp", "java": "/sdk_samples/Charge/ChargeResponse.java", "php": "/sdk_samples/Charge/ChargeResponse.php", "javascript": "/sdk_samples/Charge/ChargeResponse.javascript", "ruby": "/sdk_samples/Charge/ChargeResponse.ruby" } }, "Checkout": { "type": "object", "properties": { "id": { "type": "string", "description": "ID generated by Square Checkout when a new checkout is requested." }, "checkout_page_url": { "type": "string", "description": "The URL that the buyer\u0027s browser should be redirected to after the\ncheckout is completed." }, "ask_for_shipping_address": { "type": "boolean", "description": "If `true`, Square Checkout will collect shipping information on your\nbehalf and store that information with the transaction information in your\nSquare Dashboard.\n\nDefault: `false`." }, "merchant_support_email": { "type": "string", "description": "The email address to display on the Square Checkout confirmation page\nand confirmation email that the buyer can use to contact the merchant.\n\nIf this value is not set, the confirmation page and email will display the\nprimary email address associated with the merchant\u0027s Square account.\n\nDefault: none; only exists if explicitly set." }, "pre_populate_buyer_email": { "type": "string", "description": "If provided, the buyer\u0027s email is pre-populated on the checkout page\nas an editable text field.\n\nDefault: none; only exists if explicitly set." }, "pre_populate_shipping_address": { "$ref": "#/definitions/Address", "description": "If provided, the buyer\u0027s shipping info is pre-populated on the\ncheckout page as editable text fields.\n\nDefault: none; only exists if explicitly set." }, "redirect_url": { "type": "string", "description": "The URL to redirect to after checkout is completed with `checkoutId`,\nSquare\u0027s `orderId`, `transactionId`, and `referenceId` appended as URL\nparameters. For example, if the provided redirect_url is\n`http://www.example.com/order-complete`, a successful transaction redirects\nthe customer to:\n\n\u003cpre\u003e\u003ccode\u003ehttp://www.example.com/order-complete?checkoutId\u003dxxxxxx\u0026amp;orderId\u003dxxxxxx\u0026amp;referenceId\u003dxxxxxx\u0026amp;transactionId\u003dxxxxxx\u003c/code\u003e\u003c/pre\u003e\n\nIf you do not provide a redirect URL, Square Checkout will display an order\nconfirmation page on your behalf; however Square strongly recommends that\nyou provide a redirect URL so you can verify the transaction results and\nfinalize the order through your existing/normal confirmation workflow." }, "order": { "$ref": "#/definitions/Order", "description": "Order to be checked out." }, "created_at": { "type": "string", "description": "The time when the checkout was created, in RFC 3339 format.", "x-read-only": true }, "additional_recipients": { "type": "array", "items": { "$ref": "#/definitions/AdditionalRecipient" }, "description": "Additional recipients (other than the merchant) receiving a portion of this checkout.\nFor example, fees assessed on the purchase by a third party integration.", "x-release-status": "DEPRECATED", "x-is-deprecated": true } }, "description": "Square Checkout lets merchants accept online payments for supported\npayment types using a checkout workflow hosted on squareup.com.", "x-release-status": "PUBLIC" }, "CheckoutLocationSettings": { "type": "object", "properties": { "location_id": { "type": "string", "description": "The ID of the location that these settings apply to." }, "customer_notes_enabled": { "type": "boolean", "description": "Indicates whether customers are allowed to leave notes at checkout." }, "policies": { "type": "array", "items": { "$ref": "#/definitions/Policy" }, "description": "Policy information is displayed at the bottom of the checkout pages.\nYou can set a maximum of two policies." }, "branding": { "$ref": "#/definitions/Branding", "description": "The branding settings for this location." }, "tipping": { "$ref": "#/definitions/Tipping", "description": "The tip settings for this location." }, "coupons": { "$ref": "#/definitions/Coupons", "description": "The coupon settings for this location." }, "updated_at": { "type": "string", "description": "The timestamp when the settings were last updated, in RFC 3339 format.\nExamples for January 25th, 2020 6:25:34pm Pacific Standard Time:\nUTC: 2020-01-26T02:25:34Z\nPacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutLocationSettingsBranding": { "type": "object", "properties": { "header_type": { "type": "string", "description": "Show the location logo on the checkout page." }, "button_color": { "minLength": 7, "maxLength": 7, "type": "string", "description": "The HTML-supported hex color for the button on the checkout page (for example, \"#FFFFFF\")." }, "button_shape": { "type": "string", "description": "The shape of the button on the checkout page." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutLocationSettingsCoupons": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Indicates whether coupons are enabled for this location." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutLocationSettingsPolicy": { "type": "object", "properties": { "uid": { "type": "string", "description": "A unique ID to identify the policy when making changes. You must set the UID for policy updates, but it’s optional when setting new policies." }, "title": { "maxLength": 50, "type": "string", "description": "The title of the policy. This is required when setting the description, though you can update it in a different request." }, "description": { "maxLength": 4096, "type": "string", "description": "The description of the policy." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutLocationSettingsTipping": { "type": "object", "properties": { "percentages": { "type": "array", "items": { "maximum": 100, "minimum": 0, "type": "integer" }, "description": "Set three custom percentage amounts that buyers can select at checkout. If Smart Tip is enabled, this only applies to transactions totaling $10 or more." }, "smart_tipping_enabled": { "type": "boolean", "description": "Enables Smart Tip Amounts. If Smart Tip Amounts is enabled, tipping works as follows:\nIf a transaction is less than $10, the available tipping options include No Tip, $1, $2, or $3.\nIf a transaction is $10 or more, the available tipping options include No Tip, 15%, 20%, or 25%. \nYou can set custom percentage amounts with the `percentages` field." }, "default_percent": { "type": "integer", "description": "Set the pre-selected percentage amounts that appear at checkout. If Smart Tip is enabled, this only applies to transactions totaling $10 or more." }, "smart_tips": { "type": "array", "items": { "$ref": "#/definitions/Money" }, "description": "Show the Smart Tip Amounts for this location." }, "default_smart_tip": { "$ref": "#/definitions/Money", "description": "Set the pre-selected whole amount that appears at checkout when Smart Tip is enabled and the transaction amount is less than $10." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutMerchantSettings": { "type": "object", "properties": { "payment_methods": { "$ref": "#/definitions/PaymentMethods", "description": "The set of payment methods accepted for the merchant\u0027s account." }, "updated_at": { "type": "string", "description": "The timestamp when the settings were last updated, in RFC 3339 format.\nExamples for January 25th, 2020 6:25:34pm Pacific Standard Time:\nUTC: 2020-01-26T02:25:34Z\nPacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutMerchantSettingsPaymentMethods": { "type": "object", "properties": { "apple_pay": { "$ref": "#/definitions/PaymentMethod", "description": "" }, "google_pay": { "$ref": "#/definitions/PaymentMethod", "description": "" }, "cash_app": { "$ref": "#/definitions/PaymentMethod", "description": "" }, "afterpay_clearpay": { "$ref": "#/definitions/AfterpayClearpay", "description": "" } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay": { "type": "object", "properties": { "order_eligibility_range": { "$ref": "#/definitions/EligibilityRange", "description": "Afterpay is shown as an option for order totals falling within the configured range." }, "item_eligibility_range": { "$ref": "#/definitions/EligibilityRange", "description": "Afterpay is shown as an option for item totals falling within the configured range." }, "enabled": { "type": "boolean", "description": "Indicates whether the payment method is enabled for the account.", "x-read-only": true } }, "description": "The settings allowed for AfterpayClearpay.", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange": { "type": "object", "required": [ "min", "max" ], "properties": { "min": { "$ref": "#/definitions/Money", "description": "" }, "max": { "$ref": "#/definitions/Money", "description": "" } }, "description": "A range of purchase price that qualifies.", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutMerchantSettingsPaymentMethodsPaymentMethod": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Indicates whether the payment method is enabled for the account." } }, "description": "The settings allowed for a payment method.", "x-release-status": "BETA", "x-is-beta": true }, "CheckoutOptions": { "type": "object", "properties": { "allow_tipping": { "type": "boolean", "description": "Indicates whether the payment allows tipping." }, "custom_fields": { "type": "array", "items": { "$ref": "#/definitions/CustomField" }, "description": "The custom fields requesting information from the buyer." }, "subscription_plan_id": { "maxLength": 255, "type": "string", "description": "The ID of the subscription plan for the buyer to pay and subscribe.\nFor more information, see [Subscription Plan Checkout](https://developer.squareup.com/docs/checkout-api/subscription-plan-checkout)." }, "redirect_url": { "maxLength": 2048, "type": "string", "description": "The confirmation page URL to redirect the buyer to after Square processes the payment." }, "merchant_support_email": { "maxLength": 256, "type": "string", "description": "The email address that buyers can use to contact the seller." }, "ask_for_shipping_address": { "type": "boolean", "description": "Indicates whether to include the address fields in the payment form." }, "accepted_payment_methods": { "$ref": "#/definitions/AcceptedPaymentMethods", "description": "The methods allowed for buyers during checkout." }, "app_fee_money": { "$ref": "#/definitions/Money", "description": "The amount of money that the developer is taking as a fee for facilitating the payment on behalf of the seller.\n\nThe amount cannot be more than 90% of the total amount of the payment.\n\nThe amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-monetary-amounts).\n\nThe fee currency code must match the currency associated with the seller that is accepting the payment. The application must be from a developer account in the same country and using the same currency code as the seller. For more information about the application fee scenario, see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).\n\nTo set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/collect-fees/additional-considerations#permissions)." }, "shipping_fee": { "$ref": "#/definitions/ShippingFee", "description": "The fee associated with shipping to be applied to the `Order` as a service charge." }, "enable_coupon": { "type": "boolean", "description": "Indicates whether to include the `Add coupon` section for the buyer to provide a Square marketing coupon in the payment form." }, "enable_loyalty": { "type": "boolean", "description": "Indicates whether to include the `REWARDS` section for the buyer to opt in to loyalty, redeem rewards in the payment form, or both." } }, "description": "", "x-release-status": "PUBLIC" }, "ClearpayDetails": { "type": "object", "properties": { "email_address": { "maxLength": 255, "type": "string", "description": "Email address on the buyer\u0027s Clearpay account." } }, "description": "Additional details about Clearpay payments.", "x-release-status": "PUBLIC" }, "CloneOrderRequest": { "type": "object", "required": [ "order_id" ], "properties": { "order_id": { "type": "string", "description": "The ID of the order to clone." }, "version": { "type": "integer", "description": "An optional order version for concurrency protection.\n\nIf a version is provided, it must match the latest stored version of the order to clone.\nIf a version is not provided, the API clones the latest version." }, "idempotency_key": { "type": "string", "description": "A value you specify that uniquely identifies this clone request.\n\nIf you are unsure whether a particular order was cloned successfully,\nyou can reattempt the call with the same idempotency key without\nworrying about creating duplicate cloned orders.\nThe originally cloned order is returned.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Defines the fields that are included in requests to the\n[CloneOrder](https://developer.squareup.com/reference/square_2024-04-17/orders-api/clone-order) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "order_id": "ZAISEM52YcpmcWAzERDOyiWS123", "version": 3, "idempotency_key": "UNIQUE_STRING" } } }, "CloneOrderResponse": { "type": "object", "properties": { "order": { "$ref": "#/definitions/Order", "description": "The cloned order." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [CloneOrder](https://developer.squareup.com/reference/square_2024-04-17/orders-api/clone-order) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "order": { "id": "CAISENgvlJ6jLWAzERDzjyHVybY", "location_id": "057P5VYJ4A5X1", "line_items": [ { "uid": "8uSwfzvUImn3IRrvciqlXC", "name": "New York Strip Steak", "quantity": "1", "applied_taxes": [ { "uid": "aKG87ArnDpvMLSZJHxWUl", "tax_uid": "state-sales-tax", "applied_money": { "amount": 136, "currency": "USD" } } ], "applied_discounts": [ { "uid": "jWdgP1TpHPFBuVrz81mXVC", "discount_uid": "membership-discount", "applied_money": { "amount": 8, "currency": "USD" } }, { "uid": "jnZOjjVY57eRcQAVgEwFuC", "discount_uid": "labor-day-sale", "applied_money": { "amount": 79, "currency": "USD" } } ], "base_price_money": { "amount": 1599, "currency": "USD" }, "gross_sales_money": { "amount": 1599, "currency": "USD" }, "total_tax_money": { "amount": 136, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 87, "currency": "USD" }, "total_money": { "amount": 1648, "currency": "USD" }, "variation_total_price_money": { "amount": 1599, "currency": "USD" } }, { "uid": "v8ZuEXpOJpb0bazLuvrLDB", "name": "New York Steak", "quantity": "2", "catalog_object_id": "BEMYCSMIJL46OCDV4KYIKXIB", "variation_name": "Larger", "modifiers": [ { "uid": "Lo3qMMckDluu9Qsb58d4CC", "catalog_object_id": "CHQX7Y4KY6N5KINJKZCFURPZ", "name": "Well", "base_price_money": { "amount": 50, "currency": "USD" }, "total_price_money": { "amount": 100, "currency": "USD" } } ], "applied_taxes": [ { "uid": "v1dAgrfUVUPTnVTf9sRPz", "tax_uid": "state-sales-tax", "applied_money": { "amount": 374, "currency": "USD" } } ], "applied_discounts": [ { "uid": "nUXvdsIItfKko0dbYtY58C", "discount_uid": "membership-discount", "applied_money": { "amount": 22, "currency": "USD" } }, { "uid": "qSdkOOOernlVQqsJ94SPjB", "discount_uid": "labor-day-sale", "applied_money": { "amount": 224, "currency": "USD" } }, { "uid": "y7bVl4njrWAnfDwmz19izB", "discount_uid": "one-dollar-off", "applied_money": { "amount": 100, "currency": "USD" } } ], "base_price_money": { "amount": 2200, "currency": "USD" }, "gross_sales_money": { "amount": 4500, "currency": "USD" }, "total_tax_money": { "amount": 374, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 346, "currency": "USD" }, "total_money": { "amount": 4528, "currency": "USD" }, "variation_total_price_money": { "amount": 4400, "currency": "USD" } } ], "taxes": [ { "uid": "state-sales-tax", "name": "State Sales Tax", "type": "ADDITIVE", "percentage": "9", "applied_money": { "amount": 510, "currency": "USD" }, "scope": "ORDER" } ], "discounts": [ { "uid": "membership-discount", "catalog_object_id": "DB7L55ZH2BGWI4H23ULIWOQ7", "name": "Membership Discount", "type": "FIXED_PERCENTAGE", "percentage": "0.5", "applied_money": { "amount": 30, "currency": "USD" }, "scope": "ORDER" }, { "uid": "labor-day-sale", "name": "Labor Day Sale", "type": "FIXED_PERCENTAGE", "percentage": "5", "applied_money": { "amount": 303, "currency": "USD" }, "scope": "ORDER" }, { "uid": "one-dollar-off", "name": "Sale - $1.00 off", "type": "FIXED_AMOUNT", "amount_money": { "amount": 100, "currency": "USD" }, "applied_money": { "amount": 100, "currency": "USD" }, "scope": "LINE_ITEM" } ], "created_at": "2020-01-17T20:47:53.293Z", "updated_at": "2020-01-17T20:47:53.293Z", "state": "DRAFT", "version": 1, "reference_id": "my-order-001", "total_money": { "amount": 6176, "currency": "USD" }, "total_tax_money": { "amount": 510, "currency": "USD" }, "total_discount_money": { "amount": 433, "currency": "USD" }, "total_tip_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "net_amounts": { "total_money": { "amount": 6176, "currency": "USD" }, "tax_money": { "amount": 510, "currency": "USD" }, "discount_money": { "amount": 433, "currency": "USD" }, "tip_money": { "amount": 0, "currency": "USD" }, "service_charge_money": { "amount": 0, "currency": "USD" } }, "source": { "name": "My App" } } } }, "CollectedData": { "type": "object", "properties": { "input_text": { "type": "string", "description": "The buyer\u0027s input text.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "CompletePaymentRequest": { "type": "object", "properties": { "version_token": { "type": "string", "description": "Used for optimistic concurrency. This opaque token identifies the current `Payment` \nversion that the caller expects. If the server has a different version of the Payment, \nthe update fails and a response with a VERSION_MISMATCH error is returned.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Describes a request to complete (capture) a payment using \n[CompletePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/complete-payment).\n\nBy default, payments are set to `autocomplete` immediately after they are created.\nTo complete payments manually, set `autocomplete` to `false`.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "CompletePaymentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "payment": { "$ref": "#/definitions/Payment", "description": "The successfully completed payment." } }, "description": "Defines the response returned by[CompletePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/complete-payment).", "x-release-status": "PUBLIC", "example": { "payment": { "id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY", "created_at": "2021-10-13T19:34:33.524Z", "updated_at": "2021-10-13T19:34:34.339Z", "amount_money": { "amount": 555, "currency": "USD" }, "status": "COMPLETED", "delay_duration": "PT168H", "source_type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 11, "exp_year": 2022, "fingerprint": "sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "entry_method": "KEYED", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "auth_result_code": "2Nkw7q", "statement_description": "SQ *EXAMPLE TEST GOSQ.C", "card_payment_timeline": { "authorized_at": "2021-10-13T19:34:33.680Z", "captured_at": "2021-10-13T19:34:34.340Z" } }, "location_id": "L88917AVBK2S5", "order_id": "d7eKah653Z579f3gVtjlxpSlmUcZY", "processing_fee": [ { "effective_at": "2021-10-13T21:34:35.000Z", "type": "INITIAL", "amount_money": { "amount": 34, "currency": "USD" } } ], "note": "Test Note", "total_money": { "amount": 555, "currency": "USD" }, "approved_money": { "amount": 555, "currency": "USD" }, "employee_id": "TMoK_ogh6rH1o4dV", "receipt_number": "bP9m", "receipt_url": "https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY", "delay_action": "CANCEL", "delayed_until": "2021-10-20T19:34:33.524Z", "team_member_id": "TMoK_ogh6rH1o4dV", "application_details": { "square_product": "VIRTUAL_TERMINAL", "application_id": "sq0ids-Pw67AZAlLVB7hsRmwlJPuA" }, "version_token": "56pRkL3slrzet2iQrTp9n0bdJVYTB9YEWdTNjQfZOPV6o" } } }, "Component": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "description": "The type of this component. Each component type has expected properties expressed\nin a structured format within its corresponding `*_details` field." }, "application_details": { "$ref": "#/definitions/DeviceComponentDetailsApplicationDetails", "description": "Structured data for an `Application`, set for Components of type `APPLICATION`." }, "card_reader_details": { "$ref": "#/definitions/DeviceComponentDetailsCardReaderDetails", "description": "Structured data for a `CardReader`, set for Components of type `CARD_READER`." }, "battery_details": { "$ref": "#/definitions/DeviceComponentDetailsBatteryDetails", "description": "Structured data for a `Battery`, set for Components of type `BATTERY`." }, "wifi_details": { "$ref": "#/definitions/DeviceComponentDetailsWiFiDetails", "description": "Structured data for a `WiFi` interface, set for Components of type `WIFI`." }, "ethernet_details": { "$ref": "#/definitions/DeviceComponentDetailsEthernetDetails", "description": "Structured data for an `Ethernet` interface, set for Components of type `ETHERNET`." } }, "description": "The wrapper object for the component entries of a given component type.", "x-release-status": "BETA", "x-is-beta": true }, "ConfirmationDecision": { "type": "object", "properties": { "has_agreed": { "type": "boolean", "description": "The buyer\u0027s decision to the displayed terms.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "ConfirmationOptions": { "type": "object", "required": [ "title", "body", "agree_button_text" ], "properties": { "title": { "minLength": 1, "maxLength": 250, "type": "string", "description": "The title text to display in the confirmation screen flow on the Terminal." }, "body": { "minLength": 1, "maxLength": 10000, "type": "string", "description": "The agreement details to display in the confirmation flow on the Terminal." }, "agree_button_text": { "minLength": 1, "maxLength": 250, "type": "string", "description": "The button text to display indicating the customer agrees to the displayed terms." }, "disagree_button_text": { "minLength": 1, "maxLength": 250, "type": "string", "description": "The button text to display indicating the customer does not agree to the displayed terms." }, "decision": { "$ref": "#/definitions/ConfirmationDecision", "description": "The result of the buyer’s actions when presented with the confirmation screen.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "Coordinates": { "type": "object", "properties": { "latitude": { "type": "number", "description": "The latitude of the coordinate expressed in degrees." }, "longitude": { "type": "number", "description": "The longitude of the coordinate expressed in degrees." } }, "description": "Latitude and longitude coordinates.", "x-release-status": "PUBLIC" }, "CreateBookingCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition to create, with the following fields:\n\n- `key`\n\n- `name`. If provided, `name` must be unique (case-sensitive) across all visible booking-related custom attribute\ndefinitions for the seller.\n\n- `description`\n\n- `visibility`. Note that all custom attributes are visible in exported booking data, including those set to\n`VISIBILITY_HIDDEN`.\n\n- `schema`. With the exception of the `Selection` data type, the `schema` is specified as a\nsimple URL to the JSON schema definition hosted on the Square CDN. For more information, see\n[Specifying the schema](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attribute-definitions#specify-schema)." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents a [CreateBookingCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/create-booking-custom-attribute-definition) request.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definition": { "description": "The favorite shampoo of the customer.", "key": "favoriteShampoo", "name": "favorite Shampoo", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "visibility": "VISIBILITY_HIDDEN" } } }, "CreateBookingCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The newly created custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [CreateBookingCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/create-booking-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definition": { "key": "favoriteShampoo", "name": "Favorite Shampoo", "description": "The favorite shampoo of the customer.", "version": 1, "updated_at": "2022-11-16T15:27:30Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-11-16T15:27:30Z", "visibility": "VISIBILITY_HIDDEN" }, "errors": [] } }, "CreateBookingRequest": { "type": "object", "required": [ "booking" ], "properties": { "idempotency_key": { "minLength": 0, "maxLength": 255, "type": "string", "description": "A unique key to make this request an idempotent operation." }, "booking": { "$ref": "#/definitions/Booking", "description": "The details of the booking to be created." } }, "description": "", "x-release-status": "PUBLIC", "example": { "booking": { "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M", "start_at": "2020-11-26T13:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] } } }, "CreateBookingResponse": { "type": "object", "properties": { "booking": { "$ref": "#/definitions/Booking", "description": "The booking that was created." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "booking": { "id": "zkras0xv0xwswx", "version": 0, "status": "ACCEPTED", "created_at": "2020-10-28T15:47:41Z", "updated_at": "2020-10-28T15:47:41Z", "location_id": "LEQHH0YY8B42M", "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M", "customer_note": "", "seller_note": "", "start_at": "2020-11-26T13:00:00Z", "appointment_segments": [ { "duration_minutes": 60, "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_version": 1599775456731 } ] }, "errors": [] } }, "CreateBreakTypeRequest": { "type": "object", "required": [ "break_type" ], "properties": { "idempotency_key": { "maxLength": 128, "type": "string", "description": "A unique string value to ensure the idempotency of the operation." }, "break_type": { "$ref": "#/definitions/BreakType", "description": "The `BreakType` to be created." } }, "description": "A request to create a new `BreakType`.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "PAD3NG5KSN2GL", "break_type": { "location_id": "CGJN03P1D08GF", "break_name": "Lunch Break", "expected_duration": "PT30M", "is_paid": true } } } }, "CreateBreakTypeResponse": { "type": "object", "properties": { "break_type": { "$ref": "#/definitions/BreakType", "description": "The `BreakType` that was created by the request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to the request to create a `BreakType`. The response contains\nthe created `BreakType` object and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "break_type": { "id": "49SSVDJG76WF3", "location_id": "CGJN03P1D08GF", "break_name": "Lunch Break", "expected_duration": "PT30M", "is_paid": true, "version": 1, "created_at": "2019-02-26T22:42:54Z", "updated_at": "2019-02-26T22:42:54Z" } } }, "CreateCardRequest": { "type": "object", "required": [ "idempotency_key", "source_id", "card" ], "properties": { "idempotency_key": { "minLength": 1, "type": "string", "description": "A unique string that identifies this CreateCard request. Keys can be\nany valid string and must be unique for every request.\n\nMax: 45 characters\n\nSee [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information." }, "source_id": { "minLength": 1, "maxLength": 16384, "type": "string", "description": "The ID of the source which represents the card information to be stored. This can be a card nonce or a payment id." }, "verification_token": { "type": "string", "description": "An identifying token generated by [Payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.verifyBuyer).\nVerification tokens encapsulate customer device information and 3-D Secure\nchallenge results to indicate that Square has verified the buyer identity.\n\nSee the [SCA Overview](https://developer.squareup.com/docs/sca-overview)." }, "card": { "$ref": "#/definitions/Card", "description": "Payment details associated with the card to be stored." } }, "description": "Creates a card from the source (payment token or payment id). Accessible via\nHTTP requests at POST https://connect.squareup.com/v2/cards", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/cards", "request_body": { "idempotency_key": "4935a656-a929-4792-b97c-8848be85c27c", "source_id": "cnon:uIbfJXhXETSP197M3GB", "card": { "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "cardholder_name": "Amelia Earhart", "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", "reference_id": "user-id-1" } } } }, "CreateCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors resulting from the request." }, "card": { "$ref": "#/definitions/Card", "description": "The card created by the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [CreateCard](https://developer.squareup.com/reference/square_2024-04-17/cards-api/create-card) endpoint.\n\nNote: if there are errors processing the request, the card field will not be\npresent.", "x-release-status": "PUBLIC", "example": { "card": { "id": "ccof:uIbfJXhXETSP197M3GB", "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", "bin": "411111", "card_brand": "VISA", "card_type": "CREDIT", "cardholder_name": "Amelia Earhart", "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", "enabled": true, "exp_month": 11, "exp_year": 2022, "last_4": "1111", "merchant_id": "6SSW7HV8K2ST5", "prepaid_type": "NOT_PREPAID", "reference_id": "user-id-1", "version": 1 } } }, "CreateCheckoutRequest": { "type": "object", "required": [ "idempotency_key", "order" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 192, "type": "string", "description": "A unique string that identifies this checkout among others you have created. It can be\nany valid string but must be unique for every order sent to Square Checkout for a given location ID.\n\nThe idempotency key is used to avoid processing the same order more than once. If you are \nunsure whether a particular checkout was created successfully, you can attempt it again with\nthe same idempotency key and all the same other parameters without worrying about creating duplicates.\n\nYou should use a random number/string generator native to the language\nyou are working in to generate strings for your idempotency keys.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency)." }, "order": { "$ref": "#/definitions/CreateOrderRequest", "description": "The order including line items to be checked out." }, "ask_for_shipping_address": { "type": "boolean", "description": "If `true`, Square Checkout collects shipping information on your behalf and stores \nthat information with the transaction information in the Square Seller Dashboard.\n\nDefault: `false`." }, "merchant_support_email": { "maxLength": 254, "type": "string", "description": "The email address to display on the Square Checkout confirmation page\nand confirmation email that the buyer can use to contact the seller.\n\nIf this value is not set, the confirmation page and email display the\nprimary email address associated with the seller\u0027s Square account.\n\nDefault: none; only exists if explicitly set." }, "pre_populate_buyer_email": { "maxLength": 254, "type": "string", "description": "If provided, the buyer\u0027s email is prepopulated on the checkout page\nas an editable text field.\n\nDefault: none; only exists if explicitly set." }, "pre_populate_shipping_address": { "$ref": "#/definitions/Address", "description": "If provided, the buyer\u0027s shipping information is prepopulated on the\ncheckout page as editable text fields.\n\nDefault: none; only exists if explicitly set." }, "redirect_url": { "maxLength": 800, "type": "string", "description": "The URL to redirect to after the checkout is completed with `checkoutId`,\n`transactionId`, and `referenceId` appended as URL parameters. For example,\nif the provided redirect URL is `http://www.example.com/order-complete`, a\nsuccessful transaction redirects the customer to:\n\n`http://www.example.com/order-complete?checkoutId\u003dxxxxxx\u0026amp;referenceId\u003dxxxxxx\u0026amp;transactionId\u003dxxxxxx`\n\nIf you do not provide a redirect URL, Square Checkout displays an order\nconfirmation page on your behalf; however, it is strongly recommended that\nyou provide a redirect URL so you can verify the transaction results and\nfinalize the order through your existing/normal confirmation workflow.\n\nDefault: none; only exists if explicitly set." }, "additional_recipients": { "type": "array", "items": { "$ref": "#/definitions/ChargeRequestAdditionalRecipient" }, "description": "The basic primitive of a multi-party transaction. The value is optional.\nThe transaction facilitated by you can be split from here.\n\nIf you provide this value, the `amount_money` value in your `additional_recipients` field\ncannot be more than 90% of the `total_money` calculated by Square for your order.\nThe `location_id` must be a valid seller location where the checkout is occurring.\n\nThis field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission.\n\nThis field is currently not supported in the Square Sandbox." }, "note": { "maxLength": 60, "type": "string", "description": "An optional note to associate with the `checkout` object.\n\nThis value cannot exceed 60 characters." } }, "description": "Defines the parameters that can be included in the body of\na request to the `CreateCheckout` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "86ae1696-b1e3-4328-af6d-f1e04d947ad6", "redirect_url": "https://merchant.website.com/order-confirm", "order": { "idempotency_key": "12ae1696-z1e3-4328-af6d-f1e04d947gd4", "order": { "location_id": "location_id", "customer_id": "customer_id", "reference_id": "reference_id", "line_items": [ { "name": "Printed T Shirt", "quantity": "2", "base_price_money": { "amount": 1500, "currency": "USD" }, "applied_discounts": [ { "discount_uid": "56ae1696-z1e3-9328-af6d-f1e04d947gd4" } ], "applied_taxes": [ { "tax_uid": "38ze1696-z1e3-5628-af6d-f1e04d947fg3" } ] }, { "name": "Slim Jeans", "quantity": "1", "base_price_money": { "amount": 2500, "currency": "USD" } }, { "name": "Woven Sweater", "quantity": "3", "base_price_money": { "amount": 3500, "currency": "USD" } } ], "taxes": [ { "uid": "38ze1696-z1e3-5628-af6d-f1e04d947fg3", "type": "INCLUSIVE", "percentage": "7.75", "scope": "LINE_ITEM" } ], "discounts": [ { "uid": "56ae1696-z1e3-9328-af6d-f1e04d947gd4", "type": "FIXED_AMOUNT", "scope": "LINE_ITEM", "amount_money": { "amount": 100, "currency": "USD" } } ] } }, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 60, "currency": "USD" } } ], "ask_for_shipping_address": true, "merchant_support_email": "merchant+support@website.com", "pre_populate_buyer_email": "example@email.com", "pre_populate_shipping_address": { "address_line_1": "1455 Market St.", "address_line_2": "Suite 600", "locality": "San Francisco", "administrative_district_level_1": "CA", "postal_code": "94103", "country": "US", "first_name": "Jane", "last_name": "Doe" } } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CreateCheckout/CreateCheckoutRequest.python", "csharp": "/sdk_samples/CreateCheckout/CreateCheckoutRequest.csharp", "java": "/sdk_samples/CreateCheckout/CreateCheckoutRequest.java", "php": "/sdk_samples/CreateCheckout/CreateCheckoutRequest.php", "javascript": "/sdk_samples/CreateCheckout/CreateCheckoutRequest.javascript", "ruby": "/sdk_samples/CreateCheckout/CreateCheckoutRequest.ruby" } }, "CreateCheckoutResponse": { "type": "object", "properties": { "checkout": { "$ref": "#/definitions/Checkout", "description": "The newly created `checkout` object associated with the provided idempotency key." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `CreateCheckout` endpoint.", "x-release-status": "PUBLIC", "example": { "checkout": { "id": "CAISEHGimXh-C3RIT4og1a6u1qw", "checkout_page_url": "https://connect.squareup.com/v2/checkout?c\u003dCAISEHGimXh-C3RIT4og1a6u1qw\u0026l\u003dCYTKRM7R7JMV8", "ask_for_shipping_address": true, "merchant_support_email": "merchant+support@website.com", "pre_populate_buyer_email": "example@email.com", "pre_populate_shipping_address": { "address_line_1": "1455 Market St.", "address_line_2": "Suite 600", "locality": "San Francisco", "administrative_district_level_1": "CA", "postal_code": "94103", "country": "US", "first_name": "Jane", "last_name": "Doe" }, "redirect_url": "https://merchant.website.com/order-confirm", "order": { "location_id": "location_id", "customer_id": "customer_id", "reference_id": "reference_id", "line_items": [ { "name": "Printed T Shirt", "quantity": "2", "applied_taxes": [ { "tax_uid": "38ze1696-z1e3-5628-af6d-f1e04d947fg3", "applied_money": { "amount": 103, "currency": "USD" } } ], "applied_discounts": [ { "discount_uid": "56ae1696-z1e3-9328-af6d-f1e04d947gd4", "applied_money": { "amount": 100, "currency": "USD" } } ], "base_price_money": { "amount": 1500, "currency": "USD" }, "total_tax_money": { "amount": 103, "currency": "USD" }, "total_discount_money": { "amount": 100, "currency": "USD" }, "total_money": { "amount": 1503, "currency": "USD" } }, { "name": "Slim Jeans", "quantity": "1", "base_price_money": { "amount": 2500, "currency": "USD" }, "total_money": { "amount": 2500, "currency": "USD" } }, { "name": "Woven Sweater", "quantity": "3", "base_price_money": { "amount": 3500, "currency": "USD" }, "total_money": { "amount": 10500, "currency": "USD" } } ], "taxes": [ { "uid": "38ze1696-z1e3-5628-af6d-f1e04d947fg3", "type": "INCLUSIVE", "percentage": "7.75", "scope": "LINE_ITEM" } ], "discounts": [ { "uid": "56ae1696-z1e3-9328-af6d-f1e04d947gd4", "type": "FIXED_AMOUNT", "scope": "LINE_ITEM", "amount_money": { "amount": 100, "currency": "USD" }, "applied_money": { "amount": 100, "currency": "USD" } } ], "total_money": { "amount": 14503, "currency": "USD" }, "total_tax_money": { "amount": 103, "currency": "USD" }, "total_discount_money": { "amount": 100, "currency": "USD" } }, "created_at": "2017-06-16T22:25:35Z", "version": 1, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 60, "currency": "USD" } } ] } } }, "CreateCustomerCardRequest": { "type": "object", "required": [ "card_nonce" ], "properties": { "card_nonce": { "type": "string", "description": "A card nonce representing the credit card to link to the customer.\n\nCard nonces are generated by the Square payment form when customers enter\ntheir card information. For more information, see\n[Walkthrough: Integrate Square Payments in a Website](https://developer.squareup.com/docs/web-payments/take-card-payment).\n\n__NOTE:__ Card nonces generated by digital wallets (such as Apple Pay)\ncannot be used to create a customer card." }, "billing_address": { "$ref": "#/definitions/Address", "description": "Address information for the card on file.\n\n__NOTE:__ If a billing address is provided in the request, the\n`CreateCustomerCardRequest.billing_address.postal_code` must match\nthe postal code encoded in the card nonce." }, "cardholder_name": { "type": "string", "description": "The full name printed on the credit card." }, "verification_token": { "type": "string", "description": "An identifying token generated by [Payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.verifyBuyer).\nVerification tokens encapsulate customer device information and 3-D Secure\nchallenge results to indicate that Square has verified the buyer identity." } }, "description": "Defines the fields that are included in the request body of a request\nto the `CreateCustomerCard` endpoint.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "request_body": { "card_nonce": "YOUR_CARD_NONCE", "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "cardholder_name": "Amelia Earhart" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CreateCustomerCard/CreateCustomerCardRequest.python", "csharp": "/sdk_samples/CreateCustomerCard/CreateCustomerCardRequest.csharp", "java": "/sdk_samples/CreateCustomerCard/CreateCustomerCardRequest.java", "php": "/sdk_samples/CreateCustomerCard/CreateCustomerCardRequest.php", "javascript": "/sdk_samples/CreateCustomerCard/CreateCustomerCardRequest.javascript", "ruby": "/sdk_samples/CreateCustomerCard/CreateCustomerCardRequest.ruby" } }, "CreateCustomerCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "card": { "$ref": "#/definitions/Card", "description": "The created card on file." } }, "description": "Defines the fields that are included in the response body of\na request to the `CreateCustomerCard` endpoint.\n\nEither `errors` or `card` is present in a given response (never both).", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "card": { "id": "icard-card_id", "card_brand": "VISA", "last_4": "1111", "exp_month": 11, "exp_year": 2018, "cardholder_name": "Amelia Earhart", "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" } } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CreateCustomerCard/CreateCustomerCardResponse.python", "csharp": "/sdk_samples/CreateCustomerCard/CreateCustomerCardResponse.csharp", "java": "/sdk_samples/CreateCustomerCard/CreateCustomerCardResponse.java", "php": "/sdk_samples/CreateCustomerCard/CreateCustomerCardResponse.php", "javascript": "/sdk_samples/CreateCustomerCard/CreateCustomerCardResponse.javascript", "ruby": "/sdk_samples/CreateCustomerCard/CreateCustomerCardResponse.ruby" } }, "CreateCustomerCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition to create. Note the following:\n- With the exception of the `Selection` data type, the `schema` is specified as a simple URL to the JSON schema\ndefinition hosted on the Square CDN. For more information, including supported values and constraints, see\n[Specifying the schema](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attribute-definitions#specify-schema).\n- If provided, `name` must be unique (case-sensitive) across all visible customer-related custom attribute definitions for the seller.\n- All custom attributes are visible in exported customer data, including those set to `VISIBILITY_HIDDEN`." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents a [CreateCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/create-customer-custom-attribute-definition) request.", "x-release-status": "PUBLIC", "example": { "request_body": { "custom_attribute_definition": { "description": "The favorite movie of the customer.", "key": "favoritemovie", "name": "Favorite Movie", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "visibility": "VISIBILITY_HIDDEN" } } } }, "CreateCustomerCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The new custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [CreateCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/create-customer-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definition": { "key": "favoritemovie", "name": "Favorite Movie", "description": "The favorite movie of the customer.", "version": 1, "updated_at": "2022-04-26T15:27:30Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-04-26T15:27:30Z", "visibility": "VISIBILITY_HIDDEN" } } }, "CreateCustomerGroupRequest": { "type": "object", "required": [ "group" ], "properties": { "idempotency_key": { "type": "string", "description": "The idempotency key for the request. For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." }, "group": { "$ref": "#/definitions/CustomerGroup", "description": "The customer group to create." } }, "description": "Defines the body parameters that can be included in a request to the\n[CreateCustomerGroup](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/create-customer-group) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "group": { "name": "Loyal Customers" } } } }, "CreateCustomerGroupResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "group": { "$ref": "#/definitions/CustomerGroup", "description": "The successfully created customer group." } }, "description": "Defines the fields that are included in the response body of\na request to the [CreateCustomerGroup](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/create-customer-group) endpoint.\n\nEither `errors` or `group` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "group": { "id": "2TAT3CMH4Q0A9M87XJZED0WMR3", "name": "Loyal Customers", "created_at": "2020-04-13T21:54:57.863Z", "updated_at": "2020-04-13T21:54:58Z" } } }, "CreateCustomerRequest": { "type": "object", "properties": { "idempotency_key": { "type": "string", "description": "The idempotency key for the request.\tFor more information, see\n[Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." }, "given_name": { "type": "string", "description": "The given name (that is, the first name) associated with the customer profile.\n\nThe maximum length for this value is 300 characters." }, "family_name": { "type": "string", "description": "The family name (that is, the last name) associated with the customer profile.\n\nThe maximum length for this value is 300 characters." }, "company_name": { "type": "string", "description": "A business name associated with the customer profile.\n\nThe maximum length for this value is 500 characters." }, "nickname": { "type": "string", "description": "A nickname for the customer profile.\n\nThe maximum length for this value is 100 characters." }, "email_address": { "type": "string", "description": "The email address associated with the customer profile.\n\nThe maximum length for this value is 254 characters." }, "address": { "$ref": "#/definitions/Address", "description": "The physical address associated with the customer profile. For maximum length constraints, see \n[Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address).\nThe `first_name` and `last_name` fields are ignored if they are present in the request." }, "phone_number": { "type": "string", "description": "The phone number associated with the customer profile. The phone number must be valid and can contain\n9–16 digits, with an optional `+` prefix and country code. For more information, see\n[Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number)." }, "reference_id": { "type": "string", "description": "An optional second ID used to associate the customer profile with an\nentity in another system.\n\nThe maximum length for this value is 100 characters." }, "note": { "type": "string", "description": "A custom note associated with the customer profile." }, "birthday": { "type": "string", "description": "The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format. For example,\nspecify `1998-09-21` for September 21, 1998, or `09-21` for September 21. Birthdays are returned in `YYYY-MM-DD`\nformat, where `YYYY` is the specified birth year or `0000` if a birth year is not specified." }, "tax_ids": { "$ref": "#/definitions/CustomerTaxIds", "description": "The tax ID associated with the customer profile. This field is available only for customers of sellers\nin EU countries or the United Kingdom. For more information,\nsee [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids)." } }, "description": "Defines the body parameters that can be included in a request to the\n`CreateCustomer` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-555-4240", "reference_id": "YOUR_REFERENCE_ID", "note": "a customer" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CreateCustomer/CreateCustomerRequest.python", "csharp": "/sdk_samples/CreateCustomer/CreateCustomerRequest.csharp", "java": "/sdk_samples/CreateCustomer/CreateCustomerRequest.java", "php": "/sdk_samples/CreateCustomer/CreateCustomerRequest.php", "javascript": "/sdk_samples/CreateCustomer/CreateCustomerRequest.javascript", "ruby": "/sdk_samples/CreateCustomer/CreateCustomerRequest.ruby" } }, "CreateCustomerResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "customer": { "$ref": "#/definitions/Customer", "description": "The created customer." } }, "description": "Defines the fields that are included in the response body of\na request to the [CreateCustomer](https://developer.squareup.com/reference/square_2024-04-17/customers-api/create-customer) or\n[BulkCreateCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-create-customers) endpoint.\n\nEither `errors` or `customer` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "customer": { "id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2016-03-23T20:21:54.859Z", "updated_at": "2016-03-23T20:21:54.859Z", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-555-4240", "reference_id": "YOUR_REFERENCE_ID", "note": "a customer", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "version": 0 } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CreateCustomer/CreateCustomerResponse.python", "csharp": "/sdk_samples/CreateCustomer/CreateCustomerResponse.csharp", "java": "/sdk_samples/CreateCustomer/CreateCustomerResponse.java", "php": "/sdk_samples/CreateCustomer/CreateCustomerResponse.php", "javascript": "/sdk_samples/CreateCustomer/CreateCustomerResponse.javascript", "ruby": "/sdk_samples/CreateCustomer/CreateCustomerResponse.ruby" } }, "CreateDeviceCodeRequest": { "type": "object", "required": [ "idempotency_key", "device_code" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique string that identifies this CreateDeviceCode request. Keys can\nbe any valid string but must be unique for every CreateDeviceCode request.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information." }, "device_code": { "$ref": "#/definitions/DeviceCode", "description": "The device code to create." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "01bb00a6-0c86-4770-94ed-f5fca973cd56", "device_code": { "name": "Counter 1", "location_id": "B5E4484SHHNYH", "product_type": "TERMINAL_API" } } } }, "CreateDeviceCodeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "device_code": { "$ref": "#/definitions/DeviceCode", "description": "The created DeviceCode object containing the device code string." } }, "description": "", "x-release-status": "PUBLIC", "example": { "device_code": { "id": "B3Z6NAMYQSMTM", "name": "Counter 1", "code": "EBCARJ", "product_type": "TERMINAL_API", "location_id": "B5E4484SHHNYH", "created_at": "2020-02-06T18:44:33.000Z", "pair_by": "2020-02-06T18:49:33.000Z", "status": "UNPAIRED", "status_changed_at": "2020-02-06T18:44:33.000Z" } } }, "CreateDisputeEvidenceTextRequest": { "type": "object", "required": [ "idempotency_key", "evidence_text" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "A unique key identifying the request. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency)." }, "evidence_type": { "type": "string", "description": "The type of evidence you are uploading." }, "evidence_text": { "minLength": 1, "maxLength": 500, "type": "string", "description": "The evidence string." } }, "description": "Defines the parameters for a `CreateDisputeEvidenceText` request.", "x-release-status": "PUBLIC", "example": { "request_body": { "evidence_type": "TRACKING_NUMBER", "evidence_text": "1Z8888888888888888", "idempotency_key": "ed3ee3933d946f1514d505d173c82648" } } }, "CreateDisputeEvidenceTextResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "evidence": { "$ref": "#/definitions/DisputeEvidence", "description": "The newly uploaded dispute evidence metadata." } }, "description": "Defines the fields in a `CreateDisputeEvidenceText` response.", "x-release-status": "PUBLIC", "example": { "evidence": { "dispute_id": "bVTprrwk0gygTLZ96VX1oB", "uploaded_at": "2022-05-18T16:01:10.000Z", "evidence_type": "REBUTTAL_EXPLANATION", "evidence_text": "The customer purchased the item twice, on April 11 and April 28.", "id": "TOomLInj6iWmP3N8qfCXrB" } } }, "CreateGiftCardActivityRequest": { "type": "object", "required": [ "idempotency_key", "gift_card_activity" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique string that identifies the `CreateGiftCardActivity` request." }, "gift_card_activity": { "$ref": "#/definitions/GiftCardActivity", "description": "The activity to create for the gift card. This activity must specify `gift_card_id` or `gift_card_gan` for the target\ngift card, the `location_id` where the activity occurred, and the activity `type` along with the corresponding activity details." } }, "description": "A request to create a gift card activity.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "U16kfr-kA70er-q4Rsym-7U7NnY", "gift_card_activity": { "gift_card_id": "gftc:6d55a72470d940c6ba09c0ab8ad08d20", "type": "ACTIVATE", "location_id": "81FN9BNFZTKS4", "activate_activity_details": { "order_id": "jJNGHm4gLI6XkFbwtiSLqK72KkAZY", "line_item_uid": "eIWl7X0nMuO9Ewbh0ChIx" } } } } }, "CreateGiftCardActivityResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_card_activity": { "$ref": "#/definitions/GiftCardActivity", "description": "The gift card activity that was created." } }, "description": "A response that contains a `GiftCardActivity` that was created.\nThe response might contain a set of `Error` objects if the request resulted in errors.", "x-release-status": "PUBLIC", "example": { "gift_card_activity": { "id": "gcact_c8f8cbf1f24b448d8ecf39ed03f97864", "gift_card_id": "gftc:6d55a72470d940c6ba09c0ab8ad08d20", "gift_card_gan": "7783320002929081", "type": "ACTIVATE", "gift_card_balance_money": { "amount": 1000, "currency": "USD" }, "location_id": "81FN9BNFZTKS4", "created_at": "2021-05-20T22:26:54.000Z", "activate_activity_details": { "amount_money": { "amount": 1000, "currency": "USD" }, "order_id": "jJNGHm4gLI6XkFbwtiSLqK72KkAZY", "line_item_uid": "eIWl7X0nMuO9Ewbh0ChIx" } } } }, "CreateGiftCardRequest": { "type": "object", "required": [ "idempotency_key", "location_id", "gift_card" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information, \nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." }, "location_id": { "minLength": 1, "type": "string", "description": "The ID of the [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the gift card should be registered for \nreporting purposes. Gift cards can be redeemed at any of the seller\u0027s locations." }, "gift_card": { "$ref": "#/definitions/GiftCard", "description": "The gift card to create. The `type` field is required for this request. The `gan_source` \nand `gan` fields are included as follows: \n\nTo direct Square to generate a 16-digit GAN, omit `gan_source` and `gan`.\n\nTo provide a custom GAN, include `gan_source` and `gan`.\n- For `gan_source`, specify `OTHER`. \n- For `gan`, provide a custom GAN containing 8 to 20 alphanumeric characters. The GAN must be \nunique for the seller and cannot start with the same bank identification number (BIN) as major \ncredit cards. Do not use GANs that are easy to guess (such as 12345678) because they greatly \nincrease the risk of fraud. It is the responsibility of the developer to ensure the security \nof their custom GANs. For more information, see \n[Custom GANs](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#custom-gans). \n\nTo register an unused, physical gift card that the seller previously ordered from Square, \ninclude `gan` and provide the GAN that is printed on the gift card." } }, "description": "Represents a [CreateGiftCard](https://developer.squareup.com/reference/square_2024-04-17/gift-cards-api/create-gift-card) request.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "NC9Tm69EjbjtConu", "location_id": "81FN9BNFZTKS4", "gift_card": { "type": "DIGITAL" } } } }, "CreateGiftCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_card": { "$ref": "#/definitions/GiftCard", "description": "The new gift card." } }, "description": "A response that contains a `GiftCard`. The response might contain a set of `Error` objects if the request\nresulted in errors.", "x-release-status": "PUBLIC", "example": { "gift_card": { "id": "gftc:6cbacbb64cf54e2ca9f573d619038059", "type": "DIGITAL", "gan_source": "SQUARE", "state": "PENDING", "balance_money": { "amount": 0, "currency": "USD" }, "gan": "7783320006753271", "created_at": "2021-05-20T22:26:54.000Z" } } }, "CreateInvoiceRequest": { "type": "object", "required": [ "invoice" ], "properties": { "invoice": { "$ref": "#/definitions/Invoice", "description": "The invoice to create." }, "idempotency_key": { "maxLength": 128, "type": "string", "description": "A unique string that identifies the `CreateInvoice` request. If you do not \nprovide `idempotency_key` (or provide an empty string as the value), the endpoint \ntreats each request as independent.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Describes a `CreateInvoice` request.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "ce3748f9-5fc1-4762-aa12-aae5e843f1f4", "invoice": { "location_id": "ES0RJRZYEC39A", "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "scheduled_at": "2030-01-13T10:00:00Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4" }, "delivery_method": "EMAIL", "payment_requests": [ { "request_type": "BALANCE", "due_date": "2030-01-24", "tipping_enabled": true, "automatic_payment_source": "NONE", "reminders": [ { "message": "Your invoice is due tomorrow", "relative_scheduled_days": -1 } ] } ], "invoice_number": "inv-100", "title": "Event Planning Services", "description": "We appreciate your business!", "accepted_payment_methods": { "card": true, "square_gift_card": false, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "custom_fields": [ { "label": "Event Reference Number", "value": "Ref. #1234", "placement": "ABOVE_LINE_ITEMS" }, { "label": "Terms of Service", "value": "The terms of service are...", "placement": "BELOW_LINE_ITEMS" } ], "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false } } } }, "CreateInvoiceResponse": { "type": "object", "properties": { "invoice": { "$ref": "#/definitions/Invoice", "description": "The newly created invoice." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "The response returned by the `CreateInvoice` request.", "x-release-status": "PUBLIC", "example": { "invoice": { "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "version": 0, "location_id": "ES0RJRZYEC39A", "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "payment_requests": [ { "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355", "request_type": "BALANCE", "due_date": "2030-01-24", "tipping_enabled": true, "reminders": [ { "uid": "beebd363-e47f-4075-8785-c235aaa7df11", "relative_scheduled_days": -1, "message": "Your invoice is due tomorrow", "status": "PENDING" } ], "computed_amount_money": { "amount": 10000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "NONE" } ], "invoice_number": "inv-100", "title": "Event Planning Services", "description": "We appreciate your business!", "scheduled_at": "2030-01-13T10:00:00Z", "status": "DRAFT", "timezone": "America/Los_Angeles", "created_at": "2020-06-18T17:45:13Z", "updated_at": "2020-06-18T17:45:13Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "accepted_payment_methods": { "card": true, "square_gift_card": false, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "custom_fields": [ { "label": "Event Reference Number", "value": "Ref. #1234", "placement": "ABOVE_LINE_ITEMS" }, { "label": "Terms of Service", "value": "The terms of service are...", "placement": "BELOW_LINE_ITEMS" } ], "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false } } }, "CreateLocationCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition to create. Note the following:\n- With the exception of the `Selection` data type, the `schema` is specified as a simple URL to the JSON schema\ndefinition hosted on the Square CDN. For more information, including supported values and constraints, see\n[Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).\n- `name` is required unless `visibility` is set to `VISIBILITY_HIDDEN`." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents a [CreateLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/create-location-custom-attribute-definition) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "custom_attribute_definition": { "key": "bestseller", "name": "Bestseller", "description": "Bestselling item at location", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "visibility": "VISIBILITY_READ_WRITE_VALUES" } } } }, "CreateLocationCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The new custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [CreateLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/create-location-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "bestseller", "name": "Bestseller", "description": "Bestselling item at location", "version": 1, "updated_at": "2022-12-02T19:06:36.559Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-12-02T19:06:36.559Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "CreateLocationRequest": { "type": "object", "properties": { "location": { "$ref": "#/definitions/Location", "description": "The initial values of the location being created. The `name` field is required and must be unique within a seller account.\nAll other fields are optional, but any information you care about for the location should be included.\nThe remaining fields are automatically added based on the data from the [main location](https://developer.squareup.com/docs/locations-api#about-the-main-location)." } }, "description": "The request object for the [CreateLocation](https://developer.squareup.com/reference/square_2024-04-17/locations-api/create-location) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "location": { "name": "Midtown", "description": "Midtown Atlanta store", "address": { "address_line_1": "1234 Peachtree St. NE", "locality": "Atlanta", "administrative_district_level_1": "GA", "postal_code": "30309" } } } } }, "CreateLocationResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about [errors](https://developer.squareup.com/docs/build-basics/handling-errors) encountered during the request." }, "location": { "$ref": "#/definitions/Location", "description": "The newly created `Location` object." } }, "description": "The response object returned by the [CreateLocation](https://developer.squareup.com/reference/square_2024-04-17/locations-api/create-location) endpoint.", "x-release-status": "PUBLIC", "example": { "location": { "id": "3Z4V4WHQK64X9", "name": "Midtown", "address": { "address_line_1": "1234 Peachtree St. NE", "locality": "Atlanta", "administrative_district_level_1": "GA", "postal_code": "30309" }, "timezone": "America/New_York", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2022-02-19T17:58:25Z", "merchant_id": "3MYCJG5GVYQ8Q", "country": "US", "language_code": "en-US", "currency": "USD", "type": "PHYSICAL", "description": "Midtown Atlanta store", "coordinates": { "latitude": 33.788900, "longitude": -84.384100 }, "business_name": "Jet Fuel Coffee", "mcc": "7299" } } }, "CreateLoyaltyAccountRequest": { "type": "object", "required": [ "loyalty_account", "idempotency_key" ], "properties": { "loyalty_account": { "$ref": "#/definitions/LoyaltyAccount", "description": "The loyalty account to create." }, "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique string that identifies this `CreateLoyaltyAccount` request. \nKeys can be any valid string, but must be unique for every request." } }, "description": "A request to create a new loyalty account.", "x-release-status": "PUBLIC", "example": { "request_body": { "loyalty_account": { "mapping": { "phone_number": "+14155551234" }, "program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd" }, "idempotency_key": "ec78c477-b1c3-4899-a209-a4e71337c996" } } }, "CreateLoyaltyAccountResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "loyalty_account": { "$ref": "#/definitions/LoyaltyAccount", "description": "The newly created loyalty account." } }, "description": "A response that includes loyalty account created.", "x-release-status": "PUBLIC", "example": { "loyalty_account": { "id": "79b807d2-d786-46a9-933b-918028d7a8c5", "mapping": { "id": "66aaab3f-da99-49ed-8b19-b87f851c844f", "phone_number": "+14155551234", "created_at": "2020-05-08T21:44:32Z" }, "program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "balance": 0, "lifetime_points": 0, "customer_id": "QPTXM8PQNX3Q726ZYHPMNP46XC", "created_at": "2020-05-08T21:44:32Z", "updated_at": "2020-05-08T21:44:32Z" } } }, "CreateLoyaltyPromotionRequest": { "type": "object", "required": [ "loyalty_promotion", "idempotency_key" ], "properties": { "loyalty_promotion": { "$ref": "#/definitions/LoyaltyPromotion", "description": "The loyalty promotion to create." }, "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique identifier for this request, which is used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents a [CreateLoyaltyPromotion](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/create-loyalty-promotion) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?program_id\u003dd619f755-2d17-41f3-990d-c04ecedd64dd", "request_body": { "loyalty_promotion": { "name": "Tuesday Happy Hour Promo", "incentive": { "type": "POINTS_MULTIPLIER", "points_multiplier_data": { "multiplier": "3.0" } }, "available_time": { "time_periods": [ "BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ\u003dWEEKLY;BYDAY\u003dTU\nEND:VEVENT" ] }, "trigger_limit": { "times": 1, "interval": "DAY" }, "minimum_spend_amount_money": { "currency": "USD", "amount": 2000 }, "qualifying_category_ids": [ "XTQPYLR3IIU9C44VRCB3XD12" ] }, "idempotency_key": "ec78c477-b1c3-4899-a209-a4e71337c996" } } }, "CreateLoyaltyPromotionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "loyalty_promotion": { "$ref": "#/definitions/LoyaltyPromotion", "description": "The new loyalty promotion." } }, "description": "Represents a [CreateLoyaltyPromotion](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/create-loyalty-promotion) response.\nEither `loyalty_promotion` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "loyalty_promotion": { "id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67", "name": "Tuesday Happy Hour Promo", "incentive": { "type": "POINTS_MULTIPLIER", "points_multiplier_data": { "multiplier": "3.000", "points_multiplier": 3 } }, "available_time": { "start_date": "2022-08-16", "time_periods": [ "BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ\u003dWEEKLY;BYDAY\u003dTU\nEND:VEVENT" ] }, "trigger_limit": { "times": 1, "interval": "DAY" }, "minimum_spend_amount_money": { "currency": "USD", "amount": 2000 }, "qualifying_category_ids": [ "XTQPYLR3IIU9C44VRCB3XD12" ], "status": "ACTIVE", "created_at": "2022-08-16T08:38:54Z", "updated_at": "2022-08-16T08:38:54Z", "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd" } } }, "CreateLoyaltyRewardRequest": { "type": "object", "required": [ "reward", "idempotency_key" ], "properties": { "reward": { "$ref": "#/definitions/LoyaltyReward", "description": "The reward to create." }, "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique string that identifies this `CreateLoyaltyReward` request. \nKeys can be any valid string, but must be unique for every request." } }, "description": "A request to create a loyalty reward.", "x-release-status": "PUBLIC", "example": { "request_body": { "reward": { "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "reward_tier_id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "order_id": "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY" }, "idempotency_key": "18c2e5ea-a620-4b1f-ad60-7b167285e451" } } }, "CreateLoyaltyRewardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "reward": { "$ref": "#/definitions/LoyaltyReward", "description": "The loyalty reward created." } }, "description": "A response that includes the loyalty reward created.", "x-release-status": "PUBLIC", "example": { "reward": { "id": "a8f43ebe-2ad6-3001-bdd5-7d7c2da08943", "status": "ISSUED", "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "reward_tier_id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "points": 10, "order_id": "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", "created_at": "2020-05-01T21:49:54Z", "updated_at": "2020-05-01T21:49:54Z" } } }, "CreateMerchantCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition to create. Note the following:\n- With the exception of the `Selection` data type, the `schema` is specified as a simple URL to the JSON schema\ndefinition hosted on the Square CDN. For more information, including supported values and constraints, see\n[Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).\n- `name` is required unless `visibility` is set to `VISIBILITY_HIDDEN`." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents a [CreateMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/create-merchant-custom-attribute-definition) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "custom_attribute_definition": { "key": "alternative_seller_name", "name": "Alternative Merchant Name", "description": "This is the other name this merchant goes by.", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "visibility": "VISIBILITY_READ_ONLY" } } } }, "CreateMerchantCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The new custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [CreateMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/create-merchant-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "alternative_seller_name", "name": "Alternative Merchant Name", "description": "This is the other name this merchant goes by.", "version": 1, "updated_at": "2023-05-05T19:06:36.559Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2023-05-05T19:06:36.559Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "CreateMobileAuthorizationCodeRequest": { "type": "object", "properties": { "location_id": { "minLength": 1, "maxLength": 191, "type": "string", "description": "The Square location ID that the authorization code should be tied to." } }, "description": "Defines the body parameters that can be provided in a request to the\n`CreateMobileAuthorizationCode` endpoint.", "x-release-status": "PUBLIC", "example": { "request_url": "/mobile/authorization-code", "request_body": { "location_id": "YOUR_LOCATION_ID" } } }, "CreateMobileAuthorizationCodeResponse": { "type": "object", "properties": { "authorization_code": { "minLength": 0, "maxLength": 191, "type": "string", "description": "The generated authorization code that connects a mobile application instance\nto a Square account." }, "expires_at": { "minLength": 20, "maxLength": 48, "type": "string", "description": "The timestamp when `authorization_code` expires, in\n[RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, \"2016-09-04T23:59:33.123Z\")." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `CreateMobileAuthorizationCode` endpoint.", "x-release-status": "PUBLIC", "example": { "authorization_code": "YOUR_MOBILE_AUTHORIZATION_CODE", "expires_at": "2019-01-10T19:42:08Z" } }, "CreateOrderCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition to create. Note the following:\n- With the exception of the `Selection` data type, the `schema` is specified as a simple URL to the JSON schema\ndefinition hosted on the Square CDN. For more information, including supported values and constraints, see\n[Specifying the schema](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attribute-definitions#specify-schema).\n- If provided, `name` must be unique (case-sensitive) across all visible customer-related custom attribute definitions for the seller.\n- All custom attributes are visible in exported customer data, including those set to `VISIBILITY_HIDDEN`." }, "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. \nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents a create request for an order custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "custom_attribute_definition": { "key": "cover-count", "name": "Cover count", "description": "The number of people seated at a table", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "visibility": "VISIBILITY_READ_WRITE_VALUES" }, "idempotency_key": "IDEMPOTENCY_KEY" } } }, "CreateOrderCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The new custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from creating an order custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "cover-count", "name": "Cover count", "description": "The number of people seated at a table", "version": 1, "updated_at": "2022-10-06T16:53:23.141Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "created_at": "2022-10-06T16:53:23.141Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "CreateOrderRequest": { "type": "object", "properties": { "order": { "$ref": "#/definitions/Order", "description": "The order to create. If this field is set, the only other top-level field that can be\nset is the `idempotency_key`." }, "idempotency_key": { "maxLength": 192, "type": "string", "description": "A value you specify that uniquely identifies this\norder among orders you have created.\n\nIf you are unsure whether a particular order was created successfully,\nyou can try it again with the same idempotency key without\nworrying about creating duplicate orders.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "8193148c-9586-11e6-99f9-28cfe92138cf", "order": { "reference_id": "my-order-001", "location_id": "057P5VYJ4A5X1", "line_items": [ { "name": "New York Strip Steak", "quantity": "1", "base_price_money": { "amount": 1599, "currency": "USD" } }, { "quantity": "2", "catalog_object_id": "BEMYCSMIJL46OCDV4KYIKXIB", "modifiers": [ { "catalog_object_id": "CHQX7Y4KY6N5KINJKZCFURPZ" } ], "applied_discounts": [ { "discount_uid": "one-dollar-off" } ] } ], "taxes": [ { "uid": "state-sales-tax", "name": "State Sales Tax", "percentage": "9", "scope": "ORDER" } ], "discounts": [ { "uid": "labor-day-sale", "name": "Labor Day Sale", "percentage": "5", "scope": "ORDER" }, { "uid": "membership-discount", "catalog_object_id": "DB7L55ZH2BGWI4H23ULIWOQ7", "scope": "ORDER" }, { "uid": "one-dollar-off", "name": "Sale - $1.00 off", "amount_money": { "amount": 100, "currency": "USD" }, "scope": "LINE_ITEM" } ] } } } }, "CreateOrderResponse": { "type": "object", "properties": { "order": { "$ref": "#/definitions/Order", "description": "The newly created order." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `CreateOrder` endpoint.\n\nEither `errors` or `order` is present in a given response, but never both.", "x-release-status": "PUBLIC", "example": { "order": { "id": "CAISENgvlJ6jLWAzERDzjyHVybY", "location_id": "057P5VYJ4A5X1", "line_items": [ { "uid": "8uSwfzvUImn3IRrvciqlXC", "name": "New York Strip Steak", "quantity": "1", "applied_taxes": [ { "uid": "aKG87ArnDpvMLSZJHxWUl", "tax_uid": "state-sales-tax", "applied_money": { "amount": 136, "currency": "USD" } } ], "applied_discounts": [ { "uid": "jWdgP1TpHPFBuVrz81mXVC", "discount_uid": "membership-discount", "applied_money": { "amount": 8, "currency": "USD" } }, { "uid": "jnZOjjVY57eRcQAVgEwFuC", "discount_uid": "labor-day-sale", "applied_money": { "amount": 79, "currency": "USD" } } ], "base_price_money": { "amount": 1599, "currency": "USD" }, "gross_sales_money": { "amount": 1599, "currency": "USD" }, "total_tax_money": { "amount": 136, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 87, "currency": "USD" }, "total_money": { "amount": 1648, "currency": "USD" }, "variation_total_price_money": { "amount": 1599, "currency": "USD" } }, { "uid": "v8ZuEXpOJpb0bazLuvrLDB", "name": "New York Steak", "quantity": "2", "catalog_object_id": "BEMYCSMIJL46OCDV4KYIKXIB", "variation_name": "Larger", "modifiers": [ { "uid": "Lo3qMMckDluu9Qsb58d4CC", "catalog_object_id": "CHQX7Y4KY6N5KINJKZCFURPZ", "name": "Well", "base_price_money": { "amount": 50, "currency": "USD" }, "total_price_money": { "amount": 100, "currency": "USD" } } ], "applied_taxes": [ { "uid": "v1dAgrfUVUPTnVTf9sRPz", "tax_uid": "state-sales-tax", "applied_money": { "amount": 374, "currency": "USD" } } ], "applied_discounts": [ { "uid": "nUXvdsIItfKko0dbYtY58C", "discount_uid": "membership-discount", "applied_money": { "amount": 22, "currency": "USD" } }, { "uid": "qSdkOOOernlVQqsJ94SPjB", "discount_uid": "labor-day-sale", "applied_money": { "amount": 224, "currency": "USD" } }, { "uid": "y7bVl4njrWAnfDwmz19izB", "discount_uid": "one-dollar-off", "applied_money": { "amount": 100, "currency": "USD" } } ], "base_price_money": { "amount": 2200, "currency": "USD" }, "gross_sales_money": { "amount": 4500, "currency": "USD" }, "total_tax_money": { "amount": 374, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 346, "currency": "USD" }, "total_money": { "amount": 4528, "currency": "USD" }, "variation_total_price_money": { "amount": 4400, "currency": "USD" } } ], "taxes": [ { "uid": "state-sales-tax", "name": "State Sales Tax", "type": "ADDITIVE", "percentage": "9", "applied_money": { "amount": 510, "currency": "USD" }, "scope": "ORDER" } ], "discounts": [ { "uid": "membership-discount", "catalog_object_id": "DB7L55ZH2BGWI4H23ULIWOQ7", "name": "Membership Discount", "type": "FIXED_PERCENTAGE", "percentage": "0.5", "applied_money": { "amount": 30, "currency": "USD" }, "scope": "ORDER" }, { "uid": "labor-day-sale", "name": "Labor Day Sale", "type": "FIXED_PERCENTAGE", "percentage": "5", "applied_money": { "amount": 303, "currency": "USD" }, "scope": "ORDER" }, { "uid": "one-dollar-off", "name": "Sale - $1.00 off", "type": "FIXED_AMOUNT", "amount_money": { "amount": 100, "currency": "USD" }, "applied_money": { "amount": 100, "currency": "USD" }, "scope": "LINE_ITEM" } ], "created_at": "2020-01-17T20:47:53.293Z", "updated_at": "2020-01-17T20:47:53.293Z", "state": "OPEN", "version": 1, "reference_id": "my-order-001", "total_money": { "amount": 6176, "currency": "USD" }, "total_tax_money": { "amount": 510, "currency": "USD" }, "total_discount_money": { "amount": 433, "currency": "USD" }, "total_tip_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "net_amounts": { "total_money": { "amount": 6176, "currency": "USD" }, "tax_money": { "amount": 510, "currency": "USD" }, "discount_money": { "amount": 433, "currency": "USD" }, "tip_money": { "amount": 0, "currency": "USD" }, "service_charge_money": { "amount": 0, "currency": "USD" } }, "source": { "name": "My App" } } } }, "CreatePaymentLinkRequest": { "type": "object", "properties": { "idempotency_key": { "maxLength": 192, "type": "string", "description": "A unique string that identifies this `CreatePaymentLinkRequest` request.\nIf you do not provide a unique string (or provide an empty string as the value),\nthe endpoint treats each request as independent.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency)." }, "description": { "maxLength": 4096, "type": "string", "description": "A description of the payment link. You provide this optional description that is useful in your\napplication context. It is not used anywhere." }, "quick_pay": { "$ref": "#/definitions/QuickPay", "description": "Describes an ad hoc item and price for which to generate a quick pay checkout link.\nFor more information,\nsee [Quick Pay Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout)." }, "order": { "$ref": "#/definitions/Order", "description": "Describes the `Order` for which to create a checkout link.\nFor more information,\nsee [Square Order Checkout](https://developer.squareup.com/docs/checkout-api/square-order-checkout)." }, "checkout_options": { "$ref": "#/definitions/CheckoutOptions", "description": "Describes optional fields to add to the resulting checkout page.\nFor more information,\nsee [Optional Checkout Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations)." }, "pre_populated_data": { "$ref": "#/definitions/PrePopulatedData", "description": "Describes fields to prepopulate in the resulting checkout page.\nFor more information, see [Prepopulate the shipping address](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations#prepopulate-the-shipping-address)." }, "payment_note": { "maxLength": 500, "type": "string", "description": "A note for the payment. After processing the payment, Square adds this note to the resulting `Payment`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "cd9e25dc-d9f2-4430-aedb-61605070e95f", "quick_pay": { "name": "Auto Detailing", "price_money": { "amount": 10000, "currency": "USD" }, "location_id": "A9Y43N9ABXZBP" } } } }, "CreatePaymentLinkResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "payment_link": { "$ref": "#/definitions/PaymentLink", "description": "The created payment link." }, "related_resources": { "$ref": "#/definitions/PaymentLinkRelatedResources", "description": "The list of related objects." } }, "description": "", "x-release-status": "PUBLIC", "example": { "payment_link": { "id": "PKVT6XGJZXYUP3NZ", "version": 1, "order_id": "o4b7saqp4HzhNttf5AJxC0Srjd4F", "url": "https://square.link/u/EXAMPLE", "long_url": "https://checkout.square.site/EXAMPLE", "created_at": "2022-04-25T23:58:01Z" }, "related_resources": { "orders": [ { "id": "o4b7saqp4HzhNttf5AJxC0Srjd4F", "location_id": "{LOCATION_ID}", "source": { "name": "Test Online Checkout Application" }, "line_items": [ { "uid": "8YX13D1U3jO7czP8JVrAR", "name": "Auto Detailing", "quantity": "1", "item_type": "ITEM", "base_price_money": { "amount": 12500, "currency": "USD" }, "variation_total_price_money": { "amount": 12500, "currency": "USD" }, "gross_sales_money": { "amount": 12500, "currency": "USD" }, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 0, "currency": "USD" }, "total_money": { "amount": 12500, "currency": "USD" } } ], "fulfillments": [ { "uid": "bBpNrxjdQxGQP16sTmdzi", "type": "DIGITAL", "state": "PROPOSED" } ], "net_amounts": { "total_money": { "amount": 12500, "currency": "USD" }, "tax_money": { "amount": 0, "currency": "USD" }, "discount_money": { "amount": 0, "currency": "USD" }, "tip_money": { "amount": 0, "currency": "USD" }, "service_charge_money": { "amount": 0, "currency": "USD" } }, "created_at": "2022-03-03T00:53:15.829Z", "updated_at": "2022-03-03T00:53:15.829Z", "state": "DRAFT", "version": 1, "total_money": { "amount": 12500, "currency": "USD" }, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 0, "currency": "USD" }, "total_tip_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" } } ] } } }, "CreatePaymentRequest": { "type": "object", "required": [ "source_id", "idempotency_key" ], "properties": { "source_id": { "minLength": 1, "type": "string", "description": "The ID for the source of funds for this payment.\nThis could be a payment token generated by the Web Payments SDK for any of its\n[supported methods](https://developer.squareup.com/docs/web-payments/overview#explore-payment-methods),\nincluding cards, bank transfers, Afterpay or Cash App Pay. If recording a payment\nthat the seller received outside of Square, specify either \"CASH\" or \"EXTERNAL\".\nFor more information, see \n[Take Payments](https://developer.squareup.com/docs/payments-api/take-payments)." }, "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "A unique string that identifies this `CreatePayment` request. Keys can be any valid string\nbut must be unique for every `CreatePayment` request.\n\nNote: The number of allowed characters might be less than the stated maximum, if multi-byte\ncharacters are used.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency)." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money to accept for this payment, not including `tip_money`.\n\nThe amount must be specified in the smallest denomination of the applicable currency\n(for example, US dollar amounts are specified in cents). For more information, see\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).\n\nThe currency code must match the currency associated with the business\nthat is accepting the payment." }, "tip_money": { "$ref": "#/definitions/Money", "description": "The amount designated as a tip, in addition to `amount_money`.\n\nThe amount must be specified in the smallest denomination of the applicable currency\n(for example, US dollar amounts are specified in cents). For more information, see\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).\n\nThe currency code must match the currency associated with the business\nthat is accepting the payment." }, "app_fee_money": { "$ref": "#/definitions/Money", "description": "The amount of money that the developer is taking as a fee\nfor facilitating the payment on behalf of the seller.\n\nThe amount cannot be more than 90% of the total amount of the payment.\n\nThe amount must be specified in the smallest denomination of the applicable currency\n(for example, US dollar amounts are specified in cents). For more information, see\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).\n\nThe fee currency code must match the currency associated with the seller\nthat is accepting the payment. The application must be from a developer\naccount in the same country and using the same currency code as the seller.\n\nFor more information about the application fee scenario, see\n[Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).\n\nTo set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required.\nFor more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions)." }, "delay_duration": { "type": "string", "description": "The duration of time after the payment\u0027s creation when Square automatically \neither completes or cancels the payment depending on the `delay_action` field value. \nFor more information, see \n[Time threshold](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). \n\nThis parameter should be specified as a time duration, in RFC 3339 format.\n\nNote: This feature is only supported for card payments. This parameter can only be set for a delayed\ncapture payment (`autocomplete\u003dfalse`).\n\nDefault:\n\n- Card-present payments: \"PT36H\" (36 hours) from the creation time.\n- Card-not-present payments: \"P7D\" (7 days) from the creation time." }, "delay_action": { "type": "string", "description": "The action to be applied to the payment when the `delay_duration` has elapsed. The action must be\nCANCEL or COMPLETE. For more information, see \n[Time Threshold](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). \n\nDefault: CANCEL" }, "autocomplete": { "type": "boolean", "description": "If set to `true`, this payment will be completed when possible. If\nset to `false`, this payment is held in an approved state until either\nexplicitly completed (captured) or canceled (voided). For more information, see\n[Delayed capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments#delayed-capture-of-a-card-payment).\n\nDefault: true" }, "order_id": { "type": "string", "description": "Associates a previously created order with this payment." }, "customer_id": { "type": "string", "description": "The [Customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) ID of the customer associated with the payment.\n\nThis is required if the `source_id` refers to a card on file created using the Cards API." }, "location_id": { "type": "string", "description": "The location ID to associate with the payment. If not specified, the [main location](https://developer.squareup.com/docs/locations-api#about-the-main-location) is\nused." }, "team_member_id": { "type": "string", "description": "An optional [TeamMember](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember) ID to associate with \nthis payment." }, "reference_id": { "maxLength": 40, "type": "string", "description": "A user-defined ID to associate with the payment.\n\nYou can use this field to associate the payment to an entity in an external system \n(for example, you might specify an order ID that is generated by a third-party shopping cart)." }, "verification_token": { "type": "string", "description": "An identifying token generated by [payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.verifyBuyer).\nVerification tokens encapsulate customer device information and 3-D Secure\nchallenge results to indicate that Square has verified the buyer identity.\n\nFor more information, see [SCA Overview](https://developer.squareup.com/docs/sca-overview)." }, "accept_partial_authorization": { "type": "boolean", "description": "If set to `true` and charging a Square Gift Card, a payment might be returned with\n`amount_money` equal to less than what was requested. For example, a request for $20 when charging\na Square Gift Card with a balance of $5 results in an APPROVED payment of $5. You might choose\nto prompt the buyer for an additional payment to cover the remainder or cancel the Gift Card\npayment. This field cannot be `true` when `autocomplete \u003d true`.\n\nFor more information, see\n[Partial amount with Square Gift Cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card).\n\nDefault: false" }, "buyer_email_address": { "maxLength": 255, "type": "string", "description": "The buyer\u0027s email address." }, "billing_address": { "$ref": "#/definitions/Address", "description": "The buyer\u0027s billing address." }, "shipping_address": { "$ref": "#/definitions/Address", "description": "The buyer\u0027s shipping address." }, "note": { "maxLength": 500, "type": "string", "description": "An optional note to be entered by the developer when creating a payment." }, "statement_description_identifier": { "maxLength": 20, "type": "string", "description": "Optional additional payment information to include on the customer\u0027s card statement\nas part of the statement description. This can be, for example, an invoice number, ticket number,\nor short description that uniquely identifies the purchase.\n\nNote that the `statement_description_identifier` might get truncated on the statement description\nto fit the required information including the Square identifier (SQ *) and name of the\nseller taking the payment." }, "cash_details": { "$ref": "#/definitions/CashPaymentDetails", "description": "Additional details required when recording a cash payment (`source_id` is CASH)." }, "external_details": { "$ref": "#/definitions/ExternalPaymentDetails", "description": "Additional details required when recording an external payment (`source_id` is EXTERNAL)." }, "customer_details": { "$ref": "#/definitions/CustomerDetails", "description": "Details about the customer making the payment." } }, "description": "Describes a request to create a payment using \n[CreatePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/create-payment).", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "7b0f3ec5-086a-4871-8f13-3c81b3875218", "amount_money": { "amount": 1000, "currency": "USD" }, "source_id": "ccof:GaJGNaZa8x4OgDJn4GB", "autocomplete": true, "customer_id": "W92WH6P11H4Z77CTET0RNTGFW8", "location_id": "L88917AVBK2S5", "reference_id": "123456", "note": "Brief description", "app_fee_money": { "amount": 10, "currency": "USD" } } } }, "CreatePaymentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "payment": { "$ref": "#/definitions/Payment", "description": "The newly created payment." } }, "description": "Defines the response returned by [CreatePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/create-payment).\n\nIf there are errors processing the request, the `payment` field might not be\npresent, or it might be present with a status of `FAILED`.", "x-release-status": "PUBLIC", "example": { "payment": { "id": "R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY", "created_at": "2021-10-13T21:14:29.577Z", "updated_at": "2021-10-13T21:14:30.504Z", "amount_money": { "amount": 1000, "currency": "USD" }, "app_fee_money": { "amount": 10, "currency": "USD" }, "status": "COMPLETED", "delay_duration": "PT168H", "source_type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 11, "exp_year": 2022, "fingerprint": "sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "entry_method": "ON_FILE", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "auth_result_code": "vNEn2f", "statement_description": "SQ *EXAMPLE TEST GOSQ.C", "card_payment_timeline": { "authorized_at": "2021-10-13T21:14:29.732Z", "captured_at": "2021-10-13T21:14:30.504Z" } }, "location_id": "L88917AVBK2S5", "order_id": "pRsjRTgFWATl7so6DxdKBJa7ssbZY", "reference_id": "123456", "risk_evaluation": { "created_at": "2021-10-13T21:14:30.423Z", "risk_level": "NORMAL" }, "note": "Brief Description", "customer_id": "W92WH6P11H4Z77CTET0RNTGFW8", "total_money": { "amount": 1000, "currency": "USD" }, "approved_money": { "amount": 1000, "currency": "USD" }, "receipt_number": "R2B3", "receipt_url": "https://squareup.com/receipt/preview/EXAMPLE_RECEIPT_ID", "delay_action": "CANCEL", "delayed_until": "2021-10-20T21:14:29.577Z", "application_details": { "square_product": "ECOMMERCE_API", "application_id": "sq0ids-TcgftTEtKxJTRF1lCFJ9TA" }, "version_token": "TPtNEOBOa6Qq6E3C3IjckSVOM6b3hMbfhjvTxHBQUsB6o" } } }, "CreateRefundRequest": { "type": "object", "required": [ "idempotency_key", "tender_id", "amount_money" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 192, "type": "string", "description": "A value you specify that uniquely identifies this\nrefund among refunds you\u0027ve created for the tender.\n\nIf you\u0027re unsure whether a particular refund succeeded,\nyou can reattempt it with the same idempotency key without\nworrying about duplicating the refund.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/working-with-apis/idempotency) for more information." }, "tender_id": { "minLength": 1, "maxLength": 192, "type": "string", "description": "The ID of the tender to refund.\n\nA [`Transaction`](https://developer.squareup.com/reference/square_2024-04-17/objects/Transaction) has one or more `tenders` (i.e., methods\nof payment) associated with it, and you refund each tender separately with\nthe Connect API." }, "reason": { "maxLength": 192, "type": "string", "description": "A description of the reason for the refund.\n\nDefault value: `Refund via API`" }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money to refund.\n\nNote that you specify the amount in the\n__smallest denomination of the applicable currency__. For example, US dollar\namounts are specified in cents. See\n[Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details.\n\nThis amount cannot exceed the amount that was originally charged to the\ntender that corresponds to `tender_id`." } }, "description": "Defines the body parameters that can be included in\na request to the [CreateRefund](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/create-refund) endpoint.\n\nDeprecated - recommend using [RefundPayment](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/refund-payment)", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "request_body": { "idempotency_key": "86ae1696-b1e3-4328-af6d-f1e04d947ad2", "tender_id": "MtZRYYdDrYNQbOvV7nbuBvMF", "reason": "a reason", "amount_money": { "amount": 100, "currency": "USD" } } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CreateRefund/CreateRefundRequest.python", "csharp": "/sdk_samples/CreateRefund/CreateRefundRequest.csharp", "java": "/sdk_samples/CreateRefund/CreateRefundRequest.java", "php": "/sdk_samples/CreateRefund/CreateRefundRequest.php", "javascript": "/sdk_samples/CreateRefund/CreateRefundRequest.javascript", "ruby": "/sdk_samples/CreateRefund/CreateRefundRequest.ruby" } }, "CreateRefundResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "refund": { "$ref": "#/definitions/Refund", "description": "The created refund." } }, "description": "Defines the fields that are included in the response body of\na request to the [CreateRefund](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/create-refund) endpoint.\n\nOne of `errors` or `refund` is present in a given response (never both).", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "refund": { "id": "b27436d1-7f8e-5610-45c6-417ef71434b4-SW", "location_id": "18YC4JDH91E1H", "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF", "tender_id": "MtZRYYdDrYNQbOvV7nbuBvMF", "created_at": "2016-02-12T00:28:18Z", "reason": "some reason", "amount_money": { "amount": 100, "currency": "USD" }, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 10, "currency": "USD" }, "receivable_id": "ISu5xwxJ5v0CMJTQq7RvqyMF" } ], "status": "PENDING" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/CreateRefund/CreateRefundResponse.python", "csharp": "/sdk_samples/CreateRefund/CreateRefundResponse.csharp", "java": "/sdk_samples/CreateRefund/CreateRefundResponse.java", "php": "/sdk_samples/CreateRefund/CreateRefundResponse.php", "javascript": "/sdk_samples/CreateRefund/CreateRefundResponse.javascript", "ruby": "/sdk_samples/CreateRefund/CreateRefundResponse.ruby" } }, "CreateShiftRequest": { "type": "object", "required": [ "shift" ], "properties": { "idempotency_key": { "maxLength": 128, "type": "string", "description": "A unique string value to ensure the idempotency of the operation." }, "shift": { "$ref": "#/definitions/Shift", "description": "The `Shift` to be created." } }, "description": "Represents a request to create a `Shift`.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "HIDSNG5KS478L", "shift": { "team_member_id": "ormj0jJJZ5OZIzxrZYJI", "location_id": "PAA1RJZZKXBFG", "start_at": "2019-01-25T03:11:00-05:00", "end_at": "2019-01-25T13:11:00-05:00", "wage": { "title": "Barista", "hourly_rate": { "amount": 1100, "currency": "USD" }, "tip_eligible": true }, "breaks": [ { "start_at": "2019-01-25T06:11:00-05:00", "end_at": "2019-01-25T06:16:00-05:00", "break_type_id": "REGS1EQR1TPZ5", "name": "Tea Break", "expected_duration": "PT5M", "is_paid": true } ], "declared_cash_tip_money": { "amount": 500, "currency": "USD" } } } } }, "CreateShiftResponse": { "type": "object", "properties": { "shift": { "$ref": "#/definitions/Shift", "description": "The `Shift` that was created on the request." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request to create a `Shift`. The response contains\nthe created `Shift` object and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "shift": { "id": "K0YH4CV5462JB", "team_member_id": "ormj0jJJZ5OZIzxrZYJI", "employee_id": "ormj0jJJZ5OZIzxrZYJI", "location_id": "PAA1RJZZKXBFG", "timezone": "America/New_York", "start_at": "2019-01-25T03:11:00-05:00", "end_at": "2019-01-25T13:11:00-05:00", "wage": { "title": "Barista", "hourly_rate": { "amount": 1100, "currency": "USD" }, "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M", "tip_eligible": true }, "breaks": [ { "id": "X7GAQYVVRRG6P", "start_at": "2019-01-25T06:11:00-05:00", "end_at": "2019-01-25T06:16:00-05:00", "break_type_id": "REGS1EQR1TPZ5", "name": "Tea Break", "expected_duration": "PT5M", "is_paid": true } ], "declared_cash_tip_money": { "amount": 500, "currency": "USD" }, "status": "CLOSED", "version": 1, "created_at": "2019-02-28T00:39:02Z", "updated_at": "2019-02-28T00:39:02Z" } } }, "CreateSubscriptionRequest": { "type": "object", "required": [ "location_id", "customer_id" ], "properties": { "idempotency_key": { "type": "string", "description": "A unique string that identifies this `CreateSubscription` request.\nIf you do not provide a unique string (or provide an empty string as the value),\nthe endpoint treats each request as independent.\n\nFor more information, see [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." }, "location_id": { "minLength": 1, "type": "string", "description": "The ID of the location the subscription is associated with." }, "plan_variation_id": { "type": "string", "description": "The ID of the [subscription plan variation](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations#plan-variations) created using the Catalog API." }, "customer_id": { "minLength": 1, "type": "string", "description": "The ID of the [customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) subscribing to the subscription plan variation." }, "start_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date to start the subscription. \nIf it is unspecified, the subscription starts immediately." }, "canceled_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date when the newly created subscription is scheduled for cancellation. \n\nThis date overrides the cancellation date set in the plan variation configuration.\nIf the cancellation date is earlier than the end date of a subscription cycle, the subscription stops\nat the canceled date and the subscriber is sent a prorated invoice at the beginning of the canceled cycle. \n\nWhen the subscription plan of the newly created subscription has a fixed number of cycles and the `canceled_date`\noccurs before the subscription plan expires, the specified `canceled_date` sets the date when the subscription \nstops through the end of the last cycle." }, "tax_percentage": { "maxLength": 10, "type": "string", "description": "The tax to add when billing the subscription.\nThe percentage is expressed in decimal form, using a `\u0027.\u0027` as the decimal\nseparator and without a `\u0027%\u0027` sign. For example, a value of 7.5\ncorresponds to 7.5%." }, "price_override_money": { "$ref": "#/definitions/Money", "description": "A custom price which overrides the cost of a subscription plan variation with `STATIC` pricing.\nThis field does not affect itemized subscriptions with `RELATIVE` pricing. Instead, \nyou should edit the Subscription\u0027s [order template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates)." }, "card_id": { "type": "string", "description": "The ID of the [subscriber\u0027s](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) [card](https://developer.squareup.com/reference/square_2024-04-17/objects/Card) to charge.\nIf it is not specified, the subscriber receives an invoice via email with a link to pay for their subscription." }, "timezone": { "type": "string", "description": "The timezone that is used in date calculations for the subscription. If unset, defaults to\nthe location timezone. If a timezone is not configured for the location, defaults to \"America/New_York\".\nFormat: the IANA Timezone Database identifier for the location timezone. For\na list of time zones, see [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)." }, "source": { "$ref": "#/definitions/SubscriptionSource", "description": "The origination details of the subscription.", "x-release-status": "BETA", "x-is-beta": true }, "monthly_billing_anchor_date": { "maximum": 31, "minimum": 1, "type": "integer", "description": "The day-of-the-month to change the billing date to.", "x-release-status": "BETA", "x-is-beta": true }, "phases": { "type": "array", "items": { "$ref": "#/definitions/Phase" }, "description": "array of phases for this subscription" } }, "description": "Defines input parameters in a request to the \n[CreateSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/create-subscription) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "8193148c-9586-11e6-99f9-28cfe92138cf", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "card_id": "ccof:qy5x8hHGYsgLrp4Q4GB", "start_date": "2023-06-20", "phases": [ { "ordinal": 0, "order_template_id": "U2NaowWxzXwpsZU697x7ZHOAnCNZY" } ], "timezone": "America/Los_Angeles", "source": { "name": "My Application" } } } }, "CreateSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The newly created subscription.\n\nFor more information, see\n[Subscription object](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#subscription-object)." } }, "description": "Defines output parameters in a response from the\n[CreateSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/create-subscription) endpoint.", "x-release-status": "PUBLIC", "example": { "subscription": { "id": "56214fb2-cc85-47a1-93bc-44f3766bb56f", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "start_date": "2023-06-20", "status": "ACTIVE", "version": 1, "created_at": "2023-06-20T21:53:10Z", "card_id": "ccof:qy5x8hHGYsgLrp4Q4GB", "phases": [ { "uid": "873451e0-745b-4e87-ab0b-c574933fe616", "ordinal": 0, "order_template_id": "U2NaowWxzXwpsZU697x7ZHOAnCNZY", "plan_phase_uid": "X2Q2AONPB3RB64Y27S25QCZP" } ], "timezone": "America/Los_Angeles", "source": { "name": "My Application" } } } }, "CreateTeamMemberRequest": { "type": "object", "properties": { "idempotency_key": { "type": "string", "description": "A unique string that identifies this `CreateTeamMember` request.\nKeys can be any valid string, but must be unique for every request.\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).\n\nThe minimum length is 1 and the maximum length is 45." }, "team_member": { "$ref": "#/definitions/TeamMember", "description": "**Required** The data used to create the `TeamMember` object." } }, "description": "Represents a create request for a `TeamMember` object.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "idempotency-key-0", "team_member": { "reference_id": "reference_id_1", "status": "ACTIVE", "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@gmail.com", "phone_number": "+14159283333", "assigned_locations": { "location_ids": [ "YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT" ], "assignment_type": "EXPLICIT_LOCATIONS" } } } } }, "CreateTeamMemberResponse": { "type": "object", "properties": { "team_member": { "$ref": "#/definitions/TeamMember", "description": "The successfully created `TeamMember` object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "The errors that occurred during the request." } }, "description": "Represents a response from a create request containing the created `TeamMember` object or error messages.", "x-release-status": "PUBLIC", "example": { "team_member": { "id": "1yJlHapkseYnNPETIU1B", "reference_id": "reference_id_1", "is_owner": false, "status": "ACTIVE", "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@example.com", "phone_number": "+14159283333", "created_at": "2021-06-11T22:55:45Z", "updated_at": "2021-06-11T22:55:45Z", "assigned_locations": { "assignment_type": "EXPLICIT_LOCATIONS", "location_ids": [ "GA2Y9HSJ8KRYT", "YSGH2WBKG94QZ" ] } } } }, "CreateTerminalActionRequest": { "type": "object", "required": [ "idempotency_key", "action" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 64, "type": "string", "description": "A unique string that identifies this `CreateAction` request. Keys can be any valid string\nbut must be unique for every `CreateAction` request.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more\ninformation." }, "action": { "$ref": "#/definitions/TerminalAction", "description": "The Action to create." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "idempotency_key": "thahn-70e75c10-47f7-4ab6-88cc-aaa4076d065e", "action": { "device_id": "{{DEVICE_ID}}", "type": "SAVE_CARD", "deadline_duration": "PT5M", "save_card_options": { "customer_id": "{{CUSTOMER_ID}}", "reference_id": "user-id-1" } } } } }, "CreateTerminalActionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "action": { "$ref": "#/definitions/TerminalAction", "description": "The created `TerminalAction`" } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "action": { "id": "termapia:jveJIAkkAjILHkdCE", "device_id": "DEVICE_ID", "deadline_duration": "PT5M", "status": "PENDING", "created_at": "2021-07-28T23:22:07.476Z", "updated_at": "2021-07-28T23:22:07.476Z", "location_id": "LOCATION_ID", "type": "SAVE_CARD", "app_id": "APP_ID", "save_card_options": { "customer_id": "CUSTOMER_ID", "reference_id": "user-id-1" } } } }, "CreateTerminalCheckoutRequest": { "type": "object", "required": [ "idempotency_key", "checkout" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 64, "type": "string", "description": "A unique string that identifies this `CreateCheckout` request. Keys can be any valid string but\nmust be unique for every `CreateCheckout` request.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information." }, "checkout": { "$ref": "#/definitions/TerminalCheckout", "description": "The checkout to create." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "28a0c3bc-7839-11ea-bc55-0242ac130003", "checkout": { "amount_money": { "amount": 2610, "currency": "USD" }, "reference_id": "id11572", "device_options": { "device_id": "dbb5d83a-7838-11ea-bc55-0242ac130003" }, "note": "A brief note" } } } }, "CreateTerminalCheckoutResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "checkout": { "$ref": "#/definitions/TerminalCheckout", "description": "The created `TerminalCheckout`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "checkout": { "id": "08YceKh7B3ZqO", "amount_money": { "amount": 2610, "currency": "USD" }, "reference_id": "id11572", "note": "A brief note", "device_options": { "device_id": "dbb5d83a-7838-11ea-bc55-0242ac130003", "tip_settings": { "allow_tipping": false }, "skip_receipt_screen": false }, "status": "PENDING", "location_id": "LOCATION_ID", "created_at": "2020-04-06T16:39:32.545Z", "updated_at": "2020-04-06T16:39:32.545Z", "app_id": "APP_ID", "deadline_duration": "PT5M", "payment_type": "CARD_PRESENT" } } }, "CreateTerminalRefundRequest": { "type": "object", "required": [ "idempotency_key" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 64, "type": "string", "description": "A unique string that identifies this `CreateRefund` request. Keys can be any valid string but\nmust be unique for every `CreateRefund` request.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information." }, "refund": { "$ref": "#/definitions/TerminalRefund", "description": "The refund to create." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "402a640b-b26f-401f-b406-46f839590c04", "refund": { "amount_money": { "amount": 111, "currency": "CAD" }, "device_id": "f72dfb8e-4d65-4e56-aade-ec3fb8d33291", "reason": "Returning items", "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY" } } } }, "CreateTerminalRefundResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "refund": { "$ref": "#/definitions/TerminalRefund", "description": "The created `TerminalRefund`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "refund": { "id": "009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY", "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY", "amount_money": { "amount": 111, "currency": "CAD" }, "reason": "Returning items", "device_id": "f72dfb8e-4d65-4e56-aade-ec3fb8d33291", "deadline_duration": "PT5M", "status": "PENDING", "created_at": "2020-09-29T15:21:46.771Z", "updated_at": "2020-09-29T15:21:46.771Z", "app_id": "sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ", "card": { "card_brand": "INTERAC", "last_4": "1111", "exp_month": 1, "exp_year": 2022, "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw", "card_type": "CREDIT", "bin": "411111" }, "order_id": "kcuKDKreRaI4gF4TjmEgZjHk8Z7YY", "location_id": "76C9W6K8CNNQ5" } } }, "CreateVendorRequest": { "type": "object", "required": [ "idempotency_key" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A client-supplied, universally unique identifier (UUID) to make this [CreateVendor](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/create-vendor) call idempotent.\n\nSee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the\n[API Development 101](https://developer.squareup.com/docs/buildbasics) section for more\ninformation." }, "vendor": { "$ref": "#/definitions/Vendor", "description": "The requested [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) to be created." } }, "description": "Represents an input to a call to [CreateVendor](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/create-vendor).", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "idempotency_key": "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", "vendor": { "name": "Joe\u0027s Fresh Seafood", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250" } ], "account_number": "4025391", "note": "a vendor" } } } }, "CreateVendorResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered when the request fails." }, "vendor": { "$ref": "#/definitions/Vendor", "description": "The successfully created [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) object." } }, "description": "Represents an output from a call to [CreateVendor](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/create-vendor).", "x-release-status": "BETA", "x-is-beta": true, "example": { "vendor": { "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2022-03-16T10:21:54.859Z", "updated_at": "2022-03-16T10:21:54.859Z", "name": "Joe\u0027s Fresh Seafood", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "id": "INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A", "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250" } ], "account_number": "4025391", "note": "a vendor", "version": 1, "status": "ACTIVE" }, "errors": [] } }, "CreateWebhookSubscriptionRequest": { "type": "object", "required": [ "subscription" ], "properties": { "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique string that identifies the [CreateWebhookSubscription](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/create-webhook-subscription) request." }, "subscription": { "$ref": "#/definitions/WebhookSubscription", "description": "The [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) to create." } }, "description": "Creates a [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription).", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/webhooks/subscriptions", "request_body": { "idempotency_key": "63f84c6c-2200-4c99-846c-2670a1311fbf", "subscription": { "name": "Example Webhook Subscription", "event_types": [ "payment.created", "payment.updated" ], "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15" } } } }, "CreateWebhookSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "subscription": { "$ref": "#/definitions/WebhookSubscription", "description": "The new [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)." } }, "description": "Defines the fields that are included in the response body of\na request to the [CreateWebhookSubscription](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/create-webhook-subscription) endpoint.\n\nNote: if there are errors processing the request, the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) will not be\npresent.", "x-release-status": "PUBLIC", "example": { "subscription": { "id": "wbhk_b35f6b3145074cf9ad513610786c19d5", "name": "Example Webhook Subscription", "enabled": true, "event_types": [ "payment.created", "payment.updated" ], "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15", "signature_key": "1k9bIJKCeTmSQwyagtNRLg", "created_at": "2022-01-10 23:29:48 +0000 UTC", "updated_at": "2022-01-10 23:29:48 +0000 UTC" } } }, "CustomAttribute": { "type": "object", "properties": { "key": { "minLength": 1, "pattern": "^([a-zA-Z0-9\\._-]+:)?[a-zA-Z0-9\\._-]{1,60}$", "type": "string", "description": "The identifier\nof the custom attribute definition and its corresponding custom attributes. This value\ncan be a simple key, which is the key that is provided when the custom attribute definition\nis created, or a qualified key, if the requesting\napplication is not the definition owner. The qualified key consists of the application ID\nof the custom attribute definition owner\nfollowed by the simple key that was provided when the definition was created. It has the\nformat application_id:simple key.\n\nThe value for a simple key can contain up to 60 alphanumeric characters, periods (.),\nunderscores (_), and hyphens (-)." }, "value": { "description": "The value assigned to the custom attribute. It is validated against the custom\nattribute definition\u0027s schema on write operations. For more information about custom\nattribute values,\nsee [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview)." }, "version": { "type": "integer", "description": "Read only. The current version of the custom attribute. This field is incremented when the custom attribute is changed.\nWhen updating an existing custom attribute value, you can provide this field\nand specify the current version of the custom attribute to enable\n[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency).\nThis field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,\nsee [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview)." }, "visibility": { "type": "string", "description": "A copy of the `visibility` field value for the associated custom attribute definition.", "x-read-only": true }, "definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "A copy of the associated custom attribute definition object. This field is only set when\nthe optional field is specified on the request.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp that indicates when the custom attribute was created or was most recently\nupdated, in RFC 3339 format.", "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp that indicates when the custom attribute was created, in RFC 3339 format.", "x-read-only": true } }, "description": "A custom attribute value. Each custom attribute value has a corresponding\n`CustomAttributeDefinition` object.", "x-release-status": "PUBLIC" }, "CustomAttributeDefinition": { "type": "object", "properties": { "key": { "minLength": 1, "pattern": "^([a-zA-Z0-9\\._-]+:)?[a-zA-Z0-9\\._-]{1,60}$", "type": "string", "description": "The identifier\nof the custom attribute definition and its corresponding custom attributes. This value\ncan be a simple key, which is the key that is provided when the custom attribute definition\nis created, or a qualified key, if the requesting\napplication is not the definition owner. The qualified key consists of the application ID\nof the custom attribute definition owner\nfollowed by the simple key that was provided when the definition was created. It has the\nformat application_id:simple key.\n\nThe value for a simple key can contain up to 60 alphanumeric characters, periods (.),\nunderscores (_), and hyphens (-).\n\nThis field can not be changed\nafter the custom attribute definition is created. This field is required when creating\na definition and must be unique per application, seller, and resource type." }, "schema": { "type": "object", "description": "The JSON schema for the custom attribute definition, which determines the data type of the corresponding custom attributes. For more information,\nsee [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). This field is required when creating a definition." }, "name": { "maxLength": 255, "type": "string", "description": "The name of the custom attribute definition for API and seller-facing UI purposes. The name must\nbe unique within the seller and application pair. This field is required if the\n`visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`." }, "description": { "maxLength": 255, "type": "string", "description": "Seller-oriented description of the custom attribute definition, including any constraints\nthat the seller should observe. May be displayed as a tooltip in Square UIs. This field is\nrequired if the `visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`." }, "visibility": { "type": "string", "description": "Specifies how the custom attribute definition and its values should be shared with\nthe seller and other applications. If no value is specified, the value defaults to `VISIBILITY_HIDDEN`." }, "version": { "type": "integer", "description": "Read only. The current version of the custom attribute definition.\nThe value is incremented each time the custom attribute definition is updated.\nWhen updating a custom attribute definition, you can provide this field\nand specify the current version of the custom attribute definition to enable\n[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency).\n\nOn writes, this field must be set to the latest version. Stale writes are rejected.\n\nThis field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,\nsee [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview)." }, "updated_at": { "type": "string", "description": "The timestamp that indicates when the custom attribute definition was created or most recently updated,\nin RFC 3339 format.", "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp that indicates when the custom attribute definition was created, in RFC 3339 format.", "x-read-only": true } }, "description": "Represents a definition for custom attribute values. A custom attribute definition\nspecifies the key, visibility, schema, and other properties for a custom attribute.", "x-release-status": "PUBLIC" }, "CustomAttributeFilter": { "type": "object", "properties": { "custom_attribute_definition_id": { "type": "string", "description": "A query expression to filter items or item variations by matching their custom attributes\u0027\n`custom_attribute_definition_id` property value against the the specified id.\nExactly one of `custom_attribute_definition_id` or `key` must be specified." }, "key": { "type": "string", "description": "A query expression to filter items or item variations by matching their custom attributes\u0027\n`key` property value against the specified key.\nExactly one of `custom_attribute_definition_id` or `key` must be specified." }, "string_filter": { "type": "string", "description": "A query expression to filter items or item variations by matching their custom attributes\u0027\n`string_value` property value against the specified text.\nExactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified." }, "number_filter": { "$ref": "#/definitions/Range", "description": "A query expression to filter items or item variations with their custom attributes\ncontaining a number value within the specified range.\nExactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified." }, "selection_uids_filter": { "type": "array", "items": { "type": "string" }, "description": "A query expression to filter items or item variations by matching their custom attributes\u0027\n`selection_uid_values` values against the specified selection uids.\nExactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified." }, "bool_filter": { "type": "boolean", "description": "A query expression to filter items or item variations by matching their custom attributes\u0027\n`boolean_value` property values against the specified Boolean expression.\nExactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified." } }, "description": "Supported custom attribute query expressions for calling the\n[SearchCatalogItems](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-items)\nendpoint to search for items or item variations.", "x-release-status": "PUBLIC" }, "CustomField": { "type": "object", "required": [ "title" ], "properties": { "title": { "minLength": 1, "maxLength": 50, "type": "string", "description": "The title of the custom field." } }, "description": "Describes a custom form field to add to the checkout page to collect more information from buyers during checkout.\nFor more information,\nsee [Specify checkout options](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations#specify-checkout-options-1).", "x-release-status": "PUBLIC" }, "Customer": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique Square-assigned ID for the customer profile.\n\nIf you need this ID for an API request, use the ID returned when you created the customer profile or call the [SearchCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/search-customers) \nor [ListCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/list-customers) endpoint." }, "created_at": { "type": "string", "description": "The timestamp when the customer profile was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp when the customer profile was last updated, in RFC 3339 format.", "x-read-only": true }, "cards": { "type": "array", "items": { "$ref": "#/definitions/Card" }, "description": "Payment details of the credit, debit, and gift cards stored on file for the customer profile. \n\nDEPRECATED at version 2021-06-16. Replaced by calling [ListCards](https://developer.squareup.com/reference/square_2024-04-17/cards-api/list-cards) (for credit and debit cards on file) \nor [ListGiftCards](https://developer.squareup.com/reference/square_2024-04-17/gift-cards-api/list-gift-cards) (for gift cards on file) and including the `customer_id` query parameter. \nFor more information, see [Migration notes](https://developer.squareup.com/docs/customers-api/what-it-does#migrate-customer-cards).", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "given_name": { "type": "string", "description": "The given name (that is, the first name) associated with the customer profile." }, "family_name": { "type": "string", "description": "The family name (that is, the last name) associated with the customer profile." }, "nickname": { "type": "string", "description": "A nickname for the customer profile." }, "company_name": { "type": "string", "description": "A business name associated with the customer profile." }, "email_address": { "type": "string", "description": "The email address associated with the customer profile." }, "address": { "$ref": "#/definitions/Address", "description": "The physical address associated with the customer profile." }, "phone_number": { "type": "string", "description": "The phone number associated with the customer profile." }, "birthday": { "type": "string", "description": "The birthday associated with the customer profile, in `YYYY-MM-DD` format. For example, `1998-09-21`\nrepresents September 21, 1998, and `0000-09-21` represents September 21 (without a birth year)." }, "reference_id": { "type": "string", "description": "An optional second ID used to associate the customer profile with an\nentity in another system." }, "note": { "type": "string", "description": "A custom note associated with the customer profile." }, "preferences": { "$ref": "#/definitions/CustomerPreferences", "description": "Represents general customer preferences." }, "creation_source": { "type": "string", "description": "The method used to create the customer profile." }, "group_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of [customer groups](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerGroup) the customer belongs to." }, "segment_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of [customer segments](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerSegment) the customer belongs to." }, "version": { "type": "integer", "format": "int64", "description": "The Square-assigned version number of the customer profile. The version number is incremented each time an update is committed to the customer profile, except for changes to customer segment membership and cards on file." }, "tax_ids": { "$ref": "#/definitions/TaxIds", "description": "The tax ID associated with the customer profile. This field is present only for customers of sellers in EU countries or the United Kingdom. \nFor more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids)." } }, "description": "Represents a Square customer profile in the Customer Directory of a Square seller.", "x-release-status": "PUBLIC" }, "CustomerAddressFilter": { "type": "object", "properties": { "postal_code": { "$ref": "#/definitions/CustomerTextFilter", "description": "The postal code to search for. Only an `exact` match is supported." }, "country": { "type": "string", "description": "The country code to search for." } }, "description": "The customer address filter. This filter is used in a [CustomerCustomAttributeFilterValue](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerCustomAttributeFilterValue) filter when\nsearching by an `Address`-type custom attribute.", "x-release-status": "PUBLIC" }, "CustomerCreationSourceFilter": { "type": "object", "properties": { "values": { "type": "array", "items": { "type": "string" }, "description": "The list of creation sources used as filtering criteria." }, "rule": { "type": "string", "description": "Indicates whether a customer profile matching the filter criteria\nshould be included in the result or excluded from the result.\n\nDefault: `INCLUDE`." } }, "description": "The creation source filter.\n\nIf one or more creation sources are set, customer profiles are included in,\nor excluded from, the result if they match at least one of the filter criteria.", "x-release-status": "PUBLIC" }, "CustomerCustomAttributeFilter": { "type": "object", "required": [ "key" ], "properties": { "key": { "type": "string", "description": "The `key` of the [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) to filter by. The key is the identifier of the custom attribute\n(and the corresponding custom attribute definition) and can be retrieved using the [Customer Custom Attributes API](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api)." }, "filter": { "$ref": "#/definitions/CustomerCustomAttributeFilterValue", "description": "A filter that corresponds to the data type of the target custom attribute. For example, provide the `phone` filter to\nsearch based on the value of a `PhoneNumber`-type custom attribute. The data type is specified by the schema field of the custom attribute definition,\nwhich can be retrieved using the [Customer Custom Attributes API](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api).\n\nYou must provide this `filter` field, the `updated_at` field, or both." }, "updated_at": { "$ref": "#/definitions/TimeRange", "description": "The date range for when the custom attribute was last updated. The date range can include `start_at`, `end_at`, or\nboth. Range boundaries are inclusive. Dates are specified as RFC 3339 timestamps.\n\nYou must provide this `updated_at` field, the `filter` field, or both." } }, "description": "The custom attribute filter. Use this filter in a set of [custom attribute filters](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerCustomAttributeFilters) to search\nbased on the value or last updated date of a customer-related [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute).", "x-release-status": "PUBLIC" }, "CustomerCustomAttributeFilterValue": { "type": "object", "properties": { "email": { "$ref": "#/definitions/CustomerTextFilter", "description": "A filter for a query based on the value of an `Email`-type custom attribute. This filter is case-insensitive and can\ninclude `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete email address.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens to match against the email address. Square removes\nany punctuation (including periods (.), underscores (_), and the \u0026#64; symbol) and tokenizes the email addresses on spaces. A match is found\nif a tokenized email address contains all the tokens in the search query, irrespective of the token order. For example, `Steven gmail`\nmatches steven.jones\u0026#64;gmail.com and mygmail\u0026#64;stevensbakery.com." }, "phone": { "$ref": "#/definitions/CustomerTextFilter", "description": "A filter for a query based on the value of a `PhoneNumber`-type custom attribute. This filter is case-insensitive and\ncan include `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete phone number. This is always an E.164-compliant phone number that starts\nwith the + sign followed by the country code and subscriber number. For example, the format for a US phone number is +12061112222.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens to match against the phone number.\nSquare removes any punctuation and tokenizes the expression on spaces. A match is found if a tokenized phone number contains\nall the tokens in the search query, irrespective of the token order. For example, `415 123 45` is tokenized to `415`, `123`, and `45`,\nwhich matches +14151234567 and +12345674158, but does not match +1234156780. Similarly, the expression `415` matches\n+14151234567, +12345674158, and +1234156780." }, "text": { "$ref": "#/definitions/CustomerTextFilter", "description": "A filter for a query based on the value of a `String`-type custom attribute. This filter is case-insensitive and \ncan include `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete string.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens in any order that contain complete words\nto match against the string. Square tokenizes the expression using a grammar-based tokenizer. For example, the expressions `quick brown`,\n`brown quick`, and `quick fox` match \"The quick brown fox jumps over the lazy dog\". However, `quick foxes` and `qui` do not match." }, "selection": { "$ref": "#/definitions/FilterValue", "description": "A filter for a query based on the display name for a `Selection`-type custom attribute value. This filter is case-sensitive\nand can contain `any`, `all`, or both. The `none` condition is not supported.\n\nProvide the display name of each item that you want to search for. To find the display names for the selection, use the \n[Customer Custom Attributes API](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api) to retrieve the corresponding custom attribute definition\nand then check the `schema.items.names` field. For more information, see\n[Search based on selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection).\n\nNote that when a `Selection`-type custom attribute is assigned to a customer profile, the custom attribute value is a list of one\nor more UUIDs (sourced from the `schema.items.enum` field) that map to the item names. These UUIDs are unique per seller." }, "date": { "$ref": "#/definitions/TimeRange", "description": "A filter for a query based on the value of a `Date`-type custom attribute.\n\nProvide a date range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Dates can be specified\nin `YYYY-MM-DD` format or as RFC 3339 timestamps." }, "number": { "$ref": "#/definitions/FloatNumberRange", "description": "A filter for a query based on the value of a `Number`-type custom attribute, which can be an integer or a decimal with up to\n5 digits of precision.\n\nProvide a numerical range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Numbers are specified\nas decimals or integers. The absolute value of range boundaries must not exceed `(2^63-1)/10^5`, or 92233720368547." }, "boolean": { "type": "boolean", "description": "A filter for a query based on the value of a `Boolean`-type custom attribute." }, "address": { "$ref": "#/definitions/CustomerAddressFilter", "description": "A filter for a query based on the value of an `Address`-type custom attribute. The filter can include `postal_code`, `country`, or both." } }, "description": "A type-specific filter used in a [custom attribute filter](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerCustomAttributeFilter) to search based on the value \nof a customer-related [custom attribute](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute).", "x-release-status": "PUBLIC" }, "CustomerCustomAttributeFilters": { "type": "object", "properties": { "filters": { "type": "array", "items": { "$ref": "#/definitions/CustomerCustomAttributeFilter" }, "description": "The custom attribute filters. Each filter must specify `key` and include the `filter` field with a type-specific filter,\nthe `updated_at` field, or both. The provided keys must be unique within the list of custom attribute filters." } }, "description": "The custom attribute filters in a set of [customer filters](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerFilter) used in a search query. Use this filter\nto search based on [custom attributes](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttribute) that are assigned to customer profiles. For more information, see\n[Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).", "x-release-status": "PUBLIC" }, "CustomerDetails": { "type": "object", "properties": { "customer_initiated": { "type": "boolean", "description": "Indicates whether the customer initiated the payment." }, "seller_keyed_in": { "type": "boolean", "description": "Indicates that the seller keyed in payment details on behalf of the customer.\nThis is used to flag a payment as Mail Order / Telephone Order (MOTO)." } }, "description": "Details about the customer making the payment.", "x-release-status": "PUBLIC" }, "CustomerFilter": { "type": "object", "properties": { "creation_source": { "$ref": "#/definitions/CustomerCreationSourceFilter", "description": "A filter to select customers based on their creation source." }, "created_at": { "$ref": "#/definitions/TimeRange", "description": "A filter to select customers based on when they were created." }, "updated_at": { "$ref": "#/definitions/TimeRange", "description": "A filter to select customers based on when they were last updated." }, "email_address": { "$ref": "#/definitions/CustomerTextFilter", "description": "A filter to [select customers by their email address](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-email-address) \nvisible to the seller. \nThis filter is case-insensitive.\n\nFor [exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-email-address), this\nfilter causes the search to return customer profiles \nwhose `email_address` field value are identical to the email address provided\nin the query.\n\nFor [fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-email-address), \nthis filter causes the search to return customer profiles \nwhose `email_address` field value has a token-wise partial match against the filtering \nexpression in the query. For example, with `Steven gmail` provided in a search\nquery, the search returns customers whose email address is `steven.johnson\u0026#64;gmail.com` \nor `mygmail\u0026#64;stevensbakery.com`. Square removes any punctuation (including periods (.),\nunderscores (_), and the \u0026#64; symbol) and tokenizes the email addresses on spaces. A match is\nfound if a tokenized email address contains all the tokens in the search query, \nirrespective of the token order." }, "phone_number": { "$ref": "#/definitions/CustomerTextFilter", "description": "A filter to [select customers by their phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-phone-number)\nvisible to the seller.\n\nFor [exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number),\nthis filter returns customers whose phone number matches the specified query expression. The number in the query must be of an\nE.164-compliant form. In particular, it must include the leading `+` sign followed by a country code and then a subscriber number.\nFor example, the standard E.164 form of a US phone number is `+12062223333` and an E.164-compliant variation is `+1 (206) 222-3333`.\nTo match the query expression, stored customer phone numbers are converted to the standard E.164 form.\n\nFor [fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number),\nthis filter returns customers whose phone number matches the token or tokens provided in the query expression. For example, with `415`\nprovided in a search query, the search returns customers with the phone numbers `+1-415-212-1200`, `+1-212-415-1234`, and `+1 (551) 234-1567`.\nSimilarly, a search query of `415 123` returns customers with the phone numbers `+1-212-415-1234` and `+1 (551) 234-1567` but not\n`+1-212-415-1200`. A match is found if a tokenized phone number contains all the tokens in the search query, irrespective of the token order." }, "reference_id": { "$ref": "#/definitions/CustomerTextFilter", "description": "A filter to [select customers by their reference IDs](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-reference-id).\nThis filter is case-insensitive.\n\n[Exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id) \nof a customer\u0027s reference ID against a query\u0027s reference ID is evaluated as an\nexact match between two strings, character by character in the given order.\n\n[Fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-reference-id) \nof stored reference IDs against queried reference IDs works \nexactly the same as fuzzy matching on email addresses. Non-alphanumeric characters \nare replaced by spaces to tokenize stored and queried reference IDs. A match is found\nif a tokenized stored reference ID contains all tokens specified in any order in the query. For example,\na query of `NYC M` matches customer profiles with the `reference_id` value of `NYC_M_35_JOHNSON`\nand `NYC_27_MURRAY`." }, "group_ids": { "$ref": "#/definitions/FilterValue", "description": "A filter to select customers based on the [groups](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerGroup) they belong to.\nGroup membership is controlled by sellers and developers.\n\nThe `group_ids` filter has the following syntax:\n```\n\"group_ids\": {\n\"any\": [\"{group_a_id}\", \"{group_b_id}\", ...],\n\"all\": [\"{group_1_id}\", \"{group_2_id}\", ...],\n\"none\": [\"{group_i_id}\", \"{group_ii_id}\", ...]\n}\n```\n\nYou can use any combination of the `any`, `all`, and `none` fields in the filter.\nWith `any`, the search returns customers in groups `a` or `b` or any other group specified in the list.\nWith `all`, the search returns customers in groups `1` and `2` and all other groups specified in the list.\nWith `none`, the search returns customers not in groups `i` or `ii` or any other group specified in the list.\n\nIf any of the search conditions are not met, including when an invalid or non-existent group ID is provided,\nthe result is an empty object (`{}`)." }, "custom_attribute": { "$ref": "#/definitions/CustomerCustomAttributeFilters", "description": "A filter to select customers based on one or more custom attributes. \nThis filter can contain up to 10 custom attribute filters. Each custom attribute filter specifies filtering criteria for a target custom\nattribute. If multiple custom attribute filters are provided, they are combined as an `AND` operation.\n\nTo be valid for a search, the custom attributes must be visible to the requesting application. For more information, including example queries,\nsee [Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).\n\nSquare returns matching customer profiles, which do not contain custom attributes. To retrieve customer-related custom attributes,\nuse the [Customer Custom Attributes API](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api). For example, you can call\n[RetrieveCustomerCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/retrieve-customer-custom-attribute) using a customer ID from the result set." }, "segment_ids": { "$ref": "#/definitions/FilterValue", "description": " A filter to select customers based on the [segments](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerSegment) they belong to.\nSegment membership is dynamic and adjusts automatically based on whether customers meet the segment criteria.\n\nYou can provide up to three segment IDs in the filter, using any combination of the `all`, `any`, and `none` fields.\nFor the following example, the results include customers who belong to both segment A and segment B but do not belong to segment C.\n\n```\n\"segment_ids\": {\n\"all\": [\"{segment_A_id}\", \"{segment_B_id}\"],\n\"none\": [\"{segment_C_id}\"]\n}\n```\n\nIf an invalid or non-existent segment ID is provided in the filter, Square stops processing the request\nand returns a `400 BAD_REQUEST` error that includes the segment ID." } }, "description": "Represents the filtering criteria in a [search query](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerQuery) that defines how to filter\ncustomer profiles returned in [SearchCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/search-customers) results.", "x-release-status": "PUBLIC" }, "CustomerGroup": { "type": "object", "required": [ "name" ], "properties": { "id": { "maxLength": 255, "type": "string", "description": "A unique Square-generated ID for the customer group.", "x-read-only": true }, "name": { "type": "string", "description": "The name of the customer group." }, "created_at": { "type": "string", "description": "The timestamp when the customer group was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp when the customer group was last updated, in RFC 3339 format.", "x-read-only": true } }, "description": "Represents a group of customer profiles. \n\nCustomer groups can be created, be modified, and have their membership defined using \nthe Customers API or within the Customer Directory in the Square Seller Dashboard or Point of Sale.", "x-release-status": "PUBLIC" }, "CustomerPreferences": { "type": "object", "properties": { "email_unsubscribed": { "type": "boolean", "description": "Indicates whether the customer has unsubscribed from marketing campaign emails. A value of `true` means that the customer chose to opt out of email marketing from the current Square seller or from all Square sellers. This value is read-only from the Customers API." } }, "description": "Represents communication preferences for the customer profile.", "x-release-status": "PUBLIC" }, "CustomerQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/CustomerFilter", "description": "The filtering criteria for the search query. A query can contain multiple filters in any combination.\nMultiple filters are combined as `AND` statements.\n\n__Note:__ Combining multiple filters as `OR` statements is not supported. Instead, send multiple single-filter\nsearches and join the result sets." }, "sort": { "$ref": "#/definitions/CustomerSort", "description": "Sorting criteria for query results. The default behavior is to sort \ncustomers alphabetically by `given_name` and `family_name`." } }, "description": "Represents filtering and sorting criteria for a [SearchCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/search-customers) request.", "x-release-status": "PUBLIC" }, "CustomerSegment": { "type": "object", "required": [ "name" ], "properties": { "id": { "maxLength": 255, "type": "string", "description": "A unique Square-generated ID for the segment.", "x-read-only": true }, "name": { "type": "string", "description": "The name of the segment.", "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp when the segment was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp when the segment was last updated, in RFC 3339 format.", "x-read-only": true } }, "description": "Represents a group of customer profiles that match one or more predefined filter criteria. \n\nSegments (also known as Smart Groups) are defined and created within the Customer Directory in the\nSquare Seller Dashboard or Point of Sale.", "x-release-status": "PUBLIC" }, "CustomerSort": { "type": "object", "properties": { "field": { "type": "string", "description": "Indicates the fields to use as the sort key, which is either the default set of fields or `created_at`.\n\nThe default value is `DEFAULT`." }, "order": { "type": "string", "description": "Indicates the order in which results should be sorted based on the\nsort field value. Strings use standard alphabetic comparison\nto determine order. Strings representing numbers are sorted as strings.\n\nThe default value is `ASC`." } }, "description": "Represents the sorting criteria in a [search query](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomerQuery) that defines how to sort\ncustomer profiles returned in [SearchCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/search-customers) results.", "x-release-status": "PUBLIC" }, "CustomerTaxIds": { "type": "object", "properties": { "eu_vat": { "maxLength": 20, "type": "string", "description": "The EU VAT identification number for the customer. For example, `IE3426675K`. The ID can contain alphanumeric characters only." } }, "description": "Represents the tax ID associated with a [customer profile](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom. \nFor more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).", "x-release-status": "PUBLIC" }, "CustomerTextFilter": { "type": "object", "properties": { "exact": { "type": "string", "description": "Use the exact filter to select customers whose attributes match exactly the specified query." }, "fuzzy": { "type": "string", "description": "Use the fuzzy filter to select customers whose attributes match the specified query \nin a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then \neach query token must be matched somewhere in the searched attribute. For single token queries, \nthis is effectively the same behavior as a partial match operation." } }, "description": "A filter to select customers based on exact or fuzzy matching of\ncustomer attributes against a specified query. Depending on the customer attributes, \nthe filter can be case-sensitive. This filter can be exact or fuzzy, but it cannot be both.", "x-release-status": "PUBLIC" }, "DataCollectionOptions": { "type": "object", "required": [ "title", "body", "input_type" ], "properties": { "title": { "minLength": 1, "maxLength": 250, "type": "string", "description": "The title text to display in the data collection flow on the Terminal." }, "body": { "minLength": 1, "maxLength": 10000, "type": "string", "description": "The body text to display under the title in the data collection screen flow on the\nTerminal." }, "input_type": { "type": "string", "description": "Represents the type of the input text." }, "collected_data": { "$ref": "#/definitions/CollectedData", "description": "The buyer’s input text from the data collection screen.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DateRange": { "type": "object", "properties": { "start_date": { "type": "string", "description": "A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601\nextended format for calendar dates.\nThe beginning of a date range (inclusive)." }, "end_date": { "type": "string", "description": "A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601\nextended format for calendar dates.\nThe end of a date range (inclusive)." } }, "description": "A range defined by two dates. Used for filtering a query for Connect v2\nobjects that have date properties.", "x-release-status": "PUBLIC" }, "DeleteBookingCustomAttributeDefinitionRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteBookingCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/delete-booking-custom-attribute-definition) request.", "x-release-status": "PUBLIC", "example": { "pathParameters": { "key": "favoriteShampoo" } } }, "DeleteBookingCustomAttributeDefinitionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [DeleteBookingCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/delete-booking-custom-attribute-definition) response\ncontaining error messages when errors occurred during the request. The successful response does not contain any payload.", "x-release-status": "PUBLIC", "example": { "errors": [] } }, "DeleteBookingCustomAttributeRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteBookingCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/delete-booking-custom-attribute) request.", "x-release-status": "PUBLIC", "example": { "pathParameters": { "booking_id": "Z57QXKM2FGXEQDV42W8RBZY7BR", "key": "favoriteShampoo" } } }, "DeleteBookingCustomAttributeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [DeleteBookingCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/delete-booking-custom-attribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "errors": [] } }, "DeleteBreakTypeRequest": { "type": "object", "properties": {}, "description": "A request to delete a `BreakType`.", "x-release-status": "PUBLIC", "example": {} }, "DeleteBreakTypeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request to delete a `BreakType`. The response might contain a set \nof `Error` objects if the request resulted in errors.", "x-release-status": "PUBLIC", "example": {} }, "DeleteCatalogObjectRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.python", "csharp": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.csharp", "java": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.java", "php": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.php", "javascript": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.javascript", "ruby": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.ruby" } }, "DeleteCatalogObjectResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "deleted_object_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of all catalog objects deleted by this request.\nMultiple IDs may be returned when associated objects are also deleted, for example\na catalog item variation will be deleted (and its ID included in this field)\nwhen its parent catalog item is deleted." }, "deleted_at": { "type": "string", "description": "The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nof this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "deleted_object_ids": [ "7SB3ZQYJ5GDMVFL7JK46JCHT", "KQLFFHA6K6J3YQAQAWDQAL57" ], "deleted_at": "2016-11-16T22:25:24.878Z" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.python", "csharp": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.csharp", "java": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.java", "php": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.php", "javascript": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.javascript", "ruby": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.ruby" } }, "DeleteCustomerCardRequest": { "type": "object", "properties": {}, "description": "Defines the fields that are included in requests to the\n`DeleteCustomerCard` endpoint.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.python", "csharp": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.csharp", "java": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.java", "php": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.php", "javascript": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.javascript", "ruby": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.ruby" } }, "DeleteCustomerCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `DeleteCustomerCard` endpoint.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.python", "csharp": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.csharp", "java": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.java", "php": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.php", "javascript": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.javascript", "ruby": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.ruby" } }, "DeleteCustomerCustomAttributeDefinitionRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/delete-customer-custom-attribute-definition) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?key\u003dfavoritemovie" } }, "DeleteCustomerCustomAttributeDefinitionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from a delete request containing error messages if there are any.", "x-release-status": "PUBLIC", "example": {} }, "DeleteCustomerCustomAttributeRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteCustomerCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/delete-customer-custom-attribute) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?customer_id\u003dZ57QXKM2FGXEQDV42W8RBZY7BR\u0026key\u003dfavoritemovie" } }, "DeleteCustomerCustomAttributeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [DeleteCustomerCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/delete-customer-custom-attribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": {} }, "DeleteCustomerGroupRequest": { "type": "object", "properties": {}, "description": "Defines the fields that can be included in a request to the\n[DeleteCustomerGroup](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/delete-customer-group) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "DeleteCustomerGroupResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [DeleteCustomerGroup](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/delete-customer-group) endpoint.", "x-release-status": "PUBLIC", "example": {} }, "DeleteCustomerRequest": { "type": "object", "properties": { "version": { "type": "integer", "format": "int64", "description": "The current version of the customer profile.\n\nAs a best practice, you should include this parameter to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control. For more information, see [Delete a customer profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#delete-customer-profile)." } }, "description": "Defines the fields that are included in a request to the `DeleteCustomer`\nendpoint.", "x-release-status": "PUBLIC", "example": { "request_params": "?version\u003d11" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.python", "csharp": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.csharp", "java": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.java", "php": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.php", "javascript": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.javascript", "ruby": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.ruby" } }, "DeleteCustomerResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `DeleteCustomer` endpoint.", "x-release-status": "PUBLIC", "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.python", "csharp": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.csharp", "java": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.java", "php": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.php", "javascript": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.javascript", "ruby": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.ruby" } }, "DeleteDisputeEvidenceRequest": { "type": "object", "properties": {}, "description": "Defines the parameters for a `DeleteDisputeEvidence` request.", "x-release-status": "PUBLIC", "example": { "request_params": "?dispute_id\u003dbVTprrwk0gygTLZ96VX1oB\u0026evidence_id\u003dCpfnkwGselCwS8QFvxN6", "request_body": {} } }, "DeleteDisputeEvidenceResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Defines the fields in a `DeleteDisputeEvidence` response.", "x-release-status": "PUBLIC", "example": {} }, "DeleteInvoiceAttachmentRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteInvoiceAttachment](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/delete-invoice-attachment) request.", "x-release-status": "PUBLIC" }, "DeleteInvoiceAttachmentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Represents a [DeleteInvoiceAttachment](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/delete-invoice-attachment) response.", "x-release-status": "PUBLIC", "example": {} }, "DeleteInvoiceRequest": { "type": "object", "properties": { "version": { "type": "integer", "description": "The version of the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) to delete.\nIf you do not know the version, you can call [GetInvoice](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/get-invoice) or \n[ListInvoices](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/list-invoices)." } }, "description": "Describes a `DeleteInvoice` request.", "x-release-status": "PUBLIC" }, "DeleteInvoiceResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Describes a `DeleteInvoice` response.", "x-release-status": "PUBLIC", "example": {} }, "DeleteLocationCustomAttributeDefinitionRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/delete-location-custom-attributeDefinition) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?key\u003dbestseller" } }, "DeleteLocationCustomAttributeDefinitionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from a delete request containing error messages if there are any.", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "DeleteLocationCustomAttributeRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteLocationCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/delete-location-custom-attribute) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?location_id\u003dL0TBCBTB7P8RQ\u0026key\u003dbestseller" } }, "DeleteLocationCustomAttributeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [DeleteLocationCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/delete-location-custom-attribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "DeleteLoyaltyRewardRequest": { "type": "object", "properties": {}, "description": "A request to delete a loyalty reward.", "x-release-status": "PUBLIC", "example": { "request_params": "?reward_id\u003d9f18ac21-233a-31c3-be77-b45840f5a810" } }, "DeleteLoyaltyRewardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "A response returned by the API call.", "x-release-status": "PUBLIC", "example": {} }, "DeleteMerchantCustomAttributeDefinitionRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/delete-merchant-custom-attributeDefinition) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?key\u003dalternative_seller_name" } }, "DeleteMerchantCustomAttributeDefinitionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from a delete request containing error messages if there are any.", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "DeleteMerchantCustomAttributeRequest": { "type": "object", "properties": {}, "description": "Represents a [DeleteMerchantCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/delete-merchant-custom-attribute) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?merchant_id\u003dDM7VKY8Q63GNP\u0026key\u003dalternative_seller_name" } }, "DeleteMerchantCustomAttributeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [DeleteMerchantCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/delete-merchant-custom-attribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "DeleteOrderCustomAttributeDefinitionRequest": { "type": "object", "properties": {}, "description": "Represents a delete request for an order custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?key\u003dtable-number" } }, "DeleteOrderCustomAttributeDefinitionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from deleting an order custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "DeleteOrderCustomAttributeRequest": { "type": "object", "properties": {}, "description": "Represents a delete request for an order custom attribute.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?order_id\u003d7BbXGEIWNldxAzrtGf9GPVZTwZ4F\u0026key\u003dseat-number" } }, "DeleteOrderCustomAttributeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from deleting an order custom attribute.", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "DeletePaymentLinkRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": {} }, "DeletePaymentLinkResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "" }, "id": { "type": "string", "description": "The ID of the link that is deleted." }, "cancelled_order_id": { "type": "string", "description": "The ID of the order that is canceled. When a payment link is deleted, Square updates the\nthe `state` (of the order that the checkout link created) to CANCELED." } }, "description": "", "x-release-status": "PUBLIC", "example": { "id": "MQASNYL6QB6DFCJ3", "cancelled_order_id": "asx8LgZ6MRzD0fObfkJ6obBmSh4F" } }, "DeleteShiftRequest": { "type": "object", "properties": {}, "description": "A request to delete a `Shift`.", "x-release-status": "PUBLIC", "example": {} }, "DeleteShiftResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request to delete a `Shift`. The response might contain a set of \n`Error` objects if the request resulted in errors.", "x-release-status": "PUBLIC", "example": {} }, "DeleteSnippetRequest": { "type": "object", "properties": {}, "description": "Represents a `DeleteSnippet` request.", "x-release-status": "PUBLIC" }, "DeleteSnippetResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a `DeleteSnippet` response.", "x-release-status": "PUBLIC", "example": {} }, "DeleteSubscriptionActionRequest": { "type": "object", "properties": {}, "description": "Defines input parameters in a call to the \n[DeleteSubscriptionAction](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/delete-subscription-action)\nendpoint.", "x-release-status": "BETA", "x-is-beta": true }, "DeleteSubscriptionActionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The subscription that has the specified action deleted." } }, "description": "Defines output parameters in a response of the [DeleteSubscriptionAction](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/delete-subscription-action)\nendpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "subscription": { "id": "8151fc89-da15-4eb9-a685-1a70883cebfc", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "card_id": "ccof:IkWfpLj4tNHMyFii3GB", "start_date": "2022-07-27", "charged_through_date": "2023-11-20", "status": "ACTIVE", "invoice_ids": [ "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA" ], "price_override_money": { "amount": 25000, "currency": "USD" }, "created_at": "2022-07-27T21:53:10Z", "paid_until_date": "2024-08-01", "timezone": "America/Los_Angeles", "source": { "name": "My Application" } } } }, "DeleteWebhookSubscriptionRequest": { "type": "object", "properties": {}, "description": "Deletes a [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription).", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/webhooks/subscriptions/wbhk_b35f6b3145074cf9ad513610786c19d5" } }, "DeleteWebhookSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [DeleteWebhookSubscription](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/delete-webhook-subscription) endpoint.", "x-release-status": "PUBLIC", "example": {} }, "DeprecatedCreateDisputeEvidenceFileRequest": { "type": "object", "required": [ "idempotency_key" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "The Unique ID. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency)." }, "evidence_type": { "type": "string", "description": "The type of evidence you are uploading." }, "content_type": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The MIME type of the uploaded file.\nThe type can be image/heic, image/heif, image/jpeg, application/pdf, image/png, or image/tiff." } }, "description": "Defines the parameters for a `DeprecatedCreateDisputeEvidenceFile` request.", "x-release-status": "PUBLIC", "example": {} }, "DeprecatedCreateDisputeEvidenceFileResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "evidence": { "$ref": "#/definitions/DisputeEvidence", "description": "The metadata of the newly uploaded dispute evidence." } }, "description": "Defines the fields in a `DeprecatedCreateDisputeEvidenceFile` response.", "x-release-status": "PUBLIC", "example": { "evidence": { "evidence_id": "TOomLInj6iWmP3N8qfCXrB", "dispute_id": "bVTprrwk0gygTLZ96VX1oB", "evidence_file": { "filename": "evidence.tiff", "filetype": "image/tiff" }, "evidence_type": "GENERIC_EVIDENCE", "uploaded_at": "2018-10-18T16:01:10.000Z" } } }, "DeprecatedCreateDisputeEvidenceTextRequest": { "type": "object", "required": [ "idempotency_key", "evidence_text" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "The Unique ID. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency)." }, "evidence_type": { "type": "string", "description": "The type of evidence you are uploading." }, "evidence_text": { "minLength": 1, "maxLength": 500, "type": "string", "description": "The evidence string." } }, "description": "Defines the parameters for a `DeprecatedCreateDisputeEvidenceText` request.", "x-release-status": "PUBLIC", "example": { "request_body": { "evidence_type": "TRACKING_NUMBER", "evidence_text": "1Z8888888888888888", "idempotency_key": "ed3ee3933d946f1514d505d173c82648" } } }, "DeprecatedCreateDisputeEvidenceTextResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "evidence": { "$ref": "#/definitions/DisputeEvidence", "description": "The newly uploaded dispute evidence metadata." } }, "description": "Defines the fields in a `DeprecatedCreateDisputeEvidenceText` response.", "x-release-status": "PUBLIC", "example": { "evidence": { "dispute_id": "bVTprrwk0gygTLZ96VX1oB", "uploaded_at": "2022-05-18T16:01:10.000Z", "evidence_type": "REBUTTAL_EXPLANATION", "evidence_text": "The customer purchased the item twice, on April 11 and April 28.", "id": "TOomLInj6iWmP3N8qfCXrB" } } }, "Destination": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the destination such as a bank account or debit card." }, "id": { "type": "string", "description": "Square issued unique ID (also known as the instrument ID) associated with this destination." } }, "description": "Information about the destination against which the payout was made.", "x-release-status": "PUBLIC" }, "DestinationDetails": { "type": "object", "properties": { "card_details": { "$ref": "#/definitions/CardRefundDetails", "description": "Details about a card refund. Only populated if the destination_type is `CARD`." } }, "description": "Details about a refund\u0027s destination.", "x-release-status": "PUBLIC" }, "DestinationDetailsCardRefundDetails": { "type": "object", "properties": { "card": { "$ref": "#/definitions/Card", "description": "The card\u0027s non-confidential details." }, "entry_method": { "maxLength": 50, "type": "string", "description": "The method used to enter the card\u0027s details for the refund. The method can be\n`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`." } }, "description": "", "x-release-status": "PUBLIC" }, "Device": { "type": "object", "required": [ "attributes" ], "properties": { "id": { "type": "string", "description": "A synthetic identifier for the device. The identifier includes a standardized prefix and\nis otherwise an opaque id generated from key device fields.", "x-read-only": true }, "attributes": { "$ref": "#/definitions/DeviceAttributes", "description": "A collection of DeviceAttributes representing the device." }, "components": { "type": "array", "items": { "$ref": "#/definitions/Component" }, "description": "A list of components applicable to the device." }, "status": { "$ref": "#/definitions/DeviceStatus", "description": "The current status of the device.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceAttributes": { "type": "object", "required": [ "type", "manufacturer" ], "properties": { "type": { "type": "string", "description": "The device type." }, "manufacturer": { "type": "string", "description": "The maker of the device." }, "model": { "type": "string", "description": "The specific model of the device." }, "name": { "type": "string", "description": "A seller-specified name for the device." }, "manufacturers_id": { "type": "string", "description": "The manufacturer-supplied identifier for the device (where available). In many cases,\nthis identifier will be a serial number." }, "updated_at": { "type": "string", "description": "The RFC 3339-formatted value of the most recent update to the device information.\n(Could represent any field update on the device.)" }, "version": { "type": "string", "description": "The current version of software installed on the device." }, "merchant_token": { "type": "string", "description": "The merchant_token identifying the merchant controlling the device." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceCheckoutOptions": { "type": "object", "required": [ "device_id" ], "properties": { "device_id": { "type": "string", "description": "The unique ID of the device intended for this `TerminalCheckout`.\nA list of `DeviceCode` objects can be retrieved from the /v2/devices/codes endpoint.\nMatch a `DeviceCode.device_id` value with `device_id` to get the associated device code." }, "skip_receipt_screen": { "type": "boolean", "description": "Instructs the device to skip the receipt screen. Defaults to false." }, "collect_signature": { "type": "boolean", "description": "Indicates that signature collection is desired during checkout. Defaults to false." }, "tip_settings": { "$ref": "#/definitions/TipSettings", "description": "Tip-specific settings." }, "show_itemized_cart": { "type": "boolean", "description": "Show the itemization screen prior to taking a payment. This field is only meaningful when the\ncheckout includes an order ID. Defaults to true.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "", "x-release-status": "PUBLIC" }, "DeviceCode": { "type": "object", "required": [ "product_type" ], "properties": { "id": { "type": "string", "description": "The unique id for this device code.", "x-read-only": true }, "name": { "maxLength": 128, "type": "string", "description": "An optional user-defined name for the device code." }, "code": { "type": "string", "description": "The unique code that can be used to login.", "x-read-only": true }, "device_id": { "type": "string", "description": "The unique id of the device that used this code. Populated when the device is paired up.", "x-read-only": true }, "product_type": { "type": "string", "description": "The targeting product type of the device code." }, "location_id": { "maxLength": 50, "type": "string", "description": "The location assigned to this code." }, "status": { "type": "string", "description": "The pairing status of the device code.", "x-read-only": true }, "pair_by": { "type": "string", "description": "When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format.", "x-read-only": true }, "created_at": { "type": "string", "description": "When this DeviceCode was created. Timestamp in RFC 3339 format.", "x-read-only": true }, "status_changed_at": { "type": "string", "description": "When this DeviceCode\u0027s status was last changed. Timestamp in RFC 3339 format.", "x-read-only": true }, "paired_at": { "type": "string", "description": "When this DeviceCode was paired. Timestamp in RFC 3339 format.", "x-read-only": true } }, "description": "", "x-release-status": "PUBLIC" }, "DeviceComponentDetails": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceComponentDetailsApplicationDetails": { "type": "object", "properties": { "application_type": { "type": "string", "description": "The type of application." }, "version": { "type": "string", "description": "The version of the application." }, "session_location": { "type": "string", "description": "The location_id of the session for the application." }, "device_code_id": { "type": "string", "description": "The id of the device code that was used to log in to the device." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceComponentDetailsBatteryDetails": { "type": "object", "properties": { "visible_percent": { "type": "integer", "description": "The battery charge percentage as displayed on the device." }, "external_power": { "$ref": "#/definitions/ExternalPower", "description": "The status of external_power." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceComponentDetailsCardReaderDetails": { "type": "object", "properties": { "version": { "type": "string", "description": "The version of the card reader." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceComponentDetailsEthernetDetails": { "type": "object", "properties": { "active": { "type": "boolean", "description": "A boolean to represent whether the Ethernet interface is currently active." }, "ip_address_v4": { "type": "string", "description": "The string representation of the device’s IPv4 address." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceComponentDetailsMeasurement": { "type": "object", "properties": { "value": { "type": "integer", "description": "" } }, "description": "A value qualified by unit of measure.", "x-release-status": "BETA", "x-is-beta": true }, "DeviceComponentDetailsNetworkInterfaceDetails": { "type": "object", "properties": { "ip_address_v4": { "type": "string", "description": "The string representation of the device’s IPv4 address." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceComponentDetailsWiFiDetails": { "type": "object", "properties": { "active": { "type": "boolean", "description": "A boolean to represent whether the WiFI interface is currently active." }, "ssid": { "type": "string", "description": "The name of the connected WIFI network." }, "ip_address_v4": { "type": "string", "description": "The string representation of the device’s IPv4 address." }, "secure_connection": { "type": "string", "description": "The security protocol for a secure connection (e.g. WPA2). None provided if the connection\nis unsecured." }, "signal_strength": { "$ref": "#/definitions/Measurement", "description": "A representation of signal strength of the WIFI network connection." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceDetails": { "type": "object", "properties": { "device_id": { "maxLength": 255, "type": "string", "description": "The Square-issued ID of the device." }, "device_installation_id": { "maxLength": 255, "type": "string", "description": "The Square-issued installation ID for the device." }, "device_name": { "maxLength": 255, "type": "string", "description": "The name of the device set by the seller." } }, "description": "Details about the device that took the payment.", "x-release-status": "PUBLIC" }, "DeviceMetadata": { "type": "object", "properties": { "battery_percentage": { "type": "string", "description": "The Terminal’s remaining battery percentage, between 1-100." }, "charging_state": { "type": "string", "description": "The current charging state of the Terminal.\nOptions: `CHARGING`, `NOT_CHARGING`" }, "location_id": { "type": "string", "description": "The ID of the Square seller business location associated with the Terminal." }, "merchant_id": { "type": "string", "description": "The ID of the Square merchant account that is currently signed-in to the Terminal." }, "network_connection_type": { "type": "string", "description": "The Terminal’s current network connection type.\nOptions: `WIFI`, `ETHERNET`" }, "payment_region": { "type": "string", "description": "The country in which the Terminal is authorized to take payments." }, "serial_number": { "type": "string", "description": "The unique identifier assigned to the Terminal, which can be found on the lower back\nof the device." }, "os_version": { "type": "string", "description": "The current version of the Terminal’s operating system." }, "app_version": { "type": "string", "description": "The current version of the application running on the Terminal." }, "wifi_network_name": { "type": "string", "description": "The name of the Wi-Fi network to which the Terminal is connected." }, "wifi_network_strength": { "type": "string", "description": "The signal strength of the Wi-FI network connection.\nOptions: `POOR`, `FAIR`, `GOOD`, `EXCELLENT`" }, "ip_address": { "type": "string", "description": "The IP address of the Terminal." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DeviceStatus": { "type": "object", "properties": { "category": { "type": "string", "description": "" } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "DigitalWalletDetails": { "type": "object", "properties": { "status": { "maxLength": 50, "type": "string", "description": "The status of the `WALLET` payment. The status can be `AUTHORIZED`, `CAPTURED`, `VOIDED`, or\n`FAILED`." }, "brand": { "maxLength": 50, "type": "string", "description": "The brand used for the `WALLET` payment. The brand can be `CASH_APP`, `PAYPAY`, `ALIPAY`,\n`RAKUTEN_PAY`, `AU_PAY`, `D_BARAI`, `MERPAY`, `WECHAT_PAY` or `UNKNOWN`." }, "cash_app_details": { "$ref": "#/definitions/CashAppDetails", "description": "Brand-specific details for payments with the `brand` of `CASH_APP`." } }, "description": "Additional details about `WALLET` type payments. Contains only non-confidential information.", "x-release-status": "PUBLIC" }, "DisableCardRequest": { "type": "object", "properties": {}, "description": "Disables the card, preventing any further updates or charges. Disabling\nan already disabled card is allowed but has no effect. Accessible via\nHTTP requests at POST https://connect.squareup.com/v2/cards/{card_id}/disable", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "DisableCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "card": { "$ref": "#/definitions/Card", "description": "The retrieved card." } }, "description": "Defines the fields that are included in the response body of\na request to the [DisableCard](https://developer.squareup.com/reference/square_2024-04-17/cards-api/disable-card) endpoint.\n\nNote: if there are errors processing the request, the card field will not be\npresent.", "x-release-status": "PUBLIC", "example": { "card": { "id": "ccof:uIbfJXhXETSP197M3GB", "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", "bin": "411111", "card_brand": "VISA", "card_type": "CREDIT", "cardholder_name": "Amelia Earhart", "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", "enabled": false, "exp_month": 11, "exp_year": 2022, "last_4": "1111", "merchant_id": "6SSW7HV8K2ST5", "prepaid_type": "NOT_PREPAID", "reference_id": "user-id-1", "version": 2 } } }, "DismissTerminalActionRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": {} } }, "DismissTerminalActionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "action": { "$ref": "#/definitions/TerminalAction", "description": "Current state of the action to be dismissed." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "action": { "id": "termapia:abcdefg1234567", "device_id": "DEVICE_ID", "deadline_duration": "PT5M", "created_at": "2021-07-28T23:22:07.476Z", "updated_at": "2021-07-28T23:22:29.511Z", "await_next_action": true, "await_next_action_duration": "PT5M", "status": "COMPLETED", "type": "CONFIRMATION", "app_id": "APP_ID", "confirmation_options": { "title": "Marketing communications", "body": "I agree to receive promotional emails about future events and activities.", "agree_button_text": "Agree", "disagree_button_text": "Decline", "decision": { "has_agreed": true } } } } }, "DismissTerminalCheckoutRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": {} } }, "DismissTerminalCheckoutResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "checkout": { "$ref": "#/definitions/TerminalCheckout", "description": "Current state of the checkout to be dismissed." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "checkout": { "id": "LmZEKbo3SBfqO", "amount_money": { "amount": 2610, "currency": "USD" }, "device_options": { "device_id": "dbb5d83a-7838-11ea-bc55-0242ac130003", "collect_signature": true, "tip_settings": { "separate_tip_screen": true, "custom_tip_field": false, "allow_tipping": true }, "skip_receipt_screen": false, "loyalty_settings": { "show_loyalty_screen": false, "show_non_qualifying_loyalty_screen": false, "loyalty_screen_max_display_duration": "PT60S", "show_card_linked_reward_redemption_screen": false } }, "status": "COMPLETED", "payment_ids": [ "D7vLJqMkvSoAlX4yyFzUitOy4EPZY" ], "created_at": "2023-11-29T14:59:50.682Z", "updated_at": "2023-11-29T15:00:18.936Z", "app_id": "APP_ID", "deadline_duration": "PT5M", "location_id": "LOCATION_ID", "payment_type": "CARD_PRESENT", "payment_options": { "autocomplete": true } } } }, "DismissTerminalRefundRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": {} } }, "DismissTerminalRefundResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "refund": { "$ref": "#/definitions/TerminalRefund", "description": "Current state of the refund to be dismissed." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "refund": { "id": "vjkNb2HD-xq5kiWWiJ7RhwrQnkxIn2N0l1nPZY", "payment_id": "xq5kiWWiJ7RhwrQnkxIn2N0l1nPZY", "amount_money": { "amount": 111, "currency": "CAD" }, "reason": "Returning item", "device_id": "47776348fd8b32b9", "deadline_duration": "PT5M", "status": "IN_PROGRESS", "created_at": "2023-11-30T16:16:39.299Z", "updated_at": "2023-11-30T16:16:57.863Z", "app_id": "APP_ID", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 12, "exp_year": 2024, "fingerprint": "sq-1-ElNeDpZZqUBNDI7yNghyKO-o0yLXASp4qQDGIPtxnFvTTWoqdfdP6TV8gLsSxoztXA", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "order_id": "s8OMhQcpEp1b61YywlccSHWqUaQZY", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 12, "exp_year": 2024, "fingerprint": "sq-1-ElNeDpZZqUBNDI7yNghyKO-o0yLXASp3qQDGIPtxnFvTTWoqdfdP6TV9gLsSxoztXA", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "entry_method": "SWIPED", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "auth_result_code": "RNy6Lf", "statement_description": "SQ TREATS", "device_details": { "device_id": "f72dfb8e-4d65-4e56-aade-ec3fb8d33291", "device_installation_id": "0ef67d8e-61a3-4418-a0be-c143bfe6108d", "device_credential": { "token": "9BFDXEYKB7H8Y", "name": "Terminal API Device created on Nov 2, 2023" } }, "card_payment_timeline": { "authorized_at": "2023-11-30T16:15:06.645Z", "captured_at": "2023-11-30T16:15:13.272Z" } } } } }, "Dispute": { "type": "object", "properties": { "dispute_id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The unique ID for this `Dispute`, generated by Square.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The unique ID for this `Dispute`, generated by Square." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The disputed amount, which can be less than the total transaction amount.\nFor instance, if multiple items were purchased but the cardholder only initiates a dispute over some of the items." }, "reason": { "type": "string", "description": "The reason why the cardholder initiated the dispute." }, "state": { "type": "string", "description": "The current state of this dispute." }, "due_at": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The deadline by which the seller must respond to the dispute, in [RFC 3339 format](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates)." }, "disputed_payment": { "$ref": "#/definitions/DisputedPayment", "description": "The payment challenged in this dispute." }, "evidence_ids": { "type": "array", "items": { "minLength": 1, "maxLength": 40, "type": "string" }, "description": "The IDs of the evidence associated with the dispute.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "card_brand": { "type": "string", "description": "The card brand used in the disputed payment." }, "created_at": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The timestamp when the dispute was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The timestamp when the dispute was last updated, in RFC 3339 format.", "x-read-only": true }, "brand_dispute_id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The ID of the dispute in the card brand system, generated by the card brand." }, "reported_date": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The timestamp when the dispute was reported, in RFC 3339 format.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "reported_at": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The timestamp when the dispute was reported, in RFC 3339 format." }, "version": { "type": "integer", "description": "The current version of the `Dispute`." }, "location_id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The ID of the location where the dispute originated." } }, "description": "Represents a [dispute](https://developer.squareup.com/docs/disputes-api/overview) a cardholder initiated with their bank.", "x-release-status": "PUBLIC" }, "DisputeEvidence": { "type": "object", "properties": { "evidence_id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The Square-generated ID of the evidence.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The Square-generated ID of the evidence." }, "dispute_id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The ID of the dispute the evidence is associated with." }, "evidence_file": { "$ref": "#/definitions/DisputeEvidenceFile", "description": "Image, PDF, TXT" }, "evidence_text": { "minLength": 1, "maxLength": 500, "type": "string", "description": "Raw text" }, "uploaded_at": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The time when the evidence was uploaded, in RFC 3339 format." }, "evidence_type": { "type": "string", "description": "The type of the evidence." } }, "description": "", "x-release-status": "PUBLIC" }, "DisputeEvidenceFile": { "type": "object", "properties": { "filename": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The file name including the file extension. For example: \"receipt.tiff\"." }, "filetype": { "minLength": 1, "maxLength": 40, "type": "string", "description": "Dispute evidence files must be application/pdf, image/heic, image/heif, image/jpeg, image/png, or image/tiff formats." } }, "description": "A file to be uploaded as dispute evidence.", "x-release-status": "PUBLIC" }, "DisputedPayment": { "type": "object", "properties": { "payment_id": { "minLength": 1, "maxLength": 192, "type": "string", "description": "Square-generated unique ID of the payment being disputed." } }, "description": "The payment the cardholder disputed.", "x-release-status": "PUBLIC" }, "Employee": { "type": "object", "properties": { "id": { "type": "string", "description": "UUID for this object." }, "first_name": { "type": "string", "description": "The employee\u0027s first name." }, "last_name": { "type": "string", "description": "The employee\u0027s last name." }, "email": { "type": "string", "description": "The employee\u0027s email address" }, "phone_number": { "type": "string", "description": "The employee\u0027s phone number in E.164 format, i.e. \"+12125554250\"" }, "location_ids": { "type": "array", "items": { "type": "string" }, "description": "A list of location IDs where this employee has access to." }, "status": { "type": "string", "description": "Specifies the status of the employees being fetched." }, "is_owner": { "type": "boolean", "description": "Whether this employee is the owner of the merchant. Each merchant\nhas one owner employee, and that employee has full authority over\nthe account." }, "created_at": { "type": "string", "description": "A read-only timestamp in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "A read-only timestamp in RFC 3339 format.", "x-read-only": true } }, "description": "An employee object that is used by the external API.\n\nDEPRECATED at version 2020-08-26. Replaced by [TeamMember](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember).", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "EmployeeWage": { "type": "object", "properties": { "id": { "type": "string", "description": "The UUID for this object." }, "employee_id": { "type": "string", "description": "The `Employee` that this wage is assigned to." }, "title": { "type": "string", "description": "The job title that this wage relates to." }, "hourly_rate": { "$ref": "#/definitions/Money", "description": "Can be a custom-set hourly wage or the calculated effective hourly\nwage based on the annual wage and hours worked per week." } }, "description": "The hourly wage rate that an employee earns on a `Shift` for doing the job specified by the `title` property of this object. Deprecated at version 2020-08-26. Use [TeamMemberWage](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMemberWage).", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "Error": { "type": "object", "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." } }, "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.", "x-release-status": "PUBLIC" }, "Event": { "type": "object", "properties": { "merchant_id": { "type": "string", "description": "The ID of the target merchant associated with the event." }, "location_id": { "type": "string", "description": "The ID of the location associated with the event." }, "type": { "type": "string", "description": "The type of event this represents." }, "event_id": { "type": "string", "description": "A unique ID for the event." }, "created_at": { "type": "string", "description": "Timestamp of when the event was created, in RFC 3339 format.", "x-read-only": true }, "data": { "$ref": "#/definitions/EventData", "description": "Data associated with the event." } }, "description": "", "x-release-status": "PUBLIC" }, "EventData": { "type": "object", "properties": { "type": { "type": "string", "description": "Name of the affected object’s type." }, "id": { "type": "string", "description": "ID of the affected object." }, "deleted": { "type": "boolean", "description": "Is true if the affected object was deleted. Otherwise absent." }, "object": { "type": "object", "description": "An object containing fields and values relevant to the event. Is absent if affected object was deleted." } }, "description": "", "x-release-status": "PUBLIC" }, "EventTypeMetadata": { "type": "object", "properties": { "event_type": { "type": "string", "description": "The event type.", "x-read-only": true }, "api_version_introduced": { "type": "string", "description": "The API version at which the event type was introduced.", "x-read-only": true }, "release_status": { "type": "string", "description": "The release status of the event type.", "x-read-only": true } }, "description": "Contains the metadata of a webhook event type.", "x-release-status": "PUBLIC" }, "ExternalPaymentDetails": { "type": "object", "required": [ "type", "source" ], "properties": { "type": { "maxLength": 50, "type": "string", "description": "The type of external payment the seller received. It can be one of the following:\n- CHECK - Paid using a physical check.\n- BANK_TRANSFER - Paid using external bank transfer.\n- OTHER\\_GIFT\\_CARD - Paid using a non-Square gift card.\n- CRYPTO - Paid using a crypto currency.\n- SQUARE_CASH - Paid using Square Cash App.\n- SOCIAL - Paid using peer-to-peer payment applications.\n- EXTERNAL - A third-party application gathered this payment outside of Square.\n- EMONEY - Paid using an E-money provider.\n- CARD - A credit or debit card that Square does not support.\n- STORED_BALANCE - Use for house accounts, store credit, and so forth.\n- FOOD_VOUCHER - Restaurant voucher provided by employers to employees to pay for meals\n- OTHER - A type not listed here." }, "source": { "maxLength": 255, "type": "string", "description": "A description of the external payment source. For example, \n\"Food Delivery Service\"." }, "source_id": { "maxLength": 255, "type": "string", "description": "An ID to associate the payment to its originating source." }, "source_fee_money": { "$ref": "#/definitions/Money", "description": "The fees paid to the source. The `amount_money` minus this field is \nthe net amount seller receives." } }, "description": "Stores details about an external payment. Contains only non-confidential information.\nFor more information, see \n[Take External Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments).", "x-release-status": "PUBLIC" }, "FilterValue": { "type": "object", "properties": { "all": { "type": "array", "items": { "type": "string" }, "description": "A list of terms that must be present on the field of the resource." }, "any": { "type": "array", "items": { "type": "string" }, "description": "A list of terms where at least one of them must be present on the\nfield of the resource." }, "none": { "type": "array", "items": { "type": "string" }, "description": "A list of terms that must not be present on the field the resource" } }, "description": "A filter to select resources based on an exact field value. For any given\nvalue, the value can only be in one property. Depending on the field, either\nall properties can be set or only a subset will be available.\n\nRefer to the documentation of the field.", "x-release-status": "BETA", "x-is-beta": true }, "FloatNumberRange": { "type": "object", "properties": { "start_at": { "type": "string", "description": "A decimal value indicating where the range starts." }, "end_at": { "type": "string", "description": "A decimal value indicating where the range ends." } }, "description": "Specifies a decimal number range.", "x-release-status": "PUBLIC" }, "Fulfillment": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the fulfillment only within this order.", "x-release-status": "BETA", "x-is-beta": true }, "type": { "type": "string", "description": "The type of the fulfillment." }, "state": { "type": "string", "description": "The state of the fulfillment." }, "line_item_application": { "type": "string", "description": "Describes what order line items this fulfillment applies to.\nIt can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "entries": { "type": "array", "items": { "$ref": "#/definitions/FulfillmentFulfillmentEntry" }, "description": "A list of entries pertaining to the fulfillment of an order. Each entry must reference\na valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to\nfulfill.\n\nMultiple entries can reference the same line item `uid`, as long as the total quantity among\nall fulfillment entries referencing a single line item does not exceed the quantity of the\norder\u0027s line item itself.\n\nAn order cannot be marked as `COMPLETED` before all fulfillments are `COMPLETED`,\n`CANCELED`, or `FAILED`. Fulfillments can be created and completed independently\nbefore order completion.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this fulfillment. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\n\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\n\nValues have a maximum length of 255 characters.\n\nAn application can have up to 10 entries per metadata field.\n\nEntries written by applications are private and can only be read or modified by the same\napplication.\n\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", "x-release-status": "BETA", "x-is-beta": true }, "pickup_details": { "$ref": "#/definitions/FulfillmentPickupDetails", "description": "Contains details for a pickup fulfillment. These details are required when the fulfillment\ntype is `PICKUP`." }, "shipment_details": { "$ref": "#/definitions/FulfillmentShipmentDetails", "description": "Contains details for a shipment fulfillment. These details are required when the fulfillment type\nis `SHIPMENT`.\n\nA shipment fulfillment\u0027s relationship to fulfillment `state`:\n`PROPOSED`: A shipment is requested.\n`RESERVED`: Fulfillment in progress. Shipment processing.\n`PREPARED`: Shipment packaged. Shipping label created.\n`COMPLETED`: Package has been shipped.\n`CANCELED`: Shipment has been canceled.\n`FAILED`: Shipment has failed.", "x-release-status": "BETA", "x-is-beta": true }, "delivery_details": { "$ref": "#/definitions/FulfillmentDeliveryDetails", "description": "Describes delivery details of an order fulfillment.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Contains details about how to fulfill this order.\nOrders can only be created with at most one fulfillment using the API.\nHowever, orders returned by the Orders API might contain multiple fulfillments because sellers can create multiple fulfillments using Square products such as Square Online.", "x-release-status": "PUBLIC" }, "FulfillmentDeliveryDetails": { "type": "object", "properties": { "recipient": { "$ref": "#/definitions/FulfillmentRecipient", "description": "The contact information for the person to receive the fulfillment." }, "schedule_type": { "type": "string", "description": "Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then\n`deliver_at` is required. If `ASAP`, then `prep_time_duration` is required. The default is `SCHEDULED`." }, "placed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was placed.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").\n\nMust be in RFC 3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".", "x-read-only": true }, "deliver_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nthat represents the start of the delivery period.\nWhen the fulfillment `schedule_type` is `ASAP`, the field is automatically\nset to the current time plus the `prep_time_duration`.\nOtherwise, the application can set this field while the fulfillment `state` is\n`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the\nterminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).\n\nThe timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\")." }, "prep_time_duration": { "type": "string", "description": "The duration of time it takes to prepare and deliver this fulfillment.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\")." }, "delivery_window_duration": { "type": "string", "description": "The time period after `deliver_at` in which to deliver the order.\nApplications can set this field when the fulfillment `state` is\n`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state\nsuch as `COMPLETED`, `CANCELED`, and `FAILED`).\n\nThe duration must be in RFC 3339 format (for example, \"P1W3D\")." }, "note": { "maxLength": 550, "type": "string", "description": "Provides additional instructions about the delivery fulfillment.\nIt is displayed in the Square Point of Sale application and set by the API." }, "completed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicates when the seller completed the fulfillment.\nThis field is automatically set when fulfillment `state` changes to `COMPLETED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\")." }, "in_progress_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicates when the seller started processing the fulfillment.\nThis field is automatically set when the fulfillment `state` changes to `RESERVED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "rejected_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was rejected. This field is\nautomatically set when the fulfillment `state` changes to `FAILED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "ready_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the seller marked the fulfillment as ready for\ncourier pickup. This field is automatically set when the fulfillment `state` changes\nto PREPARED.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "delivered_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was delivered to the recipient.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "canceled_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was canceled. This field is automatically\nset when the fulfillment `state` changes to `CANCELED`.\n\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "cancel_reason": { "maxLength": 100, "type": "string", "description": "The delivery cancellation reason. Max length: 100 characters." }, "courier_pickup_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when an order can be picked up by the courier for delivery.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\")." }, "courier_pickup_window_duration": { "type": "string", "description": "The time period after `courier_pickup_at` in which the courier should pick up the order.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\")." }, "is_no_contact_delivery": { "type": "boolean", "description": "Whether the delivery is preferred to be no contact." }, "dropoff_notes": { "maxLength": 550, "type": "string", "description": "A note to provide additional instructions about how to deliver the order." }, "courier_provider_name": { "maxLength": 255, "type": "string", "description": "The name of the courier provider." }, "courier_support_phone_number": { "maxLength": 17, "type": "string", "description": "The support phone number of the courier." }, "square_delivery_id": { "maxLength": 50, "type": "string", "description": "The identifier for the delivery created by Square." }, "external_delivery_id": { "maxLength": 50, "type": "string", "description": "The identifier for the delivery created by the third-party courier service." }, "managed_delivery": { "type": "boolean", "description": "The flag to indicate the delivery is managed by a third party (ie DoorDash), which means\nwe may not receive all recipient information for PII purposes." } }, "description": "Describes delivery details of an order fulfillment.", "x-release-status": "BETA", "x-is-beta": true }, "FulfillmentFulfillmentEntry": { "type": "object", "required": [ "line_item_uid", "quantity" ], "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the fulfillment entry only within this order." }, "line_item_uid": { "minLength": 1, "type": "string", "description": "The `uid` from the order line item." }, "quantity": { "minLength": 1, "maxLength": 12, "type": "string", "description": "The quantity of the line item being fulfilled, formatted as a decimal number.\nFor example, `\"3\"`.\n\nFulfillments for line items with a `quantity_unit` can have non-integer quantities.\nFor example, `\"1.70000\"`." }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this fulfillment entry. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\n\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\n\nValues have a maximum length of 255 characters.\n\nAn application can have up to 10 entries per metadata field.\n\nEntries written by applications are private and can only be read or modified by the same\napplication.\n\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata)." } }, "description": "Links an order line item to a fulfillment. Each entry must reference\na valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to\nfulfill.", "x-release-status": "BETA", "x-is-beta": true }, "FulfillmentPickupDetails": { "type": "object", "properties": { "recipient": { "$ref": "#/definitions/FulfillmentRecipient", "description": "Information about the person to pick up this fulfillment from a physical\nlocation." }, "expires_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment expires if it is not marked in progress. The timestamp must be\nin RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\"). The expiration time can only be set\nup to 7 days in the future. If `expires_at` is not set, any new payments attached to the order\nare automatically completed." }, "auto_complete_duration": { "type": "string", "description": "The duration of time after which an in progress pickup fulfillment is automatically moved\nto the `COMPLETED` state. The duration must be in RFC 3339 format (for example, \"P1W3D\").\n\nIf not set, this pickup fulfillment remains in progress until it is canceled or completed." }, "schedule_type": { "type": "string", "description": "The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`." }, "pickup_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nthat represents the start of the pickup window. Must be in RFC 3339 timestamp format, e.g.,\n\"2016-09-04T23:59:33.123Z\".\n\nFor fulfillments with the schedule type `ASAP`, this is automatically set\nto the current time plus the expected duration to prepare the fulfillment." }, "pickup_window_duration": { "type": "string", "description": "The window of time in which the order should be picked up after the `pickup_at` timestamp.\nMust be in RFC 3339 duration format, e.g., \"P1W3D\". Can be used as an\ninformational guideline for merchants." }, "prep_time_duration": { "type": "string", "description": "The duration of time it takes to prepare this fulfillment.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\")." }, "note": { "maxLength": 500, "type": "string", "description": "A note to provide additional instructions about the pickup\nfulfillment displayed in the Square Point of Sale application and set by the API." }, "placed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was placed. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "accepted_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was marked in progress. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "rejected_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was rejected. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "ready_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment is marked as ready for pickup. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "expired_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment expired. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "picked_up_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was picked up by the recipient. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "canceled_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was canceled. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "cancel_reason": { "maxLength": 100, "type": "string", "description": "A description of why the pickup was canceled. The maximum length: 100 characters." }, "is_curbside_pickup": { "type": "boolean", "description": "If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup.", "x-release-status": "BETA", "x-is-beta": true }, "curbside_pickup_details": { "$ref": "#/definitions/FulfillmentPickupDetailsCurbsidePickupDetails", "description": "Specific details for curbside pickup. These details can only be populated if `is_curbside_pickup` is set to `true`.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Contains details necessary to fulfill a pickup order.", "x-release-status": "PUBLIC" }, "FulfillmentPickupDetailsCurbsidePickupDetails": { "type": "object", "properties": { "curbside_details": { "maxLength": 250, "type": "string", "description": "Specific details for curbside pickup, such as parking number and vehicle model." }, "buyer_arrived_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\")." } }, "description": "Specific details for curbside pickup.", "x-release-status": "BETA", "x-is-beta": true }, "FulfillmentRecipient": { "type": "object", "properties": { "customer_id": { "maxLength": 191, "type": "string", "description": "The ID of the customer associated with the fulfillment.\n\nIf `customer_id` is provided, the fulfillment recipient\u0027s `display_name`,\n`email_address`, and `phone_number` are automatically populated from the\ntargeted customer profile. If these fields are set in the request, the request\nvalues override the information from the customer profile. If the\ntargeted customer profile does not contain the necessary information and\nthese fields are left unset, the request results in an error." }, "display_name": { "maxLength": 255, "type": "string", "description": "The display name of the fulfillment recipient. This field is required.\n\nIf provided, the display name overrides the corresponding customer profile value\nindicated by `customer_id`." }, "email_address": { "maxLength": 255, "type": "string", "description": "The email address of the fulfillment recipient.\n\nIf provided, the email address overrides the corresponding customer profile value\nindicated by `customer_id`." }, "phone_number": { "maxLength": 17, "type": "string", "description": "The phone number of the fulfillment recipient. This field is required.\n\nIf provided, the phone number overrides the corresponding customer profile value\nindicated by `customer_id`." }, "address": { "$ref": "#/definitions/Address", "description": "The address of the fulfillment recipient. This field is required.\n\nIf provided, the address overrides the corresponding customer profile value\nindicated by `customer_id`.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Information about the fulfillment recipient.", "x-release-status": "PUBLIC" }, "FulfillmentShipmentDetails": { "type": "object", "properties": { "recipient": { "$ref": "#/definitions/FulfillmentRecipient", "description": "Information about the person to receive this shipment fulfillment." }, "carrier": { "maxLength": 50, "type": "string", "description": "The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS)." }, "shipping_note": { "maxLength": 500, "type": "string", "description": "A note with additional information for the shipping carrier." }, "shipping_type": { "maxLength": 50, "type": "string", "description": "A description of the type of shipping product purchased from the carrier\n(such as First Class, Priority, or Express)." }, "tracking_number": { "maxLength": 100, "type": "string", "description": "The reference number provided by the carrier to track the shipment\u0027s progress." }, "tracking_url": { "maxLength": 2000, "type": "string", "description": "A link to the tracking webpage on the carrier\u0027s website." }, "placed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment was requested. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "in_progress_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `RESERVED` state, which indicates that preparation\nof this shipment has begun. The timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "packaged_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `PREPARED` state, which indicates that the\nfulfillment is packaged. The timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "expected_shipped_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment is expected to be delivered to the shipping carrier.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\")." }, "shipped_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `COMPLETED` state, which indicates that\nthe fulfillment has been given to the shipping carrier. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "canceled_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating the shipment was canceled.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\")." }, "cancel_reason": { "maxLength": 100, "type": "string", "description": "A description of why the shipment was canceled." }, "failed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment failed to be completed. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "failure_reason": { "maxLength": 100, "type": "string", "description": "A description of why the shipment failed to be completed." } }, "description": "Contains the details necessary to fulfill a shipment order.", "x-release-status": "BETA", "x-is-beta": true }, "GetBankAccountByV1IdRequest": { "type": "object", "properties": {}, "description": "Request object for fetching a specific `BankAccount`\nby the object ID.", "x-release-status": "PUBLIC" }, "GetBankAccountByV1IdResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "bank_account": { "$ref": "#/definitions/BankAccount", "description": "The requested `BankAccount` object." } }, "description": "Response object returned by GetBankAccountByV1Id.", "x-release-status": "PUBLIC", "example": { "bank_account": { "id": "w3yRgCGYQnwmdl0R3GB", "account_number_suffix": "971", "country": "US", "currency": "USD", "account_type": "CHECKING", "holder_name": "Jane Doe", "primary_bank_identification_number": "112200303", "location_id": "S8GWD5example", "status": "VERIFICATION_IN_PROGRESS", "creditable": false, "debitable": false, "version": 5, "bank_name": "Bank Name" } } }, "GetBankAccountRequest": { "type": "object", "properties": {}, "description": "Request object to fetch a specific `BankAccount`\nby the object ID.", "x-release-status": "PUBLIC" }, "GetBankAccountResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "bank_account": { "$ref": "#/definitions/BankAccount", "description": "The requested `BankAccount` object." } }, "description": "Response object returned by `GetBankAccount`.", "x-release-status": "PUBLIC", "example": { "bank_account": { "id": "w3yRgCGYQnwmdl0R3GB", "account_number_suffix": "971", "country": "US", "currency": "USD", "account_type": "CHECKING", "holder_name": "Jane Doe", "primary_bank_identification_number": "112200303", "location_id": "S8GWD5example", "status": "VERIFICATION_IN_PROGRESS", "creditable": false, "debitable": false, "version": 5, "bank_name": "Bank Name" } } }, "GetBreakTypeRequest": { "type": "object", "properties": {}, "description": "A request to get a `BreakType` by ID.", "x-release-status": "PUBLIC", "example": {} }, "GetBreakTypeResponse": { "type": "object", "properties": { "break_type": { "$ref": "#/definitions/BreakType", "description": "The response object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request to get a `BreakType`. The response contains\nthe requested `BreakType` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "break_type": { "id": "lA0mj_RSOprNPwMUXdYp", "location_id": "059SB0E0WCNWS", "break_name": "Lunch Break", "expected_duration": "PT30M", "is_paid": true, "version": 1, "created_at": "2019-02-21T17:50:00Z", "updated_at": "2019-02-21T17:50:00Z" } } }, "GetDeviceCodeRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "GetDeviceCodeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "device_code": { "$ref": "#/definitions/DeviceCode", "description": "The queried DeviceCode." } }, "description": "", "x-release-status": "PUBLIC", "example": { "device_code": { "id": "B3Z6NAMYQSMTM", "name": "Counter 1", "code": "EBCARJ", "product_type": "TERMINAL_API", "location_id": "B5E4484SHHNYH", "created_at": "2020-02-06T18:44:33.000Z", "pair_by": "2020-02-06T18:49:33.000Z", "status": "PAIRED", "device_id": "907CS13101300122", "status_changed_at": "2020-02-06T18:47:28.000Z" } } }, "GetDeviceRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": {} } }, "GetDeviceResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "device": { "$ref": "#/definitions/Device", "description": "The requested `Device`." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "device": { "id": "device:995CS397A6475287", "attributes": { "type": "TERMINAL", "manufacturer": "Square", "model": "T2", "name": "Square Terminal 995", "manufacturers_id": "995CS397A6475287", "updated_at": "2023-09-29T13:12:22.365049321Z", "version": "5.41.0085", "merchant_token": "MLCHXZCBWFGDW" }, "components": [ { "type": "APPLICATION", "application_details": { "application_type": "TERMINAL_API", "version": "6.25", "session_location": "LMN2K7S3RTOU3" } }, { "type": "CARD_READER", "card_reader_details": { "version": "3.53.70" } }, { "type": "BATTERY", "battery_details": { "visible_percent": 5, "external_power": "AVAILABLE_CHARGING" } }, { "type": "WIFI", "wifi_details": { "active": true, "ssid": "Staff Network", "ip_address_v4": "10.0.0.7", "secure_connection": "WPA/WPA2 PSK", "signal_strength": { "value": 2 } } }, { "type": "ETHERNET", "ethernet_details": { "active": false } } ], "status": { "category": "AVAILABLE" } } } }, "GetEmployeeWageRequest": { "type": "object", "properties": {}, "description": "A request to get an `EmployeeWage`.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": {} }, "GetEmployeeWageResponse": { "type": "object", "properties": { "employee_wage": { "$ref": "#/definitions/EmployeeWage", "description": "The requested `EmployeeWage` object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "A response to a request to get an `EmployeeWage`. The response contains\nthe requested `EmployeeWage` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "employee_wage": { "id": "pXS3qCv7BERPnEGedM4S8mhm", "employee_id": "33fJchumvVdJwxV0H6L9", "title": "Manager", "hourly_rate": { "amount": 2000, "currency": "USD" } } } }, "GetInvoiceRequest": { "type": "object", "properties": {}, "description": "Describes a `GetInvoice` request.", "x-release-status": "PUBLIC" }, "GetInvoiceResponse": { "type": "object", "properties": { "invoice": { "$ref": "#/definitions/Invoice", "description": "The invoice requested." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Describes a `GetInvoice` response.", "x-release-status": "PUBLIC", "example": { "invoice": { "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "version": 0, "location_id": "ES0RJRZYEC39A", "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "payment_requests": [ { "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355", "request_type": "BALANCE", "due_date": "2030-01-24", "tipping_enabled": true, "reminders": [ { "uid": "beebd363-e47f-4075-8785-c235aaa7df11", "relative_scheduled_days": -1, "message": "Your invoice is due tomorrow", "status": "PENDING" } ], "computed_amount_money": { "amount": 10000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "NONE" } ], "invoice_number": "inv-100", "title": "Event Planning Services", "description": "We appreciate your business!", "scheduled_at": "2030-01-13T10:00:00Z", "status": "DRAFT", "timezone": "America/Los_Angeles", "created_at": "2020-06-18T17:45:13Z", "updated_at": "2020-06-18T17:45:13Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "accepted_payment_methods": { "card": true, "square_gift_card": false, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "custom_fields": [ { "label": "Event Reference Number", "value": "Ref. #1234", "placement": "ABOVE_LINE_ITEMS" }, { "label": "Terms of Service", "value": "The terms of service are...", "placement": "BELOW_LINE_ITEMS" } ], "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false } } }, "GetPaymentRefundRequest": { "type": "object", "properties": {}, "description": "Describes a request to retrieve a refund using\n[GetPaymentRefund](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/get-payment-refund).", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "GetPaymentRefundResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "refund": { "$ref": "#/definitions/PaymentRefund", "description": "The requested `PaymentRefund`." } }, "description": "Defines the response returned by [GetRefund](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/get-payment-refund).\n\nNote: If there are errors processing the request, the refund field might not be\npresent or it might be present in a FAILED state.", "x-release-status": "PUBLIC", "example": { "refund": { "id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd", "status": "COMPLETED", "amount_money": { "amount": 555, "currency": "USD" }, "payment_id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY", "order_id": "9ltv0bx5PuvGXUYHYHxYSKEqC3IZY", "created_at": "2021-10-13T19:59:05.073Z", "updated_at": "2021-10-13T20:00:02.442Z", "processing_fee": [ { "effective_at": "2021-10-13T21:34:35.000Z", "type": "INITIAL", "amount_money": { "amount": -34, "currency": "USD" } } ], "location_id": "L88917AVBK2S5", "reason": "Example Refund" } } }, "GetPaymentRequest": { "type": "object", "properties": {}, "description": "Describes a request to retrieve a payment using \n[GetPayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/get-payment).", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "GetPaymentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "payment": { "$ref": "#/definitions/Payment", "description": "The requested `Payment`." } }, "description": "Defines the response returned by [GetPayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/get-payment).", "x-release-status": "PUBLIC", "example": { "payment": { "id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY", "created_at": "2021-10-13T19:34:33.524Z", "updated_at": "2021-10-13T19:34:34.339Z", "amount_money": { "amount": 555, "currency": "USD" }, "status": "COMPLETED", "delay_duration": "PT168H", "source_type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 11, "exp_year": 2022, "fingerprint": "sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "entry_method": "KEYED", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "auth_result_code": "2Nkw7q", "statement_description": "SQ *EXAMPLE TEST GOSQ.C", "card_payment_timeline": { "authorized_at": "2021-10-13T19:34:33.680Z", "captured_at": "2021-10-13T19:34:34.340Z" } }, "location_id": "L88917AVBK2S5", "order_id": "d7eKah653Z579f3gVtjlxpSlmUcZY", "processing_fee": [ { "effective_at": "2021-10-13T21:34:35.000Z", "type": "INITIAL", "amount_money": { "amount": 34, "currency": "USD" } } ], "note": "Test Note", "total_money": { "amount": 555, "currency": "USD" }, "approved_money": { "amount": 555, "currency": "USD" }, "employee_id": "TMoK_ogh6rH1o4dV", "receipt_number": "bP9m", "receipt_url": "https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY", "delay_action": "CANCEL", "delayed_until": "2021-10-20T19:34:33.524Z", "team_member_id": "TMoK_ogh6rH1o4dV", "application_details": { "square_product": "VIRTUAL_TERMINAL", "application_id": "sq0ids-Pw67AZAlLVB7hsRmwlJPuA" }, "version_token": "56pRkL3slrzet2iQrTp9n0bdJVYTB9YEWdTNjQfZOPV6o" } } }, "GetPayoutRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "GetPayoutResponse": { "type": "object", "properties": { "payout": { "$ref": "#/definitions/Payout", "description": "The requested payout." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "payout": { "id": "po_f3c0fb38-a5ce-427d-b858-52b925b72e45", "status": "PAID", "location_id": "L88917AVBK2S5", "created_at": "2022-03-24T03:07:09Z", "updated_at": "2022-03-24T03:07:09Z", "amount_money": { "amount": -103, "currency_code": "USD" }, "destination": { "type": "BANK_ACCOUNT", "id": "bact:ZPp3oedR3AeEUNd3z7" }, "version": 1, "type": "BATCH", "arrival_date": "2022-03-24" } } }, "GetShiftRequest": { "type": "object", "properties": {}, "description": "A request to get a `Shift` by ID.", "x-release-status": "PUBLIC", "example": {} }, "GetShiftResponse": { "type": "object", "properties": { "shift": { "$ref": "#/definitions/Shift", "description": "The requested `Shift`." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "A response to a request to get a `Shift`. The response contains\nthe requested `Shift` object and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "shift": { "id": "T35HMQSN89SV4", "team_member_id": "D71KRMQof6cXGUW0aAv7", "employee_id": "D71KRMQof6cXGUW0aAv7", "location_id": "PAA1RJZZKXBFG", "timezone": "America/New_York", "start_at": "2019-02-23T18:00:00-05:00", "end_at": "2019-02-23T21:00:00-05:00", "wage": { "title": "Cashier", "hourly_rate": { "amount": 1457, "currency": "USD" }, "job_id": "N4YKVLzFj3oGtNocqoYHYpW3", "tip_eligible": true }, "breaks": [ { "id": "M9BBKEPQAQD2T", "start_at": "2019-02-23T19:00:00-05:00", "end_at": "2019-02-23T20:00:00-05:00", "break_type_id": "92EPDRQKJ5088", "name": "Lunch Break", "expected_duration": "PT1H", "is_paid": true } ], "declared_cash_tip_money": { "amount": 500, "currency": "USD" }, "status": "CLOSED", "version": 1, "created_at": "2019-02-27T00:12:12Z", "updated_at": "2019-02-27T00:12:12Z" } } }, "GetTeamMemberWageRequest": { "type": "object", "properties": {}, "description": "A request to get a `TeamMemberWage`.", "x-release-status": "PUBLIC", "example": {} }, "GetTeamMemberWageResponse": { "type": "object", "properties": { "team_member_wage": { "$ref": "#/definitions/TeamMemberWage", "description": "The requested `TeamMemberWage` object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "A response to a request to get a `TeamMemberWage`. The response contains\nthe requested `TeamMemberWage` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "team_member_wage": { "id": "pXS3qCv7BERPnEGedM4S8mhm", "team_member_id": "33fJchumvVdJwxV0H6L9", "title": "Manager", "hourly_rate": { "amount": 2000, "currency": "USD" }, "job_id": "jxJNN6eCJsLrhg5UFJrDWDGE", "tip_eligible": false } } }, "GetTerminalActionRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": {} } }, "GetTerminalActionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "action": { "$ref": "#/definitions/TerminalAction", "description": "The requested `TerminalAction`" } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "action": { "id": "termapia:jveJIAkkAjILHkdCE", "device_id": "DEVICE_ID", "deadline_duration": "PT5M", "status": "IN_PROGRESS", "created_at": "2021-07-28T23:22:07.476Z", "updated_at": "2021-07-28T23:22:08.301Z", "location_id": "LOCATION_ID", "type": "SAVE_CARD", "app_id": "APP_ID", "save_card_options": { "customer_id": "CUSTOMER_ID", "reference_id": "user-id-1" } } } }, "GetTerminalCheckoutRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "GetTerminalCheckoutResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "checkout": { "$ref": "#/definitions/TerminalCheckout", "description": "The requested `TerminalCheckout`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "checkout": { "id": "08YceKh7B3ZqO", "amount_money": { "amount": 2610, "currency": "USD" }, "reference_id": "id11572", "note": "A brief note", "device_options": { "device_id": "dbb5d83a-7838-11ea-bc55-0242ac130003", "tip_settings": { "allow_tipping": false }, "skip_receipt_screen": false }, "status": "IN_PROGRESS", "location_id": "LOCATION_ID", "created_at": "2020-04-06T16:39:32.545Z", "updated_at": "2020-04-06T16:39:323.001Z", "app_id": "APP_ID", "deadline_duration": "PT5M" } } }, "GetTerminalRefundRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "GetTerminalRefundResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "refund": { "$ref": "#/definitions/TerminalRefund", "description": "The requested `Refund`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "refund": { "id": "009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY", "refund_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY_43Q4iGp7sNeATiWrUruA1EYeMRUXaddXXlDDJ1EQLvb", "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY", "amount_money": { "amount": 111, "currency": "CAD" }, "reason": "Returning item", "device_id": "f72dfb8e-4d65-4e56-aade-ec3fb8d33291", "deadline_duration": "PT5M", "status": "COMPLETED", "created_at": "2020-09-29T15:21:46.771Z", "updated_at": "2020-09-29T15:21:48.675Z", "app_id": "sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ", "card": { "card_brand": "INTERAC", "last_4": "1111", "exp_month": 1, "exp_year": 2022, "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw", "card_type": "CREDIT", "bin": "411111" }, "order_id": "kcuKDKreRaI4gF4TjmEgZjHk8Z7YY", "location_id": "76C9W6K8CNNQ5" } } }, "GiftCard": { "type": "object", "required": [ "type" ], "properties": { "id": { "type": "string", "description": "The Square-assigned ID of the gift card.", "x-read-only": true }, "type": { "type": "string", "description": "The gift card type." }, "gan_source": { "type": "string", "description": "The source that generated the gift card account number (GAN). The default value is `SQUARE`." }, "state": { "type": "string", "description": "The current gift card state.", "x-read-only": true }, "balance_money": { "$ref": "#/definitions/Money", "description": "The current gift card balance. This balance is always greater than or equal to zero.", "x-read-only": true }, "gan": { "type": "string", "description": "The gift card account number (GAN). Buyers can use the GAN to make purchases or check \nthe gift card balance." }, "created_at": { "type": "string", "description": "The timestamp when the gift card was created, in RFC 3339 format. \nIn the case of a digital gift card, it is the time when you create a card \n(using the Square Point of Sale application, Seller Dashboard, or Gift Cards API). \nIn the case of a plastic gift card, it is the time when Square associates the card with the \nseller at the time of activation.", "x-read-only": true }, "customer_ids": { "type": "array", "items": { "maxLength": 191, "type": "string" }, "description": "The IDs of the [customer profiles](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) to whom this gift card is linked.", "x-read-only": true } }, "description": "Represents a Square gift card.", "x-release-status": "PUBLIC" }, "GiftCardActivity": { "type": "object", "required": [ "type", "location_id" ], "properties": { "id": { "type": "string", "description": "The Square-assigned ID of the gift card activity.", "x-read-only": true }, "type": { "type": "string", "description": "The type of gift card activity." }, "location_id": { "type": "string", "description": "The ID of the [business location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the activity occurred." }, "created_at": { "type": "string", "description": "The timestamp when the gift card activity was created, in RFC 3339 format.", "x-read-only": true }, "gift_card_id": { "type": "string", "description": "The gift card ID. When creating a gift card activity, `gift_card_id` is not required if \n`gift_card_gan` is specified." }, "gift_card_gan": { "type": "string", "description": "The gift card account number (GAN). When creating a gift card activity, `gift_card_gan` \nis not required if `gift_card_id` is specified." }, "gift_card_balance_money": { "$ref": "#/definitions/Money", "description": "The final balance on the gift card after the action is completed.", "x-read-only": true }, "load_activity_details": { "$ref": "#/definitions/GiftCardActivityLoad", "description": "Additional details about a `LOAD` activity, which is used to reload money onto a gift card." }, "activate_activity_details": { "$ref": "#/definitions/GiftCardActivityActivate", "description": "Additional details about an `ACTIVATE` activity, which is used to activate a gift card with \nan initial balance." }, "redeem_activity_details": { "$ref": "#/definitions/GiftCardActivityRedeem", "description": "Additional details about a `REDEEM` activity, which is used to redeem a gift card for a purchase.\n\nFor applications that process payments using the Square Payments API, Square creates a `REDEEM` activity that \nupdates the gift card balance after the corresponding [CreatePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/create-payment) \nrequest is completed. Applications that use a custom payment processing system must call \n[CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) to create the `REDEEM` activity." }, "clear_balance_activity_details": { "$ref": "#/definitions/GiftCardActivityClearBalance", "description": "Additional details about a `CLEAR_BALANCE` activity, which is used to set the balance of a gift card to zero." }, "deactivate_activity_details": { "$ref": "#/definitions/GiftCardActivityDeactivate", "description": "Additional details about a `DEACTIVATE` activity, which is used to deactivate a gift card." }, "adjust_increment_activity_details": { "$ref": "#/definitions/GiftCardActivityAdjustIncrement", "description": "Additional details about an `ADJUST_INCREMENT` activity, which is used to add money to a gift card \noutside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow." }, "adjust_decrement_activity_details": { "$ref": "#/definitions/GiftCardActivityAdjustDecrement", "description": "Additional details about an `ADJUST_DECREMENT` activity, which is used to deduct money from a gift \ncard outside of a typical `REDEEM` activity flow." }, "refund_activity_details": { "$ref": "#/definitions/GiftCardActivityRefund", "description": "Additional details about a `REFUND` activity, which is used to add money to a gift card when \nrefunding a payment.\n\nFor applications that process payments using the Square Payments API, Square creates a `REFUND` activity that \nupdates the gift card balance after the corresponding [RefundPayment](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/refund-payment) \nrequest is completed. Applications that use a custom payment processing system must call \n[CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) to create the `REFUND` activity." }, "unlinked_activity_refund_activity_details": { "$ref": "#/definitions/GiftCardActivityUnlinkedActivityRefund", "description": "Additional details about an `UNLINKED_ACTIVITY_REFUND` activity. This activity is used to add money \nto a gift card when refunding a payment that was processed using a custom payment processing system\nand not linked to the gift card." }, "import_activity_details": { "$ref": "#/definitions/GiftCardActivityImport", "description": "Additional details about an `IMPORT` activity, which Square uses to import a third-party \ngift card with a balance.", "x-read-only": true }, "block_activity_details": { "$ref": "#/definitions/GiftCardActivityBlock", "description": "Additional details about a `BLOCK` activity, which Square uses to temporarily block a gift card.", "x-read-only": true }, "unblock_activity_details": { "$ref": "#/definitions/GiftCardActivityUnblock", "description": "Additional details about an `UNBLOCK` activity, which Square uses to unblock a gift card.", "x-read-only": true }, "import_reversal_activity_details": { "$ref": "#/definitions/GiftCardActivityImportReversal", "description": "Additional details about an `IMPORT_REVERSAL` activity, which Square uses to reverse the \nimport of a third-party gift card.", "x-read-only": true }, "transfer_balance_to_activity_details": { "$ref": "#/definitions/GiftCardActivityTransferBalanceTo", "description": "Additional details about a `TRANSFER_BALANCE_TO` activity, which Square uses to add money to\na gift card as the result of a transfer from another gift card.", "x-read-only": true }, "transfer_balance_from_activity_details": { "$ref": "#/definitions/GiftCardActivityTransferBalanceFrom", "description": "Additional details about a `TRANSFER_BALANCE_FROM` activity, which Square uses to deduct money from\na gift as the result of a transfer to another gift card.", "x-read-only": true } }, "description": "Represents an action performed on a [gift card](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCard) that affects its state or balance. \nA gift card activity contains information about a specific activity type. For example, a `REDEEM` activity\nincludes a `redeem_activity_details` field that contains information about the redemption.", "x-release-status": "PUBLIC" }, "GiftCardActivityActivate": { "type": "object", "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The amount added to the gift card. This value is a positive integer.\n\nApplications that use a custom order processing system must specify this amount in the \n[CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request." }, "order_id": { "type": "string", "description": "The ID of the [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) that contains the `GIFT_CARD` line item.\n\nApplications that use the Square Orders API to process orders must specify the order ID\n[CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request." }, "line_item_uid": { "type": "string", "description": "The UID of the `GIFT_CARD` line item in the order that represents the gift card purchase.\n\nApplications that use the Square Orders API to process orders must specify the line item UID\nin the [CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request." }, "reference_id": { "type": "string", "description": "A client-specified ID that associates the gift card activity with an entity in another system. \n\nApplications that use a custom order processing system can use this field to track information \nrelated to an order or payment." }, "buyer_payment_instrument_ids": { "type": "array", "items": { "type": "string" }, "description": "The payment instrument IDs used to process the gift card purchase, such as a credit card ID \nor bank account ID. \n\nApplications that use a custom order processing system must specify payment instrument IDs in \nthe [CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request.\nSquare uses this information to perform compliance checks. \n\nFor applications that use the Square Orders API to process payments, Square has the necessary \ninstrument IDs to perform compliance checks." } }, "description": "Represents details about an `ACTIVATE` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityAdjustDecrement": { "type": "object", "required": [ "amount_money", "reason" ], "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The amount deducted from the gift card balance. This value is a positive integer." }, "reason": { "type": "string", "description": "The reason the gift card balance was adjusted." } }, "description": "Represents details about an `ADJUST_DECREMENT` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityAdjustIncrement": { "type": "object", "required": [ "amount_money", "reason" ], "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The amount added to the gift card balance. This value is a positive integer." }, "reason": { "type": "string", "description": "The reason the gift card balance was adjusted." } }, "description": "Represents details about an `ADJUST_INCREMENT` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityBlock": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string", "description": "The reason the gift card was blocked." } }, "description": "Represents details about a `BLOCK` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityClearBalance": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string", "description": "The reason the gift card balance was cleared." } }, "description": "Represents details about a `CLEAR_BALANCE` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityDeactivate": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string", "description": "The reason the gift card was deactivated." } }, "description": "Represents details about a `DEACTIVATE` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityImport": { "type": "object", "required": [ "amount_money" ], "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The balance amount on the imported gift card." } }, "description": "Represents details about an `IMPORT` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).\nThis activity type is used when Square imports a third-party gift card, in which case the \n`gan_source` of the gift card is set to `OTHER`.", "x-release-status": "PUBLIC" }, "GiftCardActivityImportReversal": { "type": "object", "required": [ "amount_money" ], "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money cleared from the third-party gift card when \nthe import was reversed." } }, "description": "Represents details about an `IMPORT_REVERSAL` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityLoad": { "type": "object", "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The amount added to the gift card. This value is a positive integer.\n\nApplications that use a custom order processing system must specify this amount in the \n[CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request." }, "order_id": { "type": "string", "description": "The ID of the [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) that contains the `GIFT_CARD` line item.\n\nApplications that use the Square Orders API to process orders must specify the order ID in the \n[CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request." }, "line_item_uid": { "type": "string", "description": "The UID of the `GIFT_CARD` line item in the order that represents the additional funds for the gift card.\n\nApplications that use the Square Orders API to process orders must specify the line item UID\nin the [CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request." }, "reference_id": { "type": "string", "description": "A client-specified ID that associates the gift card activity with an entity in another system. \n\nApplications that use a custom order processing system can use this field to track information related to \nan order or payment." }, "buyer_payment_instrument_ids": { "type": "array", "items": { "type": "string" }, "description": "The payment instrument IDs used to process the order for the additional funds, such as a credit card ID \nor bank account ID. \n\nApplications that use a custom order processing system must specify payment instrument IDs in \nthe [CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request.\nSquare uses this information to perform compliance checks. \n\nFor applications that use the Square Orders API to process payments, Square has the necessary \ninstrument IDs to perform compliance checks." } }, "description": "Represents details about a `LOAD` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityRedeem": { "type": "object", "required": [ "amount_money" ], "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The amount deducted from the gift card for the redemption. This value is a positive integer.\n\nApplications that use a custom payment processing system must specify this amount in the \n[CreateGiftCardActivity](https://developer.squareup.com/reference/square_2024-04-17/gift-card-activities-api/create-gift-card-activity) request." }, "payment_id": { "type": "string", "description": "The ID of the payment that represents the gift card redemption. Square populates this field \nif the payment was processed by Square.", "x-read-only": true }, "reference_id": { "type": "string", "description": "A client-specified ID that associates the gift card activity with an entity in another system. \n\nApplications that use a custom payment processing system can use this field to track information\nrelated to an order or payment." }, "status": { "type": "string", "description": "The status of the gift card redemption. Gift cards redeemed from Square Point of Sale or the \nSquare Seller Dashboard use a two-state process: `PENDING` \nto `COMPLETED` or `PENDING` to `CANCELED`. Gift cards redeemed using the Gift Card Activities API \nalways have a `COMPLETED` status.", "x-read-only": true } }, "description": "Represents details about a `REDEEM` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityRefund": { "type": "object", "properties": { "redeem_activity_id": { "type": "string", "description": "The ID of the refunded `REDEEM` gift card activity. Square populates this field if the \n`payment_id` in the corresponding [RefundPayment](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/refund-payment) request \nrepresents a redemption made by the same gift card. Note that you must use `RefundPayment` \nto refund a gift card payment to the same gift card if the payment was processed by Square.\n\nFor applications that use a custom payment processing system, this field is required when creating\na `REFUND` activity. The provided `REDEEM` activity ID must be linked to the same gift card." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount added to the gift card for the refund. This value is a positive integer.\n\nThis field is required when creating a `REFUND` activity. The amount can represent a full or partial refund." }, "reference_id": { "type": "string", "description": "A client-specified ID that associates the gift card activity with an entity in another system." }, "payment_id": { "type": "string", "description": "The ID of the refunded payment. Square populates this field if the refund is for a \npayment processed by Square and one of the following conditions is true:\n\n- The Refunds API is used to refund a gift card payment to the same gift card.\n- A seller initiated the refund from Square Point of Sale or the Seller Dashboard. The payment source can be the \nsame gift card or a cross-tender payment from a credit card or a different gift card.", "x-read-only": true } }, "description": "Represents details about a `REFUND` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityTransferBalanceFrom": { "type": "object", "required": [ "transfer_to_gift_card_id", "amount_money" ], "properties": { "transfer_to_gift_card_id": { "type": "string", "description": "The ID of the gift card to which the specified amount was transferred." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount deducted from the gift card for the transfer. This value is a positive integer." } }, "description": "Represents details about a `TRANSFER_BALANCE_FROM` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityTransferBalanceTo": { "type": "object", "required": [ "transfer_from_gift_card_id", "amount_money" ], "properties": { "transfer_from_gift_card_id": { "type": "string", "description": "The ID of the gift card from which the specified amount was transferred." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount added to the gift card balance for the transfer. This value is a positive integer." } }, "description": "Represents details about a `TRANSFER_BALANCE_TO` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityUnblock": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string", "description": "The reason the gift card was unblocked." } }, "description": "Represents details about an `UNBLOCK` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "GiftCardActivityUnlinkedActivityRefund": { "type": "object", "required": [ "amount_money" ], "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The amount added to the gift card for the refund. This value is a positive integer." }, "reference_id": { "type": "string", "description": "A client-specified ID that associates the gift card activity with an entity in another system." }, "payment_id": { "type": "string", "description": "The ID of the refunded payment. This field is not used starting in Square version 2022-06-16.", "x-read-only": true } }, "description": "Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType).", "x-release-status": "PUBLIC" }, "InventoryAdjustment": { "type": "object", "properties": { "id": { "maxLength": 100, "type": "string", "description": "A unique ID generated by Square for the\n`InventoryAdjustment`." }, "reference_id": { "maxLength": 255, "type": "string", "description": "An optional ID provided by the application to tie the\n`InventoryAdjustment` to an external\nsystem." }, "from_state": { "type": "string", "description": "The [inventory state](https://developer.squareup.com/reference/square_2024-04-17/enums/InventoryState) of the related quantity\nof items before the adjustment." }, "to_state": { "type": "string", "description": "The [inventory state](https://developer.squareup.com/reference/square_2024-04-17/enums/InventoryState) of the related quantity\nof items after the adjustment." }, "location_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the related\nquantity of items is being tracked." }, "catalog_object_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the\n[CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) being tracked." }, "catalog_object_type": { "maxLength": 14, "type": "string", "description": "The [type](https://developer.squareup.com/reference/square_2024-04-17/enums/CatalogObjectType) of the [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app." }, "quantity": { "maxLength": 26, "type": "string", "description": "The number of items affected by the adjustment as a decimal string.\nCan support up to 5 digits after the decimal point." }, "total_price_money": { "$ref": "#/definitions/Money", "description": "The total price paid for goods associated with the\nadjustment. Present if and only if `to_state` is `SOLD`. Always\nnon-negative.", "x-read-only": true }, "occurred_at": { "maxLength": 34, "type": "string", "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe inventory adjustment took place. For inventory adjustment updates, the `occurred_at`\ntimestamp cannot be older than 24 hours or in the future relative to the\ntime of the request." }, "created_at": { "maxLength": 34, "type": "string", "description": "An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.", "x-read-only": true }, "source": { "$ref": "#/definitions/SourceApplication", "description": "Information about the application that caused the\ninventory adjustment.", "x-read-only": true }, "employee_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Employee](https://developer.squareup.com/reference/square_2024-04-17/objects/Employee) responsible for the\ninventory adjustment." }, "team_member_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Team Member](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember) responsible for the\ninventory adjustment." }, "transaction_id": { "maxLength": 255, "type": "string", "description": "The Square-generated ID of the [Transaction](https://developer.squareup.com/reference/square_2024-04-17/objects/Transaction) that\ncaused the adjustment. Only relevant for payment-related state\ntransitions.", "x-read-only": true }, "refund_id": { "maxLength": 255, "type": "string", "description": "The Square-generated ID of the [Refund](https://developer.squareup.com/reference/square_2024-04-17/objects/Refund) that\ncaused the adjustment. Only relevant for refund-related state\ntransitions.", "x-read-only": true }, "purchase_order_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the purchase order that caused the\nadjustment. Only relevant for state transitions from the Square for Retail\napp.", "x-read-only": true }, "goods_receipt_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the goods receipt that caused the\nadjustment. Only relevant for state transitions from the Square for Retail\napp.", "x-read-only": true }, "adjustment_group": { "$ref": "#/definitions/InventoryAdjustmentGroup", "description": "An adjustment group bundling the related adjustments of item variations through stock conversions in a single inventory event.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true } }, "description": "Represents a change in state or quantity of product inventory at a\nparticular time and location.", "x-release-status": "PUBLIC" }, "InventoryAdjustmentGroup": { "type": "object", "properties": { "id": { "maxLength": 100, "type": "string", "description": "A unique ID generated by Square for the\n`InventoryAdjustmentGroup`.", "x-read-only": true }, "root_adjustment_id": { "maxLength": 100, "type": "string", "description": "The inventory adjustment of the composed variation.", "x-read-only": true }, "from_state": { "type": "string", "description": "Representative `from_state` for adjustments within the group. For example, for a group adjustment from `IN_STOCK` to `SOLD`,\nthere can be two component adjustments in the group: one from `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`.\nHere, the representative `from_state` for the `InventoryAdjustmentGroup` is `IN_STOCK`.", "x-read-only": true }, "to_state": { "type": "string", "description": "Representative `to_state` for adjustments within group. For example, for a group adjustment from `IN_STOCK` to `SOLD`,\nthe two component adjustments in the group can be from `IN_STOCK` to `COMPOSED` and from `COMPOSED` to `SOLD`.\nHere, the representative `to_state` of the `InventoryAdjustmentGroup` is `SOLD`.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "InventoryChange": { "type": "object", "properties": { "type": { "type": "string", "description": "Indicates how the inventory change is applied. See\n[InventoryChangeType](https://developer.squareup.com/reference/square_2024-04-17/enums/InventoryChangeType) for all possible values." }, "physical_count": { "$ref": "#/definitions/InventoryPhysicalCount", "description": "Contains details about the physical count when `type` is\n`PHYSICAL_COUNT`, and is unset for all other change types." }, "adjustment": { "$ref": "#/definitions/InventoryAdjustment", "description": "Contains details about the inventory adjustment when `type` is\n`ADJUSTMENT`, and is unset for all other change types." }, "transfer": { "$ref": "#/definitions/InventoryTransfer", "description": "Contains details about the inventory transfer when `type` is\n`TRANSFER`, and is unset for all other change types.\n\n_Note:_ An [InventoryTransfer](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryTransfer) object can only be set in the input to the\n[BatchChangeInventory](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/batch-change-inventory) endpoint when the seller has an active Retail Plus subscription." }, "measurement_unit": { "$ref": "#/definitions/CatalogMeasurementUnit", "description": "The [CatalogMeasurementUnit](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change.", "x-read-only": true }, "measurement_unit_id": { "type": "string", "description": "The ID of the [CatalogMeasurementUnit](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change.", "x-read-only": true } }, "description": "Represents a single physical count, inventory, adjustment, or transfer\nthat is part of the history of inventory changes for a particular\n[CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) instance.", "x-release-status": "PUBLIC" }, "InventoryCount": { "type": "object", "properties": { "catalog_object_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the\n[CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) being tracked." }, "catalog_object_type": { "maxLength": 14, "type": "string", "description": "The [type](https://developer.squareup.com/reference/square_2024-04-17/enums/CatalogObjectType) of the [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app." }, "state": { "type": "string", "description": "The current [inventory state](https://developer.squareup.com/reference/square_2024-04-17/enums/InventoryState) for the related\nquantity of items." }, "location_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the related\nquantity of items is being tracked." }, "quantity": { "maxLength": 26, "type": "string", "description": "The number of items affected by the estimated count as a decimal string.\nCan support up to 5 digits after the decimal point." }, "calculated_at": { "maxLength": 34, "type": "string", "description": "An RFC 3339-formatted timestamp that indicates when the most recent physical count or adjustment affecting\nthe estimated count is received.", "x-read-only": true }, "is_estimated": { "type": "boolean", "description": "Whether the inventory count is for composed variation (TRUE) or not (FALSE). If true, the inventory count will not be present in the response of\nany of these endpoints: [BatchChangeInventory](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/batch-change-inventory),\n[BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/batch-retrieve-inventory-changes),\n[BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/batch-retrieve-inventory-counts), and\n[RetrieveInventoryChanges](https://developer.squareup.com/reference/square_2024-04-17/inventory-api/retrieve-inventory-changes).", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true } }, "description": "Represents Square-estimated quantity of items in a particular state at a\nparticular seller location based on the known history of physical counts and\ninventory adjustments.", "x-release-status": "PUBLIC" }, "InventoryPhysicalCount": { "type": "object", "properties": { "id": { "maxLength": 100, "type": "string", "description": "A unique Square-generated ID for the\n[InventoryPhysicalCount](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryPhysicalCount)." }, "reference_id": { "maxLength": 255, "type": "string", "description": "An optional ID provided by the application to tie the\n[InventoryPhysicalCount](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryPhysicalCount) to an external\nsystem." }, "catalog_object_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the\n[CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) being tracked." }, "catalog_object_type": { "maxLength": 14, "type": "string", "description": "The [type](https://developer.squareup.com/reference/square_2024-04-17/enums/CatalogObjectType) of the [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app." }, "state": { "type": "string", "description": "The current [inventory state](https://developer.squareup.com/reference/square_2024-04-17/enums/InventoryState) for the related\nquantity of items." }, "location_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the related\nquantity of items is being tracked." }, "quantity": { "maxLength": 26, "type": "string", "description": "The number of items affected by the physical count as a decimal string.\nThe number can support up to 5 digits after the decimal point." }, "source": { "$ref": "#/definitions/SourceApplication", "description": "Information about the application with which the\nphysical count is submitted.", "x-read-only": true }, "employee_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Employee](https://developer.squareup.com/reference/square_2024-04-17/objects/Employee) responsible for the\nphysical count." }, "team_member_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Team Member](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember) responsible for the\nphysical count." }, "occurred_at": { "maxLength": 34, "type": "string", "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe physical count was examined. For physical count updates, the `occurred_at`\ntimestamp cannot be older than 24 hours or in the future relative to the\ntime of the request." }, "created_at": { "maxLength": 34, "type": "string", "description": "An RFC 3339-formatted timestamp that indicates when the physical count is received.", "x-read-only": true } }, "description": "Represents the quantity of an item variation that is physically present\nat a specific location, verified by a seller or a seller\u0027s employee. For example,\na physical count might come from an employee counting the item variations on\nhand or from syncing with an external system.", "x-release-status": "PUBLIC" }, "InventoryTransfer": { "type": "object", "properties": { "id": { "maxLength": 100, "type": "string", "description": "A unique ID generated by Square for the\n`InventoryTransfer`." }, "reference_id": { "maxLength": 255, "type": "string", "description": "An optional ID provided by the application to tie the\n`InventoryTransfer` to an external system." }, "state": { "type": "string", "description": "The [inventory state](https://developer.squareup.com/reference/square_2024-04-17/enums/InventoryState) for the quantity of\nitems being transferred." }, "from_location_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the related\nquantity of items was tracked before the transfer." }, "to_location_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the related\nquantity of items was tracked after the transfer." }, "catalog_object_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the\n[CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) being tracked." }, "catalog_object_type": { "maxLength": 14, "type": "string", "description": "The [type](https://developer.squareup.com/reference/square_2024-04-17/enums/CatalogObjectType) of the [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app." }, "quantity": { "maxLength": 26, "type": "string", "description": "The number of items affected by the transfer as a decimal string.\nCan support up to 5 digits after the decimal point." }, "occurred_at": { "maxLength": 34, "type": "string", "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe transfer took place. For write actions, the `occurred_at` timestamp\ncannot be older than 24 hours or in the future relative to the time of the\nrequest." }, "created_at": { "maxLength": 34, "type": "string", "description": "An RFC 3339-formatted timestamp that indicates when Square\nreceived the transfer request.", "x-read-only": true }, "source": { "$ref": "#/definitions/SourceApplication", "description": "Information about the application that initiated the\ninventory transfer.", "x-read-only": true }, "employee_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Employee](https://developer.squareup.com/reference/square_2024-04-17/objects/Employee) responsible for the\ninventory transfer." }, "team_member_id": { "maxLength": 100, "type": "string", "description": "The Square-generated ID of the [Team Member](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember) responsible for the\ninventory transfer." } }, "description": "Represents the transfer of a quantity of product inventory at a\nparticular time from one location to another.", "x-release-status": "PUBLIC" }, "Invoice": { "type": "object", "properties": { "id": { "type": "string", "description": "The Square-assigned ID of the invoice.", "x-read-only": true }, "version": { "type": "integer", "description": "The Square-assigned version number, which is incremented each time an update is committed to the invoice." }, "location_id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The ID of the location that this invoice is associated with. \n\nIf specified in a `CreateInvoice` request, the value must match the `location_id` of the associated order." }, "order_id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The ID of the [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) for which the invoice is created. \nThis field is required when creating an invoice, and the order must be in the `OPEN` state.\n\nTo view the line items and other information for the associated order, call the \n[RetrieveOrder](https://developer.squareup.com/reference/square_2024-04-17/orders-api/retrieve-order) endpoint using the order ID." }, "primary_recipient": { "$ref": "#/definitions/InvoiceRecipient", "description": "The customer who receives the invoice. This customer data is displayed on the invoice and used by Square to deliver the invoice. \n\nThis field is required to publish an invoice, and it must specify the `customer_id`." }, "payment_requests": { "type": "array", "items": { "$ref": "#/definitions/InvoicePaymentRequest" }, "description": "The payment schedule for the invoice, represented by one or more payment requests that\ndefine payment settings, such as amount due and due date. An invoice supports the following payment request combinations:\n- One balance\n- One deposit with one balance\n- 2–12 installments \n- One deposit with 2–12 installments\n\nThis field is required when creating an invoice. It must contain at least one payment request. \nAll payment requests for the invoice must equal the total order amount. For more information, see \n[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).\n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription)." }, "delivery_method": { "type": "string", "description": "The delivery method that Square uses to send the invoice, reminders, and receipts to\nthe customer. After the invoice is published, Square processes the invoice based on the delivery\nmethod and payment request settings, either immediately or on the `scheduled_at` date, if specified.\nFor example, Square might send the invoice or receipt for an automatic payment. For invoices with\nautomatic payments, this field must be set to `EMAIL`.\n\nOne of the following is required when creating an invoice:\n- (Recommended) This `delivery_method` field. To configure an automatic payment, the\n`automatic_payment_source` field of the payment request is also required.\n- The deprecated `request_method` field of the payment request. Note that `invoice`\nobjects returned in responses do not include `request_method`." }, "invoice_number": { "minLength": 1, "maxLength": 191, "type": "string", "description": "A user-friendly invoice number that is displayed on the invoice. The value is unique within a location.\nIf not provided when creating an invoice, Square assigns a value.\nIt increments from 1 and is padded with zeros making it 7 characters long\n(for example, 0000001 and 0000002)." }, "title": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The title of the invoice, which is displayed on the invoice." }, "description": { "minLength": 1, "maxLength": 65536, "type": "string", "description": "The description of the invoice, which is displayed on the invoice." }, "scheduled_at": { "type": "string", "description": "The timestamp when the invoice is scheduled for processing, in RFC 3339 format.\nAfter the invoice is published, Square processes the invoice on the specified date,\naccording to the delivery method and payment request settings.\n\nIf the field is not set, Square processes the invoice immediately after it is published." }, "public_url": { "type": "string", "description": "The URL of the Square-hosted invoice page.\nAfter you publish the invoice using the `PublishInvoice` endpoint, Square hosts the invoice\npage and returns the page URL in the response.", "x-read-only": true }, "next_payment_amount_money": { "$ref": "#/definitions/Money", "description": "The current amount due for the invoice. In addition to the\namount due on the next payment request, this includes any overdue payment amounts.", "x-read-only": true }, "status": { "type": "string", "description": "The status of the invoice.", "x-read-only": true }, "timezone": { "type": "string", "description": "The time zone used to interpret calendar dates on the invoice, such as `due_date`.\nWhen an invoice is created, this field is set to the `timezone` specified for the seller\nlocation. The value cannot be changed.\n\nFor example, a payment `due_date` of 2021-03-09 with a `timezone` of America/Los\\_Angeles\nbecomes overdue at midnight on March 9 in America/Los\\_Angeles (which equals a UTC timestamp\nof 2021-03-10T08:00:00Z).", "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp when the invoice was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp when the invoice was last updated, in RFC 3339 format.", "x-read-only": true }, "accepted_payment_methods": { "$ref": "#/definitions/InvoiceAcceptedPaymentMethods", "description": "The payment methods that customers can use to pay the invoice on the Square-hosted\ninvoice page. This setting is independent of any automatic payment requests for the invoice.\n\nThis field is required when creating an invoice and must set at least one payment method to `true`." }, "custom_fields": { "type": "array", "items": { "$ref": "#/definitions/InvoiceCustomField" }, "description": "Additional seller-defined fields that are displayed on the invoice. For more information, see\n[Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).\n\nAdding custom fields to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).\n\nMax: 2 custom fields" }, "subscription_id": { "type": "string", "description": "The ID of the [subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/Subscription) associated with the invoice.\nThis field is present only on subscription billing invoices.", "x-read-only": true }, "sale_or_service_date": { "type": "string", "description": "The date of the sale or the date that the service is rendered, in `YYYY-MM-DD` format.\nThis field can be used to specify a past or future date which is displayed on the invoice." }, "payment_conditions": { "minLength": 1, "maxLength": 2000, "type": "string", "description": "**France only.** The payment terms and conditions that are displayed on the invoice. For more information, \nsee [Payment conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions).\n\nFor countries other than France, Square returns an `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and \n\"Payment conditions are not supported for this location\u0027s country\" detail if this field is included in `CreateInvoice` or `UpdateInvoice` requests." }, "store_payment_method_enabled": { "type": "boolean", "description": "Indicates whether to allow a customer to save a credit or debit card as a card on file or a bank transfer as a\nbank account on file. If `true`, Square displays a __Save my card on file__ or __Save my bank on file__ checkbox on the\ninvoice payment page. Stored payment information can be used for future automatic payments. The default value is `false`." }, "attachments": { "type": "array", "items": { "$ref": "#/definitions/InvoiceAttachment" }, "description": "Metadata about the attachments on the invoice. Invoice attachments are managed using the\n[CreateInvoiceAttachment](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/create-invoice-attachment) and [DeleteInvoiceAttachment](https://developer.squareup.com/reference/square_2024-04-17/invoices-api/delete-invoice-attachment) endpoints.", "x-read-only": true } }, "description": "Stores information about an invoice. You use the Invoices API to create and manage\ninvoices. For more information, see [Invoices API Overview](https://developer.squareup.com/docs/invoices-api/overview).", "x-release-status": "PUBLIC" }, "InvoiceAcceptedPaymentMethods": { "type": "object", "properties": { "card": { "type": "boolean", "description": "Indicates whether credit card or debit card payments are accepted. The default value is `false`." }, "square_gift_card": { "type": "boolean", "description": "Indicates whether Square gift card payments are accepted. The default value is `false`." }, "bank_account": { "type": "boolean", "description": "Indicates whether ACH bank transfer payments are accepted. The default value is `false`." }, "buy_now_pay_later": { "type": "boolean", "description": "Indicates whether Afterpay (also known as Clearpay) payments are accepted. The default value is `false`.\n\nThis option is allowed only for invoices that have a single payment request of the `BALANCE` type. This payment method is\nsupported if the seller account accepts Afterpay payments and the seller location is in a country where Afterpay\ninvoice payments are supported. As a best practice, consider enabling an additional payment method when allowing\n`buy_now_pay_later` payments. For more information, including detailed requirements and processing limits, see\n[Buy Now Pay Later payments with Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later)." }, "cash_app_pay": { "type": "boolean", "description": "Indicates whether Cash App payments are accepted. The default value is `false`.\n\nThis payment method is supported only for seller [locations](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) in the United States." } }, "description": "The payment methods that customers can use to pay an [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) on the Square-hosted invoice payment page.", "x-release-status": "PUBLIC" }, "InvoiceAttachment": { "type": "object", "properties": { "id": { "type": "string", "description": "The Square-assigned ID of the attachment.", "x-read-only": true }, "filename": { "type": "string", "description": "The file name of the attachment, which is displayed on the invoice.", "x-read-only": true }, "description": { "type": "string", "description": "The description of the attachment, which is displayed on the invoice.\nThis field maps to the seller-defined **Message** field.", "x-read-only": true }, "filesize": { "type": "integer", "description": "The file size of the attachment in bytes.", "x-read-only": true }, "hash": { "type": "string", "description": "The MD5 hash that was generated from the file contents.", "x-read-only": true }, "mime_type": { "type": "string", "description": "The mime type of the attachment.\nThe following mime types are supported: \nimage/gif, image/jpeg, image/png, image/tiff, image/bmp, application/pdf.", "x-read-only": true }, "uploaded_at": { "type": "string", "description": "The timestamp when the attachment was uploaded, in RFC 3339 format.", "x-read-only": true } }, "description": "Represents a file attached to an [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice).", "x-release-status": "PUBLIC" }, "InvoiceCustomField": { "type": "object", "properties": { "label": { "maxLength": 30, "type": "string", "description": "The label or title of the custom field. This field is required for a custom field." }, "value": { "maxLength": 2000, "type": "string", "description": "The text of the custom field. If omitted, only the label is rendered." }, "placement": { "type": "string", "description": "The location of the custom field on the invoice. This field is required for a custom field." } }, "description": "An additional seller-defined and customer-facing field to include on the invoice. For more information, \nsee [Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).\n\nAdding custom fields to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).", "x-release-status": "PUBLIC" }, "InvoiceFilter": { "type": "object", "required": [ "location_ids" ], "properties": { "location_ids": { "type": "array", "items": { "type": "string" }, "description": "Limits the search to the specified locations. A location is required. \nIn the current implementation, only one location can be specified." }, "customer_ids": { "type": "array", "items": { "type": "string" }, "description": "Limits the search to the specified customers, within the specified locations. \nSpecifying a customer is optional. In the current implementation, \na maximum of one customer can be specified." } }, "description": "Describes query filters to apply.", "x-release-status": "PUBLIC" }, "InvoicePaymentReminder": { "type": "object", "properties": { "uid": { "type": "string", "description": "A Square-assigned ID that uniquely identifies the reminder within the\n`InvoicePaymentRequest`.", "x-read-only": true }, "relative_scheduled_days": { "maximum": 32767, "minimum": -32767, "type": "integer", "description": "The number of days before (a negative number) or after (a positive number)\nthe payment request `due_date` when the reminder is sent. For example, -3 indicates that\nthe reminder should be sent 3 days before the payment request `due_date`." }, "message": { "minLength": 1, "maxLength": 1000, "type": "string", "description": "The reminder message." }, "status": { "type": "string", "description": "The status of the reminder.", "x-read-only": true }, "sent_at": { "type": "string", "description": "If sent, the timestamp when the reminder was sent, in RFC 3339 format.", "x-read-only": true } }, "description": "Describes a payment request reminder (automatic notification) that Square sends\nto the customer. You configure a reminder relative to the payment request\n`due_date`.", "x-release-status": "PUBLIC" }, "InvoicePaymentRequest": { "type": "object", "properties": { "uid": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The Square-generated ID of the payment request in an [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice)." }, "request_method": { "type": "string", "description": "Indicates how Square processes the payment request. DEPRECATED at version 2021-01-21. Replaced by the\n`Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields.\n\nOne of the following is required when creating an invoice:\n- (Recommended) The `delivery_method` field of the invoice. To configure an automatic payment, the\n`automatic_payment_source` field of the payment request is also required.\n- This `request_method` field. Note that `invoice` objects returned in responses do not include `request_method`.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "request_type": { "type": "string", "description": "Identifies the payment request type. This type defines how the payment request amount is determined. \nThis field is required to create a payment request." }, "due_date": { "type": "string", "description": "The due date (in the invoice\u0027s time zone) for the payment request, in `YYYY-MM-DD` format. This field\nis required to create a payment request. If an `automatic_payment_source` is defined for the request, Square\ncharges the payment source on this date.\n\nAfter this date, the invoice becomes overdue. For example, a payment `due_date` of 2021-03-09 with a `timezone`\nof America/Los\\_Angeles becomes overdue at midnight on March 9 in America/Los\\_Angeles (which equals a UTC\ntimestamp of 2021-03-10T08:00:00Z)." }, "fixed_amount_requested_money": { "$ref": "#/definitions/Money", "description": "If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the `request_type`, \nthis indicates the request amount.\nYou cannot specify this when `request_type` is `BALANCE` or when the \npayment request includes the `percentage_requested` field." }, "percentage_requested": { "type": "string", "description": "Specifies the amount for the payment request in percentage:\n\n- When the payment `request_type` is `DEPOSIT`, it is the percentage of the order\u0027s total amount.\n- When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order\u0027s total less \nthe deposit, if requested. The sum of the `percentage_requested` in all installment \npayment requests must be equal to 100.\n\nYou cannot specify this when the payment `request_type` is `BALANCE` or when the \npayment request specifies the `fixed_amount_requested_money` field." }, "tipping_enabled": { "type": "boolean", "description": "If set to true, the Square-hosted invoice page (the `public_url` field of the invoice) \nprovides a place for the customer to pay a tip. \n\nThis field is allowed only on the final payment request \nand the payment `request_type` must be `BALANCE` or `INSTALLMENT`." }, "automatic_payment_source": { "type": "string", "description": "The payment method for an automatic payment.\n\nThe default value is `NONE`." }, "card_id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The ID of the credit or debit card on file to charge for the payment request. To get the cards on file for a customer,\ncall [ListCards](https://developer.squareup.com/reference/square_2024-04-17/cards-api/list-cards) and include the `customer_id` of the invoice recipient." }, "reminders": { "type": "array", "items": { "$ref": "#/definitions/InvoicePaymentReminder" }, "description": "A list of one or more reminders to send for the payment request." }, "computed_amount_money": { "$ref": "#/definitions/Money", "description": "The amount of the payment request, computed using the order amount and information from the various payment\nrequest fields (`request_type`, `fixed_amount_requested_money`, and `percentage_requested`).", "x-read-only": true }, "total_completed_amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money already paid for the specific payment request. \nThis amount might include a rounding adjustment if the most recent invoice payment \nwas in cash in a currency that rounds cash payments (such as, `CAD` or `AUD`).", "x-read-only": true }, "rounding_adjustment_included_money": { "$ref": "#/definitions/Money", "description": "If the most recent payment was a cash payment \nin a currency that rounds cash payments (such as, `CAD` or `AUD`) and the payment \nis rounded from `computed_amount_money` in the payment request, then this \nfield specifies the rounding adjustment applied. This amount \nmight be negative.", "x-read-only": true } }, "description": "Represents a payment request for an [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice). Invoices can specify a maximum\nof 13 payment requests, with up to 12 `INSTALLMENT` request types. For more information, \nsee [Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).\n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).", "x-release-status": "PUBLIC" }, "InvoiceQuery": { "type": "object", "required": [ "filter" ], "properties": { "filter": { "$ref": "#/definitions/InvoiceFilter", "description": "Query filters to apply in searching invoices. \nFor more information, see [Search for invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices#search-invoices)." }, "sort": { "$ref": "#/definitions/InvoiceSort", "description": "Describes the sort order for the search result." } }, "description": "Describes query criteria for searching invoices.", "x-release-status": "PUBLIC" }, "InvoiceRecipient": { "type": "object", "properties": { "customer_id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The ID of the customer. This is the customer profile ID that \nyou provide when creating a draft invoice." }, "given_name": { "type": "string", "description": "The recipient\u0027s given (that is, first) name.", "x-read-only": true }, "family_name": { "type": "string", "description": "The recipient\u0027s family (that is, last) name.", "x-read-only": true }, "email_address": { "type": "string", "description": "The recipient\u0027s email address.", "x-read-only": true }, "address": { "$ref": "#/definitions/Address", "description": "The recipient\u0027s physical address.", "x-read-only": true }, "phone_number": { "type": "string", "description": "The recipient\u0027s phone number.", "x-read-only": true }, "company_name": { "type": "string", "description": "The name of the recipient\u0027s company.", "x-read-only": true }, "tax_ids": { "$ref": "#/definitions/InvoiceRecipientTaxIds", "description": "The recipient\u0027s tax IDs. The country of the seller account determines whether this field \nis available for the customer. For more information, see [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).", "x-read-only": true } }, "description": "Represents a snapshot of customer data. This object stores customer data that is displayed on the invoice \nand that Square uses to deliver the invoice.\n\nWhen you provide a customer ID for a draft invoice, Square retrieves the associated customer profile and populates \nthe remaining `InvoiceRecipient` fields. You cannot update these fields after the invoice is published. \nSquare updates the customer ID in response to a merge operation, but does not update other fields.", "x-release-status": "PUBLIC" }, "InvoiceRecipientTaxIds": { "type": "object", "properties": { "eu_vat": { "type": "string", "description": "The EU VAT identification number for the invoice recipient. For example, `IE3426675K`.", "x-read-only": true } }, "description": "Represents the tax IDs for an invoice recipient. The country of the seller account determines \nwhether the corresponding `tax_ids` field is available for the customer. For more information, \nsee [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).", "x-release-status": "PUBLIC" }, "InvoiceSort": { "type": "object", "required": [ "field" ], "properties": { "field": { "type": "string", "description": "The field to use for sorting." }, "order": { "type": "string", "description": "The order to use for sorting the results." } }, "description": "Identifies the sort field and sort order.", "x-release-status": "PUBLIC" }, "ItemVariationLocationOverrides": { "type": "object", "properties": { "location_id": { "type": "string", "description": "The ID of the `Location`. This can include locations that are deactivated." }, "price_money": { "$ref": "#/definitions/Money", "description": "The price of the `CatalogItemVariation` at the given `Location`, or blank for variable pricing." }, "pricing_type": { "type": "string", "description": "The pricing type (fixed or variable) for the `CatalogItemVariation` at the given `Location`." }, "track_inventory": { "type": "boolean", "description": "If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`." }, "inventory_alert_type": { "type": "string", "description": "Indicates whether the `CatalogItemVariation` displays an alert when its inventory\nquantity is less than or equal to its `inventory_alert_threshold`." }, "inventory_alert_threshold": { "type": "integer", "format": "int64", "description": "If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`\nis `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.\n\nThis value is always an integer." }, "sold_out": { "type": "boolean", "description": "Indicates whether the overridden item variation is sold out at the specified location.\n\nWhen inventory tracking is enabled on the item variation either globally or at the specified location,\nthe item variation is automatically marked as sold out when its inventory count reaches zero. The seller\ncan manually set the item variation as sold out even when the inventory count is greater than zero.\nAttempts by an application to set this attribute are ignored. Regardless how the sold-out status is set,\napplications should treat its inventory count as zero when this attribute value is `true`.", "x-read-only": true }, "sold_out_valid_until": { "type": "string", "description": "The seller-assigned timestamp, of the RFC 3339 format, to indicate when this sold-out variation\nbecomes available again at the specified location. Attempts by an application to set this attribute are ignored.\nWhen the current time is later than this attribute value, the affected item variation is no longer sold out.", "x-read-only": true } }, "description": "Price and inventory alerting overrides for a `CatalogItemVariation` at a specific `Location`.", "x-release-status": "PUBLIC" }, "JobAssignment": { "type": "object", "required": [ "job_title", "pay_type" ], "properties": { "job_title": { "minLength": 1, "type": "string", "description": "The title of the job." }, "pay_type": { "type": "string", "description": "The current pay type for the job assignment used to\ncalculate the pay amount in a pay period." }, "hourly_rate": { "$ref": "#/definitions/Money", "description": "The hourly pay rate of the job." }, "annual_rate": { "$ref": "#/definitions/Money", "description": "The total pay amount for a 12-month period on the job. Set if the job `PayType` is `SALARY`." }, "weekly_hours": { "type": "integer", "description": "The planned hours per week for the job. Set if the job `PayType` is `SALARY`." } }, "description": "An object describing a job that a team member is assigned to.", "x-release-status": "PUBLIC" }, "LinkCustomerToGiftCardRequest": { "type": "object", "required": [ "customer_id" ], "properties": { "customer_id": { "minLength": 1, "maxLength": 191, "type": "string", "description": "The ID of the customer to link to the gift card." } }, "description": "A request to link a customer to a gift card.", "x-release-status": "PUBLIC", "example": { "request_params": "?gift_card_id\u003dgftc:71ea002277a34f8a945e284b04822edb", "request_body": { "customer_id": "GKY0FZ3V717AH8Q2D821PNT2ZW" } } }, "LinkCustomerToGiftCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_card": { "$ref": "#/definitions/GiftCard", "description": "The gift card with the ID of the linked customer listed in the `customer_ids` field." } }, "description": "A response that contains the linked `GiftCard` object. If the request resulted in errors, \nthe response contains a set of `Error` objects.", "x-release-status": "PUBLIC", "example": { "gift_card": { "id": "gftc:71ea002277a34f8a945e284b04822edb", "type": "DIGITAL", "gan_source": "SQUARE", "state": "ACTIVE", "balance_money": { "amount": 2500, "currency": "USD" }, "gan": "7783320005440920", "created_at": "2021-03-25T05:13:01Z", "customer_ids": [ "GKY0FZ3V717AH8Q2D821PNT2ZW" ] } } }, "ListBankAccountsRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "The pagination cursor returned by a previous call to this endpoint.\nUse it in the next `ListBankAccounts` request to retrieve the next set \nof results.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." }, "limit": { "type": "integer", "description": "Upper limit on the number of bank accounts to return in the response. \nCurrently, 1000 is the largest supported limit. You can specify a limit \nof up to 1000 bank accounts. This is also the default limit." }, "location_id": { "type": "string", "description": "Location ID. You can specify this optional filter \nto retrieve only the linked bank accounts belonging to a specific location." } }, "description": "Request object for fetching all `BankAccount`\nobjects linked to a account.", "x-release-status": "PUBLIC" }, "ListBankAccountsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "bank_accounts": { "type": "array", "items": { "$ref": "#/definitions/BankAccount" }, "description": "List of BankAccounts associated with this account." }, "cursor": { "type": "string", "description": "When a response is truncated, it includes a cursor that you can \nuse in a subsequent request to fetch next set of bank accounts.\nIf empty, this is the final response.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." } }, "description": "Response object returned by ListBankAccounts.", "x-release-status": "PUBLIC", "example": { "bank_accounts": [ { "id": "ao6iaQ9vhDiaQD7n3GB", "account_number_suffix": "971", "country": "US", "currency": "USD", "account_type": "CHECKING", "holder_name": "Jane Doe", "primary_bank_identification_number": "112200303", "location_id": "S8GWD5example", "status": "VERIFICATION_IN_PROGRESS", "creditable": false, "debitable": false, "version": 5, "bank_name": "Bank Name" }, { "id": "4x7WXuaxrkQkVlka3GB", "account_number_suffix": "972", "country": "US", "currency": "USD", "account_type": "CHECKING", "holder_name": "Jane Doe", "primary_bank_identification_number": "112200303", "location_id": "S8GWD5example", "status": "VERIFICATION_IN_PROGRESS", "creditable": false, "debitable": false, "version": 5, "bank_name": "Bank Name" } ] } }, "ListBookingCustomAttributeDefinitionsRequest": { "type": "object", "properties": { "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Represents a [ListBookingCustomAttributeDefinitions](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/list-booking-custom-attribute-definitions) request.", "x-release-status": "PUBLIC", "example": { "pathParameters": { "limit": 5 } } }, "ListBookingCustomAttributeDefinitionsResponse": { "type": "object", "properties": { "custom_attribute_definitions": { "type": "array", "items": { "$ref": "#/definitions/CustomAttributeDefinition" }, "description": "The retrieved custom attribute definitions. If no custom attribute definitions are found,\nSquare returns an empty object (`{}`)." }, "cursor": { "type": "string", "description": "The cursor to provide in your next call to this endpoint to retrieve the next page of\nresults for your original request. This field is present only if the request succeeded and\nadditional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [ListBookingCustomAttributeDefinitions](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/list-booking-custom-attribute-definitions) response.\nEither `custom_attribute_definitions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definitions": [ { "key": "favoriteShampoo", "name": "Favorite shampoo", "description": "Update the description as desired.", "version": 3, "updated_at": "2022-11-16T15:39:38Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-11-16T15:27:30Z", "visibility": "VISIBILITY_READ_ONLY" }, { "key": "partySize", "name": "Party size", "description": "Number of people in the party for dine-in", "version": 1, "updated_at": "2022-11-16T15:49:05Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "created_at": "2022-11-16T15:49:05Z", "visibility": "VISIBILITY_HIDDEN" } ], "errors": [], "cursor": "YEk4UPbUEsu8MUV0xouO5hCiFcD9T5ztB6UWEJq5vZnqBFmoBEi0j1j6HWYTFGMRre4p7T5wAQBj3Th1NX3XgBFcQVEVsIxUQ2NsbwjRitfoEZDml9uxxQXepowyRvCuSThHPbJSn7M7wInl3x8XypQF9ahVVQXegJ0CxEKc0SBH" } }, "ListBookingCustomAttributesRequest": { "type": "object", "properties": { "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "with_definitions": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`." } }, "description": "Represents a [ListBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/list-booking-custom-attributes) request.", "x-release-status": "PUBLIC", "example": { "pathParameters": { "booking_id": "Z57QXKM2FGXEQDV42W8RBZY7BR" } } }, "ListBookingCustomAttributesResponse": { "type": "object", "properties": { "custom_attributes": { "type": "array", "items": { "$ref": "#/definitions/CustomAttribute" }, "description": "The retrieved custom attributes. If `with_definitions` was set to `true` in the request,\nthe custom attribute definition is returned in the `definition` field of each custom attribute.\n\nIf no custom attributes are found, Square returns an empty object (`{}`)." }, "cursor": { "type": "string", "description": "The cursor to use in your next call to this endpoint to retrieve the next page of results\nfor your original request. This field is present only if the request succeeded and additional\nresults are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [ListBookingCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/list-booking-custom-attributes) response.\nEither `custom_attributes`, an empty object, or `errors` is present in the response. If additional\nresults are available, the `cursor` field is also present along with `custom_attributes`.", "x-release-status": "PUBLIC", "example": { "custom_attributes": [ { "key": "favoriteShampoo", "version": 1, "updated_at": "2022-11-16T15:50:27Z", "value": "Hydro-Cool", "created_at": "2022-11-16T15:50:27Z", "visibility": "VISIBILITY_READ_ONLY" }, { "key": "hasShoes", "version": 1, "updated_at": "2022-11-16T15:51:53Z", "value": false, "created_at": "2022-11-16T15:51:53Z", "visibility": "VISIBILITY_HIDDEN" } ], "errors": [] } }, "ListBookingsRequest": { "type": "object", "properties": { "limit": { "maximum": 10000, "minimum": 1, "type": "integer", "description": "The maximum number of results per page to return in a paged response." }, "cursor": { "minLength": 0, "maxLength": 65536, "type": "string", "description": "The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results." }, "customer_id": { "minLength": 0, "maxLength": 192, "type": "string", "description": "The [customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved." }, "team_member_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved." }, "location_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "The location for which to retrieve bookings. If this is not set, all locations\u0027 bookings are retrieved." }, "start_at_min": { "type": "string", "description": "The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used." }, "start_at_max": { "type": "string", "description": "The RFC 3339 timestamp specifying the latest of the start time. If this is not set, the time of 31 days after `start_at_min` is used." } }, "description": "", "x-release-status": "PUBLIC" }, "ListBookingsResponse": { "type": "object", "properties": { "bookings": { "type": "array", "items": { "$ref": "#/definitions/Booking" }, "description": "The list of targeted bookings." }, "cursor": { "minLength": 0, "maxLength": 65536, "type": "string", "description": "The pagination cursor to be used in the subsequent request to get the next page of the results. Stop retrieving the next page of the results when the cursor is not set." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "bookings": [ { "id": "zkras0xv0xwswx", "version": 1, "status": "ACCEPTED", "created_at": "2020-10-28T15:47:41Z", "updated_at": "2020-10-28T15:49:25Z", "location_id": "LEQHH0YY8B42M", "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M", "customer_note": "", "seller_note": "", "start_at": "2020-11-26T13:00:00Z", "appointment_segments": [ { "duration_minutes": 60, "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_version": 1599775456731 } ] } ], "errors": [], "cursor": null } }, "ListBreakTypesRequest": { "type": "object", "properties": { "location_id": { "type": "string", "description": "Filter the returned `BreakType` results to only those that are associated with the\nspecified location." }, "limit": { "maximum": 200, "minimum": 1, "type": "integer", "description": "The maximum number of `BreakType` results to return per page. The number can range between 1\nand 200. The default is 200." }, "cursor": { "type": "string", "description": "A pointer to the next page of `BreakType` results to fetch." } }, "description": "A request for a filtered set of `BreakType` objects.", "x-release-status": "PUBLIC", "example": { "request_params": "?location_id\u003dPAA1RJZZKXBFG\u0026limit\u003d2\u0026cursor\u003ds4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED" } }, "ListBreakTypesResponse": { "type": "object", "properties": { "break_types": { "type": "array", "items": { "$ref": "#/definitions/BreakType" }, "description": " A page of `BreakType` results." }, "cursor": { "type": "string", "description": "The value supplied in the subsequent request to fetch the next page\nof `BreakType` results." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request for a set of `BreakType` objects. The response contains\nthe requested `BreakType` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "break_types": [ { "id": "REGS1EQR1TPZ5", "location_id": "PAA1RJZZKXBFG", "break_name": "Coffee Break", "expected_duration": "PT5M", "is_paid": false, "version": 1, "created_at": "2019-01-22T20:47:37Z", "updated_at": "2019-01-22T20:47:37Z" }, { "id": "92EPDRQKJ5088", "location_id": "PAA1RJZZKXBFG", "break_name": "Lunch Break", "expected_duration": "PT1H", "is_paid": true, "version": 3, "created_at": "2019-01-25T19:26:30Z", "updated_at": "2019-01-25T19:26:30Z" } ], "cursor": "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED" } }, "ListCardsRequest": { "type": "object", "properties": { "cursor": { "maxLength": 256, "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." }, "customer_id": { "type": "string", "description": "Limit results to cards associated with the customer supplied.\nBy default, all cards owned by the merchant are returned." }, "include_disabled": { "type": "boolean", "description": "Includes disabled cards.\nBy default, all enabled cards owned by the merchant are returned." }, "reference_id": { "type": "string", "description": "Limit results to cards associated with the reference_id supplied." }, "sort_order": { "type": "string", "description": "Sorts the returned list by when the card was created with the specified order.\nThis field defaults to ASC." } }, "description": "Retrieves details for a specific Card. Accessible via\nHTTP requests at GET https://connect.squareup.com/v2/cards", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListCardsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "cards": { "type": "array", "items": { "$ref": "#/definitions/Card" }, "description": "The requested list of `Card`s." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty,\nthis is the final response.\n\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." } }, "description": "Defines the fields that are included in the response body of\na request to the [ListCards](https://developer.squareup.com/reference/square_2024-04-17/cards-api/list-cards) endpoint.\n\nNote: if there are errors processing the request, the card field will not be\npresent.", "x-release-status": "PUBLIC", "example": { "cards": [ { "id": "ccof:uIbfJXhXETSP197M3GB", "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", "bin": "411111", "card_brand": "VISA", "card_type": "CREDIT", "cardholder_name": "Amelia Earhart", "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", "enabled": true, "exp_month": 11, "exp_year": 2022, "last_4": "1111", "merchant_id": "6SSW7HV8K2ST5", "prepaid_type": "NOT_PREPAID", "reference_id": "user-id-1", "version": 1 } ] } }, "ListCashDrawerShiftEventsRequest": { "type": "object", "required": [ "location_id" ], "properties": { "location_id": { "minLength": 1, "type": "string", "description": "The ID of the location to list cash drawer shifts for." }, "limit": { "maximum": 1000, "type": "integer", "description": "Number of resources to be returned in a page of results (200 by\ndefault, 1000 max)." }, "cursor": { "type": "string", "description": "Opaque cursor for fetching the next page of results." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListCashDrawerShiftEventsResponse": { "type": "object", "properties": { "cursor": { "type": "string", "description": "Opaque cursor for fetching the next page. Cursor is not present in\nthe last page of results." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "cash_drawer_shift_events": { "type": "array", "items": { "$ref": "#/definitions/CashDrawerShiftEvent" }, "description": "All of the events (payments, refunds, etc.) for a cash drawer during\nthe shift." } }, "description": "", "x-release-status": "PUBLIC", "example": { "cash_drawer_shift_events": [ { "id": "9F07DB01-D85A-4B77-88C3-D5C64CEB5155", "event_type": "CASH_TENDER_PAYMENT", "event_money": { "amount": 100, "currency": "USD" }, "created_at": "2019-11-22T00:43:02.000Z", "description": "", "team_member_id": "" }, { "id": "B2854CEA-A781-49B3-8F31-C64558231F48", "event_type": "CASH_TENDER_PAYMENT", "event_money": { "amount": 250, "currency": "USD" }, "created_at": "2019-11-22T00:43:12.000Z", "description": "", "team_member_id": "" }, { "id": "B5FB7F72-95CD-44A3-974D-26C41064D042", "event_type": "CASH_TENDER_CANCELLED_PAYMENT", "event_money": { "amount": 250, "currency": "USD" }, "created_at": "2019-11-22T00:43:23.000Z", "description": "", "team_member_id": "" }, { "id": "0B425480-8504-40B4-A867-37B23543931B", "event_type": "CASH_TENDER_REFUND", "event_money": { "amount": 100, "currency": "USD" }, "created_at": "2019-11-22T00:43:46.000Z", "description": "", "team_member_id": "" }, { "id": "8C66E60E-FDCF-4EEF-A98D-3B14B7ED5CBE", "event_type": "PAID_IN", "event_money": { "amount": 10000, "currency": "USD" }, "created_at": "2019-11-22T00:44:18.000Z", "description": "Transfer from another drawer", "team_member_id": "" }, { "id": "D5ACA7FE-C64D-4ADA-8BC8-82118A2DAE4F", "event_type": "PAID_OUT", "event_money": { "amount": 10000, "currency": "USD" }, "created_at": "2019-11-22T00:44:29.000Z", "description": "Transfer out to another drawer", "team_member_id": "" } ] } }, "ListCashDrawerShiftsRequest": { "type": "object", "required": [ "location_id" ], "properties": { "location_id": { "minLength": 1, "type": "string", "description": "The ID of the location to query for a list of cash drawer shifts." }, "sort_order": { "type": "string", "description": "The order in which cash drawer shifts are listed in the response,\nbased on their opened_at field. Default value: ASC" }, "begin_time": { "type": "string", "description": "The inclusive start time of the query on opened_at, in ISO 8601 format." }, "end_time": { "type": "string", "description": "The exclusive end date of the query on opened_at, in ISO 8601 format." }, "limit": { "maximum": 1000, "type": "integer", "description": "Number of cash drawer shift events in a page of results (200 by\ndefault, 1000 max)." }, "cursor": { "type": "string", "description": "Opaque cursor for fetching the next page of results." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListCashDrawerShiftsResponse": { "type": "object", "properties": { "cursor": { "type": "string", "description": "Opaque cursor for fetching the next page of results. Cursor is not\npresent in the last page of results." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "cash_drawer_shifts": { "type": "array", "items": { "$ref": "#/definitions/CashDrawerShiftSummary" }, "description": "A collection of CashDrawerShiftSummary objects for shifts that match\nthe query." } }, "description": "", "x-release-status": "PUBLIC", "example": { "cash_drawer_shifts": [ { "id": "DCC99978-09A6-4926-849F-300BE9C5793A", "state": "CLOSED", "opened_at": "2019-11-22T00:42:54.000Z", "ended_at": "2019-11-22T00:44:49.000Z", "closed_at": "2019-11-22T00:44:49.000Z", "description": "Misplaced some change", "opened_cash_money": { "amount": 10000, "currency": "USD" }, "expected_cash_money": { "amount": 10000, "currency": "USD" }, "closed_cash_money": { "amount": 9970, "currency": "USD" } } ] } }, "ListCatalogRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "The pagination cursor returned in the previous response. Leave unset for an initial request.\nThe page size is currently set to be 100.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." }, "types": { "type": "string", "description": "An optional case-insensitive, comma-separated list of object types to retrieve.\n\nThe valid values are defined in the [CatalogObjectType](https://developer.squareup.com/reference/square_2024-04-17/enums/CatalogObjectType) enum, for example,\n`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,\n`MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.\n\nIf this is unspecified, the operation returns objects of all the top level types at the version\nof the Square API used to make the request. Object types that are nested onto other object types\nare not included in the defaults.\n\nAt the current API version the default object types are:\nITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST, \nPRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,\nSUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The specific version of the catalog objects to be included in the response.\nThis allows you to retrieve historical versions of objects. The specified version value is matched against\nthe [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s\u0027 `version` attribute. If not included, results will be from the\ncurrent version of the catalog.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_params": "?types\u003dcategory,tax" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.python", "csharp": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.csharp", "java": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.java", "php": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.php", "javascript": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.javascript", "ruby": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.ruby" } }, "ListCatalogResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If unset, this is the final response.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." }, "objects": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "The CatalogObjects returned." } }, "description": "", "x-release-status": "PUBLIC", "example": { "objects": [ { "type": "CATEGORY", "id": "5ZYQZZ2IECPVJ2IJ5KQPRDC3", "updated_at": "2017-02-21T14:50:26.495Z", "version": 1487688626495, "is_deleted": false, "present_at_all_locations": true, "category_data": { "name": "Beverages" } }, { "type": "TAX", "id": "L5R47DGBZOOVKCAFIXC56AEN", "updated_at": "2017-02-21T14:50:26.495Z", "version": 1487688626495, "is_deleted": false, "present_at_all_locations": true, "tax_data": { "name": "Sales Tax", "calculation_phase": "TAX_SUBTOTAL_PHASE", "inclusion_type": "ADDITIVE", "percentage": "5.0", "enabled": true } } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/ListCatalog/ListCatalogResponse.python", "csharp": "/sdk_samples/Catalog/ListCatalog/ListCatalogResponse.csharp", "java": "/sdk_samples/Catalog/ListCatalog/ListCatalogResponse.java", "php": "/sdk_samples/Catalog/ListCatalog/ListCatalogResponse.php", "javascript": "/sdk_samples/Catalog/ListCatalog/ListCatalogResponse.javascript", "ruby": "/sdk_samples/Catalog/ListCatalog/ListCatalogResponse.ruby" } }, "ListCustomerCustomAttributeDefinitionsRequest": { "type": "object", "properties": { "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Represents a [ListCustomerCustomAttributeDefinitions](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/list-customer-custom-attribute-definitions) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?limit\u003d2" } }, "ListCustomerCustomAttributeDefinitionsResponse": { "type": "object", "properties": { "custom_attribute_definitions": { "type": "array", "items": { "$ref": "#/definitions/CustomAttributeDefinition" }, "description": "The retrieved custom attribute definitions. If no custom attribute definitions are found,\nSquare returns an empty object (`{}`)." }, "cursor": { "type": "string", "description": "The cursor to provide in your next call to this endpoint to retrieve the next page of\nresults for your original request. This field is present only if the request succeeded and\nadditional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [ListCustomerCustomAttributeDefinitions](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/list-customer-custom-attribute-definitions) response.\nEither `custom_attribute_definitions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definitions": [ { "key": "favoritemovie", "name": "Favorite Movie", "description": "Update the description as desired.", "version": 3, "updated_at": "2022-04-26T15:39:38Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-04-26T15:27:30Z", "visibility": "VISIBILITY_READ_ONLY" }, { "key": "ownsmovie", "name": "Owns Movie", "description": "Customer owns movie.", "version": 1, "updated_at": "2022-04-26T15:49:05Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" }, "created_at": "2022-04-26T15:49:05Z", "visibility": "VISIBILITY_HIDDEN" } ], "cursor": "YEk4UPbUEsu8MUV0xouO5hCiFcD9T5ztB6UWEJq5vZnqBFmoBEi0j1j6HWYTFGMRre4p7T5wAQBj3Th1NX3XgBFcQVEVsIxUQ2NsbwjRitfoEZDml9uxxQXepowyRvCuSThHPbJSn7M7wInl3x8XypQF9ahVVQXegJ0CxEKc0SBH" } }, "ListCustomerCustomAttributesRequest": { "type": "object", "properties": { "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "with_definitions": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`." } }, "description": "Represents a [ListCustomerCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/list-customer-custom-attributes) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?customer_id\u003dZ57QXKM2FGXEQDV42W8RBZY7BR" } }, "ListCustomerCustomAttributesResponse": { "type": "object", "properties": { "custom_attributes": { "type": "array", "items": { "$ref": "#/definitions/CustomAttribute" }, "description": "The retrieved custom attributes. If `with_definitions` was set to `true` in the request,\nthe custom attribute definition is returned in the `definition` field of each custom attribute.\n\nIf no custom attributes are found, Square returns an empty object (`{}`)." }, "cursor": { "type": "string", "description": "The cursor to use in your next call to this endpoint to retrieve the next page of results\nfor your original request. This field is present only if the request succeeded and additional\nresults are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [ListCustomerCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/list-customer-custom-attributes) response.\nEither `custom_attributes`, an empty object, or `errors` is present in the response. If additional\nresults are available, the `cursor` field is also present along with `custom_attributes`.", "x-release-status": "PUBLIC", "example": { "custom_attributes": [ { "key": "favoritemovie", "version": 1, "updated_at": "2022-04-26T15:50:27Z", "value": "Dune", "created_at": "2022-04-26T15:50:27Z", "visibility": "VISIBILITY_READ_ONLY" }, { "key": "ownsmovie", "version": 1, "updated_at": "2022-04-26T15:51:53Z", "value": false, "created_at": "2022-04-26T15:51:53Z", "visibility": "VISIBILITY_HIDDEN" } ] } }, "ListCustomerGroupsRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "maximum": 50, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the limit is less than 1 or greater than 50, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the query parameters that can be included in a request to the\n[ListCustomerGroups](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/list-customer-groups) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListCustomerGroupsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "groups": { "type": "array", "items": { "$ref": "#/definitions/CustomerGroup" }, "description": "A list of customer groups belonging to the current seller." }, "cursor": { "type": "string", "description": "A pagination cursor to retrieve the next set of results for your\noriginal query to the endpoint. This value is present only if the request\nsucceeded and additional results are available.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the fields that are included in the response body of\na request to the [ListCustomerGroups](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/list-customer-groups) endpoint.\n\nEither `errors` or `groups` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "groups": [ { "id": "2TAT3CMH4Q0A9M87XJZED0WMR3", "name": "Loyal Customers", "created_at": "2020-04-13T21:54:57.863Z", "updated_at": "2020-04-13T21:54:58Z" }, { "id": "4XMEHESXJBNE9S9JAKZD2FGB14", "name": "Super Loyal Customers", "created_at": "2020-04-13T21:55:18.795Z", "updated_at": "2020-04-13T21:55:19Z" } ] } }, "ListCustomerSegmentsRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "A pagination cursor returned by previous calls to `ListCustomerSegments`.\nThis cursor is used to retrieve the next set of query results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "maximum": 50, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the specified limit is less than 1 or greater than 50, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the valid parameters for requests to the `ListCustomerSegments` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListCustomerSegmentsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "segments": { "type": "array", "items": { "$ref": "#/definitions/CustomerSegment" }, "description": "The list of customer segments belonging to the associated Square account." }, "cursor": { "type": "string", "description": "A pagination cursor to be used in subsequent calls to `ListCustomerSegments`\nto retrieve the next set of query results. The cursor is only present if the request succeeded and\nadditional results are available.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the fields that are included in the response body for requests to the `ListCustomerSegments` endpoint.\n\nEither `errors` or `segments` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "segments": [ { "id": "GMNXRZVEXNQDF.CHURN_RISK", "name": "Lapsed", "created_at": "2020-01-09T19:33:24.469Z", "updated_at": "2020-04-13T21:47:04Z" }, { "id": "GMNXRZVEXNQDF.LOYAL", "name": "Regulars", "created_at": "2020-01-09T19:33:24.486Z", "updated_at": "2020-04-13T21:47:04Z" }, { "id": "GMNXRZVEXNQDF.REACHABLE", "name": "Reachable", "created_at": "2020-01-09T19:33:21.813Z", "updated_at": "2020-04-13T21:47:04Z" }, { "id": "gv2:KF92J19VXN5FK30GX2E8HSGQ20", "name": "Instant Profile", "created_at": "2020-01-09T19:33:25Z", "updated_at": "2020-04-13T23:01:03Z" } ] } }, "ListCustomersRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the specified limit is less than 1 or greater than 100, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "sort_field": { "type": "string", "description": "Indicates how customers should be sorted.\n\nThe default value is `DEFAULT`." }, "sort_order": { "type": "string", "description": "Indicates whether customers should be sorted in ascending (`ASC`) or\ndescending (`DESC`) order.\n\nThe default value is `ASC`." }, "count": { "type": "boolean", "description": "Indicates whether to return the total count of customers in the `count` field of the response.\n\nThe default value is `false`." } }, "description": "Defines the query parameters that can be included in a request to the\n`ListCustomers` endpoint.", "x-release-status": "PUBLIC", "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ListCustomers/ListCustomersRequest.python", "csharp": "/sdk_samples/ListCustomers/ListCustomersRequest.csharp", "java": "/sdk_samples/ListCustomers/ListCustomersRequest.java", "php": "/sdk_samples/ListCustomers/ListCustomersRequest.php", "javascript": "/sdk_samples/ListCustomers/ListCustomersRequest.javascript", "ruby": "/sdk_samples/ListCustomers/ListCustomersRequest.ruby" } }, "ListCustomersResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "customers": { "type": "array", "items": { "$ref": "#/definitions/Customer" }, "description": "The customer profiles associated with the Square account or an empty object (`{}`) if none are found.\nOnly customer profiles with public information (`given_name`, `family_name`, `company_name`, `email_address`, or\n`phone_number`) are included in the response." }, "cursor": { "type": "string", "description": "A pagination cursor to retrieve the next set of results for the\noriginal query. A cursor is only present if the request succeeded and additional results\nare available.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "count": { "type": "integer", "format": "int64", "description": "The total count of customers associated with the Square account. Only customer profiles with public information\n(`given_name`, `family_name`, `company_name`, `email_address`, or `phone_number`) are counted. This field is present\nonly if `count` is set to `true` in the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `ListCustomers` endpoint.\n\nEither `errors` or `customers` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "customers": [ { "id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2016-03-23T20:21:54.859Z", "updated_at": "2016-03-23T20:21:55Z", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-555-4240", "reference_id": "YOUR_REFERENCE_ID", "note": "a customer", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "group_ids": [ "545AXB44B4XXWMVQ4W8SBT3HHF" ], "segment_ids": [ "1KB9JE5EGJXCW.REACHABLE" ], "version": 1 } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ListCustomers/ListCustomersResponse.python", "csharp": "/sdk_samples/ListCustomers/ListCustomersResponse.csharp", "java": "/sdk_samples/ListCustomers/ListCustomersResponse.java", "php": "/sdk_samples/ListCustomers/ListCustomersResponse.php", "javascript": "/sdk_samples/ListCustomers/ListCustomersResponse.javascript", "ruby": "/sdk_samples/ListCustomers/ListCustomersResponse.ruby" } }, "ListDeviceCodesRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information." }, "location_id": { "type": "string", "description": "If specified, only returns DeviceCodes of the specified location.\nReturns DeviceCodes of all locations if empty." }, "product_type": { "type": "string", "description": "If specified, only returns DeviceCodes targeting the specified product type.\nReturns DeviceCodes of all product types if empty." }, "status": { "type": "array", "items": { "type": "string" }, "description": "If specified, returns DeviceCodes with the specified statuses.\nReturns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListDeviceCodesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "device_codes": { "type": "array", "items": { "$ref": "#/definitions/DeviceCode" }, "description": "The queried DeviceCode." }, "cursor": { "type": "string", "description": "A pagination cursor to retrieve the next set of results for your\noriginal query to the endpoint. This value is present only if the request\nsucceeded and additional results are available.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "device_codes": [ { "id": "B3Z6NAMYQSMTM", "name": "Counter 1", "code": "EBCARJ", "product_type": "TERMINAL_API", "location_id": "B5E4484SHHNYH", "created_at": "2020-02-06T18:44:33.000Z", "pair_by": "2020-02-06T18:49:33.000Z", "status": "PAIRED", "device_id": "907CS13101300122", "status_changed_at": "2020-02-06T18:47:28.000Z" }, { "id": "YKGMJMYK8H4PQ", "name": "Unused device code", "code": "GVXNYN", "product_type": "TERMINAL_API", "location_id": "A6SYFRSV4WAFW", "pair_by": "2020-02-07T20:00:04.000Z", "created_at": "2020-02-07T19:55:04.000Z", "status": "UNPAIRED", "status_changed_at": "2020-02-07T19:55:04.000Z" } ] } }, "ListDevicesRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." }, "sort_order": { "type": "string", "description": "The order in which results are listed.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default)." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The number of results to return in a single page." }, "location_id": { "type": "string", "description": "If present, only returns devices at the target location." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": {} } }, "ListDevicesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors that occurred during the request." }, "devices": { "type": "array", "items": { "$ref": "#/definitions/Device" }, "description": "The requested list of `Device` objects." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty,\nthis is the final response.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "devices": [ { "id": "device:995CS397A6475287", "attributes": { "type": "TERMINAL", "manufacturer": "Square", "model": "T2", "name": "Square Terminal 995", "manufacturers_id": "995CS397A6475287", "updated_at": "2023-09-29T13:04:56.335762883Z", "version": "5.41.0085", "merchant_token": "MLCHNZCBWFDZB" }, "components": [ { "type": "APPLICATION", "application_details": { "application_type": "TERMINAL_API", "version": "6.25", "session_location": "LMN2K7S3RTOU3" } }, { "type": "CARD_READER", "card_reader_details": { "version": "3.53.70" } }, { "type": "BATTERY", "battery_details": { "visible_percent": 5, "external_power": "AVAILABLE_CHARGING" } }, { "type": "WIFI", "wifi_details": { "active": true, "ssid": "Staff Network", "ip_address_v4": "10.0.0.7", "secure_connection": "WPA/WPA2 PSK", "signal_strength": { "value": 2 } } }, { "type": "ETHERNET", "ethernet_details": { "active": false } } ], "status": { "category": "AVAILABLE" } }, { "id": "device:995CS234B5493559", "attributes": { "type": "TERMINAL", "manufacturer": "Square", "model": "T2", "name": "Square Terminal 995", "manufacturers_id": "995CS234B5493559", "updated_at": "2023-09-29T12:39:56.335742073Z", "version": "5.41.0085", "merchant_token": "MLCHXZCBWFGDW" }, "components": [ { "type": "APPLICATION", "application_details": { "application_type": "TERMINAL_API", "version": "6.25", "session_location": "LMN2K7S3RTOU3" } }, { "type": "CARD_READER", "card_reader_details": { "version": "3.53.70" } }, { "type": "BATTERY", "battery_details": { "visible_percent": 24, "external_power": "AVAILABLE_CHARGING" } }, { "type": "WIFI", "wifi_details": { "active": true, "ssid": "Staff Network", "ip_address_v4": "10.0.0.7", "secure_connection": "WPA/WPA2 PSK", "signal_strength": { "value": 2 } } }, { "type": "ETHERNET", "ethernet_details": { "active": false } } ], "status": { "category": "NEEDS_ATTENTION" } } ], "cursor": "GcXjlV2iaizH7R0fMT6wUDbw6l4otigjzx8XOOspUKHo9EPLRByM" } }, "ListDisputeEvidenceRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the parameters for a `ListDisputeEvidence` request.", "x-release-status": "PUBLIC", "example": { "request_params": "?dispute_id\u003dbVTprrwk0gygTLZ96VX1oB", "request_body": {} } }, "ListDisputeEvidenceResponse": { "type": "object", "properties": { "evidence": { "type": "array", "items": { "$ref": "#/definitions/DisputeEvidence" }, "description": "The list of evidence previously uploaded to the specified dispute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request.\nIf unset, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the fields in a `ListDisputeEvidence` response.", "x-release-status": "PUBLIC", "example": { "evidence": [ { "dispute_id": "bVTprrwk0gygTLZ96VX1oB", "evidence_file": { "filename": "customer-interaction", "filetype": "JPG" }, "uploaded_at": "2022-05-10T15:57:13.802Z", "evidence_type": "CARDHOLDER_COMMUNICATION", "id": "CpfnkwGselCwS8QFvxN6" }, { "dispute_id": "bVTprrwk0gygTLZ96VX1oB", "evidence_file": { "filename": "", "filetype": "" }, "uploaded_at": "2022-05-18T16:01:10.000Z", "evidence_type": "REBUTTAL_EXPLANATION", "id": "TOomLInj6iWmP3N8qfCXrB" } ] } }, "ListDisputesRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "states": { "type": "array", "items": { "type": "string" }, "description": "The dispute states used to filter the result. If not specified, the endpoint returns all disputes." }, "location_id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The ID of the location for which to return a list of disputes.\nIf not specified, the endpoint returns disputes associated with all locations." } }, "description": "Defines the request parameters for the `ListDisputes` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListDisputesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "disputes": { "type": "array", "items": { "$ref": "#/definitions/Dispute" }, "description": "The list of disputes." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request.\nIf unset, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines fields in a `ListDisputes` response.", "x-release-status": "PUBLIC", "example": { "disputes": [ { "amount_money": { "amount": 2500, "currency": "USD" }, "reason": "NO_KNOWLEDGE", "state": "ACCEPTED", "due_at": "2022-07-13T00:00:00.000Z", "disputed_payment": { "payment_id": "zhyh1ch64kRBrrlfVhwjCEjZWzNZY" }, "card_brand": "VISA", "created_at": "2022-06-29T18:45:22.265Z", "updated_at": "2022-07-07T19:14:42.650Z", "brand_dispute_id": "100000809947", "version": 2, "location_id": "L1HN3ZMQK64X9", "id": "XDgyFu7yo1E2S5lQGGpYn", "reported_at": "2022-06-29T00:00:00.000Z" }, { "amount_money": { "amount": 2209, "currency": "USD" }, "reason": "NOT_AS_DESCRIBED", "state": "EVIDENCE_REQUIRED", "due_at": "2022-05-13T00:00:00.000Z", "disputed_payment": { "payment_id": "zhyh1ch64kRBrrlfVhwjCEjZWzNZY" }, "card_brand": "VISA", "created_at": "2022-04-29T18:45:22.265Z", "updated_at": "2022-04-29T18:45:22.265Z", "brand_dispute_id": "r5Of6YaGT7AdeRaVoAGCJw", "version": 1, "location_id": "18YC4JDH91E1H", "id": "jLGg7aXC7lvKPr9PISt0T", "reported_at": "2022-04-29T00:00:00.000Z" } ], "cursor": "G1aSTRm48CLjJsg6Sg3hQN1b1OMaoVuG" } }, "ListEmployeeWagesRequest": { "type": "object", "properties": { "employee_id": { "type": "string", "description": "Filter the returned wages to only those that are associated with the specified employee." }, "limit": { "maximum": 200, "minimum": 1, "type": "integer", "description": "The maximum number of `EmployeeWage` results to return per page. The number can range between\n1 and 200. The default is 200." }, "cursor": { "type": "string", "description": "A pointer to the next page of `EmployeeWage` results to fetch." } }, "description": "A request for a set of `EmployeeWage` objects.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "request_params": "?employee_id\u003d33fJchumvVdJwxV0H6L9\u0026limit\u003d4\u0026cursor\u003ds4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED" } }, "ListEmployeeWagesResponse": { "type": "object", "properties": { "employee_wages": { "type": "array", "items": { "$ref": "#/definitions/EmployeeWage" }, "description": "A page of `EmployeeWage` results." }, "cursor": { "type": "string", "description": "The value supplied in the subsequent request to fetch the next page\nof `EmployeeWage` results." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request for a set of `EmployeeWage` objects. The response contains\na set of `EmployeeWage` objects.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "employee_wages": [ { "id": "pXS3qCv7BERPnEGedM4S8mhm", "employee_id": "33fJchumvVdJwxV0H6L9", "title": "Manager", "hourly_rate": { "amount": 3250, "currency": "USD" } }, { "id": "rZduCkzYDUVL3ovh1sQgbue6", "employee_id": "33fJchumvVdJwxV0H6L9", "title": "Cook", "hourly_rate": { "amount": 2600, "currency": "USD" } }, { "id": "FxLbs5KpPUHa8wyt5ctjubDX", "employee_id": "33fJchumvVdJwxV0H6L9", "title": "Barista", "hourly_rate": { "amount": 1600, "currency": "USD" } }, { "id": "vD1wCgijMDR3cX5TPnu7VXto", "employee_id": "33fJchumvVdJwxV0H6L9", "title": "Cashier", "hourly_rate": { "amount": 1700, "currency": "USD" } } ], "cursor": "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED" } }, "ListEmployeesRequest": { "type": "object", "properties": { "location_id": { "type": "string", "description": "" }, "status": { "type": "string", "description": "Specifies the EmployeeStatus to filter the employee by." }, "limit": { "type": "integer", "description": "The number of employees to be returned on each page." }, "cursor": { "type": "string", "description": "The token required to retrieve the specified page of results." } }, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "ListEmployeesResponse": { "type": "object", "properties": { "employees": { "type": "array", "items": { "$ref": "#/definitions/Employee" }, "description": "" }, "cursor": { "type": "string", "description": "The token to be used to retrieve the next page of results." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "ListGiftCardActivitiesRequest": { "type": "object", "properties": { "gift_card_id": { "maxLength": 50, "type": "string", "description": "If a gift card ID is provided, the endpoint returns activities related \nto the specified gift card. Otherwise, the endpoint returns all gift card activities for \nthe seller." }, "type": { "type": "string", "description": "If a [type](https://developer.squareup.com/reference/square_2024-04-17/objects/GiftCardActivityType) is provided, the endpoint returns gift card activities of the specified type. \nOtherwise, the endpoint returns all types of gift card activities." }, "location_id": { "type": "string", "description": "If a location ID is provided, the endpoint returns gift card activities for the specified location. \nOtherwise, the endpoint returns gift card activities for all locations." }, "begin_time": { "type": "string", "description": "The timestamp for the beginning of the reporting period, in RFC 3339 format.\nThis start time is inclusive. The default value is the current time minus one year." }, "end_time": { "type": "string", "description": "The timestamp for the end of the reporting period, in RFC 3339 format.\nThis end time is inclusive. The default value is the current time." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "If a limit is provided, the endpoint returns the specified number \nof results (or fewer) per page. The maximum value is 100. The default value is 50.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "sort_order": { "type": "string", "description": "The order in which the endpoint returns the activities, based on `created_at`.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default)." } }, "description": "Returns a list of gift card activities. You can optionally specify a filter to retrieve a\nsubset of activites.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListGiftCardActivitiesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_card_activities": { "type": "array", "items": { "$ref": "#/definitions/GiftCardActivity" }, "description": "The requested gift card activities or an empty object if none are found." }, "cursor": { "type": "string", "description": "When a response is truncated, it includes a cursor that you can use in a\nsubsequent request to retrieve the next set of activities. If a cursor is not present, this is\nthe final response.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." } }, "description": "A response that contains a list of `GiftCardActivity` objects. If the request resulted in errors, \nthe response contains a set of `Error` objects.", "x-release-status": "PUBLIC", "example": { "gift_card_activities": [ { "id": "gcact_897698f894b44b3db46c6147e26a0e19", "type": "REDEEM", "location_id": "81FN9BNFZTKS4", "created_at": "2021-06-02T22:26:38.000Z", "gift_card_id": "gftc:6d55a72470d940c6ba09c0ab8ad08d20", "gift_card_gan": "7783320002929081", "gift_card_balance_money": { "amount": 700, "currency": "USD" }, "redeem_activity_details": { "amount_money": { "amount": 300, "currency": "USD" } }, "payment_id": "dEv2eksNPy6GqdYiLe4ZBNk6HqXZY", "status": "COMPLETED" }, { "id": "gcact_b968ebfc7d46437b945be7b9e09123b4", "type": "ACTIVATE", "location_id": "81FN9BNFZTKS4", "created_at": "2021-05-20T22:26:54.000Z", "gift_card_id": "gftc:6d55a72470d940c6ba09c0ab8ad08d20", "gift_card_gan": "7783320002929081", "gift_card_balance_money": { "amount": 1000, "currency": "USD" }, "activate_activity_details": { "amount_money": { "amount": 1000, "currency": "USD" }, "order_id": "jJNGHm4gLI6XkFbwtiSLqK72KkAZY", "line_item_uid": "eIWl7X0nMuO9Ewbh0ChIx" } } ] } }, "ListGiftCardsRequest": { "type": "object", "properties": { "type": { "type": "string", "description": "If a [type](https://developer.squareup.com/reference/square_2024-04-17/enums/GiftCardType) is provided, the endpoint returns gift cards of the specified type.\nOtherwise, the endpoint returns gift cards of all types." }, "state": { "type": "string", "description": "If a [state](https://developer.squareup.com/reference/square_2024-04-17/enums/GiftCardStatus) is provided, the endpoint returns the gift cards in the specified state.\nOtherwise, the endpoint returns the gift cards of all states." }, "limit": { "maximum": 200, "minimum": 1, "type": "integer", "description": "If a limit is provided, the endpoint returns only the specified number of results per page.\nThe maximum value is 200. The default value is 30.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "customer_id": { "maxLength": 191, "type": "string", "description": "If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer." } }, "description": "A request to list gift cards. You can optionally specify a filter to retrieve a subset of \ngift cards.", "x-release-status": "PUBLIC", "example": { "request_params": "?type\u003dDIGITAL\u0026state\u003dACTIVE\u0026cursor\u003dJj0rA9-rrDW5k-PsorOq-m4BiGf" } }, "ListGiftCardsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_cards": { "type": "array", "items": { "$ref": "#/definitions/GiftCard" }, "description": "The requested gift cards or an empty object if none are found." }, "cursor": { "type": "string", "description": "When a response is truncated, it includes a cursor that you can use in a\nsubsequent request to retrieve the next set of gift cards. If a cursor is not present, this is\nthe final response.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." } }, "description": "A response that contains a list of `GiftCard` objects. If the request resulted in errors, \nthe response contains a set of `Error` objects.", "x-release-status": "PUBLIC", "example": { "gift_cards": [ { "id": "gftc:00113070ba5745f0b2377c1b9570cb03", "type": "DIGITAL", "gan_source": "SQUARE", "state": "ACTIVE", "balance_money": { "amount": 3900, "currency": "USD" }, "gan": "7783320008524605", "created_at": "2021-06-09T22:26:54.000Z" }, { "id": "gftc:00128a12725b41e58e0de1d20497a9dd", "type": "DIGITAL", "gan_source": "SQUARE", "state": "ACTIVE", "balance_money": { "amount": 2000, "currency": "USD" }, "gan": "7783320002692465", "created_at": "2021-05-20T22:26:54.000Z" } ], "cursor": "JbFmyvUpaNKsfC1hoLSA4WlqkgkZXTWeKuStajR5BkP7OE0ETAbeWSi6U6u7sH" } }, "ListInvoicesRequest": { "type": "object", "required": [ "location_id" ], "properties": { "location_id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The ID of the location for which to list invoices." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint. \nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "type": "integer", "description": "The maximum number of invoices to return (200 is the maximum `limit`). \nIf not provided, the server uses a default limit of 100 invoices." } }, "description": "Describes a `ListInvoice` request.", "x-release-status": "PUBLIC", "example": { "request_params": "?location_id\u003dES0RJRZYEC39A\u0026limit\u003d2" } }, "ListInvoicesResponse": { "type": "object", "properties": { "invoices": { "type": "array", "items": { "$ref": "#/definitions/Invoice" }, "description": "The invoices retrieved." }, "cursor": { "type": "string", "description": "When a response is truncated, it includes a cursor that you can use in a \nsubsequent request to retrieve the next set of invoices. If empty, this is the final \nresponse. \nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Describes a `ListInvoice` response.", "x-release-status": "PUBLIC", "example": { "invoices": [ { "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "version": 1, "location_id": "ES0RJRZYEC39A", "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "payment_requests": [ { "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355", "request_type": "BALANCE", "due_date": "2030-01-24", "tipping_enabled": true, "reminders": [ { "uid": "beebd363-e47f-4075-8785-c235aaa7df11", "relative_scheduled_days": -1, "message": "Your invoice is due tomorrow", "status": "PENDING" } ], "computed_amount_money": { "amount": 10000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "NONE" } ], "invoice_number": "inv-100", "title": "Event Planning Services", "description": "We appreciate your business!", "scheduled_at": "2030-01-13T10:00:00Z", "status": "DRAFT", "timezone": "America/Los_Angeles", "created_at": "2030-01-13T17:45:13Z", "updated_at": "2030-01-13T21:24:10Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "accepted_payment_methods": { "card": true, "square_gift_card": false, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "custom_fields": [ { "label": "Event Reference Number", "value": "Ref. #1234", "placement": "ABOVE_LINE_ITEMS" }, { "label": "Terms of Service", "value": "The terms of service are...", "placement": "BELOW_LINE_ITEMS" } ], "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false, "attachments": [ { "id": "inva:0-3bB9ZuDHiziThQhuC4fwWt", "filename": "file.jpg", "description": "Service contract", "filesize": 102705, "hash": "273ee02cb6f5f8a3a8ca23604930dd53", "mime_type": "image/jpeg", "uploaded_at": "2030-01-13T21:24:10Z" } ] }, { "id": "inv:0-ChC366qAfskpGrBI_1bozs9mEA3", "version": 3, "location_id": "ES0RJRZYEC39A", "order_id": "a65jnS8NXbfprvGJzY9F4fQTuaB", "payment_requests": [ { "uid": "66c3bdfd-5090-4ff9-a8a0-c1e1a2ffa176", "request_type": "DEPOSIT", "due_date": "2021-01-23", "percentage_requested": "25", "tipping_enabled": false, "card_id": "ccof:IkWfpLj4tNHMyFii3GB", "computed_amount_money": { "amount": 1000, "currency": "USD" }, "total_completed_amount_money": { "amount": 1000, "currency": "USD" }, "automatic_payment_source": "CARD_ON_FILE" }, { "uid": "120c5e18-4f80-4f6b-b159-774cb9bf8f99", "request_type": "BALANCE", "due_date": "2021-06-15", "tipping_enabled": false, "card_id": "ccof:IkWfpLj4tNHMyFii3GB", "computed_amount_money": { "amount": 3000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "CARD_ON_FILE" } ], "invoice_number": "inv-455", "public_url": "https://squareup.com/pay-invoice/h9sfsfTGTSnYEhISUDBhEQ", "status": "PARTIALLY_PAID", "timezone": "America/Los_Angeles", "created_at": "2021-01-23T15:29:12Z", "updated_at": "2021-01-23T15:29:56Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "next_payment_amount_money": { "amount": 3000, "currency": "USD" }, "accepted_payment_methods": { "card": true, "square_gift_card": true, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false } ], "cursor": "ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE" } }, "ListLocationBookingProfilesRequest": { "type": "object", "properties": { "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a paged response." }, "cursor": { "minLength": 0, "maxLength": 65536, "type": "string", "description": "The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results." } }, "description": "", "x-release-status": "PUBLIC" }, "ListLocationBookingProfilesResponse": { "type": "object", "properties": { "location_booking_profiles": { "type": "array", "items": { "$ref": "#/definitions/LocationBookingProfile" }, "description": "The list of a seller\u0027s location booking profiles." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in the subsequent request to get the next page of the results. Stop retrieving the next page of the results when the cursor is not set." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "location_booking_profiles": [ { "location_id": "LY6WNBPVM6VGV", "online_booking_enabled": true, "booking_site_url": "https://squareup.com/book/LY6WNBPVM6VGV/testbusiness" }, { "location_id": "PYTRNBPVMJUPV", "online_booking_enabled": false } ], "errors": [] } }, "ListLocationCustomAttributeDefinitionsRequest": { "type": "object", "properties": { "visibility_filter": { "type": "string", "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Represents a [ListLocationCustomAttributeDefinitions](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/list-location-custom-attribute-definitions) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?limit\u003d2" } }, "ListLocationCustomAttributeDefinitionsResponse": { "type": "object", "properties": { "custom_attribute_definitions": { "type": "array", "items": { "$ref": "#/definitions/CustomAttributeDefinition" }, "description": "The retrieved custom attribute definitions. If no custom attribute definitions are found,\nSquare returns an empty object (`{}`)." }, "cursor": { "type": "string", "description": "The cursor to provide in your next call to this endpoint to retrieve the next page of\nresults for your original request. This field is present only if the request succeeded and\nadditional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [ListLocationCustomAttributeDefinitions](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/list-location-custom-attribute-definitions) response.\nEither `custom_attribute_definitions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definitions": [ { "key": "phone-number", "name": "phone number", "description": "Location\u0027s phone number", "version": 1, "updated_at": "2022-12-02T19:50:21.832Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.PhoneNumber" }, "created_at": "2022-12-02T19:50:21.832Z", "visibility": "VISIBILITY_READ_ONLY" }, { "key": "bestseller", "name": "Bestseller", "description": "Bestselling item at location", "version": 4, "updated_at": "2022-12-03T10:17:52.341Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-12-02T19:06:36.559Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } ], "cursor": "ImfNzWVSiAYyiAR4gEcxDJ75KZAOSjX8H2BVHUTR0ofCtp4SdYvrUKbwYY2aCH2WqZ2FsfAuylEVUlTfaINg3ecIlFpP9Y5Ie66w9NSg9nqdI5fCJ6qdH2s0za5m2plFonsjIuFaoN89j78ROUwuSOzD6mFZPcJHhJ0CxEKc0SBH" } }, "ListLocationCustomAttributesRequest": { "type": "object", "properties": { "visibility_filter": { "type": "string", "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "with_definitions": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`." } }, "description": "Represents a [ListLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/list-location-custom-attributes) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?location_id\u003dL0TBCBTB7P8RQ" } }, "ListLocationCustomAttributesResponse": { "type": "object", "properties": { "custom_attributes": { "type": "array", "items": { "$ref": "#/definitions/CustomAttribute" }, "description": "The retrieved custom attributes. If `with_definitions` was set to `true` in the request,\nthe custom attribute definition is returned in the `definition` field of each custom attribute.\nIf no custom attributes are found, Square returns an empty object (`{}`)." }, "cursor": { "type": "string", "description": "The cursor to use in your next call to this endpoint to retrieve the next page of results\nfor your original request. This field is present only if the request succeeded and additional\nresults are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [ListLocationCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/list-location-custom-attributes) response.\nEither `custom_attributes`, an empty object, or `errors` is present in the response. If additional\nresults are available, the `cursor` field is also present along with `custom_attributes`.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attributes": [ { "key": "phone-number", "version": 1, "updated_at": "2022-12-12T18:13:03.745Z", "value": "+12223334444", "created_at": "2022-12-12T18:13:03.745Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" }, { "key": "bestseller", "version": 1, "updated_at": "2022-12-12T19:27:57.975Z", "value": "hot cocoa", "created_at": "2022-12-12T19:27:57.975Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } ] } }, "ListLocationsRequest": { "type": "object", "properties": {}, "description": "Defines the fields that are included in requests to the\n[ListLocations](https://developer.squareup.com/reference/square_2024-04-17/locations-api/list-locations) endpoint.", "x-release-status": "PUBLIC", "example": {} }, "ListLocationsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "locations": { "type": "array", "items": { "$ref": "#/definitions/Location" }, "description": "The business locations." } }, "description": "Defines the fields that are included in the response body of a request\nto the [ListLocations](https://developer.squareup.com/reference/square_2024-04-17/locations-api/list-locations) endpoint.\n\nEither `errors` or `locations` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "locations": [ { "id": "18YC4JDH91E1H", "name": "Grant Park", "address": { "address_line_1": "123 Main St", "locality": "San Francisco", "administrative_district_level_1": "CA", "postal_code": "94114", "country": "US" }, "timezone": "America/Los_Angeles", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2016-09-19T17:33:12Z", "merchant_id": "3MYCJG5GVYQ8Q", "country": "US", "language_code": "en-US", "currency": "USD", "phone_number": "+1 650-354-7217", "business_name": "Jet Fuel Coffee" }, { "id": "3Z4V4WHQK64X9", "name": "Midtown", "address": { "address_line_1": "1234 Peachtree St. NE", "locality": "Atlanta", "administrative_district_level_1": "GA", "postal_code": "30309" }, "timezone": "America/New_York", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2022-02-19T17:58:25Z", "merchant_id": "3MYCJG5GVYQ8Q", "country": "US", "language_code": "en-US", "currency": "USD", "type": "PHYSICAL", "description": "Midtown Atlanta store", "coordinates": { "latitude": 33.788900, "longitude": -84.384100 }, "business_name": "Jet Fuel Coffee", "mcc": "7299" } ] } }, "ListLoyaltyProgramsRequest": { "type": "object", "properties": {}, "description": "A request to list `LoyaltyProgram`.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "request_body": {} } }, "ListLoyaltyProgramsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "programs": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyProgram" }, "description": "A list of `LoyaltyProgram` for the merchant." } }, "description": "A response that contains all loyalty programs.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "programs": [ { "id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "status": "ACTIVE", "reward_tiers": [ { "id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "points": 10, "name": "10% off entire sale", "definition": { "scope": "ORDER", "discount_type": "FIXED_PERCENTAGE", "percentage_discount": "10" }, "created_at": "2020-04-20T16:55:11Z", "pricing_rule_reference": { "object_id": "74C4JSHESNLTB2A7ITO5HO6F", "catalog_version": "1605486402527" } } ], "terminology": { "one": "Point", "other": "Points" }, "location_ids": [ "P034NEENMD09F" ], "created_at": "2020-04-20T16:55:11Z", "updated_at": "2020-05-01T02:00:02Z", "accrual_rules": [ { "accrual_type": "SPEND", "points": 1, "spend_data": { "amount_money": { "amount": 100, "currency": "USD" }, "excluded_category_ids": [ "7ZERJKO5PVYXCVUHV2JCZ2UG", "FQKAOJE5C4FIMF5A2URMLW6V" ], "excluded_item_variation_ids": [ "CBZXBUVVTYUBZGQO44RHMR6B", "EDILT24Z2NISEXDKGY6HP7XV" ], "tax_mode": "BEFORE_TAX" } } ] } ] } }, "ListLoyaltyPromotionsRequest": { "type": "object", "properties": { "status": { "type": "string", "description": "The status to filter the results by. If a status is provided, only loyalty promotions\nwith the specified status are returned. Otherwise, all loyalty promotions associated with\nthe loyalty program are returned.", "x-read-only": true }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "maximum": 30, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response.\nThe minimum value is 1 and the maximum value is 30. The default value is 30.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Represents a [ListLoyaltyPromotions](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/list-loyalty-promotions) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?program_id\u003dd619f755-2d17-41f3-990d-c04ecedd64dd", "request_body": {} } }, "ListLoyaltyPromotionsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "loyalty_promotions": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyPromotion" }, "description": "The retrieved loyalty promotions." }, "cursor": { "type": "string", "description": "The cursor to use in your next call to this endpoint to retrieve the next page of results\nfor your original request. This field is present only if the request succeeded and additional\nresults are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Represents a [ListLoyaltyPromotions](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/list-loyalty-promotions) response.\nOne of `loyalty_promotions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `loyalty_promotions`.", "x-release-status": "PUBLIC", "example": { "loyalty_promotions": [ { "id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67", "name": "Tuesday Happy Hour Promo", "incentive": { "type": "POINTS_MULTIPLIER", "points_multiplier_data": { "multiplier": "3.000", "points_multiplier": 3 } }, "available_time": { "start_date": "2022-08-16", "time_periods": [ "BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ\u003dWEEKLY;BYDAY\u003dTU\nEND:VEVENT" ] }, "trigger_limit": { "times": 1, "interval": "DAY" }, "qualifying_item_variation_ids": [ "CJ3RYL56ITAKMD4VRCM7XERS", "AT3RYLR3TUA9C34VRCB7X5RR" ], "status": "ACTIVE", "created_at": "2022-08-16T08:38:54Z", "updated_at": "2022-08-16T08:38:54Z", "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd" }, { "id": "loypromo_e696f057-2286-35ff-8108-132241328106", "name": "July Special", "incentive": { "type": "POINTS_MULTIPLIER", "points_multiplier_data": { "multiplier": "2.000", "points_multiplier": 2 } }, "available_time": { "start_date": "2022-07-01", "end_date": "2022-08-01", "time_periods": [ "BEGIN:VEVENT\nDTSTART:20220704T090000\nDURATION:PT8H\nRRULE:FREQ\u003dWEEKLY;UNTIL\u003d20220801T000000;BYDAY\u003dMO\nEND:VEVENT", "BEGIN:VEVENT\nDTSTART:20220705T090000\nDURATION:PT8H\nRRULE:FREQ\u003dWEEKLY;UNTIL\u003d20220801T000000;BYDAY\u003dTU\nEND:VEVENT", "BEGIN:VEVENT\nDTSTART:20220706T090000\nDURATION:PT8H\nRRULE:FREQ\u003dWEEKLY;UNTIL\u003d20220801T000000;BYDAY\u003dWE\nEND:VEVENT", "BEGIN:VEVENT\nDTSTART:20220707T090000\nDURATION:PT8H\nRRULE:FREQ\u003dWEEKLY;UNTIL\u003d20220801T000000;BYDAY\u003dTH\nEND:VEVENT", "BEGIN:VEVENT\nDTSTART:20220701T090000\nDURATION:PT8H\nRRULE:FREQ\u003dWEEKLY;UNTIL\u003d20220801T000000;BYDAY\u003dFR\nEND:VEVENT" ] }, "trigger_limit": { "times": 5, "interval": "ALL_TIME" }, "minimum_spend_amount_money": { "amount": 2000, "currency": "USD" }, "qualifying_category_ids": [ "XTQPYLR3IIU9C44VRCB3XD12" ], "status": "ENDED", "created_at": "2022-06-27T15:37:38Z", "updated_at": "2022-06-27T15:37:38Z", "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd" } ] } }, "ListMerchantCustomAttributeDefinitionsRequest": { "type": "object", "properties": { "visibility_filter": { "type": "string", "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Represents a [ListMerchantCustomAttributeDefinitions](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/list-merchant-custom-attribute-definitions) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?limit\u003d2" } }, "ListMerchantCustomAttributeDefinitionsResponse": { "type": "object", "properties": { "custom_attribute_definitions": { "type": "array", "items": { "$ref": "#/definitions/CustomAttributeDefinition" }, "description": "The retrieved custom attribute definitions. If no custom attribute definitions are found,\nSquare returns an empty object (`{}`)." }, "cursor": { "type": "string", "description": "The cursor to provide in your next call to this endpoint to retrieve the next page of\nresults for your original request. This field is present only if the request succeeded and\nadditional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [ListMerchantCustomAttributeDefinitions](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/list-merchant-custom-attribute-definitions) response.\nEither `custom_attribute_definitions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definitions": [ { "key": "has_seen_tutorial", "name": "NAME", "description": "Whether the merchant has seen the tutorial screen for using the app.", "version": 1, "updated_at": "2023-05-05T16:50:21.832Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" }, "created_at": "2023-05-05T16:50:21.832Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" }, { "key": "alternative_seller_name", "name": "Alternative Merchant Name", "description": "This is the other name this merchant goes by.", "version": 4, "updated_at": "2023-05-05T10:17:52.341Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2023-05-05T19:06:36.559Z", "visibility": "VISIBILITY_READ_ONLY" } ], "cursor": "ImfNzWVSiAYyiAR4gEcxDJ75KZAOSjX8H2BVHUTR0ofCtp4SdYvrUKbwYY2aCH2WqZ2FsfAuylEVUlTfaINg3ecIlFpP9Y5Ie66w9NSg9nqdI5fCJ6qdH2s0za5m2plFonsjIuFaoN89j78ROUwuSOzD6mFZPcJHhJ0CxEKc0SBH" } }, "ListMerchantCustomAttributesRequest": { "type": "object", "properties": { "visibility_filter": { "type": "string", "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "cursor": { "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "with_definitions": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`." } }, "description": "Represents a [ListMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/list-merchant-custom-attributes) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?merchant_id\u003dDM7VKY8Q63GNP" } }, "ListMerchantCustomAttributesResponse": { "type": "object", "properties": { "custom_attributes": { "type": "array", "items": { "$ref": "#/definitions/CustomAttribute" }, "description": "The retrieved custom attributes. If `with_definitions` was set to `true` in the request,\nthe custom attribute definition is returned in the `definition` field of each custom attribute.\nIf no custom attributes are found, Square returns an empty object (`{}`)." }, "cursor": { "type": "string", "description": "The cursor to use in your next call to this endpoint to retrieve the next page of results\nfor your original request. This field is present only if the request succeeded and additional\nresults are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [ListMerchantCustomAttributes](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/list-merchant-custom-attributes) response.\nEither `custom_attributes`, an empty object, or `errors` is present in the response. If additional\nresults are available, the `cursor` field is also present along with `custom_attributes`.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attributes": [ { "key": "has_seen_tutorial", "version": 1, "updated_at": "2023-05-05T18:13:03.745Z", "value": true, "created_at": "2023-05-05T18:13:03.745Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" }, { "key": "alternative_seller_name", "version": 1, "updated_at": "2023-05-05T19:27:57.975Z", "value": "Ultimate Sneaker Store", "created_at": "2023-05-05T19:27:57.975Z", "visibility": "VISIBILITY_READ_ONLY" } ] } }, "ListMerchantsRequest": { "type": "object", "properties": { "cursor": { "type": "integer", "description": "The cursor generated by the previous response." } }, "description": "Request object for the [ListMerchant](https://developer.squareup.com/reference/square_2024-04-17/merchants-api/list-merchants) endpoint.", "x-release-status": "PUBLIC" }, "ListMerchantsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "merchant": { "type": "array", "items": { "$ref": "#/definitions/Merchant" }, "description": "The requested `Merchant` entities." }, "cursor": { "type": "integer", "description": "If the response is truncated, the cursor to use in next request to fetch next set of objects." } }, "description": "The response object returned by the [ListMerchant](https://developer.squareup.com/reference/square_2024-04-17/merchants-api/list-merchants) endpoint.", "x-release-status": "PUBLIC", "example": { "merchant": [ { "id": "DM7VKY8Q63GNP", "business_name": "Apple A Day", "country": "US", "language_code": "en-US", "currency": "USD", "status": "ACTIVE", "main_location_id": "9A65CGC72ZQG1", "created_at": "2021-12-10T19:25:52.484Z" } ] } }, "ListOrderCustomAttributeDefinitionsRequest": { "type": "object", "properties": { "visibility_filter": { "type": "string", "description": "Requests that all of the custom attributes be returned, or only those that are read-only or read-write." }, "cursor": { "minLength": 1, "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint. \nProvide this cursor to retrieve the next page of results for your original request. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory. \nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. \nThe default value is 20.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." } }, "description": "Represents a list request for order custom attribute definitions.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?limit\u003d4" } }, "ListOrderCustomAttributeDefinitionsResponse": { "type": "object", "required": [ "custom_attribute_definitions" ], "properties": { "custom_attribute_definitions": { "type": "array", "items": { "$ref": "#/definitions/CustomAttributeDefinition" }, "description": "The retrieved custom attribute definitions. If no custom attribute definitions are found, Square returns an empty object (`{}`)." }, "cursor": { "minLength": 1, "type": "string", "description": "The cursor to provide in your next call to this endpoint to retrieve the next page of results for your original request. \nThis field is present only if the request succeeded and additional results are available.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from listing order custom attribute definitions.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definitions": [ { "key": "cover-count", "name": "Cover count", "description": "The number of people seated at a table", "version": 1, "updated_at": "2022-11-16T18:03:44.051Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "created_at": "2022-11-16T18:03:44.051Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" }, { "key": "seat-number", "name": "Seat number", "description": "The identifier for a particular seat", "version": 1, "updated_at": "2022-11-16T18:04:32.059Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "created_at": "2022-11-16T18:04:32.059Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" }, { "key": "table-number", "name": "Table number", "description": "The identifier for a particular table", "version": 1, "updated_at": "2022-11-16T18:04:21.912Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "created_at": "2022-11-16T18:04:21.912Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } ] } }, "ListOrderCustomAttributesRequest": { "type": "object", "properties": { "visibility_filter": { "type": "string", "description": "Requests that all of the custom attributes be returned, or only those that are read-only or read-write." }, "cursor": { "minLength": 1, "type": "string", "description": "The cursor returned in the paged response from the previous call to this endpoint. \nProvide this cursor to retrieve the next page of results for your original request. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a single paged response. This limit is advisory. \nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. \nThe default value is 20.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "with_definitions": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom attribute, \ninformation about the data type, or other definition details. The default value is `false`." } }, "description": "Represents a list request for order custom attributes.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?order_id\u003d7BbXGEIWNldxAzrtGf9GPVZTwZ4F\u0026with_definitions\u003dtrue\u0026visibility_filter\u003dALL\u0026limit\u003d4" } }, "ListOrderCustomAttributesResponse": { "type": "object", "properties": { "custom_attributes": { "type": "array", "items": { "$ref": "#/definitions/CustomAttribute" }, "description": "The retrieved custom attributes. If no custom attribute are found, Square returns an empty object (`{}`)." }, "cursor": { "minLength": 1, "type": "string", "description": "The cursor to provide in your next call to this endpoint to retrieve the next page of results for your original request. \nThis field is present only if the request succeeded and additional results are available.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from listing order custom attributes.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attributes": [ { "key": "wayne-test-15", "version": 1, "updated_at": "2022-11-10T17:31:36.111Z", "value": "TEST", "created_at": "2022-11-10T17:31:36.111Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } ] } }, "ListPaymentLinksRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "type": "integer", "description": "A limit on the number of results to return per page. The limit is advisory and\nthe implementation might return more or less results. If the supplied limit is negative, zero, or\ngreater than the maximum limit of 1000, it is ignored.\n\nDefault value: `100`" } }, "description": "", "x-release-status": "PUBLIC", "example": {} }, "ListPaymentLinksResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." }, "payment_links": { "type": "array", "items": { "$ref": "#/definitions/PaymentLink" }, "description": "The list of payment links." }, "cursor": { "type": "string", "description": " When a response is truncated, it includes a cursor that you can use in a subsequent request\nto retrieve the next set of gift cards. If a cursor is not present, this is the final response.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "", "x-release-status": "PUBLIC", "example": { "payment_links": [ { "id": "TN4BWEDJ9AI5MBIV", "version": 2, "order_id": "Qqc6yppGvxVwc46Cch4zHTaJqc4F", "checkout_options": { "ask_for_shipping_address": true }, "url": "https://square.link/u/EXAMPLE", "created_at": "2022-04-26T00:15:15Z", "updated_at": "2022-04-26T00:18:24Z", "payment_note": "test" }, { "id": "RY5UNCUMPJN5XKCT", "version": 1, "description": "", "order_id": "EmBmGt3zJD15QeO1dxzBTxMxtwfZY", "url": "https://square.link/u/EXAMPLE", "created_at": "2022-04-11T23:14:59Z" } ], "cursor": "MTY1NQ\u003d\u003d" } }, "ListPaymentRefundsRequest": { "type": "object", "properties": { "begin_time": { "type": "string", "description": "Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339 \nformat. The range is determined using the `created_at` field for each `PaymentRefund`. \n\nDefault: The current time minus one year." }, "end_time": { "type": "string", "description": "Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339 \nformat. The range is determined using the `created_at` field for each `PaymentRefund`.\n\nDefault: The current time." }, "sort_order": { "type": "string", "description": "The order in which results are listed by `PaymentRefund.created_at`:\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default)." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "location_id": { "type": "string", "description": "Limit results to the location supplied. By default, results are returned\nfor all locations associated with the seller." }, "status": { "type": "string", "description": "If provided, only refunds with the given status are returned.\nFor a list of refund status values, see [PaymentRefund](https://developer.squareup.com/reference/square_2024-04-17/objects/PaymentRefund).\n\nDefault: If omitted, refunds are returned regardless of their status." }, "source_type": { "type": "string", "description": "If provided, only returns refunds whose payments have the indicated source type.\nCurrent values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `CASH`, and `EXTERNAL`.\nFor information about these payment source types, see\n[Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).\n\nDefault: If omitted, refunds are returned regardless of the source type." }, "limit": { "type": "integer", "description": "The maximum number of results to be returned in a single page.\n\nIt is possible to receive fewer results than the specified limit on a given page.\n\nIf the supplied value is greater than 100, no more than 100 results are returned.\n\nDefault: 100" } }, "description": "Describes a request to list refunds using\n[ListPaymentRefunds](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/list-payment-refunds).\n\nThe maximum results per page is 100.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListPaymentRefundsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "refunds": { "type": "array", "items": { "$ref": "#/definitions/PaymentRefund" }, "description": "The list of requested refunds." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty,\nthis is the final response.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the response returned by [ListPaymentRefunds](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/list-payment-refunds).\n\nEither `errors` or `refunds` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "refunds": [ { "id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd", "status": "COMPLETED", "amount_money": { "amount": 555, "currency": "USD" }, "payment_id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY", "order_id": "9ltv0bx5PuvGXUYHYHxYSKEqC3IZY", "created_at": "2021-10-13T19:59:05.342Z", "updated_at": "2021-10-13T20:00:03.497Z", "processing_fee": [ { "effective_at": "2021-10-13T21:34:35.000Z", "type": "INITIAL", "amount_money": { "amount": -34, "currency": "USD" } } ], "location_id": "L88917AVBK2S5", "reason": "Example Refund" } ], "cursor": "5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb" } }, "ListPaymentsRequest": { "type": "object", "properties": { "begin_time": { "type": "string", "description": "Indicates the start of the time range to retrieve payments for, in RFC 3339 format. \nThe range is determined using the `created_at` field for each Payment.\nInclusive. Default: The current time minus one year." }, "end_time": { "type": "string", "description": "Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The \nrange is determined using the `created_at` field for each Payment.\n\nDefault: The current time." }, "sort_order": { "type": "string", "description": "The order in which results are listed by `Payment.created_at`:\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default)." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "location_id": { "type": "string", "description": "Limit results to the location supplied. By default, results are returned\nfor the default (main) location associated with the seller." }, "total": { "minimum": 0, "type": "integer", "format": "int64", "description": "The exact amount in the `total_money` for a payment." }, "last_4": { "type": "string", "description": "The last four digits of a payment card." }, "card_brand": { "type": "string", "description": "The brand of the payment card (for example, VISA)." }, "limit": { "type": "integer", "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\n\nThe default value of 100 is also the maximum allowed value. If the provided value is \ngreater than 100, it is ignored and the default value is used instead.\n\nDefault: `100`" } }, "description": "Describes a request to list payments using \n[ListPayments](https://developer.squareup.com/reference/square_2024-04-17/payments-api/list-payments). \n\nThe maximum results per page is 100.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListPaymentsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "payments": { "type": "array", "items": { "$ref": "#/definitions/Payment" }, "description": "The requested list of payments." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty,\nthis is the final response.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the response returned by [ListPayments](https://developer.squareup.com/reference/square_2024-04-17/payments-api/list-payments).", "x-release-status": "PUBLIC", "example": { "payments": [ { "id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY", "created_at": "2021-10-13T19:34:33.524Z", "updated_at": "2021-10-13T19:34:37.261Z", "amount_money": { "amount": 555, "currency": "USD" }, "status": "COMPLETED", "delay_duration": "PT168H", "source_type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 11, "exp_year": 2022, "fingerprint": "sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "entry_method": "KEYED", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "auth_result_code": "2Nkw7q", "statement_description": "SQ *EXAMPLE TEST GOSQ.C", "card_payment_timeline": { "authorized_at": "2021-10-13T19:34:33.680Z", "captured_at": "2021-10-13T19:34:34.340Z" } }, "location_id": "L88917AVBK2S5", "order_id": "d7eKah653Z579f3gVtjlxpSlmUcZY", "processing_fee": [ { "effective_at": "2021-10-13T21:34:35.000Z", "type": "INITIAL", "amount_money": { "amount": 34, "currency": "USD" } } ], "note": "Test Note", "total_money": { "amount": 555, "currency": "USD" }, "approved_money": { "amount": 555, "currency": "USD" }, "employee_id": "TMoK_ogh6rH1o4dV", "receipt_number": "bP9m", "receipt_url": "https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY", "delay_action": "CANCEL", "delayed_until": "2021-10-20T19:34:33.524Z", "team_member_id": "TMoK_ogh6rH1o4dV", "application_details": { "square_product": "VIRTUAL_TERMINAL", "application_id": "sq0ids-Pw67AZAlLVB7hsRmwlJPuA" }, "version_token": "vguW2km0KpVCdAXZcNTZ438qg5LlVPTP4HO5OpiHNfa6o" } ] } }, "ListPayoutEntriesRequest": { "type": "object", "properties": { "sort_order": { "type": "string", "description": "The order in which payout entries are listed." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).\nIf request parameters change between requests, subsequent results may contain duplicates or missing records." }, "limit": { "type": "integer", "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value. If the provided value is\ngreater than 100, it is ignored and the default value is used instead.\nDefault: `100`" } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListPayoutEntriesResponse": { "type": "object", "properties": { "payout_entries": { "type": "array", "items": { "$ref": "#/definitions/PayoutEntry" }, "description": "The requested list of payout entries, ordered with the given or default sort order." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty, this is the final response.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "The response to retrieve payout records entries.", "x-release-status": "PUBLIC", "example": { "payout_entries": [ { "id": "poe_ZQWcw41d0SGJS6IWd4cSi8mKHk", "payout_id": "po_4d28e6c4-7dd5-4de4-8ec9-a059277646a6", "effective_at": "2021-12-14T23:31:49Z", "type": "REFUND", "gross_amount_money": { "amount": -50, "currency_code": "USD" }, "fee_amount_money": { "amount": -2, "currency_code": "USD" }, "net_amount_money": { "amount": -48, "currency_code": "USD" }, "type_refund_details": { "payment_id": "HVdG62HeMlti8YYf94oxrN", "refund_id": "HVdG62HeMlti8YYf94oxrN_dR8Nztxg7umf94oxrN12Ji5r2KW14FAY" } }, { "id": "poe_EibbY9Ob1d0SGJS6IWd4cSiSi6wkaPk", "payout_id": "po_4d28e6c4-7dd5-4de4-8ec9-a059277646a6", "effective_at": "2021-12-14T23:31:49Z", "type": "CHARGE", "gross_amount_money": { "amount": 100, "currency_code": "USD" }, "fee_amount_money": { "amount": 19, "currency_code": "USD" }, "net_amount_money": { "amount": 81, "currency_code": "USD" }, "type_charge_details": { "payment_id": "HVdG62H5K3291d0SGJS6IWd4cSi8YY" } } ], "cursor": "TbfI80z98Xc2LdApCyZ2NvCYLpkPurYLR16GRIttpMJ55mrSIMzHgtkcRQdT0mOnTtfHO" } }, "ListPayoutsRequest": { "type": "object", "properties": { "location_id": { "maxLength": 255, "type": "string", "description": "The ID of the location for which to list the payouts.\nBy default, payouts are returned for the default (main) location associated with the seller." }, "status": { "type": "string", "description": "If provided, only payouts with the given status are returned." }, "begin_time": { "type": "string", "description": "The timestamp for the beginning of the payout creation time, in RFC 3339 format.\nInclusive. Default: The current time minus one year." }, "end_time": { "type": "string", "description": "The timestamp for the end of the payout creation time, in RFC 3339 format.\nDefault: The current time." }, "sort_order": { "type": "string", "description": "The order in which payouts are listed." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).\nIf request parameters change between requests, subsequent results may contain duplicates or missing records." }, "limit": { "type": "integer", "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value. If the provided value is\ngreater than 100, it is ignored and the default value is used instead.\nDefault: `100`" } }, "description": "A request to retrieve payout records.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "ListPayoutsResponse": { "type": "object", "properties": { "payouts": { "type": "array", "items": { "$ref": "#/definitions/Payout" }, "description": "The requested list of payouts." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty, this is the final response.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "The response to retrieve payout records entries.", "x-release-status": "PUBLIC", "example": { "payouts": [ { "id": "po_b345d2c7-90b3-4f0b-a2aa-df1def7f8afc", "status": "PAID", "location_id": "L88917AVBK2S5", "created_at": "2022-03-29T16:12:31Z", "updated_at": "2022-03-30T01:07:22.875Z", "amount_money": { "amount": 6259, "currency_code": "USD" }, "destination": { "type": "CARD", "id": "ccof:ZPp3oedR3AeEUNd3z7" }, "version": 2, "type": "BATCH", "payout_fee": [ { "amount_money": { "amount": 95, "currency_code": "USD" }, "effective_at": "2022-03-29T16:12:31Z", "type": "TRANSFER_FEE" } ], "arrival_date": "2022-03-29", "end_to_end_id": "L2100000005" }, { "id": "po_f3c0fb38-a5ce-427d-b858-52b925b72e45", "status": "PAID", "location_id": "L88917AVBK2S5", "created_at": "2022-03-24T03:07:09Z", "updated_at": "2022-03-24T03:07:09Z", "amount_money": { "amount": -103, "currency_code": "USD" }, "destination": { "type": "BANK_ACCOUNT", "id": "bact:ZPp3oedR3AeEUNd3z7" }, "version": 1, "type": "BATCH", "arrival_date": "2022-03-24", "end_to_end_id": "L2100000006" } ], "cursor": "EMPCyStibo64hS8wLayZPp3oedR3AeEUNd3z7u6zphi72LQZFIEMbkKVvot9eefpU" } }, "ListRefundsRequest": { "type": "object", "properties": { "begin_time": { "type": "string", "description": "The beginning of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time minus one year." }, "end_time": { "type": "string", "description": "The end of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time." }, "sort_order": { "type": "string", "description": "The order in which results are listed in the response (`ASC` for\noldest first, `DESC` for newest first).\n\nDefault value: `DESC`" }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information." } }, "description": "Defines the query parameters that can be included in\na request to the [ListRefunds](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/list-refunds) endpoint.\n\nDeprecated - recommend using [SearchOrders](https://developer.squareup.com/reference/square_2024-04-17/orders-api/search-orders)", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "request_params": "?begin_time\u003d2016-01-15T00:00:00Z\u0026end_time\u003d2016-01-31T00:00:00Z" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ListRefunds/ListRefundsRequest.python", "csharp": "/sdk_samples/ListRefunds/ListRefundsRequest.csharp", "java": "/sdk_samples/ListRefunds/ListRefundsRequest.java", "php": "/sdk_samples/ListRefunds/ListRefundsRequest.php", "javascript": "/sdk_samples/ListRefunds/ListRefundsRequest.javascript", "ruby": "/sdk_samples/ListRefunds/ListRefundsRequest.ruby" } }, "ListRefundsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "refunds": { "type": "array", "items": { "$ref": "#/definitions/Refund" }, "description": "An array of refunds that match your query." }, "cursor": { "type": "string", "description": "A pagination cursor for retrieving the next set of results,\nif any remain. Provide this value as the `cursor` parameter in a subsequent\nrequest to this endpoint.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information." } }, "description": "Defines the fields that are included in the response body of\na request to the [ListRefunds](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/list-refunds) endpoint.\n\nOne of `errors` or `refunds` is present in a given response (never both).", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "refunds": [ { "id": "b27436d1-7f8e-5610-45c6-417ef71434b4-SW", "location_id": "18YC4JDH91E1H", "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF", "tender_id": "MtZRYYdDrYNQbOvV7nbuBvMF", "created_at": "2016-01-20T00:28:18Z", "reason": "some reason", "amount_money": { "amount": 100, "currency": "USD" }, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 10, "currency": "USD" } } ], "status": "APPROVED" } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ListRefunds/ListRefundsResponse.python", "csharp": "/sdk_samples/ListRefunds/ListRefundsResponse.csharp", "java": "/sdk_samples/ListRefunds/ListRefundsResponse.java", "php": "/sdk_samples/ListRefunds/ListRefundsResponse.php", "javascript": "/sdk_samples/ListRefunds/ListRefundsResponse.javascript", "ruby": "/sdk_samples/ListRefunds/ListRefundsResponse.ruby" } }, "ListSitesRequest": { "type": "object", "properties": {}, "description": "Represents a `ListSites` request.", "x-release-status": "PUBLIC" }, "ListSitesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "sites": { "type": "array", "items": { "$ref": "#/definitions/Site" }, "description": "The sites that belong to the seller." } }, "description": "Represents a `ListSites` response. The response can include either `sites` or `errors`.", "x-release-status": "PUBLIC", "example": { "sites": [ { "id": "site_278075276488921835", "site_title": "My Second Site", "domain": "mysite2.square.site", "is_published": false, "created_at": "2020-10-28T13:22:51.000000Z", "updated_at": "2020-10-28T13:22:51.000000Z" }, { "id": "site_102725345836253849", "site_title": "My First Site", "domain": "mysite1.square.site", "is_published": true, "created_at": "2020-06-18T17:45:13.000000Z", "updated_at": "2020-11-23T02:19:10.000000Z" } ] } }, "ListSubscriptionEventsRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "When the total number of resulting subscription events exceeds the limit of a paged response, \nspecify the cursor returned from a preceding response here to fetch the next set of results.\nIf the cursor is unset, the response contains the last page of the results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "minimum": 1, "type": "integer", "description": "The upper limit on the number of subscription events to return\nin a paged response." } }, "description": "Defines input parameters in a request to the \n[ListSubscriptionEvents](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/list-subscription-events)\nendpoint.", "x-release-status": "PUBLIC" }, "ListSubscriptionEventsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription_events": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionEvent" }, "description": "The retrieved subscription events." }, "cursor": { "type": "string", "description": "When the total number of resulting subscription events exceeds the limit of a paged response, \nthe response includes a cursor for you to use in a subsequent request to fetch the next set of events.\nIf the cursor is unset, the response contains the last page of the results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines output parameters in a response from the\n[ListSubscriptionEvents](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/list-subscription-events).", "x-release-status": "PUBLIC", "example": { "subscription_events": [ { "id": "06809161-3867-4598-8269-8aea5be4f9de", "subscription_event_type": "START_SUBSCRIPTION", "effective_date": "2020-04-24", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H" }, { "id": "f2736603-cd2e-47ec-8675-f815fff54f88", "subscription_event_type": "DEACTIVATE_SUBSCRIPTION", "effective_date": "2020-05-01", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "info": { "detail": "The customer with ID `V74BMG0GPS2KNCWJE1BTYJ37Y0` does not have a name on record.", "code": "CUSTOMER_NO_NAME" } }, { "id": "b426fc85-6859-450b-b0d0-fe3a5d1b565f", "subscription_event_type": "RESUME_SUBSCRIPTION", "effective_date": "2022-05-01", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H" }, { "id": "09f14de1-2f53-4dae-9091-49aa53f83d01", "subscription_event_type": "PAUSE_SUBSCRIPTION", "effective_date": "2022-09-01", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H" }, { "id": "f28a73ac-1a1b-4b0f-8eeb-709a72945776", "subscription_event_type": "RESUME_SUBSCRIPTION", "effective_date": "2022-12-01", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H" }, { "id": "1eee8790-472d-4efe-8c69-8ad84e9cefe0", "subscription_event_type": "PLAN_CHANGE", "effective_date": "2023-04-01", "plan_variation_id": "02CD53CFA4d1498AFAD42" }, { "id": "a0c08083-5db0-4800-85c7-d398de4fbb6e", "subscription_event_type": "STOP_SUBSCRIPTION", "effective_date": "2023-06-21", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H" } ] } }, "ListTeamMemberBookingProfilesRequest": { "type": "object", "properties": { "bookable_only": { "type": "boolean", "description": "Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`)." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in a paged response." }, "cursor": { "minLength": 0, "maxLength": 65536, "type": "string", "description": "The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results." }, "location_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "Indicates whether to include only team members enabled at the given location in the returned result." } }, "description": "", "x-release-status": "PUBLIC" }, "ListTeamMemberBookingProfilesResponse": { "type": "object", "properties": { "team_member_booking_profiles": { "type": "array", "items": { "$ref": "#/definitions/TeamMemberBookingProfile" }, "description": "The list of team member booking profiles. The results are returned in the ascending order of the time\nwhen the team member booking profiles were last updated. Multiple booking profiles updated at the same time\nare further sorted in the ascending order of their IDs." }, "cursor": { "minLength": 0, "maxLength": 65536, "type": "string", "description": "The pagination cursor to be used in the subsequent request to get the next page of the results. Stop retrieving the next page of the results when the cursor is not set." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "team_member_booking_profiles": [ { "team_member_id": "TMXUrsBWWcHTt79t", "display_name": "Sandbox Seller", "is_bookable": true }, { "team_member_id": "TMaJcbiRqPIGZuS9", "display_name": "Sandbox Staff", "is_bookable": true } ], "errors": [] } }, "ListTeamMemberWagesRequest": { "type": "object", "properties": { "team_member_id": { "type": "string", "description": "Filter the returned wages to only those that are associated with the\nspecified team member." }, "limit": { "maximum": 200, "minimum": 1, "type": "integer", "description": "The maximum number of `TeamMemberWage` results to return per page. The number can range between\n1 and 200. The default is 200." }, "cursor": { "type": "string", "description": "A pointer to the next page of `EmployeeWage` results to fetch." } }, "description": "A request for a set of `TeamMemberWage` objects.", "x-release-status": "PUBLIC", "example": { "request_params": "?team_member_id\u003d33fJchumvVdJwxV0H6L9\u0026limit\u003d4\u0026cursor\u003ds4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED" } }, "ListTeamMemberWagesResponse": { "type": "object", "properties": { "team_member_wages": { "type": "array", "items": { "$ref": "#/definitions/TeamMemberWage" }, "description": "A page of `TeamMemberWage` results." }, "cursor": { "type": "string", "description": "The value supplied in the subsequent request to fetch the next page\nof `TeamMemberWage` results." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request for a set of `TeamMemberWage` objects. The response contains\na set of `TeamMemberWage` objects.", "x-release-status": "PUBLIC", "example": { "team_member_wages": [ { "id": "pXS3qCv7BERPnEGedM4S8mhm", "team_member_id": "33fJchumvVdJwxV0H6L9", "title": "Manager", "hourly_rate": { "amount": 3250, "currency": "USD" }, "job_id": "jxJNN6eCJsLrhg5UFJrDWDGE", "tip_eligible": false }, { "id": "rZduCkzYDUVL3ovh1sQgbue6", "team_member_id": "33fJchumvVdJwxV0H6L9", "title": "Cook", "hourly_rate": { "amount": 2600, "currency": "USD" }, "job_id": "gcbz15vKGnMKmaWJJ152kjim", "tip_eligible": true }, { "id": "FxLbs5KpPUHa8wyt5ctjubDX", "team_member_id": "33fJchumvVdJwxV0H6L9", "title": "Barista", "hourly_rate": { "amount": 1600, "currency": "USD" }, "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M", "tip_eligible": true }, { "id": "vD1wCgijMDR3cX5TPnu7VXto", "team_member_id": "33fJchumvVdJwxV0H6L9", "title": "Cashier", "hourly_rate": { "amount": 1700, "currency": "USD" }, "job_id": "N4YKVLzFj3oGtNocqoYHYpW3", "tip_eligible": true } ], "cursor": "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED" } }, "ListTransactionsRequest": { "type": "object", "properties": { "begin_time": { "type": "string", "description": "The beginning of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time minus one year." }, "end_time": { "type": "string", "description": "The end of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time." }, "sort_order": { "type": "string", "description": "The order in which results are listed in the response (`ASC` for\noldest first, `DESC` for newest first).\n\nDefault value: `DESC`" }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information." } }, "description": "Defines the query parameters that can be included in\na request to the [ListTransactions](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/list-transactions) endpoint.\n\nDeprecated - recommend using [SearchOrders](https://developer.squareup.com/reference/square_2024-04-17/orders-api/search-orders)", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "request_params": "?begin_time\u003d2016-01-15T00:00:00Z\u0026end_time\u003d2016-01-31T00:00:00Z" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ListTransactions/ListTransactionsRequest.python", "csharp": "/sdk_samples/ListTransactions/ListTransactionsRequest.csharp", "java": "/sdk_samples/ListTransactions/ListTransactionsRequest.java", "php": "/sdk_samples/ListTransactions/ListTransactionsRequest.php", "javascript": "/sdk_samples/ListTransactions/ListTransactionsRequest.javascript", "ruby": "/sdk_samples/ListTransactions/ListTransactionsRequest.ruby" } }, "ListTransactionsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "transactions": { "type": "array", "items": { "$ref": "#/definitions/Transaction" }, "description": "An array of transactions that match your query." }, "cursor": { "type": "string", "description": "A pagination cursor for retrieving the next set of results,\nif any remain. Provide this value as the `cursor` parameter in a subsequent\nrequest to this endpoint.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information." } }, "description": "Defines the fields that are included in the response body of\na request to the [ListTransactions](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/list-transactions) endpoint.\n\nOne of `errors` or `transactions` is present in a given response (never both).", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "transactions": [ { "id": "KnL67ZIwXCPtzOrqj0HrkxMF", "location_id": "18YC4JDH91E1H", "created_at": "2016-01-20T22:57:56Z", "tenders": [ { "id": "MtZRYYdDrYNQbOvV7nbuBvMF", "location_id": "18YC4JDH91E1H", "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF", "created_at": "2016-01-20T22:57:56Z", "note": "some optional note", "amount_money": { "amount": 5000, "currency": "USD" }, "processing_fee_money": { "amount": 138, "currency": "USD" }, "type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111" }, "entry_method": "KEYED" }, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 20, "currency": "USD" } } ] } ], "refunds": [ { "id": "7a5RcVI0CxbOcJ2wMOkE", "location_id": "18YC4JDH91E1H", "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF", "tender_id": "MtZRYYdDrYNQbOvV7nbuBvMF", "created_at": "2016-01-20T22:59:20Z", "reason": "some reason why", "amount_money": { "amount": 5000, "currency": "USD" }, "status": "APPROVED", "processing_fee_money": { "amount": 138, "currency": "USD" }, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 100, "currency": "USD" } } ] } ], "reference_id": "some optional reference id", "product": "EXTERNAL_API" } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ListTransactions/ListTransactionsResponse.python", "csharp": "/sdk_samples/ListTransactions/ListTransactionsResponse.csharp", "java": "/sdk_samples/ListTransactions/ListTransactionsResponse.java", "php": "/sdk_samples/ListTransactions/ListTransactionsResponse.php", "javascript": "/sdk_samples/ListTransactions/ListTransactionsResponse.javascript", "ruby": "/sdk_samples/ListTransactions/ListTransactionsResponse.ruby" } }, "ListWebhookEventTypesRequest": { "type": "object", "properties": { "api_version": { "type": "string", "description": "The API version for which to list event types. Setting this field overrides the default version used by the application." } }, "description": "Lists all webhook event types that can be subscribed to.", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/webhooks/subscriptions/event-types?api_version\u003d2018-07-12" } }, "ListWebhookEventTypesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "event_types": { "type": "array", "items": { "type": "string" }, "description": "The list of event types." }, "metadata": { "type": "array", "items": { "$ref": "#/definitions/EventTypeMetadata" }, "description": "Contains the metadata of a webhook event type. For more information, see [EventTypeMetadata](https://developer.squareup.com/reference/square_2024-04-17/objects/EventTypeMetadata)." } }, "description": "Defines the fields that are included in the response body of\na request to the [ListWebhookEventTypes](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/list-webhook-event-types) endpoint.\n\nNote: if there are errors processing the request, the event types field will not be\npresent.", "x-release-status": "PUBLIC", "example": { "event_types": [ "inventory.count.updated" ], "metadata": [ { "event_type": "inventory.count.updated", "api_version_introduced": "2018-07-12", "release_status": "PUBLIC" } ] } }, "ListWebhookSubscriptionsRequest": { "type": "object", "properties": { "cursor": { "maxLength": 256, "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "include_disabled": { "type": "boolean", "description": "Includes disabled [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)s.\nBy default, all enabled [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)s are returned." }, "sort_order": { "type": "string", "description": "Sorts the returned list by when the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) was created with the specified order.\nThis field defaults to ASC." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value.\n\nDefault: 100" } }, "description": "Lists all [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)s owned by your application.", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/webhooks/subscriptions" } }, "ListWebhookSubscriptionsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "subscriptions": { "type": "array", "items": { "$ref": "#/definitions/WebhookSubscription" }, "description": "The requested list of [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)s." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty,\nthis is the final response.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines the fields that are included in the response body of\na request to the [ListWebhookSubscriptions](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/list-webhook-subscriptions) endpoint.\n\nNote: if there are errors processing the request, the subscriptions field will not be\npresent.", "x-release-status": "PUBLIC", "example": { "subscriptions": [ { "id": "wbhk_b35f6b3145074cf9ad513610786c19d5", "name": "Example Webhook Subscription", "enabled": true, "event_types": [ "payment.created", "payment.updated" ], "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15", "created_at": "2022-01-10 23:29:48 +0000 UTC", "updated_at": "2022-01-10 23:29:48 +0000 UTC" } ] } }, "ListWorkweekConfigsRequest": { "type": "object", "properties": { "limit": { "type": "integer", "description": "The maximum number of `WorkweekConfigs` results to return per page." }, "cursor": { "type": "string", "description": "A pointer to the next page of `WorkweekConfig` results to fetch." } }, "description": "A request for a set of `WorkweekConfig` objects.", "x-release-status": "PUBLIC", "example": { "request_params": "?limit\u003d1\u0026cursor\u003ds4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED" } }, "ListWorkweekConfigsResponse": { "type": "object", "properties": { "workweek_configs": { "type": "array", "items": { "$ref": "#/definitions/WorkweekConfig" }, "description": "A page of `WorkweekConfig` results." }, "cursor": { "type": "string", "description": "The value supplied in the subsequent request to fetch the next page of\n`WorkweekConfig` results." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request for a set of `WorkweekConfig` objects. The response contains\nthe requested `WorkweekConfig` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "workweek_configs": [ { "id": "FY4VCAQN700GM", "start_of_week": "MON", "start_of_day_local_time": "10:00", "version": 11, "created_at": "2016-02-04T00:58:24Z", "updated_at": "2019-02-28T01:04:35Z" } ], "cursor": "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED" } }, "Location": { "type": "object", "properties": { "id": { "maxLength": 32, "type": "string", "description": "A short generated string of letters and numbers that uniquely identifies this location instance.", "x-read-only": true }, "name": { "maxLength": 255, "type": "string", "description": "The name of the location.\nThis information appears in the Seller Dashboard as the nickname.\nA location name must be unique within a seller account." }, "address": { "$ref": "#/definitions/Address", "description": "The physical address of the location." }, "timezone": { "maxLength": 30, "type": "string", "description": "The [IANA time zone](https://www.iana.org/time-zones) identifier for\nthe time zone of the location. For example, `America/Los_Angeles`." }, "capabilities": { "type": "array", "items": { "type": "string" }, "description": "The Square features that are enabled for the location.\nSee [LocationCapability](https://developer.squareup.com/reference/square_2024-04-17/enums/LocationCapability) for possible values.", "x-read-only": true }, "status": { "type": "string", "description": "The status of the location." }, "created_at": { "minLength": 20, "maxLength": 25, "type": "string", "description": "The time when the location was created, in RFC 3339 format.\nFor more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates).", "x-read-only": true }, "merchant_id": { "maxLength": 32, "type": "string", "description": "The ID of the merchant that owns the location.", "x-read-only": true }, "country": { "type": "string", "description": "The country of the location, in the two-letter format of ISO 3166. For example, `US` or `JP`.\n\nSee [Country](https://developer.squareup.com/reference/square_2024-04-17/enums/Country) for possible values.", "x-read-only": true }, "language_code": { "minLength": 2, "maxLength": 5, "type": "string", "description": "The language associated with the location, in\n[BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).\nFor more information, see [Language Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences)." }, "currency": { "type": "string", "description": "The currency used for all transactions at this location,\nin ISO 4217 format. For example, the currency code for US dollars is `USD`.\nSee [Currency](https://developer.squareup.com/reference/square_2024-04-17/enums/Currency) for possible values.", "x-read-only": true }, "phone_number": { "maxLength": 17, "type": "string", "description": "The phone number of the location. For example, `+1 855-700-6000`." }, "business_name": { "maxLength": 255, "type": "string", "description": "The name of the location\u0027s overall business. This name is present on receipts and other customer-facing branding, and can be changed no more than three times in a twelve-month period." }, "type": { "type": "string", "description": "The type of the location." }, "website_url": { "maxLength": 255, "type": "string", "description": "The website URL of the location. For example, `https://squareup.com`." }, "business_hours": { "$ref": "#/definitions/BusinessHours", "description": "The hours of operation for the location." }, "business_email": { "maxLength": 255, "type": "string", "description": "The email address of the location. This can be unique to the location and is not always the email address for the business owner or administrator." }, "description": { "maxLength": 1024, "type": "string", "description": "The description of the location. For example, `Main Street location`." }, "twitter_username": { "minLength": 1, "maxLength": 15, "type": "string", "description": "The Twitter username of the location without the \u0027\u0026#64;\u0027 symbol. For example, `Square`." }, "instagram_username": { "minLength": 1, "maxLength": 30, "type": "string", "description": "The Instagram username of the location without the \u0027\u0026#64;\u0027 symbol. For example, `square`." }, "facebook_url": { "maxLength": 255, "type": "string", "description": "The Facebook profile URL of the location. The URL should begin with \u0027facebook.com/\u0027. For example, `https://www.facebook.com/square`." }, "coordinates": { "$ref": "#/definitions/Coordinates", "description": "The physical coordinates (latitude and longitude) of the location." }, "logo_url": { "maxLength": 255, "type": "string", "description": "The URL of the logo image for the location. When configured in the Seller\nDashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.\nThis image should have a roughly square (1:1) aspect ratio and should be at least 200x200 pixels.", "x-read-only": true }, "pos_background_url": { "maxLength": 255, "type": "string", "description": "The URL of the Point of Sale background image for the location.", "x-read-only": true }, "mcc": { "minLength": 4, "maxLength": 4, "type": "string", "description": "A four-digit number that describes the kind of goods or services sold at the location.\nThe [merchant category code (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) of the location as standardized by ISO 18245.\nFor example, `5045`, for a location that sells computer goods and software.", "x-release-status": "BETA", "x-is-beta": true }, "full_format_logo_url": { "type": "string", "description": "The URL of a full-format logo image for the location. When configured in the Seller\nDashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.\nThis image can be wider than it is tall and should be at least 1280x648 pixels.", "x-read-only": true }, "tax_ids": { "$ref": "#/definitions/TaxIds", "description": "The tax IDs for this location.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true } }, "description": "Represents one of a business\u0027 [locations](https://developer.squareup.com/docs/locations-api).", "x-release-status": "PUBLIC" }, "LocationBookingProfile": { "type": "object", "properties": { "location_id": { "type": "string", "description": "The ID of the [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location)." }, "booking_site_url": { "type": "string", "description": "Url for the online booking site for this location." }, "online_booking_enabled": { "type": "boolean", "description": "Indicates whether the location is enabled for online booking." } }, "description": "The booking profile of a seller\u0027s location, including the location\u0027s ID and whether the location is enabled for online booking.", "x-release-status": "PUBLIC" }, "LoyaltyAccount": { "type": "object", "required": [ "program_id" ], "properties": { "id": { "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the loyalty account.", "x-read-only": true }, "program_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram) to which the account belongs." }, "balance": { "type": "integer", "description": "The available point balance in the loyalty account. If points are scheduled to expire, they are listed in the `expiring_point_deadlines` field.\n\nYour application should be able to handle loyalty accounts that have a negative point balance (`balance` is less than 0). This might occur if a seller makes a manual adjustment or as a result of a refund or exchange.", "x-read-only": true }, "lifetime_points": { "minimum": 0, "type": "integer", "description": "The total points accrued during the lifetime of the account.", "x-read-only": true }, "customer_id": { "type": "string", "description": "The Square-assigned ID of the [customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) that is associated with the account." }, "enrolled_at": { "type": "string", "description": "The timestamp when the buyer joined the loyalty program, in RFC 3339 format. This field is used to display the **Enrolled On** or **Member Since** date in first-party Square products.\n\nIf this field is not set in a `CreateLoyaltyAccount` request, Square populates it after the buyer\u0027s first action on their account \n(when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). In first-party flows, Square populates the field when the buyer agrees to the terms of service in Square Point of Sale. \n\nThis field is typically specified in a `CreateLoyaltyAccount` request when creating a loyalty account for a buyer who already interacted with their account. \nFor example, you would set this field when migrating accounts from an external system. The timestamp in the request can represent a current or previous date and time, but it cannot be set for the future." }, "created_at": { "type": "string", "description": "The timestamp when the loyalty account was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp when the loyalty account was last updated, in RFC 3339 format.", "x-read-only": true }, "mapping": { "$ref": "#/definitions/LoyaltyAccountMapping", "description": "The mapping that associates the loyalty account with a buyer. Currently,\na loyalty account can only be mapped to a buyer by phone number.\n\nTo create a loyalty account, you must specify the `mapping` field, with the buyer\u0027s phone number\nin the `phone_number` field." }, "expiring_point_deadlines": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyAccountExpiringPointDeadline" }, "description": "The schedule for when points expire in the loyalty account balance. This field is present only if the account has points that are scheduled to expire. \n\nThe total number of points in this field equals the number of points in the `balance` field." } }, "description": "Describes a loyalty account in a [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram). For more information, see\n[Create and Retrieve Loyalty Accounts](https://developer.squareup.com/docs/loyalty-api/loyalty-accounts).", "x-release-status": "PUBLIC" }, "LoyaltyAccountExpiringPointDeadline": { "type": "object", "required": [ "points", "expires_at" ], "properties": { "points": { "type": "integer", "description": "The number of points scheduled to expire at the `expires_at` timestamp." }, "expires_at": { "minLength": 1, "type": "string", "description": "The timestamp of when the points are scheduled to expire, in RFC 3339 format." } }, "description": "Represents a set of points for a loyalty account that are scheduled to expire on a specific date.", "x-release-status": "PUBLIC" }, "LoyaltyAccountMapping": { "type": "object", "properties": { "id": { "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the mapping.", "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp when the mapping was created, in RFC 3339 format.", "x-read-only": true }, "phone_number": { "type": "string", "description": "The phone number of the buyer, in E.164 format. For example, \"+14155551111\"." } }, "description": "Represents the mapping that associates a loyalty account with a buyer. \n\nCurrently, a loyalty account can only be mapped to a buyer by phone number. For more information, see \n[Loyalty Overview](https://developer.squareup.com/docs/loyalty/overview).", "x-release-status": "PUBLIC" }, "LoyaltyEvent": { "type": "object", "required": [ "id", "type", "created_at", "loyalty_account_id", "source" ], "properties": { "id": { "minLength": 1, "type": "string", "description": "The Square-assigned ID of the loyalty event.", "x-read-only": true }, "type": { "type": "string", "description": "The type of the loyalty event.", "x-read-only": true }, "created_at": { "minLength": 1, "type": "string", "description": "The timestamp when the event was created, in RFC 3339 format.", "x-read-only": true }, "accumulate_points": { "$ref": "#/definitions/LoyaltyEventAccumulatePoints", "description": "Provides metadata when the event `type` is `ACCUMULATE_POINTS`.", "x-read-only": true }, "create_reward": { "$ref": "#/definitions/LoyaltyEventCreateReward", "description": "Provides metadata when the event `type` is `CREATE_REWARD`.", "x-read-only": true }, "redeem_reward": { "$ref": "#/definitions/LoyaltyEventRedeemReward", "description": "Provides metadata when the event `type` is `REDEEM_REWARD`.", "x-read-only": true }, "delete_reward": { "$ref": "#/definitions/LoyaltyEventDeleteReward", "description": "Provides metadata when the event `type` is `DELETE_REWARD`.", "x-read-only": true }, "adjust_points": { "$ref": "#/definitions/LoyaltyEventAdjustPoints", "description": "Provides metadata when the event `type` is `ADJUST_POINTS`.", "x-read-only": true }, "loyalty_account_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The ID of the [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount) associated with the event.", "x-read-only": true }, "location_id": { "type": "string", "description": "The ID of the [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the event occurred.", "x-read-only": true }, "source": { "type": "string", "description": "Defines whether the event was generated by the Square Point of Sale.", "x-read-only": true }, "expire_points": { "$ref": "#/definitions/LoyaltyEventExpirePoints", "description": "Provides metadata when the event `type` is `EXPIRE_POINTS`.", "x-read-only": true }, "other_event": { "$ref": "#/definitions/LoyaltyEventOther", "description": "Provides metadata when the event `type` is `OTHER`.", "x-read-only": true }, "accumulate_promotion_points": { "$ref": "#/definitions/LoyaltyEventAccumulatePromotionPoints", "description": "Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`.", "x-read-only": true } }, "description": "Provides information about a loyalty event. \nFor more information, see [Search for Balance-Changing Loyalty Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events).", "x-release-status": "PUBLIC" }, "LoyaltyEventAccumulatePoints": { "type": "object", "properties": { "loyalty_program_id": { "maxLength": 36, "type": "string", "description": "The ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-read-only": true }, "points": { "minimum": 1, "type": "integer", "description": "The number of points accumulated by the event." }, "order_id": { "type": "string", "description": "The ID of the [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) for which the buyer accumulated the points.\nThis field is returned only if the Orders API is used to process orders." } }, "description": "Provides metadata when the event `type` is `ACCUMULATE_POINTS`.", "x-release-status": "PUBLIC" }, "LoyaltyEventAccumulatePromotionPoints": { "type": "object", "required": [ "points", "order_id" ], "properties": { "loyalty_program_id": { "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-read-only": true }, "loyalty_promotion_id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The Square-assigned ID of the [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion).", "x-read-only": true }, "points": { "type": "integer", "description": "The number of points earned by the event.", "x-read-only": true }, "order_id": { "minLength": 1, "type": "string", "description": "The ID of the [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) for which the buyer earned the promotion points.\nOnly applications that use the Orders API to process orders can trigger this event.", "x-read-only": true } }, "description": "Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`.", "x-release-status": "PUBLIC" }, "LoyaltyEventAdjustPoints": { "type": "object", "required": [ "points" ], "properties": { "loyalty_program_id": { "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-read-only": true }, "points": { "type": "integer", "description": "The number of points added or removed." }, "reason": { "type": "string", "description": "The reason for the adjustment of points." } }, "description": "Provides metadata when the event `type` is `ADJUST_POINTS`.", "x-release-status": "PUBLIC" }, "LoyaltyEventCreateReward": { "type": "object", "required": [ "loyalty_program_id", "points" ], "properties": { "loyalty_program_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-read-only": true }, "reward_id": { "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the created [loyalty reward](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyReward).\nThis field is returned only if the event source is `LOYALTY_API`.", "x-read-only": true }, "points": { "maximum": 0, "type": "integer", "description": "The loyalty points used to create the reward.", "x-read-only": true } }, "description": "Provides metadata when the event `type` is `CREATE_REWARD`.", "x-release-status": "PUBLIC" }, "LoyaltyEventDateTimeFilter": { "type": "object", "required": [ "created_at" ], "properties": { "created_at": { "$ref": "#/definitions/TimeRange", "description": "The `created_at` date time range used to filter the result." } }, "description": "Filter events by date time range.", "x-release-status": "PUBLIC" }, "LoyaltyEventDeleteReward": { "type": "object", "required": [ "loyalty_program_id", "points" ], "properties": { "loyalty_program_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-read-only": true }, "reward_id": { "maxLength": 36, "type": "string", "description": "The ID of the deleted [loyalty reward](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyReward).\nThis field is returned only if the event source is `LOYALTY_API`.", "x-read-only": true }, "points": { "minimum": 0, "type": "integer", "description": "The number of points returned to the loyalty account.", "x-read-only": true } }, "description": "Provides metadata when the event `type` is `DELETE_REWARD`.", "x-release-status": "PUBLIC" }, "LoyaltyEventExpirePoints": { "type": "object", "required": [ "loyalty_program_id", "points" ], "properties": { "loyalty_program_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-read-only": true }, "points": { "maximum": 0, "type": "integer", "description": "The number of points expired." } }, "description": "Provides metadata when the event `type` is `EXPIRE_POINTS`.", "x-release-status": "PUBLIC" }, "LoyaltyEventFilter": { "type": "object", "properties": { "loyalty_account_filter": { "$ref": "#/definitions/LoyaltyEventLoyaltyAccountFilter", "description": "Filter events by loyalty account." }, "type_filter": { "$ref": "#/definitions/LoyaltyEventTypeFilter", "description": "Filter events by event type." }, "date_time_filter": { "$ref": "#/definitions/LoyaltyEventDateTimeFilter", "description": "Filter events by date time range. \nFor each range, the start time is inclusive and the end time \nis exclusive." }, "location_filter": { "$ref": "#/definitions/LoyaltyEventLocationFilter", "description": "Filter events by location." }, "order_filter": { "$ref": "#/definitions/LoyaltyEventOrderFilter", "description": "Filter events by the order associated with the event." } }, "description": "The filtering criteria. If the request specifies multiple filters, \nthe endpoint uses a logical AND to evaluate them.", "x-release-status": "PUBLIC" }, "LoyaltyEventLocationFilter": { "type": "object", "required": [ "location_ids" ], "properties": { "location_ids": { "type": "array", "items": { "minLength": 1, "type": "string" }, "description": "The [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) IDs for loyalty events to query.\nIf multiple values are specified, the endpoint uses \na logical OR to combine them." } }, "description": "Filter events by location.", "x-release-status": "PUBLIC" }, "LoyaltyEventLoyaltyAccountFilter": { "type": "object", "required": [ "loyalty_account_id" ], "properties": { "loyalty_account_id": { "minLength": 1, "type": "string", "description": "The ID of the [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount) associated with loyalty events." } }, "description": "Filter events by loyalty account.", "x-release-status": "PUBLIC" }, "LoyaltyEventOrderFilter": { "type": "object", "required": [ "order_id" ], "properties": { "order_id": { "minLength": 1, "type": "string", "description": "The ID of the [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) associated with the event." } }, "description": "Filter events by the order associated with the event.", "x-release-status": "PUBLIC" }, "LoyaltyEventOther": { "type": "object", "required": [ "loyalty_program_id", "points" ], "properties": { "loyalty_program_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-read-only": true }, "points": { "type": "integer", "description": "The number of points added or removed." } }, "description": "Provides metadata when the event `type` is `OTHER`.", "x-release-status": "PUBLIC" }, "LoyaltyEventQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/LoyaltyEventFilter", "description": "The query filter criteria." } }, "description": "Represents a query used to search for loyalty events.", "x-release-status": "PUBLIC" }, "LoyaltyEventRedeemReward": { "type": "object", "required": [ "loyalty_program_id" ], "properties": { "loyalty_program_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-read-only": true }, "reward_id": { "maxLength": 36, "type": "string", "description": "The ID of the redeemed [loyalty reward](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyReward).\nThis field is returned only if the event source is `LOYALTY_API`.", "x-read-only": true }, "order_id": { "type": "string", "description": "The ID of the [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) that redeemed the reward.\nThis field is returned only if the Orders API is used to process orders.", "x-read-only": true } }, "description": "Provides metadata when the event `type` is `REDEEM_REWARD`.", "x-release-status": "PUBLIC" }, "LoyaltyEventTypeFilter": { "type": "object", "required": [ "types" ], "properties": { "types": { "type": "array", "items": { "type": "string" }, "description": "The loyalty event types used to filter the result.\nIf multiple values are specified, the endpoint uses a \nlogical OR to combine them." } }, "description": "Filter events by event type.", "x-release-status": "PUBLIC" }, "LoyaltyProgram": { "type": "object", "required": [ "location_ids" ], "properties": { "id": { "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the loyalty program. Updates to \nthe loyalty program do not modify the identifier.", "x-read-only": true }, "status": { "type": "string", "description": "Whether the program is currently active." }, "reward_tiers": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyProgramRewardTier" }, "description": "The list of rewards for buyers, sorted by ascending points." }, "expiration_policy": { "$ref": "#/definitions/LoyaltyProgramExpirationPolicy", "description": "If present, details for how points expire." }, "terminology": { "$ref": "#/definitions/LoyaltyProgramTerminology", "description": "A cosmetic name for the “points” currency." }, "location_ids": { "type": "array", "items": { "minLength": 1, "type": "string" }, "description": "The [locations](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) at which the program is active." }, "created_at": { "type": "string", "description": "The timestamp when the program was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp when the reward was last updated, in RFC 3339 format.", "x-read-only": true }, "accrual_rules": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyProgramAccrualRule" }, "description": "Defines how buyers can earn loyalty points from the base loyalty program.\nTo check for associated [loyalty promotions](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion) that enable\nbuyers to earn extra points, call [ListLoyaltyPromotions](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/list-loyalty-promotions)." } }, "description": "Represents a Square loyalty program. Loyalty programs define how buyers can earn points and redeem points for rewards. \nSquare sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. \nFor more information, see [Loyalty Program Overview](https://developer.squareup.com/docs/loyalty/overview).", "x-release-status": "PUBLIC" }, "LoyaltyProgramAccrualRule": { "type": "object", "required": [ "accrual_type" ], "properties": { "accrual_type": { "type": "string", "description": "The type of the accrual rule that defines how buyers can earn points." }, "points": { "minimum": 1, "type": "integer", "description": "The number of points that \nbuyers earn based on the `accrual_type`." }, "visit_data": { "$ref": "#/definitions/LoyaltyProgramAccrualRuleVisitData", "description": "Additional data for rules with the `VISIT` accrual type." }, "spend_data": { "$ref": "#/definitions/LoyaltyProgramAccrualRuleSpendData", "description": "Additional data for rules with the `SPEND` accrual type." }, "item_variation_data": { "$ref": "#/definitions/LoyaltyProgramAccrualRuleItemVariationData", "description": "Additional data for rules with the `ITEM_VARIATION` accrual type." }, "category_data": { "$ref": "#/definitions/LoyaltyProgramAccrualRuleCategoryData", "description": "Additional data for rules with the `CATEGORY` accrual type." } }, "description": "Represents an accrual rule, which defines how buyers can earn points from the base [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram).", "x-release-status": "PUBLIC" }, "LoyaltyProgramAccrualRuleCategoryData": { "type": "object", "required": [ "category_id" ], "properties": { "category_id": { "minLength": 1, "type": "string", "description": "The ID of the `CATEGORY` [catalog object](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) that buyers can purchase to earn\npoints." } }, "description": "Represents additional data for rules with the `CATEGORY` accrual type.", "x-release-status": "PUBLIC" }, "LoyaltyProgramAccrualRuleItemVariationData": { "type": "object", "required": [ "item_variation_id" ], "properties": { "item_variation_id": { "minLength": 1, "type": "string", "description": "The ID of the `ITEM_VARIATION` [catalog object](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject) that buyers can purchase to earn\npoints." } }, "description": "Represents additional data for rules with the `ITEM_VARIATION` accrual type.", "x-release-status": "PUBLIC" }, "LoyaltyProgramAccrualRuleSpendData": { "type": "object", "required": [ "amount_money", "tax_mode" ], "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The amount that buyers must spend to earn points. \nFor example, given an \"Earn 1 point for every $10 spent\" accrual rule, a buyer who spends $105 earns 10 points." }, "excluded_category_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of any `CATEGORY` catalog objects that are excluded from points accrual.\n\nYou can use the [BatchRetrieveCatalogObjects](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/batch-retrieve-catalog-objects)\nendpoint to retrieve information about the excluded categories." }, "excluded_item_variation_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of any `ITEM_VARIATION` catalog objects that are excluded from points accrual.\n\nYou can use the [BatchRetrieveCatalogObjects](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/batch-retrieve-catalog-objects)\nendpoint to retrieve information about the excluded item variations." }, "tax_mode": { "type": "string", "description": "Indicates how taxes should be treated when calculating the purchase amount used for points accrual." } }, "description": "Represents additional data for rules with the `SPEND` accrual type.", "x-release-status": "PUBLIC" }, "LoyaltyProgramAccrualRuleVisitData": { "type": "object", "required": [ "tax_mode" ], "properties": { "minimum_amount_money": { "$ref": "#/definitions/Money", "description": "The minimum purchase required during the visit to quality for points." }, "tax_mode": { "type": "string", "description": "Indicates how taxes should be treated when calculating the purchase amount to determine whether the visit qualifies for points. \nThis setting applies only if `minimum_amount_money` is specified." } }, "description": "Represents additional data for rules with the `VISIT` accrual type.", "x-release-status": "PUBLIC" }, "LoyaltyProgramExpirationPolicy": { "type": "object", "required": [ "expiration_duration" ], "properties": { "expiration_duration": { "minLength": 1, "type": "string", "description": "The number of months before points expire, in `P[n]M` RFC 3339 duration format. For example, a value of `P12M` represents a duration of 12 months. \nPoints are valid through the last day of the month in which they are scheduled to expire. For example, with a `P12M` duration, points earned on July 6, 2020 expire on August 1, 2021." } }, "description": "Describes when the loyalty program expires.", "x-release-status": "PUBLIC" }, "LoyaltyProgramRewardDefinition": { "type": "object", "required": [ "scope", "discount_type" ], "properties": { "scope": { "type": "string", "description": "Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. You can find this information in the\n`product_set_data` field of the `PRODUCT_SET` catalog object referenced by the pricing rule. For `ORDER` scopes,\n`all_products` is true. For `ITEM_VARIATION` or `CATEGORY` scopes, `product_ids_any` is a list of\ncatalog object IDs of the given type.", "x-read-only": true }, "discount_type": { "type": "string", "description": "The type of discount the reward tier offers. DEPRECATED at version 2020-12-16. You can find this information\nin the `discount_data.discount_type` field of the `DISCOUNT` catalog object referenced by the pricing rule.", "x-read-only": true }, "percentage_discount": { "type": "string", "description": "The fixed percentage of the discount. Present if `discount_type` is `FIXED_PERCENTAGE`.\nFor example, a 7.25% off discount will be represented as \"7.25\". DEPRECATED at version 2020-12-16. You can find this\ninformation in the `discount_data.percentage` field of the `DISCOUNT` catalog object referenced by the pricing rule.", "x-read-only": true }, "catalog_object_ids": { "type": "array", "items": { "type": "string" }, "description": "The list of catalog objects to which this reward can be applied. They are either all item-variation ids or category ids, depending on the `type` field.\nDEPRECATED at version 2020-12-16. You can find this information in the `product_set_data.product_ids_any` field\nof the `PRODUCT_SET` catalog object referenced by the pricing rule.", "x-read-only": true }, "fixed_discount_money": { "$ref": "#/definitions/Money", "description": "The amount of the discount. Present if `discount_type` is `FIXED_AMOUNT`. For example, $5 off.\nDEPRECATED at version 2020-12-16. You can find this information in the `discount_data.amount_money` field of the \n`DISCOUNT` catalog object referenced by the pricing rule.", "x-read-only": true }, "max_discount_money": { "$ref": "#/definitions/Money", "description": "When `discount_type` is `FIXED_PERCENTAGE`, the maximum discount amount that can be applied.\nDEPRECATED at version 2020-12-16. You can find this information in the `discount_data.maximum_amount_money` field\nof the `DISCOUNT` catalog object referenced by the the pricing rule.", "x-read-only": true } }, "description": "Provides details about the reward tier discount. DEPRECATED at version 2020-12-16. Discount details\nare now defined using a catalog pricing rule and other catalog objects. For more information, see\n[Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "LoyaltyProgramRewardTier": { "type": "object", "required": [ "points", "pricing_rule_reference" ], "properties": { "id": { "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the reward tier.", "x-read-only": true }, "points": { "minimum": 1, "type": "integer", "description": "The points exchanged for the reward tier." }, "name": { "type": "string", "description": "The name of the reward tier.", "x-read-only": true }, "definition": { "$ref": "#/definitions/LoyaltyProgramRewardDefinition", "description": "Provides details about the reward tier definition.\nDEPRECATED at version 2020-12-16. Replaced by the `pricing_rule_reference` field.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp when the reward tier was created, in RFC 3339 format.", "x-read-only": true }, "pricing_rule_reference": { "$ref": "#/definitions/CatalogObjectReference", "description": "A reference to the specific version of a `PRICING_RULE` catalog object that contains information about the reward tier discount.\n\nUse `object_id` and `catalog_version` with the [RetrieveCatalogObject](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/retrieve-catalog-object) endpoint\nto get discount details. Make sure to set `include_related_objects` to true in the request to retrieve all catalog objects\nthat define the discount. For more information, see [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details)." } }, "description": "Represents a reward tier in a loyalty program. A reward tier defines how buyers can redeem points for a reward, such as the number of points required and the value and scope of the discount. A loyalty program can offer multiple reward tiers.", "x-release-status": "PUBLIC" }, "LoyaltyProgramTerminology": { "type": "object", "required": [ "one", "other" ], "properties": { "one": { "minLength": 1, "type": "string", "description": "A singular unit for a point (for example, 1 point is called 1 star)." }, "other": { "minLength": 1, "type": "string", "description": "A plural unit for point (for example, 10 points is called 10 stars)." } }, "description": "Represents the naming used for loyalty points.", "x-release-status": "PUBLIC" }, "LoyaltyPromotion": { "type": "object", "required": [ "name", "incentive", "available_time", "qualifying_item_variation_ids", "qualifying_category_ids" ], "properties": { "id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The Square-assigned ID of the promotion.", "x-read-only": true }, "name": { "minLength": 1, "maxLength": 70, "type": "string", "description": "The name of the promotion." }, "incentive": { "$ref": "#/definitions/LoyaltyPromotionIncentive", "description": "The points incentive for the promotion. This field defines whether promotion points\nare earned by multiplying base program points or by adding a specified number of points." }, "available_time": { "$ref": "#/definitions/LoyaltyPromotionAvailableTimeData", "description": "The scheduling information that defines when purchases can qualify to earn points from an `ACTIVE` promotion." }, "trigger_limit": { "$ref": "#/definitions/LoyaltyPromotionTriggerLimit", "description": "The number of times a buyer can earn promotion points during a specified interval.\nIf not specified, buyers can trigger the promotion an unlimited number of times." }, "status": { "type": "string", "description": "The current status of the promotion.", "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp of when the promotion was created, in RFC 3339 format.", "x-read-only": true }, "canceled_at": { "type": "string", "description": "The timestamp of when the promotion was canceled, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp when the promotion was last updated, in RFC 3339 format.", "x-read-only": true }, "loyalty_program_id": { "type": "string", "description": "The ID of the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram) associated with the promotion.", "x-read-only": true }, "minimum_spend_amount_money": { "$ref": "#/definitions/Money", "description": "The minimum purchase amount required to earn promotion points. If specified, this amount is positive." }, "qualifying_item_variation_ids": { "type": "array", "items": { "minLength": 1, "type": "string" }, "description": "The IDs of any qualifying `ITEM_VARIATION` [catalog objects](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject). If specified,\nthe purchase must include at least one of these items to qualify for the promotion.\n\nThis option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule.\nWith `SPEND` accrual rules, make sure that qualifying promotional items are not excluded.\n\nYou can specify `qualifying_item_variation_ids` or `qualifying_category_ids` for a given promotion, but not both." }, "qualifying_category_ids": { "type": "array", "items": { "minLength": 1, "type": "string" }, "description": "The IDs of any qualifying `CATEGORY` [catalog objects](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject). If specified,\nthe purchase must include at least one item from one of these categories to qualify for the promotion.\n\nThis option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule.\nWith `SPEND` accrual rules, make sure that qualifying promotional items are not excluded.\n\nYou can specify `qualifying_category_ids` or `qualifying_item_variation_ids` for a promotion, but not both." } }, "description": "Represents a promotion for a [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram). Loyalty promotions enable buyers\nto earn extra points on top of those earned from the base program.\n\nA loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` or `SCHEDULED` status.", "x-release-status": "PUBLIC" }, "LoyaltyPromotionAvailableTimeData": { "type": "object", "required": [ "time_periods" ], "properties": { "start_date": { "type": "string", "description": "The date that the promotion starts, in `YYYY-MM-DD` format. Square populates this field\nbased on the provided `time_periods`.", "x-read-only": true }, "end_date": { "type": "string", "description": "The date that the promotion ends, in `YYYY-MM-DD` format. Square populates this field\nbased on the provided `time_periods`. If an end date is not specified, an `ACTIVE` promotion\nremains available until it is canceled.", "x-read-only": true }, "time_periods": { "type": "array", "items": { "type": "string" }, "description": "A list of [iCalendar (RFC 5545) events](https://tools.ietf.org/html/rfc5545#section-3.6.1)\n(`VEVENT`). Each event represents an available time period per day or days of the week. \nA day can have a maximum of one available time period.\n\nOnly `DTSTART`, `DURATION`, and `RRULE` are supported. `DTSTART` and `DURATION` are required and\ntimestamps must be in local (unzoned) time format. Include `RRULE` to specify recurring promotions,\nan end date (using the `UNTIL` keyword), or both. For more information, see\n[Available time](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#available-time).\n\nNote that `BEGIN:VEVENT` and `END:VEVENT` are optional in a `CreateLoyaltyPromotion` request\nbut are always included in the response." } }, "description": "Represents scheduling information that determines when purchases can qualify to earn points\nfrom a [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion).", "x-release-status": "PUBLIC" }, "LoyaltyPromotionIncentive": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "description": "The type of points incentive." }, "points_multiplier_data": { "$ref": "#/definitions/LoyaltyPromotionIncentivePointsMultiplierData", "description": "Additional data for a `POINTS_MULTIPLIER` incentive type." }, "points_addition_data": { "$ref": "#/definitions/LoyaltyPromotionIncentivePointsAdditionData", "description": "Additional data for a `POINTS_ADDITION` incentive type." } }, "description": "Represents how points for a [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion) are calculated,\neither by multiplying the points earned from the base program or by adding a specified number\nof points to the points earned from the base program.", "x-release-status": "PUBLIC" }, "LoyaltyPromotionIncentivePointsAdditionData": { "type": "object", "required": [ "points_addition" ], "properties": { "points_addition": { "minimum": 1, "type": "integer", "description": "The number of additional points to earn each time the promotion is triggered. For example,\nsuppose a purchase qualifies for 5 points from the base loyalty program. If the purchase also\nqualifies for a `POINTS_ADDITION` promotion incentive with a `points_addition` of 3, the buyer\nearns a total of 8 points (5 program points + 3 promotion points \u003d 8 points)." } }, "description": "Represents the metadata for a `POINTS_ADDITION` type of [loyalty promotion incentive](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotionIncentive).", "x-release-status": "PUBLIC" }, "LoyaltyPromotionIncentivePointsMultiplierData": { "type": "object", "properties": { "points_multiplier": { "maximum": 10, "minimum": 2, "type": "integer", "description": "The multiplier used to calculate the number of points earned each time the promotion\nis triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program.\nIf the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `points_multiplier`\nof 3, the buyer earns a total of 15 points (5 program points x 3 promotion multiplier \u003d 15 points).\n\nDEPRECATED at version 2023-08-16. Replaced by the `multiplier` field.\n\nOne of the following is required when specifying a points multiplier:\n- (Recommended) The `multiplier` field.\n- This deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier`\nwith the equivalent value.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "multiplier": { "maxLength": 5, "type": "string", "description": "The multiplier used to calculate the number of points earned each time the promotion is triggered,\nspecified as a string representation of a decimal. Square supports multipliers up to 10x, with three\npoint precision for decimal multipliers. For example, suppose a purchase qualifies for 4 points from the\nbase loyalty program. If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a\n`multiplier` of \"1.5\", the buyer earns a total of 6 points (4 program points x 1.5 promotion multiplier \u003d 6 points).\nFractional points are dropped.\n\nOne of the following is required when specifying a points multiplier:\n- (Recommended) This `multiplier` field.\n- The deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier`\nwith the equivalent value." } }, "description": "Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty promotion incentive](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotionIncentive).", "x-release-status": "PUBLIC" }, "LoyaltyPromotionTriggerLimit": { "type": "object", "required": [ "times" ], "properties": { "times": { "maximum": 30, "minimum": 1, "type": "integer", "description": "The maximum number of times a buyer can trigger the promotion during the specified `interval`." }, "interval": { "type": "string", "description": "The time period the limit applies to." } }, "description": "Represents the number of times a buyer can earn points during a [loyalty promotion](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyPromotion).\nIf this field is not set, buyers can trigger the promotion an unlimited number of times to earn points during\nthe time that the promotion is available.\n\nA purchase that is disqualified from earning points because of this limit might qualify for another active promotion.", "x-release-status": "PUBLIC" }, "LoyaltyReward": { "type": "object", "required": [ "loyalty_account_id", "reward_tier_id" ], "properties": { "id": { "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the loyalty reward.", "x-read-only": true }, "status": { "type": "string", "description": "The status of a loyalty reward.", "x-read-only": true }, "loyalty_account_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount) to which the reward belongs." }, "reward_tier_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The Square-assigned ID of the [reward tier](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgramRewardTier) used to create the reward." }, "points": { "minimum": 1, "type": "integer", "description": "The number of loyalty points used for the reward.", "x-read-only": true }, "order_id": { "type": "string", "description": "The Square-assigned ID of the [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) to which the reward is attached." }, "created_at": { "type": "string", "description": "The timestamp when the reward was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp when the reward was last updated, in RFC 3339 format.", "x-read-only": true }, "redeemed_at": { "type": "string", "description": "The timestamp when the reward was redeemed, in RFC 3339 format.", "x-read-only": true } }, "description": "Represents a contract to redeem loyalty points for a [reward tier](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgramRewardTier) discount. Loyalty rewards can be in an ISSUED, REDEEMED, or DELETED state. \nFor more information, see [Manage loyalty rewards](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards).", "x-release-status": "PUBLIC" }, "MeasurementUnit": { "type": "object", "properties": { "custom_unit": { "$ref": "#/definitions/MeasurementUnitCustom", "description": "A custom unit of measurement defined by the seller using the Point of Sale\napp or ad-hoc as an order line item." }, "area_unit": { "type": "string", "description": "Represents a standard area unit." }, "length_unit": { "type": "string", "description": "Represents a standard length unit." }, "volume_unit": { "type": "string", "description": "Represents a standard volume unit." }, "weight_unit": { "type": "string", "description": "Represents a standard unit of weight or mass." }, "generic_unit": { "type": "string", "description": "Reserved for API integrations that lack the ability to specify a real measurement unit" }, "time_unit": { "type": "string", "description": "Represents a standard unit of time." }, "type": { "type": "string", "description": "Represents the type of the measurement unit." } }, "description": "Represents a unit of measurement to use with a quantity, such as ounces\nor inches. Exactly one of the following fields are required: `custom_unit`,\n`area_unit`, `length_unit`, `volume_unit`, and `weight_unit`.", "x-release-status": "PUBLIC" }, "MeasurementUnitCustom": { "type": "object", "required": [ "name", "abbreviation" ], "properties": { "name": { "type": "string", "description": "The name of the custom unit, for example \"bushel\"." }, "abbreviation": { "type": "string", "description": "The abbreviation of the custom unit, such as \"bsh\" (bushel). This appears\nin the cart for the Point of Sale app, and in reports." } }, "description": "The information needed to define a custom unit, provided by the seller.", "x-release-status": "PUBLIC" }, "Merchant": { "type": "object", "required": [ "country" ], "properties": { "id": { "type": "string", "description": "The Square-issued ID of the merchant." }, "business_name": { "type": "string", "description": "The name of the merchant\u0027s overall business." }, "country": { "type": "string", "description": "The country code associated with the merchant, in the two-letter format of ISO 3166. For example, `US` or `JP`." }, "language_code": { "type": "string", "description": "The code indicating the [language preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences) of the merchant, in [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). For example, `en-US` or `fr-CA`." }, "currency": { "type": "string", "description": "The currency associated with the merchant, in ISO 4217 format. For example, the currency code for US dollars is `USD`." }, "status": { "type": "string", "description": "The merchant\u0027s status." }, "main_location_id": { "type": "string", "description": "The ID of the [main `Location`](https://developer.squareup.com/docs/locations-api#about-the-main-location) for this merchant." }, "created_at": { "type": "string", "description": "The time when the merchant was created, in RFC 3339 format.\n For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates).", "x-read-only": true } }, "description": "Represents a business that sells with Square.", "x-release-status": "PUBLIC" }, "ModifierLocationOverrides": { "type": "object", "properties": { "location_id": { "type": "string", "description": "The ID of the `Location` object representing the location. This can include a deactivated location." }, "price_money": { "$ref": "#/definitions/Money", "description": "The overridden price at the specified location. If this is unspecified, the modifier price is not overridden.\nThe modifier becomes free of charge at the specified location, when this `price_money` field is set to 0." }, "sold_out": { "type": "boolean", "description": "Indicates whether the modifier is sold out at the specified location or not. As an example, for cheese (modifier) burger (item), when the modifier is sold out, it is the cheese, but not the burger, that is sold out.\nThe seller can manually set this sold out status. Attempts by an application to set this attribute are ignored.", "x-read-only": true } }, "description": "Location-specific overrides for specified properties of a `CatalogModifier` object.", "x-release-status": "PUBLIC" }, "Money": { "type": "object", "properties": { "amount": { "type": "integer", "format": "int64", "description": "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." }, "currency": { "type": "string", "description": "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2024-04-17/enums/Currency) for possible values." } }, "description": "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information.", "x-release-status": "PUBLIC" }, "ObtainTokenRequest": { "type": "object", "required": [ "client_id", "grant_type" ], "properties": { "client_id": { "maxLength": 191, "type": "string", "description": "The Square-issued ID of your application, which is available on the **OAuth** page in the\n[Developer Dashboard](https://developer.squareup.com/apps)." }, "client_secret": { "minLength": 2, "maxLength": 1024, "type": "string", "description": "The Square-issued application secret for your application, which is available on the **OAuth** page\nin the [Developer Dashboard](https://developer.squareup.com/apps). This parameter is only required when \nyou\u0027re not using the [OAuth PKCE (Proof Key for Code Exchange) flow](https://developer.squareup.com/docs/oauth-api/overview#pkce-flow).\nThe PKCE flow requires a `code_verifier` instead of a `client_secret` when `grant_type` is set to `authorization_code`. \nIf `grant_type` is set to `refresh_token` and the `refresh_token` is obtained uaing PKCE, the PKCE flow only requires `client_id`, \n`grant_type`, and `refresh_token`." }, "code": { "minLength": 0, "maxLength": 191, "type": "string", "description": "The authorization code to exchange.\nThis code is required if `grant_type` is set to `authorization_code` to indicate that\nthe application wants to exchange an authorization code for an OAuth access token." }, "redirect_uri": { "minLength": 0, "maxLength": 2048, "type": "string", "description": "The redirect URL assigned on the **OAuth** page for your application in the [Developer Dashboard](https://developer.squareup.com/apps)." }, "grant_type": { "minLength": 10, "maxLength": 20, "type": "string", "description": "Specifies the method to request an OAuth access token.\nValid values are `authorization_code`, `refresh_token`, and `migration_token`." }, "refresh_token": { "minLength": 2, "maxLength": 1024, "type": "string", "description": "A valid refresh token for generating a new OAuth access token.\n\nA valid refresh token is required if `grant_type` is set to `refresh_token`\nto indicate that the application wants a replacement for an expired OAuth access token." }, "migration_token": { "minLength": 2, "maxLength": 1024, "type": "string", "description": "A legacy OAuth access token obtained using a Connect API version prior\nto 2019-03-13. This parameter is required if `grant_type` is set to\n`migration_token` to indicate that the application wants to get a replacement\nOAuth access token. The response also returns a refresh token.\nFor more information, see [Migrate to Using Refresh Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens)." }, "scopes": { "type": "array", "items": { "type": "string" }, "description": "A JSON list of strings representing the permissions that the application is requesting.\nFor example, \"`[\"MERCHANT_PROFILE_READ\",\"PAYMENTS_READ\",\"BANK_ACCOUNTS_READ\"]`\".\n\nThe access token returned in the response is granted the permissions\nthat comprise the intersection between the requested list of permissions and those\nthat belong to the provided refresh token." }, "short_lived": { "type": "boolean", "description": "A Boolean indicating a request for a short-lived access token.\n\nThe short-lived access token returned in the response expires in 24 hours." }, "code_verifier": { "type": "string", "description": "Must be provided when using the PKCE OAuth flow if `grant_type` is set to `authorization_code`. The `code_verifier` is used to verify against the\n`code_challenge` associated with the `authorization_code`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "client_id": "APPLICATION_ID", "client_secret": "APPLICATION_SECRET", "code": "CODE_FROM_AUTHORIZE", "grant_type": "authorization_code" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ObtainToken/ObtainTokenRequest.python", "csharp": "/sdk_samples/ObtainToken/ObtainTokenRequest.csharp", "java": "/sdk_samples/ObtainToken/ObtainTokenRequest.java", "php": "/sdk_samples/ObtainToken/ObtainTokenRequest.php", "javascript": "/sdk_samples/ObtainToken/ObtainTokenRequest.javascript", "ruby": "/sdk_samples/ObtainToken/ObtainTokenRequest.ruby" } }, "ObtainTokenResponse": { "type": "object", "properties": { "access_token": { "minLength": 2, "maxLength": 1024, "type": "string", "description": "A valid OAuth access token. \nProvide the access token in a header with every request to Connect API\nendpoints. For more information, see [OAuth API: Walkthrough](https://developer.squareup.com/docs/oauth-api/walkthrough)." }, "token_type": { "minLength": 2, "maxLength": 10, "type": "string", "description": "This value is always _bearer_." }, "expires_at": { "minLength": 20, "maxLength": 48, "type": "string", "description": "The date when the `access_token` expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format." }, "merchant_id": { "minLength": 8, "maxLength": 191, "type": "string", "description": "The ID of the authorizing merchant\u0027s business." }, "subscription_id": { "type": "string", "description": "__LEGACY FIELD__. The ID of a subscription plan the merchant signed up\nfor. The ID is only present if the merchant signed up for a subscription plan during authorization." }, "plan_id": { "type": "string", "description": "__LEGACY FIELD__. The ID of the subscription plan the merchant signed\nup for. The ID is only present if the merchant signed up for a subscription plan during\nauthorization." }, "id_token": { "type": "string", "description": "The OpenID token belonging to this person. This token is only present if the\nOPENID scope is included in the authorization request.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "refresh_token": { "minLength": 2, "maxLength": 1024, "type": "string", "description": "A refresh token. \nFor more information, see [Refresh, Revoke, and Limit the Scope of OAuth Tokens](https://developer.squareup.com/docs/oauth-api/refresh-revoke-limit-scope)." }, "short_lived": { "type": "boolean", "description": "A Boolean indicating that the access token is a short-lived access token.\nThe short-lived access token returned in the response expires in 24 hours." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "refresh_token_expires_at": { "minLength": 20, "maxLength": 48, "type": "string", "description": "The date when the `refresh_token` expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format." } }, "description": "", "x-release-status": "PUBLIC", "example": { "access_token": "ACCESS_TOKEN", "token_type": "bearer", "expires_at": "2006-01-02T15:04:05Z", "merchant_id": "MERCHANT_ID", "refresh_token": "REFRESH_TOKEN" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ObtainToken/ObtainTokenResponse.python", "csharp": "/sdk_samples/ObtainToken/ObtainTokenResponse.csharp", "java": "/sdk_samples/ObtainToken/ObtainTokenResponse.java", "php": "/sdk_samples/ObtainToken/ObtainTokenResponse.php", "javascript": "/sdk_samples/ObtainToken/ObtainTokenResponse.javascript", "ruby": "/sdk_samples/ObtainToken/ObtainTokenResponse.ruby" } }, "Order": { "type": "object", "required": [ "location_id" ], "properties": { "id": { "type": "string", "description": "The order\u0027s unique ID.", "x-read-only": true }, "location_id": { "minLength": 1, "type": "string", "description": "The ID of the seller location that this order is associated with." }, "reference_id": { "maxLength": 40, "type": "string", "description": "A client-specified ID to associate an entity in another system\nwith this order." }, "source": { "$ref": "#/definitions/OrderSource", "description": "The origination details of the order." }, "customer_id": { "maxLength": 191, "type": "string", "description": "The ID of the [customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) associated with the order.\n\nYou should specify a `customer_id` on the order (or the payment) to ensure that transactions\nare reliably linked to customers. Omitting this field might result in the creation of new\n[instant profiles](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles).", "x-release-status": "BETA", "x-is-beta": true }, "line_items": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItem" }, "description": "The line items included in the order." }, "taxes": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemTax" }, "description": "The list of all taxes associated with the order.\n\nTaxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an\n`OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes\nwith `ORDER` scope, the server generates an `OrderLineItemAppliedTax` for every line item.\n\nOn reads, each tax in the list includes the total amount of that tax applied to the order.\n\n__IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, using the deprecated\n`line_items.taxes` field results in an error. Use `line_items.applied_taxes`\ninstead." }, "discounts": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemDiscount" }, "description": "The list of all discounts associated with the order.\n\nDiscounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`,\nan `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to.\nFor discounts with `ORDER` scope, the server generates an `OrderLineItemAppliedDiscount`\nfor every line item.\n\n__IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, using the deprecated\n`line_items.discounts` field results in an error. Use `line_items.applied_discounts`\ninstead." }, "service_charges": { "type": "array", "items": { "$ref": "#/definitions/OrderServiceCharge" }, "description": "A list of service charges applied to the order." }, "fulfillments": { "type": "array", "items": { "$ref": "#/definitions/Fulfillment" }, "description": "Details about order fulfillment.\n\nOrders can only be created with at most one fulfillment. However, orders returned\nby the API might contain multiple fulfillments." }, "returns": { "type": "array", "items": { "$ref": "#/definitions/OrderReturn" }, "description": "A collection of items from sale orders being returned in this one. Normally part of an\nitemized return or exchange. There is exactly one `Return` object per sale `Order` being\nreferenced.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "return_amounts": { "$ref": "#/definitions/OrderMoneyAmounts", "description": "The rollup of the returned money amounts.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "net_amounts": { "$ref": "#/definitions/OrderMoneyAmounts", "description": "The net money amounts (sale money - return money).", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "rounding_adjustment": { "$ref": "#/definitions/OrderRoundingAdjustment", "description": "A positive rounding adjustment to the total of the order. This adjustment is commonly\nused to apply cash rounding when the minimum unit of account is smaller than the lowest physical\ndenomination of the currency.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "tenders": { "type": "array", "items": { "$ref": "#/definitions/Tender" }, "description": "The tenders that were used to pay for the order.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "refunds": { "type": "array", "items": { "$ref": "#/definitions/Refund" }, "description": "The refunds that are part of this order.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this order. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\n\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\n\nValues have a maximum length of 255 characters.\n\nAn application can have up to 10 entries per metadata field.\n\nEntries written by applications are private and can only be read or modified by the same\napplication.\n\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", "x-release-status": "BETA", "x-is-beta": true }, "created_at": { "type": "string", "description": "The timestamp for when the order was created, at server side, in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp for when the order was last updated, at server side, in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "closed_at": { "type": "string", "description": "The timestamp for when the order reached a terminal [state](https://developer.squareup.com/reference/square_2024-04-17/enums/OrderState), in RFC 3339 format (for example \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "state": { "type": "string", "description": "The current state of the order." }, "version": { "type": "integer", "description": "The version number, which is incremented each time an update is committed to the order.\nOrders not created through the API do not include a version number and\ntherefore cannot be updated.\n\n[Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders).", "x-release-status": "BETA", "x-is-beta": true }, "total_money": { "$ref": "#/definitions/Money", "description": "The total amount of money to collect for the order.", "x-read-only": true }, "total_tax_money": { "$ref": "#/definitions/Money", "description": "The total amount of tax money to collect for the order.", "x-read-only": true }, "total_discount_money": { "$ref": "#/definitions/Money", "description": "The total amount of discount money to collect for the order.", "x-read-only": true }, "total_tip_money": { "$ref": "#/definitions/Money", "description": "The total amount of tip money to collect for the order.", "x-read-only": true }, "total_service_charge_money": { "$ref": "#/definitions/Money", "description": "The total amount of money collected in service charges for the order.\n\nNote: `total_service_charge_money` is the sum of `applied_money` fields for each individual\nservice charge. Therefore, `total_service_charge_money` only includes inclusive tax amounts,\nnot additive tax amounts.", "x-read-only": true }, "ticket_name": { "maxLength": 30, "type": "string", "description": "A short-term identifier for the order (such as a customer first name,\ntable number, or auto-generated order number that resets daily).", "x-release-status": "BETA", "x-is-beta": true }, "pricing_options": { "$ref": "#/definitions/OrderPricingOptions", "description": "Pricing options for an order. The options affect how the order\u0027s price is calculated.\nThey can be used, for example, to apply automatic price adjustments that are based on\npreconfigured [pricing rules](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogPricingRule)." }, "rewards": { "type": "array", "items": { "$ref": "#/definitions/OrderReward" }, "description": "A set-like list of Rewards that have been added to the Order.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "net_amount_due_money": { "$ref": "#/definitions/Money", "description": "The net amount of money due on the order.", "x-read-only": true } }, "description": "Contains all information related to a single order to process with Square,\nincluding line items that specify the products to purchase. `Order` objects also\ninclude information about any associated tenders, refunds, and returns.\n\nAll Connect V2 Transactions have all been converted to Orders including all associated\nitemization data.", "x-release-status": "PUBLIC" }, "OrderCreated": { "type": "object", "properties": { "order_id": { "type": "string", "description": "The order\u0027s unique ID." }, "version": { "type": "integer", "description": "The version number, which is incremented each time an update is committed to the order.\nOrders that were not created through the API do not include a version number and\ntherefore cannot be updated.\n\n[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)" }, "location_id": { "type": "string", "description": "The ID of the seller location that this order is associated with." }, "state": { "type": "string", "description": "The state of the order." }, "created_at": { "type": "string", "description": "The timestamp for when the order was created, in RFC 3339 format.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "OrderCreatedObject": { "type": "object", "properties": { "order_created": { "$ref": "#/definitions/OrderCreated", "description": "Information about the created order." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "OrderEntry": { "type": "object", "properties": { "order_id": { "type": "string", "description": "The ID of the order." }, "version": { "type": "integer", "description": "The version number, which is incremented each time an update is committed to the order.\nOrders that were not created through the API do not include a version number and\ntherefore cannot be updated.\n\n[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "location_id": { "type": "string", "description": "The location ID the order belongs to." } }, "description": "A lightweight description of an [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) that is returned when\n`returned_entries` is `true` on a [SearchOrdersRequest](https://developer.squareup.com/reference/square_2024-04-17/orders-api/search-orders).", "x-release-status": "PUBLIC" }, "OrderFulfillment": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the fulfillment only within this order.", "x-release-status": "BETA", "x-is-beta": true }, "type": { "type": "string", "description": "The type of the fulfillment." }, "state": { "type": "string", "description": "The state of the fulfillment." }, "line_item_application": { "type": "string", "description": "Describes what order line items this fulfillment applies to.\nIt can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "entries": { "type": "array", "items": { "$ref": "#/definitions/OrderFulfillmentFulfillmentEntry" }, "description": "A list of entries pertaining to the fulfillment of an order. Each entry must reference\na valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to\nfulfill.\nMultiple entries can reference the same line item `uid`, as long as the total quantity among\nall fulfillment entries referencing a single line item does not exceed the quantity of the\norder\u0027s line item itself.\nAn order cannot be marked as `COMPLETED` before all fulfillments are `COMPLETED`,\n`CANCELED`, or `FAILED`. Fulfillments can be created and completed independently\nbefore order completion.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this fulfillment. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\nValues have a maximum length of 255 characters.\nAn application can have up to 10 entries per metadata field.\nEntries written by applications are private and can only be read or modified by the same\napplication.\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", "x-release-status": "BETA", "x-is-beta": true }, "pickup_details": { "$ref": "#/definitions/OrderFulfillmentPickupDetails", "description": "Contains details for a pickup fulfillment. These details are required when the fulfillment\ntype is `PICKUP`." }, "shipment_details": { "$ref": "#/definitions/OrderFulfillmentShipmentDetails", "description": "Contains details for a shipment fulfillment. These details are required when the fulfillment type\nis `SHIPMENT`.\nA shipment fulfillment\u0027s relationship to fulfillment `state`:\n`PROPOSED`: A shipment is requested.\n`RESERVED`: Fulfillment in progress. Shipment processing.\n`PREPARED`: Shipment packaged. Shipping label created.\n`COMPLETED`: Package has been shipped.\n`CANCELED`: Shipment has been canceled.\n`FAILED`: Shipment has failed.", "x-release-status": "BETA", "x-is-beta": true }, "delivery_details": { "$ref": "#/definitions/OrderFulfillmentDeliveryDetails", "description": "Describes delivery details of an order fulfillment.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Contains details about how to fulfill this order.\nOrders can only be created with at most one fulfillment using the API.\nHowever, orders returned by the Orders API might contain multiple fulfillments because sellers can create multiple fulfillments using Square products such as Square Online.", "x-release-status": "PUBLIC" }, "OrderFulfillmentDeliveryDetails": { "type": "object", "properties": { "recipient": { "$ref": "#/definitions/OrderFulfillmentRecipient", "description": "The contact information for the person to receive the fulfillment." }, "schedule_type": { "type": "string", "description": "Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then\n`deliver_at` is required. If `ASAP`, then `prep_time_duration` is required. The default is `SCHEDULED`." }, "placed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was placed.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").\nMust be in RFC 3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".", "x-read-only": true }, "deliver_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nthat represents the start of the delivery period.\nWhen the fulfillment `schedule_type` is `ASAP`, the field is automatically\nset to the current time plus the `prep_time_duration`.\nOtherwise, the application can set this field while the fulfillment `state` is\n`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the\nterminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).\n\nThe timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\")." }, "prep_time_duration": { "type": "string", "description": "The duration of time it takes to prepare and deliver this fulfillment.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\")." }, "delivery_window_duration": { "type": "string", "description": "The time period after `deliver_at` in which to deliver the order.\nApplications can set this field when the fulfillment `state` is\n`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state\nsuch as `COMPLETED`, `CANCELED`, and `FAILED`).\nThe duration must be in RFC 3339 format (for example, \"P1W3D\")." }, "note": { "maxLength": 550, "type": "string", "description": "Provides additional instructions about the delivery fulfillment.\nIt is displayed in the Square Point of Sale application and set by the API." }, "completed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicates when the seller completed the fulfillment.\nThis field is automatically set when fulfillment `state` changes to `COMPLETED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\")." }, "in_progress_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicates when the seller started processing the fulfillment.\nThis field is automatically set when the fulfillment `state` changes to `RESERVED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "rejected_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was rejected. This field is\nautomatically set when the fulfillment `state` changes to `FAILED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "ready_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the seller marked the fulfillment as ready for\ncourier pickup. This field is automatically set when the fulfillment `state` changes\nto PREPARED.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "delivered_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was delivered to the recipient.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "canceled_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was canceled. This field is automatically\nset when the fulfillment `state` changes to `CANCELED`.\n\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "cancel_reason": { "maxLength": 100, "type": "string", "description": "The delivery cancellation reason. Max length: 100 characters." }, "courier_pickup_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when an order can be picked up by the courier for delivery.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\")." }, "courier_pickup_window_duration": { "type": "string", "description": "The time period after `courier_pickup_at` in which the courier should pick up the order.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\")." }, "is_no_contact_delivery": { "type": "boolean", "description": "Whether the delivery is preferred to be no contact." }, "dropoff_notes": { "maxLength": 550, "type": "string", "description": "A note to provide additional instructions about how to deliver the order." }, "courier_provider_name": { "maxLength": 255, "type": "string", "description": "The name of the courier provider." }, "courier_support_phone_number": { "maxLength": 17, "type": "string", "description": "The support phone number of the courier." }, "square_delivery_id": { "maxLength": 50, "type": "string", "description": "The identifier for the delivery created by Square." }, "external_delivery_id": { "maxLength": 50, "type": "string", "description": "The identifier for the delivery created by the third-party courier service." }, "managed_delivery": { "type": "boolean", "description": "The flag to indicate the delivery is managed by a third party (ie DoorDash), which means\nwe may not receive all recipient information for PII purposes." } }, "description": "Describes delivery details of an order fulfillment.", "x-release-status": "BETA", "x-is-beta": true }, "OrderFulfillmentFulfillmentEntry": { "type": "object", "required": [ "line_item_uid", "quantity" ], "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the fulfillment entry only within this order." }, "line_item_uid": { "minLength": 1, "type": "string", "description": "The `uid` from the order line item." }, "quantity": { "minLength": 1, "maxLength": 12, "type": "string", "description": "The quantity of the line item being fulfilled, formatted as a decimal number.\nFor example, `\"3\"`.\nFulfillments for line items with a `quantity_unit` can have non-integer quantities.\nFor example, `\"1.70000\"`." }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this fulfillment entry. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\nValues have a maximum length of 255 characters.\nAn application can have up to 10 entries per metadata field.\nEntries written by applications are private and can only be read or modified by the same\napplication.\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata)." } }, "description": "Links an order line item to a fulfillment. Each entry must reference\na valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to\nfulfill.", "x-release-status": "BETA", "x-is-beta": true }, "OrderFulfillmentPickupDetails": { "type": "object", "properties": { "recipient": { "$ref": "#/definitions/OrderFulfillmentRecipient", "description": "Information about the person to pick up this fulfillment from a physical\nlocation." }, "expires_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment expires if it is not marked in progress. The timestamp must be\nin RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\"). The expiration time can only be set\nup to 7 days in the future. If `expires_at` is not set, any new payments attached to the order\nare automatically completed." }, "auto_complete_duration": { "type": "string", "description": "The duration of time after which an in progress pickup fulfillment is automatically moved\nto the `COMPLETED` state. The duration must be in RFC 3339 format (for example, \"P1W3D\").\n\nIf not set, this pickup fulfillment remains in progress until it is canceled or completed." }, "schedule_type": { "type": "string", "description": "The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`." }, "pickup_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nthat represents the start of the pickup window. Must be in RFC 3339 timestamp format, e.g.,\n\"2016-09-04T23:59:33.123Z\".\nFor fulfillments with the schedule type `ASAP`, this is automatically set\nto the current time plus the expected duration to prepare the fulfillment." }, "pickup_window_duration": { "type": "string", "description": "The window of time in which the order should be picked up after the `pickup_at` timestamp.\nMust be in RFC 3339 duration format, e.g., \"P1W3D\". Can be used as an\ninformational guideline for merchants." }, "prep_time_duration": { "type": "string", "description": "The duration of time it takes to prepare this fulfillment.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\")." }, "note": { "maxLength": 500, "type": "string", "description": "A note to provide additional instructions about the pickup\nfulfillment displayed in the Square Point of Sale application and set by the API." }, "placed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was placed. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "accepted_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was marked in progress. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "rejected_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was rejected. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "ready_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment is marked as ready for pickup. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "expired_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment expired. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "picked_up_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was picked up by the recipient. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "canceled_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was canceled. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "cancel_reason": { "maxLength": 100, "type": "string", "description": "A description of why the pickup was canceled. The maximum length: 100 characters." }, "is_curbside_pickup": { "type": "boolean", "description": "If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup.", "x-release-status": "BETA", "x-is-beta": true }, "curbside_pickup_details": { "$ref": "#/definitions/OrderFulfillmentPickupDetailsCurbsidePickupDetails", "description": "Specific details for curbside pickup. These details can only be populated if `is_curbside_pickup` is set to `true`.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Contains details necessary to fulfill a pickup order.", "x-release-status": "PUBLIC" }, "OrderFulfillmentPickupDetailsCurbsidePickupDetails": { "type": "object", "properties": { "curbside_details": { "maxLength": 250, "type": "string", "description": "Specific details for curbside pickup, such as parking number and vehicle model." }, "buyer_arrived_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\")." } }, "description": "Specific details for curbside pickup.", "x-release-status": "BETA", "x-is-beta": true }, "OrderFulfillmentRecipient": { "type": "object", "properties": { "customer_id": { "maxLength": 191, "type": "string", "description": "The ID of the customer associated with the fulfillment.\nIf `customer_id` is provided, the fulfillment recipient\u0027s `display_name`,\n`email_address`, and `phone_number` are automatically populated from the\ntargeted customer profile. If these fields are set in the request, the request\nvalues override the information from the customer profile. If the\ntargeted customer profile does not contain the necessary information and\nthese fields are left unset, the request results in an error." }, "display_name": { "maxLength": 255, "type": "string", "description": "The display name of the fulfillment recipient. This field is required.\nIf provided, the display name overrides the corresponding customer profile value\nindicated by `customer_id`." }, "email_address": { "maxLength": 255, "type": "string", "description": "The email address of the fulfillment recipient.\nIf provided, the email address overrides the corresponding customer profile value\nindicated by `customer_id`." }, "phone_number": { "maxLength": 17, "type": "string", "description": "The phone number of the fulfillment recipient. This field is required.\nIf provided, the phone number overrides the corresponding customer profile value\nindicated by `customer_id`." }, "address": { "$ref": "#/definitions/Address", "description": "The address of the fulfillment recipient. This field is required.\nIf provided, the address overrides the corresponding customer profile value\nindicated by `customer_id`.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Information about the fulfillment recipient.", "x-release-status": "PUBLIC" }, "OrderFulfillmentShipmentDetails": { "type": "object", "properties": { "recipient": { "$ref": "#/definitions/OrderFulfillmentRecipient", "description": "Information about the person to receive this shipment fulfillment." }, "carrier": { "maxLength": 50, "type": "string", "description": "The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS)." }, "shipping_note": { "maxLength": 500, "type": "string", "description": "A note with additional information for the shipping carrier." }, "shipping_type": { "maxLength": 50, "type": "string", "description": "A description of the type of shipping product purchased from the carrier\n(such as First Class, Priority, or Express)." }, "tracking_number": { "maxLength": 100, "type": "string", "description": "The reference number provided by the carrier to track the shipment\u0027s progress." }, "tracking_url": { "maxLength": 2000, "type": "string", "description": "A link to the tracking webpage on the carrier\u0027s website." }, "placed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment was requested. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "in_progress_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `RESERVED` state, which indicates that preparation\nof this shipment has begun. The timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "packaged_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `PREPARED` state, which indicates that the\nfulfillment is packaged. The timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "expected_shipped_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment is expected to be delivered to the shipping carrier.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\")." }, "shipped_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `COMPLETED` state, which indicates that\nthe fulfillment has been given to the shipping carrier. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "canceled_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating the shipment was canceled.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\")." }, "cancel_reason": { "maxLength": 100, "type": "string", "description": "A description of why the shipment was canceled." }, "failed_at": { "type": "string", "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment failed to be completed. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", "x-read-only": true }, "failure_reason": { "maxLength": 100, "type": "string", "description": "A description of why the shipment failed to be completed." } }, "description": "Contains the details necessary to fulfill a shipment order.", "x-release-status": "BETA", "x-is-beta": true }, "OrderFulfillmentUpdated": { "type": "object", "properties": { "order_id": { "type": "string", "description": "The order\u0027s unique ID." }, "version": { "type": "integer", "description": "The version number, which is incremented each time an update is committed to the order.\nOrders that were not created through the API do not include a version number and\ntherefore cannot be updated.\n\n[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)" }, "location_id": { "type": "string", "description": "The ID of the seller location that this order is associated with." }, "state": { "type": "string", "description": "The state of the order." }, "created_at": { "type": "string", "description": "The timestamp for when the order was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp for when the order was last updated, in RFC 3339 format.", "x-read-only": true }, "fulfillment_update": { "type": "array", "items": { "$ref": "#/definitions/OrderFulfillmentUpdatedUpdate" }, "description": "The fulfillments that were updated with this version change." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "OrderFulfillmentUpdatedObject": { "type": "object", "properties": { "order_fulfillment_updated": { "$ref": "#/definitions/OrderFulfillmentUpdated", "description": "Information about the updated order fulfillment." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "OrderFulfillmentUpdatedUpdate": { "type": "object", "properties": { "fulfillment_uid": { "type": "string", "description": "A unique ID that identifies the fulfillment only within this order." }, "old_state": { "type": "string", "description": "The state of the fulfillment before the change.\nThe state is not populated if the fulfillment is created with this new `Order` version." }, "new_state": { "type": "string", "description": "The state of the fulfillment after the change. The state might be equal to `old_state` if a non-state\nfield was changed on the fulfillment (such as the tracking number)." } }, "description": "Information about fulfillment updates.", "x-release-status": "BETA", "x-is-beta": true }, "OrderLineItem": { "type": "object", "required": [ "quantity" ], "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the line item only within this order.", "x-release-status": "BETA", "x-is-beta": true }, "name": { "maxLength": 512, "type": "string", "description": "The name of the line item." }, "quantity": { "minLength": 1, "maxLength": 12, "type": "string", "description": "The count, or measurement, of a line item being purchased:\n\nIf `quantity` is a whole number, and `quantity_unit` is not specified, then `quantity` denotes an item count. For example: `3` apples.\n\nIf `quantity` is a whole or decimal number, and `quantity_unit` is also specified, then `quantity` denotes a measurement. For example: `2.25` pounds of broccoli.\n\nFor more information, see [Specify item quantity and measurement unit](https://developer.squareup.com/docs/orders-api/create-orders#specify-item-quantity-and-measurement-unit).\n\nLine items with a quantity of `0` are automatically removed\nwhen paying for or otherwise completing the order." }, "quantity_unit": { "$ref": "#/definitions/OrderQuantityUnit", "description": "The measurement unit and decimal precision that this line item\u0027s quantity is measured in." }, "note": { "maxLength": 2000, "type": "string", "description": "An optional note associated with the line item." }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) ID applied to this line item." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this line item references." }, "variation_name": { "maxLength": 400, "type": "string", "description": "The name of the variation applied to this line item." }, "item_type": { "type": "string", "description": "The type of line item: an itemized sale, a non-itemized sale (custom amount), or the\nactivation or reloading of a gift card." }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this line item. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\n\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\n\nValues have a maximum length of 255 characters.\n\nAn application can have up to 10 entries per metadata field.\n\nEntries written by applications are private and can only be read or modified by the same\napplication.\n\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", "x-release-status": "BETA", "x-is-beta": true }, "modifiers": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemModifier" }, "description": "The [CatalogModifier](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifier)s applied to this line item." }, "applied_taxes": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemAppliedTax" }, "description": "The list of references to taxes applied to this line item. Each\n`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a\ntop-level `OrderLineItemTax` applied to the line item. On reads, the\namount applied is populated.\n\nAn `OrderLineItemAppliedTax` is automatically created on every line\nitem for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax`\nrecords for `LINE_ITEM` scoped taxes must be added in requests for the tax\nto apply to any line items.\n\nTo change the amount of a tax, modify the referenced top-level tax.", "x-release-status": "BETA", "x-is-beta": true }, "applied_discounts": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemAppliedDiscount" }, "description": "The list of references to discounts applied to this line item. Each\n`OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level\n`OrderLineItemDiscounts` applied to the line item. On reads, the amount\napplied is populated.\n\nAn `OrderLineItemAppliedDiscount` is automatically created on every line item for all\n`ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records\nfor `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any\nline items.\n\nTo change the amount of a discount, modify the referenced top-level discount.", "x-release-status": "BETA", "x-is-beta": true }, "applied_service_charges": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemAppliedServiceCharge" }, "description": "The list of references to service charges applied to this line item. Each\n`OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a\ntop-level `OrderServiceCharge` applied to the line item. On reads, the amount applied is\npopulated.\n\nTo change the amount of a service charge, modify the referenced top-level service charge.", "x-release-status": "BETA", "x-is-beta": true }, "base_price_money": { "$ref": "#/definitions/Money", "description": "The base price for a single unit of the line item." }, "variation_total_price_money": { "$ref": "#/definitions/Money", "description": "The total price of all item variations sold in this line item.\nThe price is calculated as `base_price_money` multiplied by `quantity`.\nIt does not include modifiers.", "x-read-only": true }, "gross_sales_money": { "$ref": "#/definitions/Money", "description": "The amount of money made in gross sales for this line item.\nThe amount is calculated as the sum of the variation\u0027s total price and each modifier\u0027s total price.\nFor inclusive tax items in the US, Canada, and Japan, tax is deducted from `gross_sales_money`. For Europe and\nAustralia, inclusive tax remains as part of the gross sale calculation.", "x-read-only": true }, "total_tax_money": { "$ref": "#/definitions/Money", "description": "The total amount of tax money to collect for the line item.", "x-read-only": true }, "total_discount_money": { "$ref": "#/definitions/Money", "description": "The total amount of discount money to collect for the line item.", "x-read-only": true }, "total_money": { "$ref": "#/definitions/Money", "description": "The total amount of money to collect for this line item.", "x-read-only": true }, "pricing_blocklists": { "$ref": "#/definitions/OrderLineItemPricingBlocklists", "description": "Describes pricing adjustments that are blocked from automatic\napplication to a line item. For more information, see\n[Apply Taxes and Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts).", "x-release-status": "BETA", "x-is-beta": true }, "total_service_charge_money": { "$ref": "#/definitions/Money", "description": "The total amount of apportioned service charge money to collect for the line item.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true } }, "description": "Represents a line item in an order. Each line item describes a different\nproduct to purchase, with its own quantity and price details.", "x-release-status": "PUBLIC" }, "OrderLineItemAppliedDiscount": { "type": "object", "required": [ "discount_uid" ], "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the applied discount only within this order." }, "discount_uid": { "minLength": 1, "maxLength": 60, "type": "string", "description": "The `uid` of the discount that the applied discount represents. It must\nreference a discount present in the `order.discounts` field.\n\nThis field is immutable. To change which discounts apply to a line item,\nyou must delete the discount and re-add it as a new `OrderLineItemAppliedDiscount`." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of money applied by the discount to the line item.", "x-read-only": true } }, "description": "Represents an applied portion of a discount to a line item in an order.\n\nOrder scoped discounts have automatically applied discounts present for each line item.\nLine-item scoped discounts must have applied discounts added manually for any applicable line\nitems. The corresponding applied money is automatically computed based on participating\nline items.", "x-release-status": "BETA", "x-is-beta": true }, "OrderLineItemAppliedServiceCharge": { "type": "object", "required": [ "service_charge_uid" ], "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the applied service charge only within this order." }, "service_charge_uid": { "minLength": 1, "maxLength": 60, "type": "string", "description": "The `uid` of the service charge that the applied service charge represents. It must\nreference a service charge present in the `order.service_charges` field.\n\nThis field is immutable. To change which service charges apply to a line item,\ndelete and add a new `OrderLineItemAppliedServiceCharge`." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of money applied by the service charge to the line item.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "OrderLineItemAppliedTax": { "type": "object", "required": [ "tax_uid" ], "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the applied tax only within this order." }, "tax_uid": { "minLength": 1, "maxLength": 60, "type": "string", "description": "The `uid` of the tax for which this applied tax represents. It must reference\na tax present in the `order.taxes` field.\n\nThis field is immutable. To change which taxes apply to a line item, delete and add a new\n`OrderLineItemAppliedTax`." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of money applied by the tax to the line item.", "x-read-only": true } }, "description": "Represents an applied portion of a tax to a line item in an order.\n\nOrder-scoped taxes automatically include the applied taxes in each line item.\nLine item taxes must be referenced from any applicable line items.\nThe corresponding applied money is automatically computed, based on the\nset of participating line items.", "x-release-status": "BETA", "x-is-beta": true }, "OrderLineItemDiscount": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the discount only within this order.", "x-release-status": "BETA", "x-is-beta": true }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The catalog object ID referencing [CatalogDiscount](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogDiscount)." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this discount references." }, "name": { "maxLength": 255, "type": "string", "description": "The discount\u0027s name." }, "type": { "type": "string", "description": "The type of the discount.\n\nDiscounts that do not reference a catalog object ID must have a type of\n`FIXED_PERCENTAGE` or `FIXED_AMOUNT`." }, "percentage": { "maxLength": 10, "type": "string", "description": "The percentage of the discount, as a string representation of a decimal number.\nA value of `7.25` corresponds to a percentage of 7.25%.\n\n`percentage` is not set for amount-based discounts." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The total declared monetary amount of the discount.\n\n`amount_money` is not set for percentage-based discounts." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of discount actually applied to the line item.\n\nThe amount represents the amount of money applied as a line-item scoped discount.\nWhen an amount-based discount is scoped to the entire order, the value\nof `applied_money` is different than `amount_money` because the total\namount of the discount is distributed across all line items." }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this discount. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\n\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\n\nValues have a maximum length of 255 characters.\n\nAn application can have up to 10 entries per metadata field.\n\nEntries written by applications are private and can only be read or modified by the same\napplication.\n\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", "x-release-status": "BETA", "x-is-beta": true }, "scope": { "type": "string", "description": "Indicates the level at which the discount applies. For `ORDER` scoped discounts,\nSquare generates references in `applied_discounts` on all order line items that do\nnot have them. For `LINE_ITEM` scoped discounts, the discount only applies to line items\nwith a discount reference in their `applied_discounts` field.\n\nThis field is immutable. To change the scope of a discount, you must delete\nthe discount and re-add it as a new discount." }, "reward_ids": { "type": "array", "items": { "type": "string" }, "description": "The reward IDs corresponding to this discount. The application and\nspecification of discounts that have `reward_ids` are completely controlled by the backing\ncriteria corresponding to the reward tiers of the rewards that are added to the order\nthrough the Loyalty API. To manually unapply discounts that are the result of added rewards,\nthe rewards must be removed from the order through the Loyalty API.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "pricing_rule_id": { "type": "string", "description": "The object ID of a [pricing rule](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogPricingRule) to be applied\nautomatically to this discount. The specification and application of the discounts, to\nwhich a `pricing_rule_id` is assigned, are completely controlled by the corresponding\npricing rule.", "x-read-only": true } }, "description": "Represents a discount that applies to one or more line items in an\norder.\n\nFixed-amount, order-scoped discounts are distributed across all non-zero line item totals.\nThe amount distributed to each line item is relative to the\namount contributed by the item to the order subtotal.", "x-release-status": "PUBLIC" }, "OrderLineItemModifier": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the modifier only within this order.", "x-release-status": "BETA", "x-is-beta": true }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The catalog object ID referencing [CatalogModifier](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifier)." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this modifier references." }, "name": { "maxLength": 255, "type": "string", "description": "The name of the item modifier." }, "quantity": { "type": "string", "description": "The quantity of the line item modifier. The modifier quantity can be 0 or more.\nFor example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders\nthis item, the restaurant records the purchase by creating an `Order` object with a line item\nfor a burger. The line item includes a line item modifier: the name is cheese and the quantity\nis 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses\nthe extra cheese option, the modifier quantity increases to 2. If the buyer does not want\nany cheese, the modifier quantity is set to 0." }, "base_price_money": { "$ref": "#/definitions/Money", "description": "The base price for the modifier.\n\n`base_price_money` is required for ad hoc modifiers.\nIf both `catalog_object_id` and `base_price_money` are set, `base_price_money` will\noverride the predefined [CatalogModifier](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifier) price." }, "total_price_money": { "$ref": "#/definitions/Money", "description": "The total price of the item modifier for its line item.\nThis is the modifier\u0027s `base_price_money` multiplied by the line item\u0027s quantity.", "x-read-only": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this order. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\n\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\n\nValues have a maximum length of 255 characters.\n\nAn application can have up to 10 entries per metadata field.\n\nEntries written by applications are private and can only be read or modified by the same\napplication.\n\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", "x-release-status": "BETA", "x-is-beta": true } }, "description": "A [CatalogModifier](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifier).", "x-release-status": "PUBLIC" }, "OrderLineItemPricingBlocklists": { "type": "object", "properties": { "blocked_discounts": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemPricingBlocklistsBlockedDiscount" }, "description": "A list of discounts blocked from applying to the line item.\nDiscounts can be blocked by the `discount_uid` (for ad hoc discounts) or\nthe `discount_catalog_object_id` (for catalog discounts)." }, "blocked_taxes": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemPricingBlocklistsBlockedTax" }, "description": "A list of taxes blocked from applying to the line item.\nTaxes can be blocked by the `tax_uid` (for ad hoc taxes) or\nthe `tax_catalog_object_id` (for catalog taxes)." } }, "description": "Describes pricing adjustments that are blocked from automatic\napplication to a line item. For more information, see\n[Apply Taxes and Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts).", "x-release-status": "BETA", "x-is-beta": true }, "OrderLineItemPricingBlocklistsBlockedDiscount": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID of the `BlockedDiscount` within the order." }, "discount_uid": { "maxLength": 60, "type": "string", "description": "The `uid` of the discount that should be blocked. Use this field to block\nad hoc discounts. For catalog discounts, use the `discount_catalog_object_id` field." }, "discount_catalog_object_id": { "maxLength": 192, "type": "string", "description": "The `catalog_object_id` of the discount that should be blocked.\nUse this field to block catalog discounts. For ad hoc discounts, use the\n`discount_uid` field." } }, "description": "A discount to block from applying to a line item. The discount must be\nidentified by either `discount_uid` or `discount_catalog_object_id`, but not both.", "x-release-status": "BETA", "x-is-beta": true }, "OrderLineItemPricingBlocklistsBlockedTax": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID of the `BlockedTax` within the order." }, "tax_uid": { "maxLength": 60, "type": "string", "description": "The `uid` of the tax that should be blocked. Use this field to block\nad hoc taxes. For catalog, taxes use the `tax_catalog_object_id` field." }, "tax_catalog_object_id": { "maxLength": 192, "type": "string", "description": "The `catalog_object_id` of the tax that should be blocked.\nUse this field to block catalog taxes. For ad hoc taxes, use the\n`tax_uid` field." } }, "description": "A tax to block from applying to a line item. The tax must be\nidentified by either `tax_uid` or `tax_catalog_object_id`, but not both.", "x-release-status": "BETA", "x-is-beta": true }, "OrderLineItemTax": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the tax only within this order.", "x-release-status": "BETA", "x-is-beta": true }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The catalog object ID referencing [CatalogTax](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogTax)." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this tax references." }, "name": { "maxLength": 255, "type": "string", "description": "The tax\u0027s name." }, "type": { "type": "string", "description": "Indicates the calculation method used to apply the tax." }, "percentage": { "maxLength": 10, "type": "string", "description": "The percentage of the tax, as a string representation of a decimal\nnumber. For example, a value of `\"7.25\"` corresponds to a percentage of\n7.25%." }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this tax. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\n\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\n\nValues have a maximum length of 255 characters.\n\nAn application can have up to 10 entries per metadata field.\n\nEntries written by applications are private and can only be read or modified by the same\napplication.\n\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", "x-release-status": "BETA", "x-is-beta": true }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of money applied to the order by the tax.\n\n- For percentage-based taxes, `applied_money` is the money\ncalculated using the percentage." }, "scope": { "type": "string", "description": "Indicates the level at which the tax applies. For `ORDER` scoped taxes,\nSquare generates references in `applied_taxes` on all order line items that do\nnot have them. For `LINE_ITEM` scoped taxes, the tax only applies to line items\nwith references in their `applied_taxes` field.\n\nThis field is immutable. To change the scope, you must delete the tax and\nre-add it as a new tax." }, "auto_applied": { "type": "boolean", "description": "Determines whether the tax was automatically applied to the order based on\nthe catalog configuration. For an example, see\n[Automatically Apply Taxes to an Order](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes).", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true } }, "description": "Represents a tax that applies to one or more line item in the order.\n\nFixed-amount, order-scoped taxes are distributed across all non-zero line item totals.\nThe amount distributed to each line item is relative to the amount the item\ncontributes to the order subtotal.", "x-release-status": "PUBLIC" }, "OrderMoneyAmounts": { "type": "object", "properties": { "total_money": { "$ref": "#/definitions/Money", "description": "The total money." }, "tax_money": { "$ref": "#/definitions/Money", "description": "The money associated with taxes." }, "discount_money": { "$ref": "#/definitions/Money", "description": "The money associated with discounts." }, "tip_money": { "$ref": "#/definitions/Money", "description": "The money associated with tips." }, "service_charge_money": { "$ref": "#/definitions/Money", "description": "The money associated with service charges." } }, "description": "A collection of various money amounts.", "x-release-status": "BETA", "x-is-beta": true }, "OrderPricingOptions": { "type": "object", "properties": { "auto_apply_discounts": { "type": "boolean", "description": "The option to determine whether pricing rule-based\ndiscounts are automatically applied to an order." }, "auto_apply_taxes": { "type": "boolean", "description": "The option to determine whether rule-based taxes are automatically\napplied to an order when the criteria of the corresponding rules are met.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Pricing options for an order. The options affect how the order\u0027s price is calculated.\nThey can be used, for example, to apply automatic price adjustments that are based on preconfigured\n[pricing rules](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogPricingRule).", "x-release-status": "PUBLIC" }, "OrderQuantityUnit": { "type": "object", "properties": { "measurement_unit": { "$ref": "#/definitions/MeasurementUnit", "description": "A [MeasurementUnit](https://developer.squareup.com/reference/square_2024-04-17/objects/MeasurementUnit) that represents the\nunit of measure for the quantity." }, "precision": { "type": "integer", "description": "For non-integer quantities, represents the number of digits after the decimal point that are\nrecorded for this quantity.\n\nFor example, a precision of 1 allows quantities such as `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`.\n\nMin: 0. Max: 5." }, "catalog_object_id": { "type": "string", "description": "The catalog object ID referencing the\n[CatalogMeasurementUnit](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogMeasurementUnit).\n\nThis field is set when this is a catalog-backed measurement unit." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this measurement unit references.\n\nThis field is set when this is a catalog-backed measurement unit." } }, "description": "Contains the measurement unit for a quantity and a precision that\nspecifies the number of digits after the decimal point for decimal quantities.", "x-release-status": "PUBLIC" }, "OrderReturn": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the return only within this order." }, "source_order_id": { "type": "string", "description": "An order that contains the original sale of these return line items. This is unset\nfor unlinked returns." }, "return_line_items": { "type": "array", "items": { "$ref": "#/definitions/OrderReturnLineItem" }, "description": "A collection of line items that are being returned." }, "return_service_charges": { "type": "array", "items": { "$ref": "#/definitions/OrderReturnServiceCharge" }, "description": "A collection of service charges that are being returned." }, "return_taxes": { "type": "array", "items": { "$ref": "#/definitions/OrderReturnTax" }, "description": "A collection of references to taxes being returned for an order, including the total\napplied tax amount to be returned. The taxes must reference a top-level tax ID from the source\norder.", "x-read-only": true }, "return_discounts": { "type": "array", "items": { "$ref": "#/definitions/OrderReturnDiscount" }, "description": "A collection of references to discounts being returned for an order, including the total\napplied discount amount to be returned. The discounts must reference a top-level discount ID\nfrom the source order.", "x-read-only": true }, "return_tips": { "type": "array", "items": { "$ref": "#/definitions/OrderReturnTip" }, "description": "A collection of references to tips being returned for an order." }, "rounding_adjustment": { "$ref": "#/definitions/OrderRoundingAdjustment", "description": "A positive or negative rounding adjustment to the total value being returned. Adjustments are commonly\nused to apply cash rounding when the minimum unit of the account is smaller than the lowest\nphysical denomination of the currency." }, "return_amounts": { "$ref": "#/definitions/OrderMoneyAmounts", "description": "An aggregate monetary value being returned by this return entry." } }, "description": "The set of line items, service charges, taxes, discounts, tips, and other items being returned in an order.", "x-release-status": "BETA", "x-is-beta": true }, "OrderReturnDiscount": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the returned discount only within this order." }, "source_discount_uid": { "maxLength": 60, "type": "string", "description": "The discount `uid` from the order that contains the original application of this discount." }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The catalog object ID referencing [CatalogDiscount](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogDiscount)." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this discount references." }, "name": { "maxLength": 255, "type": "string", "description": "The discount\u0027s name." }, "type": { "type": "string", "description": "The type of the discount. If it is created by the API, it is `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.\n\nDiscounts that do not reference a catalog object ID must have a type of\n`FIXED_PERCENTAGE` or `FIXED_AMOUNT`." }, "percentage": { "maxLength": 10, "type": "string", "description": "The percentage of the tax, as a string representation of a decimal number.\nA value of `\"7.25\"` corresponds to a percentage of 7.25%.\n\n`percentage` is not set for amount-based discounts." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The total declared monetary amount of the discount.\n\n`amount_money` is not set for percentage-based discounts." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of discount actually applied to this line item. When an amount-based\ndiscount is at the order level, this value is different from `amount_money` because the discount\nis distributed across the line items.", "x-read-only": true }, "scope": { "type": "string", "description": "Indicates the level at which the `OrderReturnDiscount` applies. For `ORDER` scoped\ndiscounts, the server generates references in `applied_discounts` on all\n`OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount is only applied to\n`OrderReturnLineItem`s with references in their `applied_discounts` field." } }, "description": "Represents a discount being returned that applies to one or more return line items in an\norder.\n\nFixed-amount, order-scoped discounts are distributed across all non-zero return line item totals.\nThe amount distributed to each return line item is relative to that item’s contribution to the\norder subtotal.", "x-release-status": "BETA", "x-is-beta": true }, "OrderReturnLineItem": { "type": "object", "required": [ "quantity" ], "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID for this return line-item entry." }, "source_line_item_uid": { "maxLength": 60, "type": "string", "description": "The `uid` of the line item in the original sale order." }, "name": { "maxLength": 512, "type": "string", "description": "The name of the line item." }, "quantity": { "minLength": 1, "maxLength": 12, "type": "string", "description": "The quantity returned, formatted as a decimal number.\nFor example, `\"3\"`.\n\nLine items with a `quantity_unit` can have non-integer quantities.\nFor example, `\"1.70000\"`." }, "quantity_unit": { "$ref": "#/definitions/OrderQuantityUnit", "description": "The unit and precision that this return line item\u0027s quantity is measured in." }, "note": { "maxLength": 2000, "type": "string", "description": "The note of the return line item." }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) ID applied to this return line item." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this line item references." }, "variation_name": { "maxLength": 400, "type": "string", "description": "The name of the variation applied to this return line item." }, "item_type": { "type": "string", "description": "The type of line item: an itemized return, a non-itemized return (custom amount),\nor the return of an unactivated gift card sale." }, "return_modifiers": { "type": "array", "items": { "$ref": "#/definitions/OrderReturnLineItemModifier" }, "description": "The [CatalogModifier](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifier)s applied to this line item." }, "applied_taxes": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemAppliedTax" }, "description": "The list of references to `OrderReturnTax` entities applied to the return line item. Each\n`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level\n`OrderReturnTax` applied to the return line item. On reads, the applied amount\nis populated." }, "applied_discounts": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemAppliedDiscount" }, "description": "The list of references to `OrderReturnDiscount` entities applied to the return line item. Each\n`OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level\n`OrderReturnDiscount` applied to the return line item. On reads, the applied amount\nis populated." }, "base_price_money": { "$ref": "#/definitions/Money", "description": "The base price for a single unit of the line item." }, "variation_total_price_money": { "$ref": "#/definitions/Money", "description": "The total price of all item variations returned in this line item.\nThe price is calculated as `base_price_money` multiplied by `quantity` and\ndoes not include modifiers.", "x-read-only": true }, "gross_return_money": { "$ref": "#/definitions/Money", "description": "The gross return amount of money calculated as (item base price + modifiers price) * quantity.", "x-read-only": true }, "total_tax_money": { "$ref": "#/definitions/Money", "description": "The total amount of tax money to return for the line item.", "x-read-only": true }, "total_discount_money": { "$ref": "#/definitions/Money", "description": "The total amount of discount money to return for the line item.", "x-read-only": true }, "total_money": { "$ref": "#/definitions/Money", "description": "The total amount of money to return for this line item.", "x-read-only": true }, "applied_service_charges": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemAppliedServiceCharge" }, "description": "The list of references to `OrderReturnServiceCharge` entities applied to the return\nline item. Each `OrderLineItemAppliedServiceCharge` has a `service_charge_uid` that\nreferences the `uid` of a top-level `OrderReturnServiceCharge` applied to the return line\nitem. On reads, the applied amount is populated." }, "total_service_charge_money": { "$ref": "#/definitions/Money", "description": "The total amount of apportioned service charge money to return for the line item.", "x-read-only": true } }, "description": "The line item being returned in an order.", "x-release-status": "BETA", "x-is-beta": true }, "OrderReturnLineItemModifier": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the return modifier only within this order." }, "source_modifier_uid": { "maxLength": 60, "type": "string", "description": "The modifier `uid` from the order\u0027s line item that contains the\noriginal sale of this line item modifier." }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The catalog object ID referencing [CatalogModifier](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifier)." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this line item modifier references." }, "name": { "maxLength": 255, "type": "string", "description": "The name of the item modifier." }, "base_price_money": { "$ref": "#/definitions/Money", "description": "The base price for the modifier.\n\n`base_price_money` is required for ad hoc modifiers.\nIf both `catalog_object_id` and `base_price_money` are set, `base_price_money` overrides the predefined [CatalogModifier](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogModifier) price." }, "total_price_money": { "$ref": "#/definitions/Money", "description": "The total price of the item modifier for its line item.\nThis is the modifier\u0027s `base_price_money` multiplied by the line item\u0027s quantity.", "x-read-only": true }, "quantity": { "type": "string", "description": "The quantity of the line item modifier. The modifier quantity can be 0 or more.\nFor example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders\nthis item, the restaurant records the purchase by creating an `Order` object with a line item\nfor a burger. The line item includes a line item modifier: the name is cheese and the quantity\nis 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses\nthe extra cheese option, the modifier quantity increases to 2. If the buyer does not want\nany cheese, the modifier quantity is set to 0." } }, "description": "A line item modifier being returned.", "x-release-status": "BETA", "x-is-beta": true }, "OrderReturnServiceCharge": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the return service charge only within this order.", "x-release-status": "BETA", "x-is-beta": true }, "source_service_charge_uid": { "maxLength": 60, "type": "string", "description": "The service charge `uid` from the order containing the original\nservice charge. `source_service_charge_uid` is `null` for\nunlinked returns." }, "name": { "maxLength": 255, "type": "string", "description": "The name of the service charge." }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The catalog object ID of the associated [OrderServiceCharge](https://developer.squareup.com/reference/square_2024-04-17/objects/OrderServiceCharge)." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this service charge references." }, "percentage": { "maxLength": 10, "type": "string", "description": "The percentage of the service charge, as a string representation of\na decimal number. For example, a value of `\"7.25\"` corresponds to a\npercentage of 7.25%.\n\nEither `percentage` or `amount_money` should be set, but not both." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of a non-percentage-based service charge.\n\nEither `percentage` or `amount_money` should be set, but not both." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of money applied to the order by the service charge, including\nany inclusive tax amounts, as calculated by Square.\n\n- For fixed-amount service charges, `applied_money` is equal to `amount_money`.\n- For percentage-based service charges, `applied_money` is the money calculated using the percentage.", "x-read-only": true }, "total_money": { "$ref": "#/definitions/Money", "description": "The total amount of money to collect for the service charge.\n\n__NOTE__: If an inclusive tax is applied to the service charge, `total_money`\ndoes not equal `applied_money` plus `total_tax_money` because the inclusive\ntax amount is already included in both `applied_money` and `total_tax_money`.", "x-read-only": true }, "total_tax_money": { "$ref": "#/definitions/Money", "description": "The total amount of tax money to collect for the service charge.", "x-read-only": true }, "calculation_phase": { "type": "string", "description": "The calculation phase after which to apply the service charge.", "x-read-only": true }, "taxable": { "type": "boolean", "description": "Indicates whether the surcharge can be taxed. Service charges\ncalculated in the `TOTAL_PHASE` cannot be marked as taxable." }, "applied_taxes": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemAppliedTax" }, "description": "The list of references to `OrderReturnTax` entities applied to the\n`OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid`\nthat references the `uid` of a top-level `OrderReturnTax` that is being\napplied to the `OrderReturnServiceCharge`. On reads, the applied amount is\npopulated.", "x-release-status": "BETA", "x-is-beta": true }, "treatment_type": { "type": "string", "description": "The treatment type of the service charge.", "x-release-status": "BETA", "x-is-beta": true }, "scope": { "type": "string", "description": "Indicates the level at which the apportioned service charge applies. For `ORDER`\nscoped service charges, Square generates references in `applied_service_charges` on\nall order line items that do not have them. For `LINE_ITEM` scoped service charges,\nthe service charge only applies to line items with a service charge reference in their\n`applied_service_charges` field.\n\nThis field is immutable. To change the scope of an apportioned service charge, you must delete\nthe apportioned service charge and re-add it as a new apportioned service charge.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Represents the service charge applied to the original order.", "x-release-status": "PUBLIC" }, "OrderReturnTax": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the returned tax only within this order." }, "source_tax_uid": { "maxLength": 60, "type": "string", "description": "The tax `uid` from the order that contains the original tax charge." }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The catalog object ID referencing [CatalogTax](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogTax)." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this tax references." }, "name": { "maxLength": 255, "type": "string", "description": "The tax\u0027s name." }, "type": { "type": "string", "description": "Indicates the calculation method used to apply the tax." }, "percentage": { "maxLength": 10, "type": "string", "description": "The percentage of the tax, as a string representation of a decimal number.\nFor example, a value of `\"7.25\"` corresponds to a percentage of 7.25%." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of money applied by the tax in an order.", "x-read-only": true }, "scope": { "type": "string", "description": "Indicates the level at which the `OrderReturnTax` applies. For `ORDER` scoped\ntaxes, Square generates references in `applied_taxes` on all\n`OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax is only applied to\n`OrderReturnLineItem`s with references in their `applied_discounts` field." } }, "description": "Represents a tax being returned that applies to one or more return line items in an order.\n\nFixed-amount, order-scoped taxes are distributed across all non-zero return line item totals.\nThe amount distributed to each return line item is relative to that item’s contribution to the\norder subtotal.", "x-release-status": "BETA", "x-is-beta": true }, "OrderReturnTip": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the tip only within this order." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of tip being returned\n--", "x-read-only": true }, "source_tender_uid": { "maxLength": 192, "type": "string", "description": "The tender `uid` from the order that contains the original application of this tip." }, "source_tender_id": { "maxLength": 192, "type": "string", "description": "The tender `id` from the order that contains the original application of this tip." } }, "description": "A tip being returned.", "x-release-status": "BETA", "x-is-beta": true }, "OrderReward": { "type": "object", "required": [ "id", "reward_tier_id" ], "properties": { "id": { "minLength": 1, "type": "string", "description": "The identifier of the reward." }, "reward_tier_id": { "minLength": 1, "type": "string", "description": "The identifier of the reward tier corresponding to this reward." } }, "description": "Represents a reward that can be applied to an order if the necessary\nreward tier criteria are met. Rewards are created through the Loyalty API.", "x-release-status": "BETA", "x-is-beta": true }, "OrderRoundingAdjustment": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the rounding adjustment only within this order." }, "name": { "type": "string", "description": "The name of the rounding adjustment from the original sale order." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The actual rounding adjustment amount." } }, "description": "A rounding adjustment of the money being returned. Commonly used to apply cash rounding\nwhen the minimum unit of the account is smaller than the lowest physical denomination of the currency.", "x-release-status": "BETA", "x-is-beta": true }, "OrderServiceCharge": { "type": "object", "properties": { "uid": { "maxLength": 60, "type": "string", "description": "A unique ID that identifies the service charge only within this order.", "x-release-status": "BETA", "x-is-beta": true }, "name": { "maxLength": 512, "type": "string", "description": "The name of the service charge." }, "catalog_object_id": { "maxLength": 192, "type": "string", "description": "The catalog object ID referencing the service charge [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)." }, "catalog_version": { "type": "integer", "format": "int64", "description": "The version of the catalog object that this service charge references." }, "percentage": { "maxLength": 10, "type": "string", "description": "The service charge percentage as a string representation of a\ndecimal number. For example, `\"7.25\"` indicates a service charge of 7.25%.\n\nExactly 1 of `percentage` or `amount_money` should be set." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of a non-percentage-based service charge.\n\nExactly one of `percentage` or `amount_money` should be set." }, "applied_money": { "$ref": "#/definitions/Money", "description": "The amount of money applied to the order by the service charge,\nincluding any inclusive tax amounts, as calculated by Square.\n\n- For fixed-amount service charges, `applied_money` is equal to `amount_money`.\n- For percentage-based service charges, `applied_money` is the money\ncalculated using the percentage.", "x-read-only": true }, "total_money": { "$ref": "#/definitions/Money", "description": "The total amount of money to collect for the service charge.\n\n__Note__: If an inclusive tax is applied to the service charge,\n`total_money` does not equal `applied_money` plus `total_tax_money`\nbecause the inclusive tax amount is already included in both\n`applied_money` and `total_tax_money`.", "x-read-only": true }, "total_tax_money": { "$ref": "#/definitions/Money", "description": "The total amount of tax money to collect for the service charge.", "x-read-only": true }, "calculation_phase": { "type": "string", "description": "The calculation phase at which to apply the service charge." }, "taxable": { "type": "boolean", "description": "Indicates whether the service charge can be taxed. If set to `true`,\norder-level taxes automatically apply to the service charge. Note that\nservice charges calculated in the `TOTAL_PHASE` cannot be marked as taxable." }, "applied_taxes": { "type": "array", "items": { "$ref": "#/definitions/OrderLineItemAppliedTax" }, "description": "The list of references to the taxes applied to this service charge. Each\n`OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level\n`OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied\nis populated.\n\nAn `OrderLineItemAppliedTax` is automatically created on every taxable service charge\nfor all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records\nfor `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable\nservice charge. Taxable service charges have the `taxable` field set to `true` and calculated\nin the `SUBTOTAL_PHASE`.\n\nTo change the amount of a tax, modify the referenced top-level tax.", "x-release-status": "BETA", "x-is-beta": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Application-defined data attached to this service charge. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\n\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a \u0027:\u0027 character.\n\nValues have a maximum length of 255 characters.\n\nAn application can have up to 10 entries per metadata field.\n\nEntries written by applications are private and can only be read or modified by the same\napplication.\n\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", "x-release-status": "BETA", "x-is-beta": true }, "type": { "type": "string", "description": "The type of the service charge.", "x-read-only": true }, "treatment_type": { "type": "string", "description": "The treatment type of the service charge.", "x-release-status": "BETA", "x-is-beta": true }, "scope": { "type": "string", "description": "Indicates the level at which the apportioned service charge applies. For `ORDER`\nscoped service charges, Square generates references in `applied_service_charges` on\nall order line items that do not have them. For `LINE_ITEM` scoped service charges,\nthe service charge only applies to line items with a service charge reference in their\n`applied_service_charges` field.\n\nThis field is immutable. To change the scope of an apportioned service charge, you must delete\nthe apportioned service charge and re-add it as a new apportioned service charge.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Represents a service charge applied to an order.", "x-release-status": "PUBLIC" }, "OrderSource": { "type": "object", "properties": { "name": { "type": "string", "description": "The name used to identify the place (physical or digital) that an order originates.\nIf unset, the name defaults to the name of the application that created the order." } }, "description": "Represents the origination details of an order.", "x-release-status": "PUBLIC" }, "OrderUpdated": { "type": "object", "properties": { "order_id": { "type": "string", "description": "The order\u0027s unique ID." }, "version": { "type": "integer", "description": "The version number, which is incremented each time an update is committed to the order.\nOrders that were not created through the API do not include a version number and\ntherefore cannot be updated.\n\n[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)" }, "location_id": { "type": "string", "description": "The ID of the seller location that this order is associated with." }, "state": { "type": "string", "description": "The state of the order." }, "created_at": { "type": "string", "description": "The timestamp for when the order was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp for when the order was last updated, in RFC 3339 format.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "OrderUpdatedObject": { "type": "object", "properties": { "order_updated": { "$ref": "#/definitions/OrderUpdated", "description": "Information about the updated order." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "PaginationCursor": { "type": "object", "properties": { "order_value": { "type": "string", "description": "The ID of the last resource in the current page. The page can be in an ascending or\ndescending order" } }, "description": "Used *internally* to encapsulate pagination details. The resulting proto will be base62 encoded\nin order to produce a cursor that can be used externally.", "x-release-status": "BETA", "x-is-beta": true }, "PauseSubscriptionRequest": { "type": "object", "properties": { "pause_effective_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date when the scheduled `PAUSE` action takes place on the subscription.\n\nWhen this date is unspecified or falls within the current billing cycle, the subscription is paused\non the starting date of the next billing cycle." }, "pause_cycle_duration": { "type": "integer", "format": "int64", "description": "The number of billing cycles the subscription will be paused before it is reactivated. \n\nWhen this is set, a `RESUME` action is also scheduled to take place on the subscription at \nthe end of the specified pause cycle duration. In this case, neither `resume_effective_date` \nnor `resume_change_timing` may be specified." }, "resume_effective_date": { "type": "string", "description": "The date when the subscription is reactivated by a scheduled `RESUME` action. \nThis date must be at least one billing cycle ahead of `pause_effective_date`." }, "resume_change_timing": { "type": "string", "description": "The timing whether the subscription is reactivated immediately or at the end of the billing cycle, relative to \n`resume_effective_date`." }, "pause_reason": { "maxLength": 255, "type": "string", "description": "The user-provided reason to pause the subscription." } }, "description": "Defines input parameters in a request to the\n[PauseSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/pause-subscription) endpoint.", "x-release-status": "BETA", "x-is-beta": true }, "PauseSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The subscription to be paused by the scheduled `PAUSE` action." }, "actions": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionAction" }, "description": "The list of a `PAUSE` action and a possible `RESUME` action created by the request." } }, "description": "Defines output parameters in a response from the\n[PauseSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/pause-subscription) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "subscription": { "id": "56214fb2-cc85-47a1-93bc-44f3766bb56f", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "start_date": "2023-06-20", "status": "ACTIVE", "version": 1, "created_at": "2023-06-20T21:53:10Z", "card_id": "ccof:qy5x8hHGYsgLrp4Q4GB", "phases": [ { "uid": "873451e0-745b-4e87-ab0b-c574933fe616", "ordinal": 0, "order_template_id": "U2NaowWxzXwpsZU697x7ZHOAnCNZY", "plan_phase_uid": "X2Q2AONPB3RB64Y27S25QCZP" } ], "timezone": "America/Los_Angeles", "source": { "name": "My Application" } }, "actions": [ { "id": "99b2439e-63f7-3ad5-95f7-ab2447a80673", "type": "PAUSE", "effective_date": "2023-11-17" } ] } }, "PayOrderRequest": { "type": "object", "required": [ "idempotency_key" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 192, "type": "string", "description": "A value you specify that uniquely identifies this request among requests you have sent. If\nyou are unsure whether a particular payment request was completed successfully, you can reattempt\nit with the same idempotency key without worrying about duplicate payments.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency)." }, "order_version": { "type": "integer", "description": "The version of the order being paid. If not supplied, the latest version will be paid." }, "payment_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the [payments](https://developer.squareup.com/reference/square_2024-04-17/objects/Payment) to collect.\nThe payment total must match the order total." } }, "description": "Defines the fields that are included in requests to the\n[PayOrder](https://developer.squareup.com/reference/square_2024-04-17/orders-api/pay-order) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "idempotency_key": "c043a359-7ad9-4136-82a9-c3f1d66dcbff", "payment_ids": [ "EnZdNAlWCmfh6Mt5FMNST1o7taB", "0LRiVlbXVwe8ozu4KbZxd12mvaB" ] } } }, "PayOrderResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "order": { "$ref": "#/definitions/Order", "description": "The paid, updated [order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order)." } }, "description": "Defines the fields that are included in the response body of a request to the\n[PayOrder](https://developer.squareup.com/reference/square_2024-04-17/orders-api/pay-order) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "order": { "id": "lgwOlEityYPJtcuvKTVKT1pA986YY", "location_id": "P3CCK6HSNDAS7", "line_items": [ { "uid": "QW6kofLHJK7JEKMjlSVP5C", "quantity": "1", "name": "Item 1", "base_price_money": { "amount": 500, "currency": "USD" }, "gross_sales_money": { "amount": 500, "currency": "USD" }, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 0, "currency": "USD" }, "total_money": { "amount": 500, "currency": "USD" } }, { "uid": "zhw8MNfRGdFQMI2WE1UBJD", "quantity": "2", "name": "Item 2", "base_price_money": { "amount": 750, "currency": "USD" }, "gross_sales_money": { "amount": 1500, "currency": "USD" }, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 0, "currency": "USD" }, "total_money": { "amount": 1500, "currency": "USD" } } ], "created_at": "2019-08-06T02:47:35.693Z", "updated_at": "2019-08-06T02:47:37.140Z", "version": 4, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 0, "currency": "USD" }, "total_money": { "amount": 2000, "currency": "USD" }, "closed_at": "2019-08-06T02:47:37.140Z", "tenders": [ { "id": "EnZdNAlWCmfh6Mt5FMNST1o7taB", "location_id": "P3CCK6HSNDAS7", "transaction_id": "lgwOlEityYPJtcuvKTVKT1pA986YY", "created_at": "2019-08-06T02:47:36.293Z", "amount_money": { "amount": 1000, "currency": "USD" }, "type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 2, "exp_year": 2022, "fingerprint": "sq-1-n_BL15KP87ClDa4-h2nXOI0fp5VnxNH6hfhzqhptTfAgxgLuGFcg6jIPngDz4IkkTQ" }, "entry_method": "KEYED" }, "payment_id": "EnZdNAlWCmfh6Mt5FMNST1o7taB" }, { "id": "0LRiVlbXVwe8ozu4KbZxd12mvaB", "location_id": "P3CCK6HSNDAS7", "transaction_id": "lgwOlEityYPJtcuvKTVKT1pA986YY", "created_at": "2019-08-06T02:47:36.809Z", "amount_money": { "amount": 1000, "currency": "USD" }, "type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 2, "exp_year": 2022, "fingerprint": "sq-1-n_BL15KP87ClDa4-h2nXOI0fp5VnxNH6hfhzqhptTfAgxgLuGFcg6jIPngDz4IkkTQ" }, "entry_method": "KEYED" }, "payment_id": "0LRiVlbXVwe8ozu4KbZxd12mvaB" } ], "total_service_charge_money": { "amount": 0, "currency": "USD" }, "net_amounts": { "total_money": { "amount": 2000, "currency": "USD" }, "tax_money": { "amount": 0, "currency": "USD" }, "discount_money": { "amount": 0, "currency": "USD" }, "tip_money": { "amount": 0, "currency": "USD" }, "service_charge_money": { "amount": 0, "currency": "USD" } }, "source": { "name": "Source Name" }, "state": "COMPLETED" } } }, "Payment": { "type": "object", "properties": { "id": { "maxLength": 192, "type": "string", "description": "A unique ID for the payment.", "x-read-only": true }, "created_at": { "maxLength": 32, "type": "string", "description": "The timestamp of when the payment was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "maxLength": 32, "type": "string", "description": "The timestamp of when the payment was last updated, in RFC 3339 format.", "x-read-only": true }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount processed for this payment, not including `tip_money`.\n\nThe amount is specified in the smallest denomination of the applicable currency (for example,\nUS dollar amounts are specified in cents). For more information, see\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)." }, "tip_money": { "$ref": "#/definitions/Money", "description": "The amount designated as a tip. \n\nThis amount is specified in the smallest denomination of the applicable currency (for example,\nUS dollar amounts are specified in cents). For more information, see\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)." }, "total_money": { "$ref": "#/definitions/Money", "description": "The total amount for the payment, including `amount_money` and `tip_money`.\nThis amount is specified in the smallest denomination of the applicable currency (for example,\nUS dollar amounts are specified in cents). For more information, see\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).", "x-read-only": true }, "app_fee_money": { "$ref": "#/definitions/Money", "description": "The amount the developer is taking as a fee for facilitating the payment on behalf\nof the seller. This amount is specified in the smallest denomination of the applicable currency\n(for example, US dollar amounts are specified in cents). For more information,\nsee [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).\n\nThe amount cannot be more than 90% of the `total_money` value.\n\nTo set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required.\nFor more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions)." }, "approved_money": { "$ref": "#/definitions/Money", "description": "The amount of money approved for this payment. This value may change if Square chooses to\nobtain reauthorization as part of a call to [UpdatePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/update-payment)." }, "processing_fee": { "type": "array", "items": { "$ref": "#/definitions/ProcessingFee" }, "description": "The processing fees and fee adjustments assessed by Square for this payment.", "x-read-only": true }, "refunded_money": { "$ref": "#/definitions/Money", "description": "The total amount of the payment refunded to date. \n\nThis amount is specified in the smallest denomination of the applicable currency (for example,\nUS dollar amounts are specified in cents).", "x-read-only": true }, "status": { "maxLength": 50, "type": "string", "description": "Indicates whether the payment is APPROVED, PENDING, COMPLETED, CANCELED, or FAILED.", "x-read-only": true }, "delay_duration": { "type": "string", "description": "The duration of time after the payment\u0027s creation when Square automatically applies the\n`delay_action` to the payment. This automatic `delay_action` applies only to payments that\ndo not reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration`\ntime period.\n\nThis field is specified as a time duration, in RFC 3339 format.\n\nNotes:\nThis feature is only supported for card payments.\n\nDefault:\n\n- Card-present payments: \"PT36H\" (36 hours) from the creation time.\n- Card-not-present payments: \"P7D\" (7 days) from the creation time.", "x-read-only": true }, "delay_action": { "type": "string", "description": "The action to be applied to the payment when the `delay_duration` has elapsed.\n\nCurrent values include `CANCEL` and `COMPLETE`." }, "delayed_until": { "type": "string", "description": "The read-only timestamp of when the `delay_action` is automatically applied,\nin RFC 3339 format.\n\nNote that this field is calculated by summing the payment\u0027s `delay_duration` and `created_at`\nfields. The `created_at` field is generated by Square and might not exactly match the\ntime on your local machine.", "x-read-only": true }, "source_type": { "maxLength": 50, "type": "string", "description": "The source type for this payment.\n\nCurrent values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `SQUARE_ACCOUNT`,\n`CASH` and `EXTERNAL`. For information about these payment source types,\nsee [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).", "x-read-only": true }, "card_details": { "$ref": "#/definitions/CardPaymentDetails", "description": "Details about a card payment. These details are only populated if the source_type is `CARD`.", "x-read-only": true }, "cash_details": { "$ref": "#/definitions/CashPaymentDetails", "description": "Details about a cash payment. These details are only populated if the source_type is `CASH`." }, "bank_account_details": { "$ref": "#/definitions/BankAccountPaymentDetails", "description": "Details about a bank account payment. These details are only populated if the source_type is `BANK_ACCOUNT`.", "x-read-only": true }, "external_details": { "$ref": "#/definitions/ExternalPaymentDetails", "description": "Details about an external payment. The details are only populated \nif the `source_type` is `EXTERNAL`.", "x-read-only": true }, "wallet_details": { "$ref": "#/definitions/DigitalWalletDetails", "description": "Details about an wallet payment. The details are only populated \nif the `source_type` is `WALLET`.", "x-read-only": true }, "buy_now_pay_later_details": { "$ref": "#/definitions/BuyNowPayLaterDetails", "description": "Details about a Buy Now Pay Later payment. The details are only populated\nif the `source_type` is `BUY_NOW_PAY_LATER`. For more information, see \n[Afterpay Payments](https://developer.squareup.com/docs/payments-api/take-payments/afterpay-payments).", "x-read-only": true }, "square_account_details": { "$ref": "#/definitions/SquareAccountDetails", "description": "Details about a Square Account payment. The details are only populated\nif the `source_type` is `SQUARE_ACCOUNT`.", "x-read-only": true }, "location_id": { "maxLength": 50, "type": "string", "description": "The ID of the location associated with the payment.", "x-read-only": true }, "order_id": { "maxLength": 192, "type": "string", "description": "The ID of the order associated with the payment.", "x-read-only": true }, "reference_id": { "maxLength": 40, "type": "string", "description": "An optional ID that associates the payment with an entity in\nanother system.", "x-read-only": true }, "customer_id": { "maxLength": 191, "type": "string", "description": "The ID of the customer associated with the payment. If the ID is \nnot provided in the `CreatePayment` request that was used to create the `Payment`, \nSquare may use information in the request \n(such as the billing and shipping address, email address, and payment source) \nto identify a matching customer profile in the Customer Directory. \nIf found, the profile ID is used. If a profile is not found, the \nAPI attempts to create an \n[instant profile](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles). \nIf the API cannot create an \ninstant profile (either because the seller has disabled it or the \nseller\u0027s region prevents creating it), this field remains unset. Note that \nthis process is asynchronous and it may take some time before a \ncustomer ID is added to the payment.", "x-read-only": true }, "employee_id": { "maxLength": 192, "type": "string", "description": "__Deprecated__: Use `Payment.team_member_id` instead.\n\nAn optional ID of the employee associated with taking the payment.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-read-only": true }, "team_member_id": { "maxLength": 192, "type": "string", "description": "An optional ID of the [TeamMember](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember) associated with taking the payment.", "x-read-only": true }, "refund_ids": { "type": "array", "items": { "type": "string" }, "description": "A list of `refund_id`s identifying refunds for the payment.", "x-read-only": true }, "risk_evaluation": { "$ref": "#/definitions/RiskEvaluation", "description": "Provides information about the risk associated with the payment, as determined by Square.\nThis field is present for payments to sellers that have opted in to receive risk\nevaluations.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "buyer_email_address": { "maxLength": 255, "type": "string", "description": "The buyer\u0027s email address.", "x-read-only": true }, "billing_address": { "$ref": "#/definitions/Address", "description": "The buyer\u0027s billing address.", "x-read-only": true }, "shipping_address": { "$ref": "#/definitions/Address", "description": "The buyer\u0027s shipping address.", "x-read-only": true }, "note": { "maxLength": 500, "type": "string", "description": "An optional note to include when creating a payment.", "x-read-only": true }, "statement_description_identifier": { "type": "string", "description": "Additional payment information that gets added to the customer\u0027s card statement\nas part of the statement description.\n\nNote that the `statement_description_identifier` might get truncated on the statement description\nto fit the required information including the Square identifier (SQ *) and the name of the\nseller taking the payment.", "x-read-only": true }, "capabilities": { "type": "array", "items": { "type": "string" }, "description": "Actions that can be performed on this payment:\n- `EDIT_AMOUNT_UP` - The payment amount can be edited up.\n- `EDIT_AMOUNT_DOWN` - The payment amount can be edited down.\n- `EDIT_TIP_AMOUNT_UP` - The tip amount can be edited up.\n- `EDIT_TIP_AMOUNT_DOWN` - The tip amount can be edited down.\n- `EDIT_DELAY_ACTION` - The delay_action can be edited.", "x-read-only": true }, "receipt_number": { "maxLength": 4, "type": "string", "description": "The payment\u0027s receipt number.\nThe field is missing if a payment is canceled.", "x-read-only": true }, "receipt_url": { "maxLength": 255, "type": "string", "description": "The URL for the payment\u0027s receipt.\nThe field is only populated for COMPLETED payments.", "x-read-only": true }, "device_details": { "$ref": "#/definitions/DeviceDetails", "description": "Details about the device that took the payment.", "x-read-only": true }, "application_details": { "$ref": "#/definitions/ApplicationDetails", "description": "Details about the application that took the payment.", "x-read-only": true }, "version_token": { "type": "string", "description": "Used for optimistic concurrency. This opaque token identifies a specific version of the\n`Payment` object." } }, "description": "Represents a payment processed by the Square API.", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityAppFeeRefundDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "refund_id": { "type": "string", "description": "The ID of the refund associated with this activity." }, "location_id": { "type": "string", "description": "The ID of the location of the merchant associated with the payment refund activity" } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityAppFeeRevenueDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "location_id": { "type": "string", "description": "The ID of the location of the merchant associated with the payment activity" } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityAutomaticSavingsDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "payout_id": { "type": "string", "description": "The ID of the payout associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityAutomaticSavingsReversedDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "payout_id": { "type": "string", "description": "The ID of the payout associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityChargeDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityDepositFeeDetail": { "type": "object", "properties": { "payout_id": { "type": "string", "description": "The ID of the payout that triggered this deposit fee activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityDisputeDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "dispute_id": { "type": "string", "description": "The ID of the dispute associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityFeeDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity\nThis will only be populated when a principal LedgerEntryToken is also populated.\nIf the fee is independent (there is no principal LedgerEntryToken) then this will likely not\nbe populated." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityFreeProcessingDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityHoldAdjustmentDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityOpenDisputeDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "dispute_id": { "type": "string", "description": "The ID of the dispute associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityOtherAdjustmentDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityOtherDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityRefundDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "refund_id": { "type": "string", "description": "The ID of the refund associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityReleaseAdjustmentDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityReserveHoldDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityReserveReleaseDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivitySquareCapitalPaymentDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivitySquareCapitalReversedPaymentDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityTaxOnFeeDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "tax_rate_description": { "type": "string", "description": "The description of the tax rate being applied. For example: \"GST\", \"HST\"." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityThirdPartyFeeDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentBalanceActivityThirdPartyFeeRefundDetail": { "type": "object", "properties": { "payment_id": { "type": "string", "description": "The ID of the payment associated with this activity." }, "refund_id": { "type": "string", "description": "The public refund id associated with this activity." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentLink": { "type": "object", "required": [ "version" ], "properties": { "id": { "type": "string", "description": "The Square-assigned ID of the payment link.", "x-read-only": true }, "version": { "maximum": 65535, "type": "integer", "description": "The Square-assigned version number, which is incremented each time an update is committed to the payment link." }, "description": { "maxLength": 4096, "type": "string", "description": "The optional description of the `payment_link` object.\nIt is primarily for use by your application and is not used anywhere." }, "order_id": { "maxLength": 192, "type": "string", "description": "The ID of the order associated with the payment link.", "x-read-only": true }, "checkout_options": { "$ref": "#/definitions/CheckoutOptions", "description": "The checkout options configured for the payment link.\nFor more information, see [Optional Checkout Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations)." }, "pre_populated_data": { "$ref": "#/definitions/PrePopulatedData", "description": "Describes buyer data to prepopulate\non the checkout page." }, "url": { "maxLength": 255, "type": "string", "description": "The shortened URL of the payment link.", "x-read-only": true }, "long_url": { "maxLength": 255, "type": "string", "description": "The long URL of the payment link.", "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp when the payment link was created, in RFC 3339 format." }, "updated_at": { "type": "string", "description": "The timestamp when the payment link was last updated, in RFC 3339 format." }, "payment_note": { "maxLength": 500, "type": "string", "description": "An optional note. After Square processes the payment, this note is added to the\nresulting `Payment`." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentLinkRelatedResources": { "type": "object", "properties": { "orders": { "type": "array", "items": { "$ref": "#/definitions/Order" }, "description": "The order associated with the payment link." }, "subscription_plans": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "The subscription plan associated with the payment link." } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentOptions": { "type": "object", "properties": { "autocomplete": { "type": "boolean", "description": "Indicates whether the `Payment` objects created from this `TerminalCheckout` are automatically\n`COMPLETED` or left in an `APPROVED` state for later modification." }, "delay_duration": { "type": "string", "description": "The duration of time after the payment\u0027s creation when Square automatically cancels the\npayment. This automatic cancellation applies only to payments that do not reach a terminal state\n(COMPLETED or CANCELED) before the `delay_duration` time period.\n\nThis parameter should be specified as a time duration, in RFC 3339 format, with a minimum value\nof 1 minute.\n\nNote: This feature is only supported for card payments. This parameter can only be set for a delayed\ncapture payment (`autocomplete\u003dfalse`).\nDefault:\n- Card-present payments: \"PT36H\" (36 hours) from the creation time.\n- Card-not-present payments: \"P7D\" (7 days) from the creation time." }, "accept_partial_authorization": { "type": "boolean", "description": "If set to `true` and charging a Square Gift Card, a payment might be returned with\n`amount_money` equal to less than what was requested. For example, a request for $20 when charging\na Square Gift Card with a balance of $5 results in an APPROVED payment of $5. You might choose\nto prompt the buyer for an additional payment to cover the remainder or cancel the Gift Card\npayment.\n\nThis field cannot be `true` when `autocomplete \u003d true`.\nThis field cannot be `true` when an `order_id` isn\u0027t specified.\n\nFor more information, see\n[Take Partial Payments](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/partial-payments-with-gift-cards).\n\nDefault: false" }, "delay_action": { "type": "string", "description": "The action to be applied to the payment when the delay_duration has elapsed.\nThe action must be CANCEL or COMPLETE.\n\nThis parameter can only be set for a delayed capture payment (when `autocomplete` is `false`).", "x-release-status": "BETA", "x-is-beta": true } }, "description": "", "x-release-status": "PUBLIC" }, "PaymentRefund": { "type": "object", "required": [ "id", "amount_money" ], "properties": { "id": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The unique ID for this refund, generated by Square." }, "status": { "maxLength": 50, "type": "string", "description": "The refund\u0027s status:\n- `PENDING` - Awaiting approval.\n- `COMPLETED` - Successfully completed.\n- `REJECTED` - The refund was rejected.\n- `FAILED` - An error occurred." }, "location_id": { "maxLength": 50, "type": "string", "description": "The location ID associated with the payment this refund is attached to." }, "unlinked": { "type": "boolean", "description": "Flag indicating whether or not the refund is linked to an existing payment in Square.", "x-read-only": true }, "destination_type": { "maxLength": 50, "type": "string", "description": "The destination type for this refund.\n\nCurrent values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`,\n`EXTERNAL`, and `SQUARE_ACCOUNT`." }, "destination_details": { "$ref": "#/definitions/DestinationDetails", "description": "Contains information about the refund destination. This field is populated only if\n`destination_id` is defined in the `RefundPayment` request.", "x-read-only": true }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money refunded. This amount is specified in the smallest denomination\nof the applicable currency (for example, US dollar amounts are specified in cents)." }, "app_fee_money": { "$ref": "#/definitions/Money", "description": "The amount of money the application developer contributed to help cover the refunded amount.\nThis amount is specified in the smallest denomination of the applicable currency (for example,\nUS dollar amounts are specified in cents). For more information, see\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)." }, "processing_fee": { "type": "array", "items": { "$ref": "#/definitions/ProcessingFee" }, "description": "Processing fees and fee adjustments assessed by Square for this refund." }, "payment_id": { "maxLength": 192, "type": "string", "description": "The ID of the payment associated with this refund." }, "order_id": { "maxLength": 192, "type": "string", "description": "The ID of the order associated with the refund." }, "reason": { "maxLength": 192, "type": "string", "description": "The reason for the refund." }, "created_at": { "maxLength": 32, "type": "string", "description": "The timestamp of when the refund was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "maxLength": 32, "type": "string", "description": "The timestamp of when the refund was last updated, in RFC 3339 format.", "x-read-only": true }, "team_member_id": { "maxLength": 192, "type": "string", "description": "An optional ID of the team member associated with taking the payment.", "x-read-only": true } }, "description": "Represents a refund of a payment made using Square. Contains information about\nthe original payment and the amount of money refunded.", "x-release-status": "PUBLIC" }, "Payout": { "type": "object", "required": [ "id", "location_id" ], "properties": { "id": { "minLength": 1, "type": "string", "description": "A unique ID for the payout." }, "status": { "type": "string", "description": "Indicates the payout status." }, "location_id": { "minLength": 1, "type": "string", "description": "The ID of the location associated with the payout." }, "created_at": { "type": "string", "description": "The timestamp of when the payout was created and submitted for deposit to the seller\u0027s banking destination, in RFC 3339 format." }, "updated_at": { "type": "string", "description": "The timestamp of when the payout was last updated, in RFC 3339 format." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money involved in the payout. A positive amount indicates a deposit, and a negative amount indicates a withdrawal. This amount is never zero." }, "destination": { "$ref": "#/definitions/Destination", "description": "Information about the banking destination (such as a bank account, Square checking account, or debit card)\nagainst which the payout was made." }, "version": { "type": "integer", "description": "The version number, which is incremented each time an update is made to this payout record.\nThe version number helps developers receive event notifications or feeds out of order." }, "type": { "type": "string", "description": "Indicates the payout type." }, "payout_fee": { "type": "array", "items": { "$ref": "#/definitions/PayoutFee" }, "description": "A list of transfer fees and any taxes on the fees assessed by Square for this payout." }, "arrival_date": { "type": "string", "description": "The calendar date, in ISO 8601 format (YYYY-MM-DD), when the payout is due to arrive in the seller’s banking destination." }, "end_to_end_id": { "type": "string", "description": "A unique ID for each `Payout` object that might also appear on the seller’s bank statement. You can use this ID to automate the process of reconciling each payout with the corresponding line item on the bank statement." } }, "description": "An accounting of the amount owed the seller and record of the actual transfer to their\nexternal bank account or to the Square balance.", "x-release-status": "PUBLIC" }, "PayoutEntry": { "type": "object", "required": [ "id", "payout_id" ], "properties": { "id": { "minLength": 1, "type": "string", "description": "A unique ID for the payout entry." }, "payout_id": { "minLength": 1, "type": "string", "description": "The ID of the payout entries’ associated payout." }, "effective_at": { "type": "string", "description": "The timestamp of when the payout entry affected the balance, in RFC 3339 format." }, "type": { "type": "string", "description": "The type of activity associated with this payout entry." }, "gross_amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money involved in this payout entry." }, "fee_amount_money": { "$ref": "#/definitions/Money", "description": "The amount of Square fees associated with this payout entry." }, "net_amount_money": { "$ref": "#/definitions/Money", "description": "The net proceeds from this transaction after any fees." }, "type_app_fee_revenue_details": { "$ref": "#/definitions/PaymentBalanceActivityAppFeeRevenueDetail", "description": "Details of any developer app fee revenue generated on a payment." }, "type_app_fee_refund_details": { "$ref": "#/definitions/PaymentBalanceActivityAppFeeRefundDetail", "description": "Details of a refund for an app fee on a payment." }, "type_automatic_savings_details": { "$ref": "#/definitions/PaymentBalanceActivityAutomaticSavingsDetail", "description": "Details of any automatic transfer from the payment processing balance to the Square Savings account. These are, generally, proportional to the merchant\u0027s sales." }, "type_automatic_savings_reversed_details": { "$ref": "#/definitions/PaymentBalanceActivityAutomaticSavingsReversedDetail", "description": "Details of any automatic transfer from the Square Savings account back to the processing balance. These are, generally, proportional to the merchant\u0027s refunds." }, "type_charge_details": { "$ref": "#/definitions/PaymentBalanceActivityChargeDetail", "description": "Details of credit card payment captures." }, "type_deposit_fee_details": { "$ref": "#/definitions/PaymentBalanceActivityDepositFeeDetail", "description": "Details of any fees involved with deposits such as for instant deposits." }, "type_dispute_details": { "$ref": "#/definitions/PaymentBalanceActivityDisputeDetail", "description": "Details of any balance change due to a dispute event." }, "type_fee_details": { "$ref": "#/definitions/PaymentBalanceActivityFeeDetail", "description": "Details of adjustments due to the Square processing fee." }, "type_free_processing_details": { "$ref": "#/definitions/PaymentBalanceActivityFreeProcessingDetail", "description": "Square offers Free Payments Processing for a variety of business scenarios including seller referral or when Square wants to apologize for a bug, customer service, repricing complication, and so on. This entry represents details of any credit to the merchant for the purposes of Free Processing." }, "type_hold_adjustment_details": { "$ref": "#/definitions/PaymentBalanceActivityHoldAdjustmentDetail", "description": "Details of any adjustment made by Square related to the holding or releasing of a payment." }, "type_open_dispute_details": { "$ref": "#/definitions/PaymentBalanceActivityOpenDisputeDetail", "description": "Details of any open disputes." }, "type_other_details": { "$ref": "#/definitions/PaymentBalanceActivityOtherDetail", "description": "Details of any other type that does not belong in the rest of the types." }, "type_other_adjustment_details": { "$ref": "#/definitions/PaymentBalanceActivityOtherAdjustmentDetail", "description": "Details of any other type of adjustments that don\u0027t fall under existing types." }, "type_refund_details": { "$ref": "#/definitions/PaymentBalanceActivityRefundDetail", "description": "Details of a refund for an existing card payment." }, "type_release_adjustment_details": { "$ref": "#/definitions/PaymentBalanceActivityReleaseAdjustmentDetail", "description": "Details of fees released for adjustments." }, "type_reserve_hold_details": { "$ref": "#/definitions/PaymentBalanceActivityReserveHoldDetail", "description": "Details of fees paid for funding risk reserve." }, "type_reserve_release_details": { "$ref": "#/definitions/PaymentBalanceActivityReserveReleaseDetail", "description": "Details of fees released from risk reserve." }, "type_square_capital_payment_details": { "$ref": "#/definitions/PaymentBalanceActivitySquareCapitalPaymentDetail", "description": "Details of capital merchant cash advance (MCA) assessments. These are, generally, proportional to the merchant\u0027s sales but may be issued for other reasons related to the MCA." }, "type_square_capital_reversed_payment_details": { "$ref": "#/definitions/PaymentBalanceActivitySquareCapitalReversedPaymentDetail", "description": "Details of capital merchant cash advance (MCA) assessment refunds. These are, generally, proportional to the merchant\u0027s refunds but may be issued for other reasons related to the MCA." }, "type_tax_on_fee_details": { "$ref": "#/definitions/PaymentBalanceActivityTaxOnFeeDetail", "description": "Details of tax paid on fee amounts." }, "type_third_party_fee_details": { "$ref": "#/definitions/PaymentBalanceActivityThirdPartyFeeDetail", "description": "Details of fees collected by a 3rd party platform." }, "type_third_party_fee_refund_details": { "$ref": "#/definitions/PaymentBalanceActivityThirdPartyFeeRefundDetail", "description": "Details of refunded fees from a 3rd party platform." } }, "description": "One or more PayoutEntries that make up a Payout. Each one has a date, amount, and type of activity.\nThe total amount of the payout will equal the sum of the payout entries for a batch payout", "x-release-status": "PUBLIC" }, "PayoutFee": { "type": "object", "properties": { "amount_money": { "$ref": "#/definitions/Money", "description": "The money amount of the payout fee." }, "effective_at": { "type": "string", "description": "The timestamp of when the fee takes effect, in RFC 3339 format." }, "type": { "type": "string", "description": "The type of fee assessed as part of the payout." } }, "description": "Represents a payout fee that can incur as part of a payout.", "x-release-status": "PUBLIC" }, "Phase": { "type": "object", "properties": { "uid": { "type": "string", "description": "id of subscription phase" }, "ordinal": { "type": "integer", "format": "int64", "description": "index of phase in total subscription plan" }, "order_template_id": { "type": "string", "description": "id of order to be used in billing" }, "plan_phase_uid": { "type": "string", "description": "the uid from the plan\u0027s phase in catalog" } }, "description": "Represents a phase, which can override subscription phases as defined by plan_id", "x-release-status": "PUBLIC" }, "PhaseInput": { "type": "object", "required": [ "ordinal" ], "properties": { "ordinal": { "type": "integer", "format": "int64", "description": "index of phase in total subscription plan" }, "order_template_id": { "type": "string", "description": "id of order to be used in billing" } }, "description": "Represents the arguments used to construct a new phase.", "x-release-status": "PUBLIC" }, "PrePopulatedData": { "type": "object", "properties": { "buyer_email": { "maxLength": 256, "type": "string", "description": "The buyer email to prepopulate in the payment form." }, "buyer_phone_number": { "maxLength": 17, "type": "string", "description": "The buyer phone number to prepopulate in the payment form." }, "buyer_address": { "$ref": "#/definitions/Address", "description": "The buyer address to prepopulate in the payment form." } }, "description": "Describes buyer data to prepopulate in the payment form.\nFor more information,\nsee [Optional Checkout Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations).", "x-release-status": "PUBLIC" }, "ProcessingFee": { "type": "object", "properties": { "effective_at": { "type": "string", "description": "The timestamp of when the fee takes effect, in RFC 3339 format." }, "type": { "type": "string", "description": "The type of fee assessed or adjusted. The fee type can be `INITIAL` or `ADJUSTMENT`." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The fee amount, which might be negative, that is assessed or adjusted by Square.\n\nPositive values represent funds being assessed, while negative values represent\nfunds being returned." } }, "description": "Represents the Square processing fee.", "x-release-status": "PUBLIC" }, "PublishInvoiceRequest": { "type": "object", "required": [ "version" ], "properties": { "version": { "type": "integer", "description": "The version of the [invoice](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) to publish.\nThis must match the current version of the invoice; otherwise, the request is rejected." }, "idempotency_key": { "maxLength": 128, "type": "string", "description": "A unique string that identifies the `PublishInvoice` request. If you do not \nprovide `idempotency_key` (or provide an empty string as the value), the endpoint \ntreats each request as independent.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Describes a `PublishInvoice` request.", "x-release-status": "PUBLIC", "example": { "request_body": { "version": 1, "idempotency_key": "32da42d0-1997-41b0-826b-f09464fc2c2e" } } }, "PublishInvoiceResponse": { "type": "object", "properties": { "invoice": { "$ref": "#/definitions/Invoice", "description": "The published invoice." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Describes a `PublishInvoice` response.", "x-release-status": "PUBLIC", "example": { "invoice": { "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "version": 1, "location_id": "ES0RJRZYEC39A", "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "payment_requests": [ { "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355", "request_type": "BALANCE", "due_date": "2030-01-24", "tipping_enabled": true, "reminders": [ { "uid": "beebd363-e47f-4075-8785-c235aaa7df11", "relative_scheduled_days": -1, "message": "Your invoice is due tomorrow", "status": "PENDING" } ], "computed_amount_money": { "amount": 10000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "NONE" } ], "invoice_number": "inv-100", "title": "Event Planning Services", "description": "We appreciate your business!", "scheduled_at": "2030-01-13T10:00:00Z", "status": "SCHEDULED", "timezone": "America/Los_Angeles", "created_at": "2020-06-18T17:45:13Z", "updated_at": "2020-06-18T18:23:11Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "public_url": "https://squareup.com/pay-invoice/inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "accepted_payment_methods": { "card": true, "square_gift_card": false, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "custom_fields": [ { "label": "Event Reference Number", "value": "Ref. #1234", "placement": "ABOVE_LINE_ITEMS" }, { "label": "Terms of Service", "value": "The terms of service are...", "placement": "BELOW_LINE_ITEMS" } ], "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false } } }, "QrCodeOptions": { "type": "object", "required": [ "title", "body", "barcode_contents" ], "properties": { "title": { "minLength": 1, "maxLength": 250, "type": "string", "description": "The title text to display in the QR code flow on the Terminal." }, "body": { "minLength": 1, "maxLength": 10000, "type": "string", "description": "The body text to display in the QR code flow on the Terminal." }, "barcode_contents": { "minLength": 1, "maxLength": 1024, "type": "string", "description": "The text representation of the data to show in the QR code\nas UTF8-encoded data." } }, "description": "Fields to describe the action that displays QR-Codes.", "x-release-status": "BETA", "x-is-beta": true }, "QuantityRatio": { "type": "object", "properties": { "quantity": { "type": "integer", "description": "The whole or fractional quantity as the numerator." }, "quantity_denominator": { "type": "integer", "description": "The whole or fractional quantity as the denominator.\nIn the case of fractional quantity this field is the denominator and quantity is the numerator.\nWhen unspecified, the value is `1`. For example, when `quantity\u003d3` and `quantity_donominator` is unspecified,\nthe quantity ratio is `3` or `3/1`." } }, "description": "A whole number or unreduced fractional ratio.", "x-release-status": "BETA", "x-is-beta": true }, "QuickPay": { "type": "object", "required": [ "name", "price_money", "location_id" ], "properties": { "name": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The ad hoc item name. In the resulting `Order`, this name appears as the line item name." }, "price_money": { "$ref": "#/definitions/Money", "description": "The price of the item." }, "location_id": { "type": "string", "description": "The ID of the business location the checkout is associated with." } }, "description": "Describes an ad hoc item and price to generate a quick pay checkout link.\nFor more information,\nsee [Quick Pay Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout).", "x-release-status": "PUBLIC" }, "Range": { "type": "object", "properties": { "min": { "type": "string", "description": "The lower bound of the number range. At least one of `min` or `max` must be specified.\nIf unspecified, the results will have no minimum value." }, "max": { "type": "string", "description": "The upper bound of the number range. At least one of `min` or `max` must be specified.\nIf unspecified, the results will have no maximum value." } }, "description": "The range of a number value between the specified lower and upper bounds.", "x-release-status": "PUBLIC" }, "ReceiptOptions": { "type": "object", "required": [ "payment_id" ], "properties": { "payment_id": { "type": "string", "description": "The reference to the Square payment ID for the receipt." }, "print_only": { "type": "boolean", "description": "Instructs the device to print the receipt without displaying the receipt selection screen.\nRequires `printer_enabled` set to true.\nDefaults to false." }, "is_duplicate": { "type": "boolean", "description": "Identify the receipt as a reprint rather than an original receipt.\nDefaults to false." } }, "description": "Describes receipt action fields.", "x-release-status": "BETA", "x-is-beta": true }, "RedeemLoyaltyRewardRequest": { "type": "object", "required": [ "idempotency_key", "location_id" ], "properties": { "idempotency_key": { "minLength": 1, "maxLength": 128, "type": "string", "description": "A unique string that identifies this `RedeemLoyaltyReward` request. \nKeys can be any valid string, but must be unique for every request." }, "location_id": { "minLength": 1, "type": "string", "description": "The ID of the [location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) where the reward is redeemed." } }, "description": "A request to redeem a loyalty reward.", "x-release-status": "PUBLIC", "example": { "request_params": "?reward_id\u003d9f18ac21-233a-31c3-be77-b45840f5a810", "request_body": { "idempotency_key": "98adc7f7-6963-473b-b29c-f3c9cdd7d994", "location_id": "P034NEENMD09F" } } }, "RedeemLoyaltyRewardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "event": { "$ref": "#/definitions/LoyaltyEvent", "description": "The `LoyaltyEvent` for redeeming the reward." } }, "description": "A response that includes the `LoyaltyEvent` published for redeeming the reward.", "x-release-status": "PUBLIC", "example": { "event": { "id": "67377a6e-dbdc-369d-aa16-2e7ed422e71f", "type": "REDEEM_REWARD", "created_at": "2020-05-08T21:56:00Z", "redeem_reward": { "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "reward_id": "9f18ac21-233a-31c3-be77-b45840f5a810" }, "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "location_id": "P034NEENMD09F", "source": "LOYALTY_API" } } }, "Refund": { "type": "object", "required": [ "id", "location_id", "tender_id", "reason", "amount_money", "status" ], "properties": { "id": { "maxLength": 255, "type": "string", "description": "The refund\u0027s unique ID." }, "location_id": { "maxLength": 50, "type": "string", "description": "The ID of the refund\u0027s associated location." }, "transaction_id": { "maxLength": 192, "type": "string", "description": "The ID of the transaction that the refunded tender is part of." }, "tender_id": { "maxLength": 192, "type": "string", "description": "The ID of the refunded tender." }, "created_at": { "maxLength": 32, "type": "string", "description": "The timestamp for when the refund was created, in RFC 3339 format.", "x-read-only": true }, "reason": { "maxLength": 192, "type": "string", "description": "The reason for the refund being issued." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money refunded to the buyer." }, "status": { "type": "string", "description": "The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`,\nor `FAILED`)." }, "processing_fee_money": { "$ref": "#/definitions/Money", "description": "The amount of Square processing fee money refunded to the *merchant*." }, "additional_recipients": { "type": "array", "items": { "$ref": "#/definitions/AdditionalRecipient" }, "description": "Additional recipients (other than the merchant) receiving a portion of this refund.\nFor example, fees assessed on a refund of a purchase by a third party integration.", "x-release-status": "DEPRECATED", "x-is-deprecated": true } }, "description": "Represents a refund processed for a Square transaction.", "x-release-status": "PUBLIC" }, "RefundPaymentRequest": { "type": "object", "required": [ "idempotency_key", "amount_money" ], "properties": { "idempotency_key": { "minLength": 1, "type": "string", "description": " A unique string that identifies this `RefundPayment` request. The key can be any valid string\nbut must be unique for every `RefundPayment` request.\n\nKeys are limited to a max of 45 characters - however, the number of allowed characters might be\nless than 45, if multi-byte characters are used.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency)." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money to refund.\n\nThis amount cannot be more than the `total_money` value of the payment minus the total\namount of all previously completed refunds for this payment.\n\nThis amount must be specified in the smallest denomination of the applicable currency\n(for example, US dollar amounts are specified in cents). For more information, see\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).\n\nThe currency code must match the currency associated with the business\nthat is charging the card." }, "app_fee_money": { "$ref": "#/definitions/Money", "description": "The amount of money the developer contributes to help cover the refunded amount.\nThis amount is specified in the smallest denomination of the applicable currency (for example,\nUS dollar amounts are specified in cents).\n\nThe value cannot be more than the `amount_money`.\n\nYou can specify this parameter in a refund request only if the same parameter was also included\nwhen taking the payment. This is part of the application fee scenario the API supports. For more\ninformation, see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).\n\nTo set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required.\nFor more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions).", "x-release-status": "BETA", "x-is-beta": true }, "payment_id": { "type": "string", "description": "The unique ID of the payment being refunded.\nRequired when unlinked\u003dfalse, otherwise must not be set." }, "destination_id": { "type": "string", "description": "The ID indicating where funds will be refunded to, if this is an unlinked refund.\nThis can be any of the following: A token generated by Web Payments SDK;\na card-on-file identifier.\nRequired for requests specifying unlinked\u003dtrue.\nOtherwise, if included when `unlinked\u003dfalse`, will throw an error." }, "unlinked": { "type": "boolean", "description": "Indicates that the refund is not linked to a Square payment.\nIf set to true, `destination_id` and `location_id` must be supplied while `payment_id` must not\nbe provided." }, "location_id": { "maxLength": 50, "type": "string", "description": "The location ID associated with the unlinked refund.\nRequired for requests specifying `unlinked\u003dtrue`.\nOtherwise, if included when `unlinked\u003dfalse`, will throw an error." }, "customer_id": { "type": "string", "description": "The [Customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) ID of the customer associated with the refund.\nThis is required if the `destination_id` refers to a card on file created using the Cards\nAPI. Only allowed when `unlinked\u003dtrue`." }, "reason": { "maxLength": 192, "type": "string", "description": "A description of the reason for the refund." }, "payment_version_token": { "type": "string", "description": " Used for optimistic concurrency. This opaque token identifies the current `Payment`\nversion that the caller expects. If the server has a different version of the Payment,\nthe update fails and a response with a VERSION_MISMATCH error is returned.\nIf the versions match, or the field is not provided, the refund proceeds as normal.", "x-release-status": "BETA", "x-is-beta": true }, "team_member_id": { "maxLength": 192, "type": "string", "description": "An optional [TeamMember](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember) ID to associate with this refund." } }, "description": "Describes a request to refund a payment using [RefundPayment](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/refund-payment).", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "9b7f2dcf-49da-4411-b23e-a2d6af21333a", "payment_id": "R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY", "amount_money": { "amount": 1000, "currency": "USD" }, "app_fee_money": { "amount": 10, "currency": "USD" }, "reason": "Example" } } }, "RefundPaymentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "refund": { "$ref": "#/definitions/PaymentRefund", "description": "The successfully created `PaymentRefund`." } }, "description": "Defines the response returned by\n[RefundPayment](https://developer.squareup.com/reference/square_2024-04-17/refunds-api/refund-payment).\n\nIf there are errors processing the request, the `refund` field might not be\npresent, or it might be present with a status of `FAILED`.", "x-release-status": "PUBLIC", "example": { "refund": { "id": "R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY_KlWP8IC1557ddwc9QWTKrCVU6m0JXDz15R2Qym5eQfR", "status": "PENDING", "amount_money": { "amount": 1000, "currency": "USD" }, "payment_id": "R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY", "order_id": "1JLEUZeEooAIX8HMqm9kvWd69aQZY", "created_at": "2021-10-13T21:23:19.116Z", "updated_at": "2021-10-13T21:23:19.508Z", "app_fee_money": { "amount": 10, "currency": "USD" }, "location_id": "L88917AVBK2S5", "reason": "Example" } } }, "RegisterDomainRequest": { "type": "object", "required": [ "domain_name" ], "properties": { "domain_name": { "minLength": 1, "maxLength": 255, "type": "string", "description": "A domain name as described in RFC-1034 that will be registered with ApplePay." } }, "description": "Defines the parameters that can be included in the body of\na request to the [RegisterDomain](https://developer.squareup.com/reference/square_2024-04-17/apple-pay-api/register-domain) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "domain_name": "example.com" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainRequest.python", "csharp": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainRequest.csharp", "java": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainRequest.java", "php": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainRequest.php", "javascript": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainRequest.javascript", "ruby": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainRequest.ruby" } }, "RegisterDomainResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "status": { "type": "string", "description": "The status of the domain registration.\n\nSee [RegisterDomainResponseStatus](https://developer.squareup.com/reference/square_2024-04-17/enums/RegisterDomainResponseStatus) for possible values." } }, "description": "Defines the fields that are included in the response body of\na request to the [RegisterDomain](https://developer.squareup.com/reference/square_2024-04-17/apple-pay-api/register-domain) endpoint.\n\nEither `errors` or `status` are present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "status": "VERIFIED" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainResponse.python", "csharp": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainResponse.csharp", "java": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainResponse.java", "php": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainResponse.php", "javascript": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainResponse.javascript", "ruby": "/sdk_samples/ApplePay/RegisterDomain/RegisterDomainResponse.ruby" } }, "RemoveGroupFromCustomerRequest": { "type": "object", "properties": {}, "description": "Defines the fields that are included in the request body of\na request to the [RemoveGroupFromCustomer](https://developer.squareup.com/reference/square_2024-04-17/customers-api/remove-group-from-customer) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RemoveGroupFromCustomerResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [RemoveGroupFromCustomer](https://developer.squareup.com/reference/square_2024-04-17/customers-api/remove-group-from-customer)\nendpoint.", "x-release-status": "PUBLIC", "example": {} }, "ResumeSubscriptionRequest": { "type": "object", "properties": { "resume_effective_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date when the subscription reactivated.", "x-release-status": "BETA", "x-is-beta": true }, "resume_change_timing": { "type": "string", "description": "The timing to resume a subscription, relative to the specified\n`resume_effective_date` attribute value.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Defines input parameters in a request to the\n[ResumeSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/resume-subscription) endpoint.", "x-release-status": "PUBLIC" }, "ResumeSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The resumed subscription." }, "actions": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionAction" }, "description": "A list of `RESUME` actions created by the request and scheduled for the subscription.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Defines output parameters in a response from the \n[ResumeSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/resume-subscription) endpoint.", "x-release-status": "PUBLIC", "example": { "subscription": { "id": "56214fb2-cc85-47a1-93bc-44f3766bb56f", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "start_date": "2023-06-20", "status": "ACTIVE", "version": 1, "created_at": "2023-06-20T21:53:10Z", "card_id": "ccof:qy5x8hHGYsgLrp4Q4GB", "phases": [ { "uid": "873451e0-745b-4e87-ab0b-c574933fe616", "ordinal": 0, "order_template_id": "U2NaowWxzXwpsZU697x7ZHOAnCNZY", "plan_phase_uid": "X2Q2AONPB3RB64Y27S25QCZP" } ], "timezone": "America/Los_Angeles", "source": { "name": "My Application" } }, "actions": [ { "id": "18ff74f4-3da4-30c5-929f-7d6fca84f115", "type": "RESUME", "effective_date": "2023-09-01" } ] } }, "RetrieveBookingCustomAttributeDefinitionRequest": { "type": "object", "properties": { "version": { "type": "integer", "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error." } }, "description": "Represents a [RetrieveBookingCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/retrieve-booking-custom-attribute-definition) request.", "x-release-status": "PUBLIC", "example": { "pathParameters": { "key": "favoriteShampoo" } } }, "RetrieveBookingCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The retrieved custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [RetrieveBookingCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/retrieve-booking-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definition": { "key": "favoriteShampoo", "name": "Favorite shampoo", "description": "The favorite shampoo of the customer.", "version": 1, "updated_at": "2022-11-16T15:27:30Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-11-16T15:27:30Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" }, "errors": [] } }, "RetrieveBookingCustomAttributeRequest": { "type": "object", "properties": { "with_definition": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`." }, "version": { "type": "integer", "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error." } }, "description": "Represents a [RetrieveBookingCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/retrieve-booking-custom-attribute) request.", "x-release-status": "PUBLIC", "example": { "pathParameters": { "booking_id": "Z57QXKM2FGXEQDV42W8RBZY7BR", "key": "favoriteShampoo" } } }, "RetrieveBookingCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The retrieved custom attribute. If `with_definition` was set to `true` in the request,\nthe custom attribute definition is returned in the `definition` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [RetrieveBookingCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/retrieve-booking-custom-attribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute": { "key": "favoriteShampoo", "version": 1, "updated_at": "2022-11-16T15:50:27Z", "value": "Dune", "created_at": "2022-11-16T15:50:27Z", "visibility": "VISIBILITY_READ_ONLY" }, "errors": [] } }, "RetrieveBookingRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC" }, "RetrieveBookingResponse": { "type": "object", "properties": { "booking": { "$ref": "#/definitions/Booking", "description": "The booking that was requested." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "booking": { "id": "zkras0xv0xwswx", "version": 1, "status": "ACCEPTED", "created_at": "2020-10-28T15:47:41Z", "updated_at": "2020-10-28T15:49:25Z", "location_id": "LEQHH0YY8B42M", "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M", "customer_note": "", "seller_note": "", "start_at": "2020-11-26T13:00:00Z", "appointment_segments": [ { "duration_minutes": 60, "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_version": 1599775456731 } ] }, "errors": [] } }, "RetrieveBusinessBookingProfileRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC" }, "RetrieveBusinessBookingProfileResponse": { "type": "object", "properties": { "business_booking_profile": { "$ref": "#/definitions/BusinessBookingProfile", "description": "The seller\u0027s booking profile." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "business_booking_profile": { "seller_id": "MLJQYZZRM0D3Y", "created_at": "2020-09-10T21:40:38Z", "booking_enabled": true, "customer_timezone_choice": "CUSTOMER_CHOICE", "booking_policy": "ACCEPT_ALL", "allow_user_cancel": true, "business_appointment_settings": { "location_types": [ "BUSINESS_LOCATION" ], "alignment_time": "HALF_HOURLY", "min_booking_lead_time_seconds": 0, "max_booking_lead_time_seconds": 31536000, "any_team_member_booking_enabled": true, "multiple_service_booking_enabled": true, "cancellation_fee_money": { "currency": "USD" }, "cancellation_policy": "CUSTOM_POLICY", "skip_booking_flow_staff_selection": false } }, "errors": [] } }, "RetrieveCardRequest": { "type": "object", "properties": {}, "description": "Retrieves details for a specific Card. Accessible via\nHTTP requests at GET https://connect.squareup.com/v2/cards/{card_id}", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "card": { "$ref": "#/definitions/Card", "description": "The retrieved card." } }, "description": "Defines the fields that are included in the response body of\na request to the [RetrieveCard](https://developer.squareup.com/reference/square_2024-04-17/cards-api/retrieve-card) endpoint.\n\nNote: if there are errors processing the request, the card field will not be\npresent.", "x-release-status": "PUBLIC", "example": { "card": { "id": "ccof:uIbfJXhXETSP197M3GB", "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", "bin": "411111", "card_brand": "VISA", "card_type": "CREDIT", "cardholder_name": "Amelia Earhart", "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", "enabled": true, "exp_month": 11, "exp_year": 2022, "last_4": "1111", "merchant_id": "6SSW7HV8K2ST5", "prepaid_type": "NOT_PREPAID", "reference_id": "user-id-1", "version": 1 } } }, "RetrieveCashDrawerShiftRequest": { "type": "object", "required": [ "location_id" ], "properties": { "location_id": { "minLength": 1, "type": "string", "description": "The ID of the location to retrieve cash drawer shifts from." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveCashDrawerShiftResponse": { "type": "object", "properties": { "cash_drawer_shift": { "$ref": "#/definitions/CashDrawerShift", "description": "The cash drawer shift queried for." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "cash_drawer_shift": { "id": "DCC99978-09A6-4926-849F-300BE9C5793A", "state": "CLOSED", "opened_at": "2019-11-22T00:42:54.000Z", "ended_at": "2019-11-22T00:44:49.000Z", "closed_at": "2019-11-22T00:44:49.000Z", "opening_team_member_id": "", "ending_team_member_id": "", "closing_team_member_id": "", "description": "Misplaced some change", "opened_cash_money": { "amount": 10000, "currency": "USD" }, "cash_payment_money": { "amount": 100, "currency": "USD" }, "cash_refunds_money": { "amount": -100, "currency": "USD" }, "cash_paid_in_money": { "amount": 10000, "currency": "USD" }, "cash_paid_out_money": { "amount": -10000, "currency": "USD" }, "expected_cash_money": { "amount": 10000, "currency": "USD" }, "closed_cash_money": { "amount": 9970, "currency": "USD" }, "device": { "name": "My iPad" } } } }, "RetrieveCatalogObjectRequest": { "type": "object", "properties": { "include_related_objects": { "type": "boolean", "description": "If `true`, the response will include additional objects that are related to the\nrequested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field\nof the response. These objects are put in the `related_objects` field. Setting this to `true` is\nhelpful when the objects are needed for immediate display to a user.\nThis process only goes one level deep. Objects referenced by the related objects will not be included. For example,\n\nif the `objects` field of the response contains a CatalogItem, its associated\nCatalogCategory objects, CatalogTax objects, CatalogImage objects and\nCatalogModifierLists will be returned in the `related_objects` field of the\nresponse. If the `objects` field of the response contains a CatalogItemVariation,\nits parent CatalogItem will be returned in the `related_objects` field of\nthe response.\n\nDefault value: `false`" }, "catalog_version": { "type": "integer", "format": "int64", "description": "Requests objects as of a specific version of the catalog. This allows you to retrieve historical\nversions of objects. The value to retrieve a specific version of an object can be found\nin the version field of [CatalogObject](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogObject)s. If not included, results will\nbe from the current version of the catalog.", "x-release-status": "BETA", "x-is-beta": true }, "include_category_path_to_root": { "type": "boolean", "description": "Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists\nof `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category\nand ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned\nin the response payload.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_params": "?include_related_objects\u003dtrue" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.python", "csharp": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.csharp", "java": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.java", "php": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.php", "javascript": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.javascript", "ruby": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.ruby" } }, "RetrieveCatalogObjectResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "object": { "$ref": "#/definitions/CatalogObject", "description": "The `CatalogObject`s returned." }, "related_objects": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "A list of `CatalogObject`s referenced by the object in the `object` field." } }, "description": "", "x-release-status": "PUBLIC", "example": { "object": { "type": "ITEM", "id": "W62UWFY35CWMYGVWK6TWJDNI", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "item_data": { "name": "Tea", "description": "Hot Leaf Juice", "categories": [ { "id": "BJNQCF2FJ6S6UIDT65ABHLRX", "ordinal": 0 } ], "tax_ids": [ "HURXQOOAIC4IZSI2BEXQRYFY" ], "variations": [ { "type": "ITEM_VARIATION", "id": "2TZFAOHWGG7PAK2QEXWYPZSP", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "W62UWFY35CWMYGVWK6TWJDNI", "name": "Mug", "ordinal": 0, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 150, "currency": "USD" } } } ] } }, "related_objects": [ { "type": "CATEGORY", "id": "BJNQCF2FJ6S6UIDT65ABHLRX", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "category_data": { "name": "Beverages" } }, { "type": "TAX", "id": "HURXQOOAIC4IZSI2BEXQRYFY", "updated_at": "2016-11-16T22:25:24.878Z", "version": 1479335124878, "is_deleted": false, "present_at_all_locations": true, "tax_data": { "name": "Sales Tax", "calculation_phase": "TAX_SUBTOTAL_PHASE", "inclusion_type": "ADDITIVE", "percentage": "5.0", "enabled": true } } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectResponse.python", "csharp": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectResponse.csharp", "java": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectResponse.java", "php": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectResponse.php", "javascript": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectResponse.javascript", "ruby": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectResponse.ruby" } }, "RetrieveCustomerCustomAttributeDefinitionRequest": { "type": "object", "properties": { "version": { "type": "integer", "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error." } }, "description": "Represents a [RetrieveCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/retrieve-customer-custom-attributeDefinition) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?key\u003dfavoritemovie" } }, "RetrieveCustomerCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The retrieved custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [RetrieveCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/retrieve-customer-custom-attributeDefinition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definition": { "key": "favoritemovie", "name": "Favorite Movie", "description": "The favorite movie of the customer.", "version": 1, "updated_at": "2022-04-26T15:27:30Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-04-26T15:27:30Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "RetrieveCustomerCustomAttributeRequest": { "type": "object", "properties": { "with_definition": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`." }, "version": { "type": "integer", "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error." } }, "description": "Represents a [RetrieveCustomerCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/retrieve-customer-custom-attribute) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?customer_id\u003dZ57QXKM2FGXEQDV42W8RBZY7BR\u0026key\u003dfavoritemovie" } }, "RetrieveCustomerCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The retrieved custom attribute. If `with_definition` was set to `true` in the request,\nthe custom attribute definition is returned in the `definition` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [RetrieveCustomerCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/retrieve-customer-custom-attribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute": { "key": "favoritemovie", "version": 1, "updated_at": "2022-04-26T15:50:27Z", "value": "Dune", "created_at": "2022-04-26T15:50:27Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "RetrieveCustomerGroupRequest": { "type": "object", "properties": {}, "description": "Defines the fields that can be included in a request to the\n[RetrieveCustomerGroup](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/retrieve-customer-group) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveCustomerGroupResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "group": { "$ref": "#/definitions/CustomerGroup", "description": "The retrieved customer group." } }, "description": "Defines the fields that are included in the response body of\na request to the [RetrieveCustomerGroup](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/retrieve-customer-group) endpoint.\n\nEither `errors` or `group` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "group": { "id": "2TAT3CMH4Q0A9M87XJZED0WMR3", "name": "Loyal Customers", "created_at": "2020-04-13T21:54:57.863Z", "updated_at": "2020-04-13T21:54:58Z" } } }, "RetrieveCustomerRequest": { "type": "object", "properties": {}, "description": "Defines the fields that are included in requests to the `RetrieveCustomer`\nendpoint.", "x-release-status": "PUBLIC", "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.python", "csharp": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.csharp", "java": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.java", "php": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.php", "javascript": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.javascript", "ruby": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.ruby" } }, "RetrieveCustomerResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "customer": { "$ref": "#/definitions/Customer", "description": "The requested customer." } }, "description": "Defines the fields that are included in the response body of\na request to the `RetrieveCustomer` endpoint.\n\nEither `errors` or `customer` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "customer": { "id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2016-03-23T20:21:54.859Z", "updated_at": "2016-03-23T20:21:54.859Z", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-555-4240", "reference_id": "YOUR_REFERENCE_ID", "note": "a customer", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "group_ids": [ "545AXB44B4XXWMVQ4W8SBT3HHF" ], "segment_ids": [ "1KB9JE5EGJXCW.REACHABLE" ], "version": 1 } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/RetrieveCustomer/RetrieveCustomerResponse.python", "csharp": "/sdk_samples/RetrieveCustomer/RetrieveCustomerResponse.csharp", "java": "/sdk_samples/RetrieveCustomer/RetrieveCustomerResponse.java", "php": "/sdk_samples/RetrieveCustomer/RetrieveCustomerResponse.php", "javascript": "/sdk_samples/RetrieveCustomer/RetrieveCustomerResponse.javascript", "ruby": "/sdk_samples/RetrieveCustomer/RetrieveCustomerResponse.ruby" } }, "RetrieveCustomerSegmentRequest": { "type": "object", "properties": {}, "description": "Defines the valid parameters for requests to the `RetrieveCustomerSegmentRequest` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveCustomerSegmentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "segment": { "$ref": "#/definitions/CustomerSegment", "description": "The retrieved customer segment." } }, "description": "Defines the fields that are included in the response body for requests to the `RetrieveCustomerSegment` endpoint.\n\nEither `errors` or `segment` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "segment": { "id": "GMNXRZVEXNQDF.CHURN_RISK", "name": "Lapsed", "created_at": "2020-01-09T19:33:24.469Z", "updated_at": "2020-04-13T23:01:13Z" } } }, "RetrieveDisputeEvidenceRequest": { "type": "object", "properties": {}, "description": "Defines the parameters for a `RetrieveDisputeEvidence` request.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveDisputeEvidenceResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "evidence": { "$ref": "#/definitions/DisputeEvidence", "description": "Metadata about the dispute evidence file." } }, "description": "Defines the fields in a `RetrieveDisputeEvidence` response.", "x-release-status": "PUBLIC", "example": { "evidence": { "dispute_id": "bVTprrwk0gygTLZ96VX1oB", "evidence_file": { "filename": "customer-interaction.jpg", "filetype": "image/jpeg" }, "uploaded_at": "2022-05-18T16:01:10.000Z", "evidence_type": "CARDHOLDER_COMMUNICATION", "id": "TOomLInj6iWmP3N8qfCXrB" } } }, "RetrieveDisputeRequest": { "type": "object", "properties": {}, "description": "Defines the request parameters for the `RetrieveDispute` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveDisputeResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "dispute": { "$ref": "#/definitions/Dispute", "description": "Details about the requested `Dispute`." } }, "description": "Defines fields in a `RetrieveDispute` response.", "x-release-status": "PUBLIC", "example": { "dispute": { "amount_money": { "amount": 2500, "currency": "USD" }, "reason": "NO_KNOWLEDGE", "state": "ACCEPTED", "due_at": "2022-07-13T00:00:00.000Z", "disputed_payment": { "payment_id": "zhyh1ch64kRBrrlfVhwjCEjZWzNZY" }, "card_brand": "VISA", "created_at": "2022-06-29T18:45:22.265Z", "updated_at": "2022-07-07T19:14:42.650Z", "brand_dispute_id": "100000809947", "version": 2, "location_id": "L1HN3ZMQK64X9", "id": "XDgyFu7yo1E2S5lQGGpYn", "reported_at": "2022-06-29T00:00:00.000Z" } } }, "RetrieveEmployeeRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "RetrieveEmployeeResponse": { "type": "object", "properties": { "employee": { "$ref": "#/definitions/Employee", "description": "" }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "RetrieveGiftCardFromGANRequest": { "type": "object", "required": [ "gan" ], "properties": { "gan": { "minLength": 1, "maxLength": 255, "type": "string", "description": "The gift card account number (GAN) of the gift card to retrieve.\nThe maximum length of a GAN is 255 digits to account for third-party GANs that have been imported.\nSquare-issued gift cards have 16-digit GANs." } }, "description": "A request to retrieve gift cards by their GANs.", "x-release-status": "PUBLIC", "example": { "request_body": { "gan": "7783320001001635" } } }, "RetrieveGiftCardFromGANResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_card": { "$ref": "#/definitions/GiftCard", "description": "A gift card that was fetched, if present. It returns empty if an error occurred." } }, "description": "A response that contains a `GiftCard`. This response might contain a set of `Error` objects\nif the request resulted in errors.", "x-release-status": "PUBLIC", "example": { "gift_card": { "id": "gftc:6944163553804e439d89adb47caf806a", "type": "DIGITAL", "gan_source": "SQUARE", "state": "ACTIVE", "balance_money": { "amount": 5000, "currency": "USD" }, "gan": "7783320001001635", "created_at": "2021-05-20T22:26:54.000Z" } } }, "RetrieveGiftCardFromNonceRequest": { "type": "object", "required": [ "nonce" ], "properties": { "nonce": { "minLength": 1, "type": "string", "description": "The payment token of the gift card to retrieve. Payment tokens are generated by the \nWeb Payments SDK or In-App Payments SDK." } }, "description": "A request to retrieve a gift card by using a payment token.", "x-release-status": "PUBLIC", "example": { "request_body": { "nonce": "cnon:7783322135245171" } } }, "RetrieveGiftCardFromNonceResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_card": { "$ref": "#/definitions/GiftCard", "description": "The retrieved gift card." } }, "description": "A response that contains a `GiftCard` object. If the request resulted in errors, \nthe response contains a set of `Error` objects.", "x-release-status": "PUBLIC", "example": { "gift_card": { "id": "gftc:6944163553804e439d89adb47caf806a", "type": "DIGITAL", "gan_source": "SQUARE", "state": "ACTIVE", "balance_money": { "amount": 5000, "currency": "USD" }, "gan": "7783320001001635", "created_at": "2021-05-20T22:26:54.000Z" } } }, "RetrieveGiftCardRequest": { "type": "object", "properties": {}, "description": "A request to retrieve digital gift cards.", "x-release-status": "PUBLIC", "example": { "request_params": "?id\u003dgftc:00113070ba5745f0b2377c1b9570cb03" } }, "RetrieveGiftCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_card": { "$ref": "#/definitions/GiftCard", "description": "The gift card retrieved." } }, "description": "A response that contains a `GiftCard`. The response might contain a set of `Error` objects\nif the request resulted in errors.", "x-release-status": "PUBLIC", "example": { "gift_card": { "id": "gftc:00113070ba5745f0b2377c1b9570cb03", "type": "DIGITAL", "gan_source": "SQUARE", "state": "ACTIVE", "balance_money": { "amount": 1000, "currency": "USD" }, "gan": "7783320001001635", "created_at": "2021-05-20T22:26:54.000Z" } } }, "RetrieveInventoryAdjustmentRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.python", "csharp": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.csharp", "java": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.java", "php": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.php", "javascript": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.javascript", "ruby": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.ruby" } }, "RetrieveInventoryAdjustmentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "adjustment": { "$ref": "#/definitions/InventoryAdjustment", "description": "The requested [InventoryAdjustment](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryAdjustment)." } }, "description": "", "x-release-status": "PUBLIC", "example": { "errors": [], "adjustment": { "id": "UDMOEO78BG6GYWA2XDRYX3KB", "reference_id": "4a366069-4096-47a2-99a5-0084ac879509", "from_state": "IN_STOCK", "to_state": "SOLD", "location_id": "C6W5YS5QM06F5", "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "catalog_object_type": "ITEM_VARIATION", "quantity": "7", "total_price_money": { "amount": 4550, "currency": "USD" }, "occurred_at": "2016-11-16T25:44:22.837Z", "created_at": "2016-11-17T13:02:15.142Z", "source": { "product": "SQUARE_POS", "application_id": "416ff29c-86c4-4feb-b58c-9705f21f3ea0", "name": "Square Point of Sale 4.37" }, "team_member_id": "LRK57NSQ5X7PUD05" } } }, "RetrieveInventoryChangesRequest": { "type": "object", "properties": { "location_ids": { "type": "string", "description": "The [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) IDs to look up as a comma-separated\nlist. An empty list queries all locations." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_params": "?location_ids\u003d\u0026cursor\u003d" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.python", "csharp": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.csharp", "java": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.java", "php": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.php", "javascript": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.javascript", "ruby": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.ruby" } }, "RetrieveInventoryChangesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "changes": { "type": "array", "items": { "$ref": "#/definitions/InventoryChange" }, "description": "The set of inventory changes for the requested object and locations." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If unset,\nthis is the final response.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "errors": [], "changes": [ { "type": "ADJUSTMENT", "adjustment": { "id": "OJKJIUANKLMLQANZADNPLKAD", "reference_id": "d8207693-168f-4b44-a2fd-a7ff533ddd26", "from_state": "IN_STOCK", "to_state": "SOLD", "location_id": "C6W5YS5QM06F5", "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "catalog_object_type": "ITEM_VARIATION", "quantity": "3", "total_price_money": { "amount": 5000, "currency": "USD" }, "occurred_at": "2016-11-16T22:25:24.878Z", "created_at": "2016-11-16T22:25:24.878Z", "source": { "product": "SQUARE_POS", "application_id": "416ff29c-86c4-4feb-b58c-9705f21f3ea0", "name": "Square Point of Sale 4.37" }, "team_member_id": "AV7YRCGI2H1J5NQ8E1XIZCNA", "transaction_id": "5APV6JYK1SNCZD11AND2RX1Z" } } ] } }, "RetrieveInventoryCountRequest": { "type": "object", "properties": { "location_ids": { "type": "string", "description": "The [Location](https://developer.squareup.com/reference/square_2024-04-17/objects/Location) IDs to look up as a comma-separated\nlist. An empty list queries all locations." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_params": "?location_ids\u003dC6W5YS5QM06F5\u0026cursor\u003d" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.python", "csharp": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.csharp", "java": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.java", "php": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.php", "javascript": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.javascript", "ruby": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.ruby" } }, "RetrieveInventoryCountResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "counts": { "type": "array", "items": { "$ref": "#/definitions/InventoryCount" }, "description": "The current calculated inventory counts for the requested object and\nlocations." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If unset,\nthis is the final response.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "errors": [], "counts": [ { "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "catalog_object_type": "ITEM_VARIATION", "state": "IN_STOCK", "location_id": "C6W5YS5QM06F5", "quantity": "22", "calculated_at": "2016-11-16T22:28:01.223Z" } ] } }, "RetrieveInventoryPhysicalCountRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.python", "csharp": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.csharp", "java": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.java", "php": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.php", "javascript": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.javascript", "ruby": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.ruby" } }, "RetrieveInventoryPhysicalCountResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "count": { "$ref": "#/definitions/InventoryPhysicalCount", "description": "The requested [InventoryPhysicalCount](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryPhysicalCount)." } }, "description": "", "x-release-status": "PUBLIC", "example": { "errors": [], "count": { "id": "ANZADNPLKADOJKJIUANKLMLQ", "reference_id": "f857ec37-f9a0-4458-8e23-5b5e0bea4e53", "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "catalog_object_type": "ITEM_VARIATION", "state": "IN_STOCK", "location_id": "C6W5YS5QM06F5", "quantity": "15", "source": { "product": "SQUARE_POS", "application_id": "416ff29c-86c4-4feb-b58c-9705f21f3ea0", "name": "Square Point of Sale 4.37" }, "team_member_id": "LRK57NSQ5X7PUD05", "occurred_at": "2016-11-16T22:25:24.878Z", "created_at": "2016-11-16T22:25:24.878Z" } } }, "RetrieveInventoryTransferRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.python", "csharp": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.csharp", "java": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.java", "php": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.php", "javascript": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.javascript", "ruby": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.ruby" } }, "RetrieveInventoryTransferResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "transfer": { "$ref": "#/definitions/InventoryTransfer", "description": "The requested [InventoryTransfer](https://developer.squareup.com/reference/square_2024-04-17/objects/InventoryTransfer)." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "errors": [], "transfer": { "id": "UDMOEO78BG6GYWA2XDRYX3KB", "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI", "catalog_object_type": "ITEM_VARIATION", "created_at": "2016-11-17T13:02:15.142Z", "team_member_id": "LRK57NSQ5X7PUD05", "from_location_id": "C6W5YS5QM06F5", "to_location_id": "59TNP9SA8VGDA", "occurred_at": "2016-11-16T25:44:22.837Z", "quantity": "7", "reference_id": "4a366069-4096-47a2-99a5-0084ac879509", "source": { "product": "SQUARE_POS", "application_id": "416ff29c-86c4-4feb-b58c-9705f21f3ea0", "name": "Square Point of Sale 4.37" }, "state": "IN_STOCK" } } }, "RetrieveLocationBookingProfileRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC" }, "RetrieveLocationBookingProfileResponse": { "type": "object", "properties": { "location_booking_profile": { "$ref": "#/definitions/LocationBookingProfile", "description": "The requested location booking profile." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "location_booking_profile": { "location_id": "L3HETDGYQ4A2C", "booking_enabled": true, "booking_site_url": "https://square.site/book/L3HETDGYQ4A2C/prod-business" }, "errors": [] } }, "RetrieveLocationCustomAttributeDefinitionRequest": { "type": "object", "properties": { "version": { "type": "integer", "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error." } }, "description": "Represents a [RetrieveLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/retrieve-location-custom-attributeDefinition) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?key\u003dbestseller" } }, "RetrieveLocationCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The retrieved custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [RetrieveLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/retrieve-location-custom-attributeDefinition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "bestseller", "name": "Bestseller", "description": "Bestselling item at location", "version": 1, "updated_at": "2022-12-02T19:06:36.559Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-12-02T19:06:36.559Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "RetrieveLocationCustomAttributeRequest": { "type": "object", "properties": { "with_definition": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`." }, "version": { "type": "integer", "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error." } }, "description": "Represents a [RetrieveLocationCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/retrieve-location-custom-attribute) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?location_id\u003dL0TBCBTB7P8RQ\u0026key\u003dbestseller" } }, "RetrieveLocationCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The retrieved custom attribute. If `with_definition` was set to `true` in the request,\nthe custom attribute definition is returned in the `definition` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [RetrieveLocationCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/retrieve-location-custom-attribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute": { "key": "bestseller", "version": 2, "updated_at": "2023-01-09T19:21:04.551Z", "value": "hot cocoa", "created_at": "2023-01-09T19:02:58.647Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "RetrieveLocationRequest": { "type": "object", "properties": {}, "description": "Defines the fields that are included in the request body for the\n[RetrieveLocation](https://developer.squareup.com/reference/square_2024-04-17/locations-api/retrieve-location) endpoint.", "x-release-status": "PUBLIC", "example": {} }, "RetrieveLocationResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "location": { "$ref": "#/definitions/Location", "description": "The requested location." } }, "description": "Defines the fields that the [RetrieveLocation](https://developer.squareup.com/reference/square_2024-04-17/locations-api/retrieve-location)\nendpoint returns in a response.", "x-release-status": "PUBLIC", "example": { "location": { "id": "18YC4JDH91E1H", "name": "Grant Park", "address": { "address_line_1": "123 Main St", "locality": "San Francisco", "administrative_district_level_1": "CA", "postal_code": "94114", "country": "US" }, "timezone": "America/Los_Angeles", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2016-09-19T17:33:12Z", "merchant_id": "3MYCJG5GVYQ8Q", "country": "US", "language_code": "en-US", "currency": "USD", "phone_number": "+1 650-354-7217", "business_name": "Jet Fuel Coffee" } } }, "RetrieveLocationSettingsRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "RetrieveLocationSettingsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "location_settings": { "$ref": "#/definitions/CheckoutLocationSettings", "description": "The location settings." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "location_settings": { "location_id": "LOCATION_ID_1", "updated_at": "2022-06-16T22:25:35Z", "customer_notes_enabled": true, "policies": [ { "uid": "POLICY_ID_1", "title": "Return Policy", "description": "This is my Return Policy" } ], "branding": { "header_type": "FRAMED_LOGO", "button_color": "#ffffff", "button_shape": "ROUNDED" }, "tipping": { "percentages": [ 10, 15, 20 ], "smart_tipping_enabled": true, "default_percent": 15, "default_whole_amount_money": { "amount": 100, "currency": "USD" }, "whole_amounts": [ { "amount": 1000, "currency": "USD" }, { "amount": 1500, "currency": "USD" }, { "amount": 2000, "currency": "USD" } ] } } } }, "RetrieveLoyaltyAccountRequest": { "type": "object", "properties": {}, "description": "A request to retrieve a loyalty account.", "x-release-status": "PUBLIC", "example": { "request_params": "?account_id\u003d79b807d2-d786-46a9-933b-918028d7a8c5" } }, "RetrieveLoyaltyAccountResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "loyalty_account": { "$ref": "#/definitions/LoyaltyAccount", "description": "The loyalty account." } }, "description": "A response that includes the loyalty account.", "x-release-status": "PUBLIC", "example": { "loyalty_account": { "id": "79b807d2-d786-46a9-933b-918028d7a8c5", "mapping": { "id": "66aaab3f-da99-49ed-8b19-b87f851c844f", "phone_number": "+14155551234", "created_at": "2020-05-08T21:44:32Z" }, "program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "balance": 10, "lifetime_points": 20, "customer_id": "Q8002FAM9V1EZ0ADB2T5609X6NET1H0", "created_at": "2020-05-08T21:44:32Z", "updated_at": "2020-05-08T21:44:32Z" } } }, "RetrieveLoyaltyProgramRequest": { "type": "object", "properties": {}, "description": "A request to retrieve the [loyalty program](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyProgram) that belongs to a seller. A seller can have only one loyalty program.", "x-release-status": "PUBLIC", "example": { "request_params": "?program_id\u003dmain" } }, "RetrieveLoyaltyProgramResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "program": { "$ref": "#/definitions/LoyaltyProgram", "description": "The loyalty program that was requested." } }, "description": "A response that contains the loyalty program.", "x-release-status": "PUBLIC", "example": { "program": { "id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "status": "ACTIVE", "reward_tiers": [ { "id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "points": 10, "name": "10% off entire sale", "definition": { "scope": "ORDER", "discount_type": "FIXED_PERCENTAGE", "percentage_discount": "10" }, "created_at": "2020-04-20T16:55:11Z", "pricing_rule_reference": { "object_id": "74C4JSHESNLTB2A7ITO5HO6F", "catalog_version": "1605486402527" } } ], "terminology": { "one": "Point", "other": "Points" }, "location_ids": [ "P034NEENMD09F" ], "created_at": "2020-04-20T16:55:11Z", "updated_at": "2020-05-01T02:00:02Z", "accrual_rules": [ { "accrual_type": "SPEND", "points": 1, "spend_data": { "amount_money": { "amount": 100, "currency": "USD" }, "excluded_category_ids": [ "7ZERJKO5PVYXCVUHV2JCZ2UG", "FQKAOJE5C4FIMF5A2URMLW6V" ], "excluded_item_variation_ids": [ "CBZXBUVVTYUBZGQO44RHMR6B", "EDILT24Z2NISEXDKGY6HP7XV" ], "tax_mode": "BEFORE_TAX" } } ] } } }, "RetrieveLoyaltyPromotionRequest": { "type": "object", "properties": {}, "description": "Represents a [RetrieveLoyaltyPromotionPromotions](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/retrieve-loyalty-promotion) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?program_id\u003dd619f755-2d17-41f3-990d-c04ecedd64dd\u0026promotion_id\u003dloypromo_f0f9b849-725e-378d-b810-511237e07b67", "request_body": {} } }, "RetrieveLoyaltyPromotionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "loyalty_promotion": { "$ref": "#/definitions/LoyaltyPromotion", "description": "The retrieved loyalty promotion." } }, "description": "Represents a [RetrieveLoyaltyPromotionPromotions](https://developer.squareup.com/reference/square_2024-04-17/loyalty-api/retrieve-loyalty-promotion) response.", "x-release-status": "PUBLIC", "example": { "loyalty_promotion": { "id": "loypromo_f0f9b849-725e-378d-b810-511237e07b67", "name": "Tuesday Happy Hour Promo", "incentive": { "type": "POINTS_MULTIPLIER", "points_multiplier_data": { "multiplier": "3.000", "points_multiplier": 3 } }, "available_time": { "start_date": "2022-08-16", "time_periods": [ "BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ\u003dWEEKLY;BYDAY\u003dTU\nEND:VEVENT" ] }, "trigger_limit": { "times": 1, "interval": "DAY" }, "minimum_spend_amount_money": { "amount": 2000, "currency": "USD" }, "qualifying_item_variation_ids": [ "CJ3RYL56ITAKMD4VRCM7XERS", "AT3RYLR3TUA9C34VRCB7X5RR" ], "status": "ACTIVE", "created_at": "2022-08-16T08:38:54Z", "updated_at": "2022-08-16T08:38:54Z", "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd" } } }, "RetrieveLoyaltyRewardRequest": { "type": "object", "properties": {}, "description": "A request to retrieve a loyalty reward.", "x-release-status": "PUBLIC", "example": { "request_params": "?reward_id\u003d9f18ac21-233a-31c3-be77-b45840f5a810" } }, "RetrieveLoyaltyRewardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "reward": { "$ref": "#/definitions/LoyaltyReward", "description": "The loyalty reward retrieved." } }, "description": "A response that includes the loyalty reward.", "x-release-status": "PUBLIC", "example": { "reward": { "id": "9f18ac21-233a-31c3-be77-b45840f5a810", "status": "REDEEMED", "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "reward_tier_id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "points": 10, "created_at": "2020-05-08T21:55:42Z", "updated_at": "2020-05-08T21:56:00Z", "redeemed_at": "2020-05-08T21:56:00Z" } } }, "RetrieveMerchantCustomAttributeDefinitionRequest": { "type": "object", "properties": { "version": { "type": "integer", "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error." } }, "description": "Represents a [RetrieveMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/retrieve-merchant-custom-attributeDefinition) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?key\u003dalternative_seller_name" } }, "RetrieveMerchantCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The retrieved custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [RetrieveMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/retrieve-merchant-custom-attributeDefinition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "alternative_seller_name", "name": "Alternative Merchant Name", "description": "This is the other name this merchant goes by.", "version": 1, "updated_at": "2023-05-05T19:06:36.559Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2023-05-05T19:06:36.559Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "RetrieveMerchantCustomAttributeRequest": { "type": "object", "properties": { "with_definition": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`." }, "version": { "type": "integer", "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error." } }, "description": "Represents a [RetrieveMerchantCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/retrieve-merchant-custom-attribute) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?merchant_id\u003dDM7VKY8Q63GNP\u0026key\u003dalternative_seller_name" } }, "RetrieveMerchantCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The retrieved custom attribute. If `with_definition` was set to `true` in the request,\nthe custom attribute definition is returned in the `definition` field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a [RetrieveMerchantCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/retrieve-merchant-custom-attribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute": { "key": "alternative_seller_name", "version": 2, "updated_at": "2023-05-06T19:21:04.551Z", "value": "Ultimate Sneaker Store", "created_at": "2023-05-06T19:02:58.647Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "RetrieveMerchantRequest": { "type": "object", "properties": {}, "description": "Request object for the [RetrieveMerchant](https://developer.squareup.com/reference/square_2024-04-17/merchants-api/retrieve-merchant) endpoint.", "x-release-status": "PUBLIC" }, "RetrieveMerchantResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "merchant": { "$ref": "#/definitions/Merchant", "description": "The requested `Merchant` object." } }, "description": "The response object returned by the [RetrieveMerchant](https://developer.squareup.com/reference/square_2024-04-17/merchants-api/retrieve-merchant) endpoint.", "x-release-status": "PUBLIC", "example": { "merchant": { "id": "DM7VKY8Q63GNP", "business_name": "Apple A Day", "country": "US", "language_code": "en-US", "currency": "USD", "status": "ACTIVE", "main_location_id": "9A65CGC72ZQG1", "created_at": "2021-12-10T19:25:52.484Z" } } }, "RetrieveMerchantSettingsRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "RetrieveMerchantSettingsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "merchant_settings": { "$ref": "#/definitions/CheckoutMerchantSettings", "description": "The merchant settings." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "merchant_settings": { "merchant_id": "MERCHANT_ID", "updated_at": "2022-06-16T22:25:35Z", "payment_methods": { "apple_pay": { "enabled": true }, "google_pay": { "enabled": true }, "cash_app_pay": { "enabled": true }, "afterpay_clearpay": { "enabled": true, "order_eligibility_range": { "min": { "amount": 100, "currency": "USD" }, "max": { "amount": 10000, "currency": "USD" } }, "item_eligibility_range": { "min": { "amount": 100, "currency": "USD" }, "max": { "amount": 10000, "currency": "USD" } } } } } } }, "RetrieveOrderCustomAttributeDefinitionRequest": { "type": "object", "properties": { "version": { "type": "integer", "description": "To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include this optional field and specify the current version of the custom attribute." } }, "description": "Represents a get request for an order custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_parameters": "?key\u003dcover-count" } }, "RetrieveOrderCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The retrieved custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from getting an order custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "cover-count", "name": "Cover count", "description": "The number of people seated at a table", "version": 1, "updated_at": "2022-10-06T16:53:23.141Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "created_at": "2022-10-06T16:53:23.141Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "RetrieveOrderCustomAttributeRequest": { "type": "object", "properties": { "version": { "type": "integer", "description": "To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include this optional field and specify the current version of the custom attribute." }, "with_definition": { "type": "boolean", "description": "Indicates whether to return the [custom attribute definition](https://developer.squareup.com/reference/square_2024-04-17/objects/CustomAttributeDefinition) in the `definition` field of each \ncustom attribute. Set this parameter to `true` to get the name and description of each custom attribute, \ninformation about the data type, or other definition details. The default value is `false`." } }, "description": "Represents a get request for an order custom attribute.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?order_id\u003d7BbXGEIWNldxAzrtGf9GPVZTwZ4F\u0026key\u003dcover-count" } }, "RetrieveOrderCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The retrieved custom attribute. If `with_definition` was set to `true` in the request, the custom attribute definition is returned in the `definition field." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from getting an order custom attribute.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute": { "key": "cover-count", "version": 1, "updated_at": "2022-11-22T21:28:35.721Z", "value": "6", "created_at": "2022-11-22T21:27:33.429Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "RetrieveOrderRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveOrderResponse": { "type": "object", "properties": { "order": { "$ref": "#/definitions/Order", "description": "The requested order." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "order": { "id": "CAISENgvlJ6jLWAzERDzjyHVybY", "location_id": "D7AVYMEAPJ3A3", "line_items": [ { "uid": "ULkg0tQTRK2bkU9fNv3IJD", "quantity": "1", "name": "Item 1", "base_price_money": { "amount": 500, "currency": "USD" }, "gross_sales_money": { "amount": 500, "currency": "USD" }, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 250, "currency": "USD" }, "total_money": { "amount": 250, "currency": "USD" }, "variation_total_price_money": { "amount": 500, "currency": "USD" }, "applied_discounts": [ { "uid": "9zr9S4dxvPAixvn0lpa1VC", "discount_uid": "zGsRZP69aqSSR9lq9euSPB", "applied_money": { "amount": 250, "currency": "USD" } } ] }, { "uid": "mumY8Nun4BC5aKe2yyx5a", "quantity": "2", "name": "Item 2", "base_price_money": { "amount": 300, "currency": "USD" }, "gross_sales_money": { "amount": 600, "currency": "USD" }, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 300, "currency": "USD" }, "total_money": { "amount": 300, "currency": "USD" }, "variation_total_price_money": { "amount": 600, "currency": "USD" }, "applied_discounts": [ { "uid": "qa8LwwZK82FgSEkQc2HYVC", "discount_uid": "zGsRZP69aqSSR9lq9euSPB", "applied_money": { "amount": 300, "currency": "USD" } } ] } ], "discounts": [ { "uid": "zGsRZP69aqSSR9lq9euSPB", "name": "50% Off", "percentage": "50", "applied_money": { "amount": 550, "currency": "USD" }, "type": "FIXED_PERCENTAGE", "scope": "ORDER" } ], "created_at": "2020-05-18T16:30:49.614Z", "updated_at": "2020-05-18T16:30:49.614Z", "state": "OPEN", "version": 1, "total_tax_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 550, "currency": "USD" }, "total_tip_money": { "amount": 0, "currency": "USD" }, "total_money": { "amount": 550, "currency": "USD" }, "total_service_charge_money": { "amount": 0, "currency": "USD" }, "net_amounts": { "total_money": { "amount": 550, "currency": "USD" }, "tax_money": { "amount": 0, "currency": "USD" }, "discount_money": { "amount": 550, "currency": "USD" }, "tip_money": { "amount": 0, "currency": "USD" }, "service_charge_money": { "amount": 0, "currency": "USD" } } } } }, "RetrievePaymentLinkRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC", "example": {} }, "RetrievePaymentLinkResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "payment_link": { "$ref": "#/definitions/PaymentLink", "description": "The payment link that is retrieved." } }, "description": "", "x-release-status": "PUBLIC", "example": { "payment_link": { "id": "LLO5Q3FRCFICDB4B", "version": 1, "order_id": "4uKASDATqSd1QQ9jV86sPhMdVEbSJc4F", "url": "https://square.link/u/EXAMPLE", "long_url": "https://checkout.square.site/EXAMPLE", "created_at": "2022-04-26T00:10:29Z" } } }, "RetrieveSnippetRequest": { "type": "object", "properties": {}, "description": "Represents a `RetrieveSnippet` request.", "x-release-status": "PUBLIC" }, "RetrieveSnippetResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "snippet": { "$ref": "#/definitions/Snippet", "description": "The retrieved snippet." } }, "description": "Represents a `RetrieveSnippet` response. The response can include either `snippet` or `errors`.", "x-release-status": "PUBLIC", "example": { "snippet": { "id": "snippet_5d178150-a6c0-11eb-a9f1-437e6a2881e7", "site_id": "site_278075276488921835", "content": "\u003cscript\u003evar js \u003d 1;\u003c/script\u003e", "created_at": "2021-03-11T25:40:09.000000Z", "updated_at": "2021-03-11T25:40:09.000000Z" } } }, "RetrieveSubscriptionRequest": { "type": "object", "properties": { "include": { "type": "string", "description": "A query parameter to specify related information to be included in the response. \n\nThe supported query parameter values are: \n\n- `actions`: to include scheduled actions on the targeted subscription.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Defines input parameters in a request to the \n[RetrieveSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/retrieve-subscription) endpoint.", "x-release-status": "PUBLIC" }, "RetrieveSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The subscription retrieved." } }, "description": "Defines output parameters in a response from the\n[RetrieveSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/retrieve-subscription) endpoint.", "x-release-status": "PUBLIC", "example": { "subscription": { "id": "8151fc89-da15-4eb9-a685-1a70883cebfc", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "card_id": "ccof:IkWfpLj4tNHMyFii3GB", "start_date": "2022-07-27", "charged_through_date": "2023-11-20", "status": "ACTIVE", "invoice_ids": [ "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA" ], "price_override_money": { "amount": 25000, "currency": "USD" }, "created_at": "2022-07-27T21:53:10Z", "paid_until_date": "2024-08-01", "timezone": "America/Los_Angeles", "source": { "name": "My Application" } } } }, "RetrieveTeamMemberBookingProfileRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "PUBLIC" }, "RetrieveTeamMemberBookingProfileResponse": { "type": "object", "properties": { "team_member_booking_profile": { "$ref": "#/definitions/TeamMemberBookingProfile", "description": "The returned team member booking profile." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "team_member_booking_profile": { "team_member_id": "TMaJcbiRqPIGZuS9", "display_name": "Sandbox Staff", "is_bookable": true }, "errors": [] } }, "RetrieveTeamMemberRequest": { "type": "object", "properties": {}, "description": "Represents a retrieve request for a `TeamMember` object.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveTeamMemberResponse": { "type": "object", "properties": { "team_member": { "$ref": "#/definitions/TeamMember", "description": "The successfully retrieved `TeamMember` object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "The errors that occurred during the request." } }, "description": "Represents a response from a retrieve request containing a `TeamMember` object or error messages.", "x-release-status": "PUBLIC", "example": { "team_member": { "id": "1yJlHapkseYnNPETIU1B", "reference_id": "reference_id_1", "is_owner": false, "status": "ACTIVE", "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@example.com", "phone_number": "+14159283333", "created_at": "2021-06-11T22:55:45Z", "updated_at": "2021-06-15T17:38:05Z", "assigned_locations": { "assignment_type": "EXPLICIT_LOCATIONS", "location_ids": [ "GA2Y9HSJ8KRYT", "YSGH2WBKG94QZ" ] } } } }, "RetrieveTokenStatusRequest": { "type": "object", "properties": {}, "description": "Request object for [RetrieveTokenStatus] endpoint.", "x-release-status": "PUBLIC" }, "RetrieveTokenStatusResponse": { "type": "object", "properties": { "scopes": { "type": "array", "items": { "type": "string" }, "description": "The list of scopes associated with an access token." }, "expires_at": { "type": "string", "description": "The date and time when the `access_token` expires, in RFC 3339 format. Empty if the token never expires." }, "client_id": { "maxLength": 191, "type": "string", "description": "The Square-issued application ID associated with the access token. This is the same application ID used to obtain the token." }, "merchant_id": { "minLength": 8, "maxLength": 191, "type": "string", "description": "The ID of the authorizing merchant\u0027s business." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": " Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `RetrieveTokenStatus` endpoint.", "x-release-status": "PUBLIC", "example": { "scopes": [ "PAYMENTS_READ", "PAYMENTS_WRITE" ], "expires_at": "2022-10-14T14:44:00Z", "client_id": "CLIENT_ID", "merchant_id": "MERCHANT_ID" } }, "RetrieveTransactionRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.python", "csharp": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.csharp", "java": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.java", "php": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.php", "javascript": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.javascript", "ruby": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.ruby" } }, "RetrieveTransactionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "transaction": { "$ref": "#/definitions/Transaction", "description": "The requested transaction." } }, "description": "Defines the fields that are included in the response body of\na request to the [RetrieveTransaction](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/retrieve-transaction) endpoint.\n\nOne of `errors` or `transaction` is present in a given response (never both).", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": { "transaction": { "id": "KnL67ZIwXCPtzOrqj0HrkxMF", "location_id": "18YC4JDH91E1H", "created_at": "2016-03-10T22:57:56Z", "tenders": [ { "id": "MtZRYYdDrYNQbOvV7nbuBvMF", "location_id": "18YC4JDH91E1H", "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF", "created_at": "2016-03-10T22:57:56Z", "note": "some optional note", "amount_money": { "amount": 5000, "currency": "USD" }, "processing_fee_money": { "amount": 138, "currency": "USD" }, "type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1111" }, "entry_method": "KEYED" }, "additional_recipients": [ { "location_id": "057P5VYJ4A5X1", "description": "Application fees", "amount_money": { "amount": 20, "currency": "USD" } } ] } ], "reference_id": "some optional reference id", "product": "EXTERNAL_API" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/RetrieveTransaction/RetrieveTransactionResponse.python", "csharp": "/sdk_samples/RetrieveTransaction/RetrieveTransactionResponse.csharp", "java": "/sdk_samples/RetrieveTransaction/RetrieveTransactionResponse.java", "php": "/sdk_samples/RetrieveTransaction/RetrieveTransactionResponse.php", "javascript": "/sdk_samples/RetrieveTransaction/RetrieveTransactionResponse.javascript", "ruby": "/sdk_samples/RetrieveTransaction/RetrieveTransactionResponse.ruby" } }, "RetrieveVendorRequest": { "type": "object", "properties": {}, "description": "Represents an input to a call to [RetrieveVendor](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/retrieve-vendor).", "x-release-status": "BETA", "x-is-beta": true, "example": {} }, "RetrieveVendorResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered when the request fails." }, "vendor": { "$ref": "#/definitions/Vendor", "description": "The successfully retrieved [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) object." } }, "description": "Represents an output from a call to [RetrieveVendor](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/retrieve-vendor).", "x-release-status": "BETA", "x-is-beta": true, "example": { "vendor": { "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2022-03-16T10:21:54.859Z", "updated_at": "2022-03-16T10:21:54.859Z", "name": "Joe\u0027s Fresh Seafood", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "id": "INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A", "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250" } ], "account_number": "4025391", "note": "a vendor", "version": 1, "status": "ACTIVE" }, "errors": [] } }, "RetrieveWageSettingRequest": { "type": "object", "properties": {}, "description": "Represents a retrieve request for the wage setting of a team member.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "RetrieveWageSettingResponse": { "type": "object", "properties": { "wage_setting": { "$ref": "#/definitions/WageSetting", "description": "The successfully retrieved `WageSetting` object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "The errors that occurred during the request." } }, "description": "Represents a response from a retrieve request containing the specified `WageSetting` object or error messages.", "x-release-status": "PUBLIC", "example": { "wage_setting": { "team_member_id": "1yJlHapkseYnNPETIU1B", "job_assignments": [ { "job_title": "Manager", "pay_type": "SALARY", "hourly_rate": { "amount": 2164, "currency": "USD" }, "annual_rate": { "amount": 4500000, "currency": "USD" }, "weekly_hours": 40 } ], "is_overtime_exempt": false, "version": 1, "created_at": "2020-06-11T23:01:21+00:00", "updated_at": "2020-06-11T23:01:21+00:00" } } }, "RetrieveWebhookSubscriptionRequest": { "type": "object", "properties": {}, "description": "Retrieves a [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) using its id.", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/webhooks/subscriptions/wbhk_b35f6b3145074cf9ad513610786c19d5" } }, "RetrieveWebhookSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "subscription": { "$ref": "#/definitions/WebhookSubscription", "description": "The requested [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)." } }, "description": "Defines the fields that are included in the response body of\na request to the [RetrieveWebhookSubscription](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/retrieve-webhook-subscription) endpoint.\n\nNote: if there are errors processing the request, the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) will not be\npresent.", "x-release-status": "PUBLIC", "example": { "subscription": { "id": "wbhk_b35f6b3145074cf9ad513610786c19d5", "name": "Example Webhook Subscription", "enabled": true, "event_types": [ "payment.created", "payment.updated" ], "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15", "signature_key": "1k9bIJKCeTmSQwyagtNRLg", "created_at": "2022-01-10 23:29:48 +0000 UTC", "updated_at": "2022-01-10 23:29:48 +0000 UTC" } } }, "RevokeTokenRequest": { "type": "object", "properties": { "client_id": { "maxLength": 191, "type": "string", "description": "The Square-issued ID for your application, which is available on the **OAuth** page in the\n[Developer Dashboard](https://developer.squareup.com/apps)." }, "access_token": { "minLength": 2, "maxLength": 1024, "type": "string", "description": "The access token of the merchant whose token you want to revoke.\nDo not provide a value for `merchant_id` if you provide this parameter." }, "merchant_id": { "type": "string", "description": "The ID of the merchant whose token you want to revoke.\nDo not provide a value for `access_token` if you provide this parameter." }, "revoke_only_access_token": { "type": "boolean", "description": "If `true`, terminate the given single access token, but do not\nterminate the entire authorization.\nDefault: `false`" } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "access_token": "ACCESS_TOKEN", "client_id": "CLIENT_ID" } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/RevokeToken/RevokeTokenRequest.python", "csharp": "/sdk_samples/RevokeToken/RevokeTokenRequest.csharp", "java": "/sdk_samples/RevokeToken/RevokeTokenRequest.java", "php": "/sdk_samples/RevokeToken/RevokeTokenRequest.php", "javascript": "/sdk_samples/RevokeToken/RevokeTokenRequest.javascript", "ruby": "/sdk_samples/RevokeToken/RevokeTokenRequest.ruby" } }, "RevokeTokenResponse": { "type": "object", "properties": { "success": { "type": "boolean", "description": "If the request is successful, this is `true`." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "success": true }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/RevokeToken/RevokeTokenResponse.python", "csharp": "/sdk_samples/RevokeToken/RevokeTokenResponse.csharp", "java": "/sdk_samples/RevokeToken/RevokeTokenResponse.java", "php": "/sdk_samples/RevokeToken/RevokeTokenResponse.php", "javascript": "/sdk_samples/RevokeToken/RevokeTokenResponse.javascript", "ruby": "/sdk_samples/RevokeToken/RevokeTokenResponse.ruby" } }, "RiskEvaluation": { "type": "object", "properties": { "created_at": { "type": "string", "description": "The timestamp when payment risk was evaluated, in RFC 3339 format.", "x-read-only": true }, "risk_level": { "type": "string", "description": "The risk level associated with the payment" } }, "description": "Represents fraud risk information for the associated payment.\n\nWhen you take a payment through Square\u0027s Payments API (using the `CreatePayment`\nendpoint), Square evaluates it and assigns a risk level to the payment. Sellers\ncan use this information to determine the course of action (for example,\nprovide the goods/services or refund the payment).", "x-release-status": "BETA", "x-is-beta": true }, "SaveCardOptions": { "type": "object", "required": [ "customer_id" ], "properties": { "customer_id": { "type": "string", "description": "The square-assigned ID of the customer linked to the saved card." }, "card_id": { "maxLength": 64, "type": "string", "description": "The id of the created card-on-file.", "x-read-only": true }, "reference_id": { "maxLength": 128, "type": "string", "description": "An optional user-defined reference ID that can be used to associate\nthis `Card` to another entity in an external system. For example, a customer\nID generated by a third-party system." } }, "description": "Describes save-card action fields.", "x-release-status": "BETA", "x-is-beta": true }, "SearchAvailabilityFilter": { "type": "object", "required": [ "start_at_range" ], "properties": { "start_at_range": { "$ref": "#/definitions/TimeRange", "description": "The query expression to search for buy-accessible availabilities with their starting times falling within the specified time range.\nThe time range must be at least 24 hours and at most 32 days long.\nFor waitlist availabilities, the time range can be 0 or more up to 367 days long." }, "location_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "The query expression to search for buyer-accessible availabilities with their location IDs matching the specified location ID.\nThis query expression cannot be set if `booking_id` is set." }, "segment_filters": { "type": "array", "items": { "$ref": "#/definitions/SegmentFilter" }, "description": "The query expression to search for buyer-accessible availabilities matching the specified list of segment filters.\nIf the size of the `segment_filters` list is `n`, the search returns availabilities with `n` segments per availability.\n\nThis query expression cannot be set if `booking_id` is set." }, "booking_id": { "minLength": 0, "maxLength": 36, "type": "string", "description": "The query expression to search for buyer-accessible availabilities for an existing booking by matching the specified `booking_id` value.\nThis is commonly used to reschedule an appointment.\nIf this expression is set, the `location_id` and `segment_filters` expressions cannot be set." } }, "description": "A query filter to search for buyer-accessible availabilities by.", "x-release-status": "PUBLIC" }, "SearchAvailabilityQuery": { "type": "object", "required": [ "filter" ], "properties": { "filter": { "$ref": "#/definitions/SearchAvailabilityFilter", "description": "The query filter to search for buyer-accessible availabilities of existing bookings." } }, "description": "The query used to search for buyer-accessible availabilities of bookings.", "x-release-status": "PUBLIC" }, "SearchAvailabilityRequest": { "type": "object", "required": [ "query" ], "properties": { "query": { "$ref": "#/definitions/SearchAvailabilityQuery", "description": "Query conditions used to filter buyer-accessible booking availabilities." } }, "description": "", "x-release-status": "PUBLIC", "example": { "query": { "filter": { "start_at_range": { "start_at": "2020-11-26T13:00:00Z", "end_at": "2020-11-27T13:00:00Z" }, "location_id": "LEQHH0YY8B42M", "segment_filters": [ { "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "team_member_id_filter": { "any": [ "TMXUrsBWWcHTt79t", "TMaJcbiRqPIGZuS9" ] } } ] } } } }, "SearchAvailabilityResponse": { "type": "object", "properties": { "availabilities": { "type": "array", "items": { "$ref": "#/definitions/Availability" }, "description": "List of appointment slots available for booking." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "availabilities": [ { "start_at": "2020-11-26T13:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-26T13:30:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-26T14:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-26T14:30:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-26T15:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-26T15:30:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-26T16:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T09:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T09:30:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T10:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T10:30:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T11:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T11:30:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T12:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T12:30:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T13:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T13:30:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] }, { "start_at": "2020-11-27T14:00:00Z", "location_id": "LEQHH0YY8B42M", "appointment_segments": [ { "duration_minutes": 60, "team_member_id": "TMaJcbiRqPIGZuS9", "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "service_variation_version": 1599775456731 } ] } ], "errors": [] } }, "SearchCatalogItemsRequest": { "type": "object", "properties": { "text_filter": { "type": "string", "description": "The text filter expression to return items or item variations containing specified text in\nthe `name`, `description`, or `abbreviation` attribute value of an item, or in\nthe `name`, `sku`, or `upc` attribute value of an item variation." }, "category_ids": { "type": "array", "items": { "type": "string" }, "description": "The category id query expression to return items containing the specified category IDs." }, "stock_levels": { "type": "array", "items": { "type": "string" }, "description": "The stock-level query expression to return item variations with the specified stock levels." }, "enabled_location_ids": { "type": "array", "items": { "type": "string" }, "description": "The enabled-location query expression to return items and item variations having specified enabled locations." }, "cursor": { "type": "string", "description": "The pagination token, returned in the previous response, used to fetch the next batch of pending results." }, "limit": { "maximum": 100, "type": "integer", "description": "The maximum number of results to return per page. The default value is 100." }, "sort_order": { "type": "string", "description": "The order to sort the results by item names. The default sort order is ascending (`ASC`)." }, "product_types": { "type": "array", "items": { "type": "string" }, "description": "The product types query expression to return items or item variations having the specified product types." }, "custom_attribute_filters": { "type": "array", "items": { "$ref": "#/definitions/CustomAttributeFilter" }, "description": "The customer-attribute filter to return items or item variations matching the specified\ncustom attribute expressions. A maximum number of 10 custom attribute expressions are supported in\na single call to the [SearchCatalogItems](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-items) endpoint." }, "archived_state": { "type": "string", "description": "The query filter to return not archived (`ARCHIVED_STATE_NOT_ARCHIVED`), archived (`ARCHIVED_STATE_ARCHIVED`), or either type (`ARCHIVED_STATE_ALL`) of items." } }, "description": "Defines the request body for the [SearchCatalogItems](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-items) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "sort_order": "ASC", "product_types": [ "REGULAR" ], "category_ids": [ "WINE_CATEGORY_ID" ], "enabled_location_ids": [ "ATL_LOCATION_ID" ], "text_filter": "red", "custom_attribute_filters": [ { "custom_attribute_definition_id": "VEGAN_DEFINITION_ID", "bool_filter": true }, { "custom_attribute_definition_id": "BRAND_DEFINITION_ID", "string_filter": "Dark Horse" }, { "key": "VINTAGE", "number_filter": { "min": 2017, "max": 2018 } }, { "custom_attribute_definition_id": "VARIETAL_DEFINITION_ID", "selection_ids_filter": "MERLOT_SELECTION_ID" } ], "stock_levels": [ "OUT", "LOW" ], "limit": 100 } } }, "SearchCatalogItemsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "items": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "Returned items matching the specified query expressions." }, "cursor": { "type": "string", "description": "Pagination token used in the next request to return more of the search result." }, "matched_variation_ids": { "type": "array", "items": { "type": "string" }, "description": "Ids of returned item variations matching the specified query expression." } }, "description": "Defines the response body returned from the [SearchCatalogItems](https://developer.squareup.com/reference/square_2024-04-17/catalog-api/search-catalog-items) endpoint.", "x-release-status": "PUBLIC", "example": { "items": [ { "type": "ITEM", "id": "GPOKJPTV2KDLVKCADJ7I77EZ", "updated_at": "2020-06-18T17:55:56.646Z", "version": 1592502956646, "is_deleted": false, "present_at_all_locations": true, "custom_attribute_values": { "VINTAGE": { "name": "Vintage", "custom_attribute_definition_id": "EI7IJQDUKYSHULREPIPH6HNU", "type": "NUMBER", "number_value": 2018, "key": "VINTAGE" }, "VARIETAL": { "name": "Varietal", "custom_attribute_definition_id": "VARIETAL_DEFINITION_ID", "type": "SELECTION", "selection_uid_values": [ "MERLOT_SELECTION_ID", null ], "key": "VARIETAL" }, "BRAND": { "name": "Brand", "custom_attribute_definition_id": "BRAND_DEFINITION_ID", "type": "STRING", "string_value": "Dark Horse", "key": "BRAND" } }, "item_data": { "name": "Dark Horse Merlot 2018", "product_type": "REGULAR", "is_archived": false, "description": "A nice red wine", "variations": [ { "type": "ITEM_VARIATION", "id": "VBJNPHCOKDFECR6VU25WRJUD", "updated_at": "2020-06-18T17:55:56.646Z", "version": 1592502956646, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "GPOKJPTV2KDLVKCADJ7I77EZ", "name": "750 mL", "ordinal": 0, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 1000, "currency": "USD" } } } ] } } ], "matched_variation_ids": [ "VBJNPHCOKDFECR6VU25WRJUD" ] } }, "SearchCatalogObjectsRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "The pagination cursor returned in the previous response. Leave unset for an initial request.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." }, "object_types": { "type": "array", "items": { "type": "string" }, "description": "The desired set of object types to appear in the search results.\n\nIf this is unspecified, the operation returns objects of all the top level types at the version\nof the Square API used to make the request. Object types that are nested onto other object types\nare not included in the defaults.\n\nAt the current API version the default object types are:\nITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST, \nPRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,\nSUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS.\n\nNote that if you wish for the query to return objects belonging to nested types (i.e., COMPONENT, IMAGE,\nITEM_OPTION_VAL, ITEM_VARIATION, or MODIFIER), you must explicitly include all the types of interest\nin this field." }, "include_deleted_objects": { "type": "boolean", "description": "If `true`, deleted objects will be included in the results. Deleted objects will have their\n`is_deleted` field set to `true`." }, "include_related_objects": { "type": "boolean", "description": "If `true`, the response will include additional objects that are related to the\nrequested objects. Related objects are objects that are referenced by object ID by the objects\nin the response. This is helpful if the objects are being fetched for immediate display to a user.\nThis process only goes one level deep. Objects referenced by the related objects will not be included.\nFor example:\n\nIf the `objects` field of the response contains a CatalogItem, its associated\nCatalogCategory objects, CatalogTax objects, CatalogImage objects and\nCatalogModifierLists will be returned in the `related_objects` field of the\nresponse. If the `objects` field of the response contains a CatalogItemVariation,\nits parent CatalogItem will be returned in the `related_objects` field of\nthe response.\n\nDefault value: `false`" }, "begin_time": { "type": "string", "description": "Return objects modified after this [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), in RFC 3339\nformat, e.g., `2016-09-04T23:59:33.123Z`. The timestamp is exclusive - objects with a\ntimestamp equal to `begin_time` will not be included in the response." }, "query": { "$ref": "#/definitions/CatalogQuery", "description": "A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned." }, "limit": { "type": "integer", "description": "A limit on the number of results to be returned in a single page. The limit is advisory -\nthe implementation may return more or fewer results. If the supplied limit is negative, zero, or\nis higher than the maximum limit of 1,000, it will be ignored." }, "include_category_path_to_root": { "type": "boolean", "description": "Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists\nof `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category\nand ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned\nin the response payload.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "object_types": [ "ITEM" ], "query": { "prefix_query": { "attribute_name": "name", "attribute_prefix": "tea" } }, "limit": 100 } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsRequest.python", "csharp": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsRequest.csharp", "java": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsRequest.java", "php": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsRequest.php", "javascript": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsRequest.javascript", "ruby": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsRequest.ruby" } }, "SearchCatalogObjectsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If unset, this is the final response.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." }, "objects": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "The CatalogObjects returned." }, "related_objects": { "type": "array", "items": { "$ref": "#/definitions/CatalogObject" }, "description": "A list of CatalogObjects referenced by the objects in the `objects` field." }, "latest_time": { "type": "string", "description": "When the associated product catalog was last updated. Will\nmatch the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "", "x-release-status": "PUBLIC", "example": { "objects": [ { "type": "ITEM", "id": "X5DZ5NWWAQ44CKBLKIFQGOWK", "updated_at": "2017-10-26T15:41:32.337Z", "version": 1509032492337, "is_deleted": false, "present_at_all_locations": true, "item_data": { "name": "Tea - Black", "description": "A delicious blend of black tea.", "categories": [ { "id": "E7CLE5RZZ744BHWVQQEAHI2C", "ordinal": 0 } ], "product_type": "REGULAR", "tax_ids": [ "ZXITPM6RWHZ7GZ7EIP3YKECM" ], "variations": [ { "type": "ITEM_VARIATION", "id": "5GSZPX6EU7MM75S57OONG3V5", "updated_at": "2017-10-26T15:27:31.626Z", "version": 1509031651626, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "X5DZ5NWWAQ44CKBLKIFQGOWK", "name": "Regular", "ordinal": 1, "price_money": { "amount": 150, "currency": "USD" }, "pricing_type": "FIXED_PRICING" } }, { "type": "ITEM_VARIATION", "id": "XVLBN7DU6JTWHJTG5F265B43", "updated_at": "2017-10-26T15:27:31.626Z", "version": 1509031651626, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "X5DZ5NWWAQ44CKBLKIFQGOWK", "name": "Large", "ordinal": 2, "price_money": { "amount": 225, "currency": "USD" }, "pricing_type": "FIXED_PRICING" } } ], "visibility": "PRIVATE" } }, { "type": "ITEM", "id": "NNNEM3LA656Q46NXLWCNI7S5", "updated_at": "2017-10-26T15:41:23.232Z", "version": 1509032483232, "is_deleted": false, "present_at_all_locations": true, "item_data": { "name": "Tea - Green", "description": "Relaxing green herbal tea.", "categories": [ { "id": "E7CLE5RZZ744BHWVQQEAHI2C", "ordinal": 0 } ], "product_type": "REGULAR", "tax_ids": [ "ZXITPM6RWHZ7GZ7EIP3YKECM" ], "variations": [ { "type": "ITEM_VARIATION", "id": "FHYBVIA6NVBCSOVETA62WEA4", "updated_at": "2017-10-26T15:29:00.524Z", "version": 1509031740524, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "NNNEM3LA656Q46NXLWCNI7S5", "name": "Regular", "ordinal": 1, "price_money": { "amount": 150, "currency": "USD" }, "pricing_type": "FIXED_PRICING" } } ], "visibility": "PRIVATE" } } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsResponse.python", "csharp": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsResponse.csharp", "java": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsResponse.java", "php": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsResponse.php", "javascript": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsResponse.javascript", "ruby": "/sdk_samples/Catalog/SearchCatalogObjects/SearchCatalogObjectsResponse.ruby" } }, "SearchCustomersRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "Include the pagination cursor in subsequent calls to this endpoint to retrieve\nthe next set of results associated with the original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "format": "int64", "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf the specified limit is invalid, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "query": { "$ref": "#/definitions/CustomerQuery", "description": "The filtering and sorting criteria for the search request. If a query is not specified,\nSquare returns all customer profiles ordered alphabetically by `given_name` and `family_name`." }, "count": { "type": "boolean", "description": "Indicates whether to return the total count of matching customers in the `count` field of the response.\n\nThe default value is `false`." } }, "description": "Defines the fields that are included in the request body of a request to the\n`SearchCustomers` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "query": { "filter": { "email_address": { "fuzzy": "example.com" }, "creation_source": { "values": [ "THIRD_PARTY" ], "rule": "INCLUDE" }, "created_at": { "start_at": "2018-01-01T00:00:00-00:00", "end_at": "2018-02-01T00:00:00-00:00" }, "group_ids": { "all": [ "545AXB44B4XXWMVQ4W8SBT3HHF" ] } }, "sort": { "field": "CREATED_AT", "order": "ASC" } }, "limit": 2 } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/SearchCustomers/SearchCustomersRequest.python", "csharp": "/sdk_samples/SearchCustomers/SearchCustomersRequest.csharp", "java": "/sdk_samples/SearchCustomers/SearchCustomersRequest.java", "php": "/sdk_samples/SearchCustomers/SearchCustomersRequest.php", "javascript": "/sdk_samples/SearchCustomers/SearchCustomersRequest.javascript", "ruby": "/sdk_samples/SearchCustomers/SearchCustomersRequest.ruby" } }, "SearchCustomersResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "customers": { "type": "array", "items": { "$ref": "#/definitions/Customer" }, "description": "The customer profiles that match the search query. If any search condition is not met, the result is an empty object (`{}`).\nOnly customer profiles with public information (`given_name`, `family_name`, `company_name`, `email_address`, or `phone_number`)\nare included in the response." }, "cursor": { "type": "string", "description": "A pagination cursor that can be used during subsequent calls\nto `SearchCustomers` to retrieve the next set of results associated\nwith the original query. Pagination cursors are only present when\na request succeeds and additional results are available.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "count": { "type": "integer", "format": "int64", "description": "The total count of customers associated with the Square account that match the search query. Only customer profiles with\npublic information (`given_name`, `family_name`, `company_name`, `email_address`, or `phone_number`) are counted. This field is\npresent only if `count` is set to `true` in the request." } }, "description": "Defines the fields that are included in the response body of\na request to the `SearchCustomers` endpoint.\n\nEither `errors` or `customers` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "customers": [ { "id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2018-01-23T20:21:54.859Z", "updated_at": "2020-04-20T10:02:43.083Z", "given_name": "James", "family_name": "Bond", "email_address": "james.bond@example.com", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-555-4250", "reference_id": "YOUR_REFERENCE_ID_2", "preferences": { "email_unsubscribed": false }, "creation_source": "DIRECTORY", "group_ids": [ "545AXB44B4XXWMVQ4W8SBT3HHF" ], "segment_ids": [ "1KB9JE5EGJXCW.REACHABLE" ], "version": 7 }, { "id": "A9641GZW2H7Z56YYSD41Q12HDW", "created_at": "2018-01-30T14:10:54.859Z", "updated_at": "2018-03-08T18:25:21.342Z", "given_name": "Amelia", "family_name": "Earhart", "email_address": "amelia.earhart@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "phone_number": "+1-212-555-9238", "reference_id": "YOUR_REFERENCE_ID_1", "note": "a customer", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "group_ids": [ "545AXB44B4XXWMVQ4W8SBT3HHF" ], "segment_ids": [ "1KB9JE5EGJXCW.REACHABLE" ], "version": 1 } ], "cursor": "9dpS093Uy12AzeE" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/SearchCustomers/SearchCustomersResponse.python", "csharp": "/sdk_samples/SearchCustomers/SearchCustomersResponse.csharp", "java": "/sdk_samples/SearchCustomers/SearchCustomersResponse.java", "php": "/sdk_samples/SearchCustomers/SearchCustomersResponse.php", "javascript": "/sdk_samples/SearchCustomers/SearchCustomersResponse.javascript", "ruby": "/sdk_samples/SearchCustomers/SearchCustomersResponse.ruby" } }, "SearchInvoicesRequest": { "type": "object", "required": [ "query" ], "properties": { "query": { "$ref": "#/definitions/InvoiceQuery", "description": "Describes the query criteria for searching invoices." }, "limit": { "type": "integer", "description": "The maximum number of invoices to return (200 is the maximum `limit`). \nIf not provided, the server uses a default limit of 100 invoices." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint. \nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Describes a `SearchInvoices` request.", "x-release-status": "PUBLIC", "example": { "request_body": { "query": { "filter": { "location_ids": [ "ES0RJRZYEC39A" ], "customer_ids": [ "JDKYHBWT1D4F8MFH63DBMEN8Y4" ] }, "sort": { "field": "INVOICE_SORT_DATE", "order": "DESC" }, "limit": 100 } } } }, "SearchInvoicesResponse": { "type": "object", "properties": { "invoices": { "type": "array", "items": { "$ref": "#/definitions/Invoice" }, "description": "The list of invoices returned by the search." }, "cursor": { "type": "string", "description": "When a response is truncated, it includes a cursor that you can use in a \nsubsequent request to fetch the next set of invoices. If empty, this is the final \nresponse. \nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Describes a `SearchInvoices` response.", "x-release-status": "PUBLIC", "example": { "invoices": [ { "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "version": 0, "location_id": "ES0RJRZYEC39A", "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "payment_requests": [ { "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355", "request_type": "BALANCE", "due_date": "2030-01-24", "tipping_enabled": true, "reminders": [ { "uid": "beebd363-e47f-4075-8785-c235aaa7df11", "relative_scheduled_days": -1, "message": "Your invoice is due tomorrow", "status": "PENDING" } ], "computed_amount_money": { "amount": 10000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "NONE" } ], "invoice_number": "inv-100", "title": "Event Planning Services", "description": "We appreciate your business!", "scheduled_at": "2030-01-13T10:00:00Z", "status": "DRAFT", "timezone": "America/Los_Angeles", "created_at": "2020-06-18T17:45:13Z", "updated_at": "2020-06-18T17:45:13Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "accepted_payment_methods": { "card": true, "square_gift_card": false, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "custom_fields": [ { "label": "Event Reference Number", "value": "Ref. #1234", "placement": "ABOVE_LINE_ITEMS" }, { "label": "Terms of Service", "value": "The terms of service are...", "placement": "BELOW_LINE_ITEMS" } ], "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false }, { "id": "inv:0-ChC366qAfskpGrBI_1bozs9mEA3", "version": 3, "location_id": "ES0RJRZYEC39A", "order_id": "a65jnS8NXbfprvGJzY9F4fQTuaB", "payment_requests": [ { "uid": "66c3bdfd-5090-4ff9-a8a0-c1e1a2ffa176", "request_type": "DEPOSIT", "due_date": "2021-01-23", "percentage_requested": "25", "tipping_enabled": false, "card_id": "ccof:IkWfpLj4tNHMyFii3GB", "computed_amount_money": { "amount": 1000, "currency": "USD" }, "total_completed_amount_money": { "amount": 1000, "currency": "USD" }, "automatic_payment_source": "CARD_ON_FILE" }, { "uid": "120c5e18-4f80-4f6b-b159-774cb9bf8f99", "request_type": "BALANCE", "due_date": "2021-06-15", "tipping_enabled": false, "card_id": "ccof:IkWfpLj4tNHMyFii3GB", "computed_amount_money": { "amount": 3000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "CARD_ON_FILE" } ], "invoice_number": "inv-455", "public_url": "https://squareup.com/pay-invoice/h9sfsfTGTSnYEhISUDBhEQ", "status": "PARTIALLY_PAID", "timezone": "America/Los_Angeles", "created_at": "2021-01-23T15:29:12Z", "updated_at": "2021-01-23T15:29:56Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "next_payment_amount_money": { "amount": 3000, "currency": "USD" }, "accepted_payment_methods": { "card": true, "square_gift_card": true, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false } ], "cursor": "ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE" } }, "SearchLoyaltyAccountsRequest": { "type": "object", "properties": { "query": { "$ref": "#/definitions/SearchLoyaltyAccountsRequestLoyaltyAccountQuery", "description": "The search criteria for the request." }, "limit": { "maximum": 200, "minimum": 1, "type": "integer", "description": "The maximum number of results to include in the response. The default value is 30." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to \nthis endpoint. Provide this to retrieve the next set of \nresults for the original query.\n\nFor more information, \nsee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "A request to search for loyalty accounts.", "x-release-status": "PUBLIC", "example": { "request_body": { "query": { "mappings": [ { "phone_number": "+14155551234" } ] }, "limit": 10 } } }, "SearchLoyaltyAccountsRequestLoyaltyAccountQuery": { "type": "object", "properties": { "mappings": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyAccountMapping" }, "description": "The set of mappings to use in the loyalty account search. \n\nThis cannot be combined with `customer_ids`. \n\nMax: 30 mappings" }, "customer_ids": { "type": "array", "items": { "type": "string" }, "description": "The set of customer IDs to use in the loyalty account search. \n\nThis cannot be combined with `mappings`. \n\nMax: 30 customer IDs" } }, "description": "The search criteria for the loyalty accounts.", "x-release-status": "PUBLIC" }, "SearchLoyaltyAccountsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "loyalty_accounts": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyAccount" }, "description": "The loyalty accounts that met the search criteria, \nin order of creation date." }, "cursor": { "type": "string", "description": "The pagination cursor to use in a subsequent \nrequest. If empty, this is the final response.\nFor more information, \nsee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "A response that includes loyalty accounts that satisfy the search criteria.", "x-release-status": "PUBLIC", "example": { "loyalty_accounts": [ { "id": "79b807d2-d786-46a9-933b-918028d7a8c5", "mapping": { "id": "66aaab3f-da99-49ed-8b19-b87f851c844f", "phone_number": "+14155551234", "created_at": "2020-05-08T21:44:32Z" }, "program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "balance": 10, "lifetime_points": 20, "customer_id": "Q8002FAM9V1EZ0ADB2T5609X6NET1H0", "created_at": "2020-05-08T21:44:32Z", "updated_at": "2020-05-08T21:44:32Z" } ] } }, "SearchLoyaltyEventsRequest": { "type": "object", "properties": { "query": { "$ref": "#/definitions/LoyaltyEventQuery", "description": "A set of one or more predefined query filters to apply when \nsearching for loyalty events. The endpoint performs a logical AND to \nevaluate multiple filters and performs a logical OR on arrays \nthat specifies multiple field values." }, "limit": { "maximum": 30, "minimum": 1, "type": "integer", "description": "The maximum number of results to include in the response. \nThe last page might contain fewer events. \nThe default is 30 events." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "A request to search for loyalty events.", "x-release-status": "PUBLIC", "example": { "request_body": { "query": { "filter": { "order_filter": { "order_id": "PyATxhYLfsMqpVkcKJITPydgEYfZY" } } }, "limit": 30 } } }, "SearchLoyaltyEventsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "events": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyEvent" }, "description": "The loyalty events that satisfy the search criteria." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent \nrequest. If empty, this is the final response. \nFor more information, \nsee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "A response that contains loyalty events that satisfy the search \ncriteria, in order by the `created_at` date.", "x-release-status": "PUBLIC", "example": { "events": [ { "id": "c27c8465-806e-36f2-b4b3-71f5887b5ba8", "type": "ACCUMULATE_POINTS", "created_at": "2020-05-08T22:01:30Z", "accumulate_points": { "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "points": 5, "order_id": "PyATxhYLfsMqpVkcKJITPydgEYfZY" }, "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "location_id": "P034NEENMD09F", "source": "LOYALTY_API" }, { "id": "e4a5cbc3-a4d0-3779-98e9-e578885d9430", "type": "REDEEM_REWARD", "created_at": "2020-05-08T22:01:15Z", "redeem_reward": { "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "reward_id": "d03f79f4-815f-3500-b851-cc1e68a457f9", "order_id": "PyATxhYLfsMqpVkcKJITPydgEYfZY" }, "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "location_id": "P034NEENMD09F", "source": "LOYALTY_API" }, { "id": "5e127479-0b03-3671-ab1e-15faea8b7188", "type": "CREATE_REWARD", "created_at": "2020-05-08T22:00:44Z", "create_reward": { "loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd", "reward_id": "d03f79f4-815f-3500-b851-cc1e68a457f9", "points": -10 }, "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "source": "LOYALTY_API" } ] } }, "SearchLoyaltyRewardsRequest": { "type": "object", "properties": { "query": { "$ref": "#/definitions/SearchLoyaltyRewardsRequestLoyaltyRewardQuery", "description": "The search criteria for the request. \nIf empty, the endpoint retrieves all loyalty rewards in the loyalty program." }, "limit": { "maximum": 30, "minimum": 1, "type": "integer", "description": "The maximum number of results to return in the response. The default value is 30." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to \nthis endpoint. Provide this to retrieve the next set of \nresults for the original query.\nFor more information, \nsee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "A request to search for loyalty rewards.", "x-release-status": "PUBLIC", "example": { "request_body": { "query": { "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd" }, "limit": 10 } } }, "SearchLoyaltyRewardsRequestLoyaltyRewardQuery": { "type": "object", "required": [ "loyalty_account_id" ], "properties": { "loyalty_account_id": { "minLength": 1, "type": "string", "description": "The ID of the [loyalty account](https://developer.squareup.com/reference/square_2024-04-17/objects/LoyaltyAccount) to which the loyalty reward belongs." }, "status": { "type": "string", "description": "The status of the loyalty reward." } }, "description": "The set of search requirements.", "x-release-status": "PUBLIC" }, "SearchLoyaltyRewardsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "rewards": { "type": "array", "items": { "$ref": "#/definitions/LoyaltyReward" }, "description": "The loyalty rewards that satisfy the search criteria.\nThese are returned in descending order by `updated_at`." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent \nrequest. If empty, this is the final response." } }, "description": "A response that includes the loyalty rewards satisfying the search criteria.", "x-release-status": "PUBLIC", "example": { "rewards": [ { "id": "d03f79f4-815f-3500-b851-cc1e68a457f9", "status": "REDEEMED", "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "reward_tier_id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "points": 10, "order_id": "PyATxhYLfsMqpVkcKJITPydgEYfZY", "created_at": "2020-05-08T22:00:44Z", "updated_at": "2020-05-08T22:01:17Z", "redeemed_at": "2020-05-08T22:01:17Z" }, { "id": "9f18ac21-233a-31c3-be77-b45840f5a810", "status": "REDEEMED", "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "reward_tier_id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "points": 10, "created_at": "2020-05-08T21:55:42Z", "updated_at": "2020-05-08T21:56:00Z", "redeemed_at": "2020-05-08T21:56:00Z" }, { "id": "a8f43ebe-2ad6-3001-bdd5-7d7c2da08943", "status": "DELETED", "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "reward_tier_id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "points": 10, "order_id": "5NB69ZNh3FbsOs1ox43bh1xrli6YY", "created_at": "2020-05-01T21:49:54Z", "updated_at": "2020-05-08T21:55:10Z" }, { "id": "a051254c-f840-3b45-8cf1-50bcd38ff92a", "status": "ISSUED", "loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", "reward_tier_id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "points": 10, "order_id": "LQQ16znvi2VIUKPVhUfJefzr1eEZY", "created_at": "2020-05-01T20:20:37Z", "updated_at": "2020-05-01T20:20:40Z" } ] } }, "SearchOrdersCustomerFilter": { "type": "object", "properties": { "customer_ids": { "type": "array", "items": { "type": "string" }, "description": "A list of customer IDs to filter by.\n\nMax: 10 customer ids." } }, "description": "A filter based on the order `customer_id` and any tender `customer_id`\nassociated with the order. It does not filter based on the\n[FulfillmentRecipient](https://developer.squareup.com/reference/square_2024-04-17/objects/FulfillmentRecipient) `customer_id`.", "x-release-status": "BETA", "x-is-beta": true }, "SearchOrdersDateTimeFilter": { "type": "object", "properties": { "created_at": { "$ref": "#/definitions/TimeRange", "description": "The time range for filtering on the `created_at` timestamp. If you use this\nvalue, you must set the `sort_field` in the `OrdersSearchSort` object to\n`CREATED_AT`." }, "updated_at": { "$ref": "#/definitions/TimeRange", "description": "The time range for filtering on the `updated_at` timestamp. If you use this\nvalue, you must set the `sort_field` in the `OrdersSearchSort` object to\n`UPDATED_AT`." }, "closed_at": { "$ref": "#/definitions/TimeRange", "description": "The time range for filtering on the `closed_at` timestamp. If you use this\nvalue, you must set the `sort_field` in the `OrdersSearchSort` object to\n`CLOSED_AT`." } }, "description": "Filter for `Order` objects based on whether their `CREATED_AT`,\n`CLOSED_AT`, or `UPDATED_AT` timestamps fall within a specified time range.\nYou can specify the time range and which timestamp to filter for. You can filter\nfor only one time range at a time.\n\nFor each time range, the start time and end time are inclusive. If the end time\nis absent, it defaults to the time of the first request for the cursor.\n\n__Important:__ If you use the `DateTimeFilter` in a `SearchOrders` query,\nyou must set the `sort_field` in [OrdersSort](https://developer.squareup.com/reference/square_2024-04-17/objects/SearchOrdersSort)\nto the same field you filter for. For example, if you set the `CLOSED_AT` field\nin `DateTimeFilter`, you must set the `sort_field` in `SearchOrdersSort` to\n`CLOSED_AT`. Otherwise, `SearchOrders` throws an error.\n[Learn more about filtering orders by time range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range)", "x-release-status": "PUBLIC" }, "SearchOrdersFilter": { "type": "object", "properties": { "state_filter": { "$ref": "#/definitions/SearchOrdersStateFilter", "description": "Filter by [OrderState](https://developer.squareup.com/reference/square_2024-04-17/enums/OrderState)." }, "date_time_filter": { "$ref": "#/definitions/SearchOrdersDateTimeFilter", "description": "Filter for results within a time range.\n\n__Important:__ If you filter for orders by time range, you must set `SearchOrdersSort`\nto sort by the same field.\n[Learn more about filtering orders by time range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range)" }, "fulfillment_filter": { "$ref": "#/definitions/SearchOrdersFulfillmentFilter", "description": "Filter by the fulfillment type or state." }, "source_filter": { "$ref": "#/definitions/SearchOrdersSourceFilter", "description": "Filter by the source of the order." }, "customer_filter": { "$ref": "#/definitions/SearchOrdersCustomerFilter", "description": "Filter by customers associated with the order.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Filtering criteria to use for a `SearchOrders` request. Multiple filters\nare ANDed together.", "x-release-status": "PUBLIC" }, "SearchOrdersFulfillmentFilter": { "type": "object", "properties": { "fulfillment_types": { "type": "array", "items": { "type": "string" }, "description": "A list of [fulfillment types](https://developer.squareup.com/reference/square_2024-04-17/enums/FulfillmentType) to filter\nfor. The list returns orders if any of its fulfillments match any of the fulfillment types\nlisted in this field." }, "fulfillment_states": { "type": "array", "items": { "type": "string" }, "description": "A list of [fulfillment states](https://developer.squareup.com/reference/square_2024-04-17/enums/FulfillmentState) to filter\nfor. The list returns orders if any of its fulfillments match any of the\nfulfillment states listed in this field." } }, "description": "Filter based on [order fulfillment](https://developer.squareup.com/reference/square_2024-04-17/objects/Fulfillment) information.", "x-release-status": "PUBLIC" }, "SearchOrdersQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/SearchOrdersFilter", "description": "Criteria to filter results by." }, "sort": { "$ref": "#/definitions/SearchOrdersSort", "description": "Criteria to sort results by." } }, "description": "Contains query criteria for the search.", "x-release-status": "PUBLIC" }, "SearchOrdersRequest": { "type": "object", "properties": { "location_ids": { "type": "array", "items": { "type": "string" }, "description": "The location IDs for the orders to query. All locations must belong to\nthe same merchant.\n\nMax: 10 location IDs." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for your original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "query": { "$ref": "#/definitions/SearchOrdersQuery", "description": "Query conditions used to filter or sort the results. Note that when\nretrieving additional pages using a cursor, you must use the original query." }, "limit": { "minimum": 0, "type": "integer", "description": "The maximum number of results to be returned in a single page.\n\nDefault: `500`\nMax: `1000`" }, "return_entries": { "type": "boolean", "description": "A Boolean that controls the format of the search results. If `true`,\n`SearchOrders` returns [OrderEntry](https://developer.squareup.com/reference/square_2024-04-17/objects/OrderEntry) objects. If `false`, `SearchOrders`\nreturns complete order objects.\n\nDefault: `false`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "return_entries": true, "limit": 3, "location_ids": [ "057P5VYJ4A5X1", "18YC4JDH91E1H" ], "query": { "filter": { "date_time_filter": { "closed_at": { "start_at": "2018-03-03T20:00:00+00:00", "end_at": "2019-03-04T21:54:45+00:00" } }, "state_filter": { "states": [ "COMPLETED" ] } }, "sort": { "sort_field": "CLOSED_AT", "sort_order": "DESC" } } } } }, "SearchOrdersResponse": { "type": "object", "properties": { "order_entries": { "type": "array", "items": { "$ref": "#/definitions/OrderEntry" }, "description": "A list of [OrderEntries](https://developer.squareup.com/reference/square_2024-04-17/objects/OrderEntry) that fit the query\nconditions. The list is populated only if `return_entries` is set to `true` in the request." }, "orders": { "type": "array", "items": { "$ref": "#/definitions/Order" }, "description": "A list of\n[Order](https://developer.squareup.com/reference/square_2024-04-17/objects/Order) objects that match the query conditions. The list is populated only if\n`return_entries` is set to `false` in the request." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If unset,\nthis is the final response.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "[Errors](https://developer.squareup.com/reference/square_2024-04-17/objects/Error) encountered during the search." } }, "description": "Either the `order_entries` or `orders` field is set, depending on whether\n`return_entries` is set on the [SearchOrdersRequest](https://developer.squareup.com/reference/square_2024-04-17/orders-api/search-orders).", "x-release-status": "PUBLIC", "example": { "order_entries": [ { "order_id": "CAISEM82RcpmcFBM0TfOyiHV3es", "location_id": "057P5VYJ4A5X1", "version": 1 }, { "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "location_id": "18YC4JDH91E1H" }, { "order_id": "CAISEM52YcpmcWAzERDOyiWS3ty", "location_id": "057P5VYJ4A5X1" } ], "cursor": "123" } }, "SearchOrdersSort": { "type": "object", "required": [ "sort_field" ], "properties": { "sort_field": { "type": "string", "description": "The field to sort by.\n\n__Important:__ When using a [DateTimeFilter](https://developer.squareup.com/reference/square_2024-04-17/objects/SearchOrdersFilter),\n`sort_field` must match the timestamp field that the `DateTimeFilter` uses to\nfilter. For example, if you set your `sort_field` to `CLOSED_AT` and you use a\n`DateTimeFilter`, your `DateTimeFilter` must filter for orders by their `CLOSED_AT` date.\nIf this field does not match the timestamp field in `DateTimeFilter`,\n`SearchOrders` returns an error.\n\nDefault: `CREATED_AT`." }, "sort_order": { "type": "string", "description": "The chronological order in which results are returned. Defaults to `DESC`." } }, "description": "Sorting criteria for a `SearchOrders` request. Results can only be sorted\nby a timestamp field.", "x-release-status": "PUBLIC" }, "SearchOrdersSourceFilter": { "type": "object", "properties": { "source_names": { "type": "array", "items": { "type": "string" }, "description": "Filters by the [Source](https://developer.squareup.com/reference/square_2024-04-17/objects/OrderSource) `name`. The filter returns any orders\nwith a `source.name` that matches any of the listed source names.\n\nMax: 10 source names." } }, "description": "A filter based on order `source` information.", "x-release-status": "PUBLIC" }, "SearchOrdersStateFilter": { "type": "object", "required": [ "states" ], "properties": { "states": { "type": "array", "items": { "type": "string" }, "description": "States to filter for." } }, "description": "Filter by the current order `state`.", "x-release-status": "PUBLIC" }, "SearchShiftsRequest": { "type": "object", "properties": { "query": { "$ref": "#/definitions/ShiftQuery", "description": "Query filters." }, "limit": { "maximum": 200, "minimum": 1, "type": "integer", "description": "The number of resources in a page (200 by default)." }, "cursor": { "type": "string", "description": "An opaque cursor for fetching the next page." } }, "description": "A request for a filtered and sorted set of `Shift` objects.", "x-release-status": "PUBLIC", "example": { "request_body": { "query": { "filter": { "workday": { "date_range": { "start_date": "2019-01-20", "end_date": "2019-02-03" }, "match_shifts_by": "START_AT", "default_timezone": "America/Los_Angeles" } } }, "limit": 100 } } }, "SearchShiftsResponse": { "type": "object", "properties": { "shifts": { "type": "array", "items": { "$ref": "#/definitions/Shift" }, "description": "Shifts." }, "cursor": { "type": "string", "description": "An opaque cursor for fetching the next page." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request for `Shift` objects. The response contains\nthe requested `Shift` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "shifts": [ { "id": "X714F3HA6D1PT", "team_member_id": "ormj0jJJZ5OZIzxrZYJI", "employee_id": "ormj0jJJZ5OZIzxrZYJI", "location_id": "PAA1RJZZKXBFG", "timezone": "America/New_York", "start_at": "2019-01-21T03:11:00-05:00", "end_at": "2019-01-21T13:11:00-05:00", "wage": { "title": "Barista", "hourly_rate": { "amount": 1100, "currency": "USD" }, "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M", "tip_eligible": true }, "breaks": [ { "id": "SJW7X6AKEJQ65", "start_at": "2019-01-21T06:11:00-05:00", "end_at": "2019-01-21T06:11:00-05:00", "break_type_id": "REGS1EQR1TPZ5", "name": "Tea Break", "expected_duration": "PT10M", "is_paid": true } ], "declared_cash_tip_money": { "amount": 500, "currency": "USD" }, "status": "CLOSED", "version": 6, "created_at": "2019-01-24T01:12:03Z", "updated_at": "2019-02-07T22:21:08Z" }, { "id": "GDHYBZYWK0P2V", "team_member_id": "33fJchumvVdJwxV0H6L9", "employee_id": "33fJchumvVdJwxV0H6L9", "location_id": "PAA1RJZZKXBFG", "timezone": "America/New_York", "start_at": "2019-01-22T12:02:00-05:00", "end_at": "2019-01-22T13:02:00-05:00", "wage": { "title": "Cook", "hourly_rate": { "amount": 1600, "currency": "USD" }, "job_id": "gcbz15vKGnMKmaWJJ152kjim", "tip_eligible": true }, "breaks": [ { "id": "BKS6VR7WR748A", "start_at": "2019-01-23T14:30:00-05:00", "end_at": "2019-01-23T14:40:00-05:00", "break_type_id": "WQX00VR99F53J", "name": "Tea Break", "expected_duration": "PT10M", "is_paid": true }, { "id": "BQFEZSHFZSC51", "start_at": "2019-01-22T12:30:00-05:00", "end_at": "2019-01-22T12:44:00-05:00", "break_type_id": "P6Q468ZFRN1AC", "name": "Coffee Break", "expected_duration": "PT15M", "is_paid": false } ], "declared_cash_tip_money": { "amount": 0, "currency": "USD" }, "status": "CLOSED", "version": 16, "created_at": "2019-01-23T23:32:45Z", "updated_at": "2019-01-24T00:56:25Z" } ] } }, "SearchSubscriptionsFilter": { "type": "object", "properties": { "customer_ids": { "type": "array", "items": { "type": "string" }, "description": "A filter to select subscriptions based on the subscribing customer IDs." }, "location_ids": { "type": "array", "items": { "type": "string" }, "description": "A filter to select subscriptions based on the location." }, "source_names": { "type": "array", "items": { "type": "string" }, "description": "A filter to select subscriptions based on the source application.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Represents a set of query expressions (filters) to narrow the scope of targeted subscriptions returned by \nthe [SearchSubscriptions](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/search-subscriptions) endpoint.", "x-release-status": "PUBLIC" }, "SearchSubscriptionsQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/SearchSubscriptionsFilter", "description": "A list of query expressions." } }, "description": "Represents a query, consisting of specified query expressions, used to search for subscriptions.", "x-release-status": "PUBLIC" }, "SearchSubscriptionsRequest": { "type": "object", "properties": { "cursor": { "type": "string", "description": "When the total number of resulting subscriptions exceeds the limit of a paged response, \nspecify the cursor returned from a preceding response here to fetch the next set of results.\nIf the cursor is unset, the response contains the last page of the results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." }, "limit": { "minimum": 1, "type": "integer", "description": "The upper limit on the number of subscriptions to return\nin a paged response." }, "query": { "$ref": "#/definitions/SearchSubscriptionsQuery", "description": "A subscription query consisting of specified filtering conditions.\n\nIf this `query` field is unspecified, the `SearchSubscriptions` call will return all subscriptions." }, "include": { "type": "array", "items": { "type": "string" }, "description": "An option to include related information in the response. \n\nThe supported values are: \n\n- `actions`: to include scheduled actions on the targeted subscriptions.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Defines input parameters in a request to the \n[SearchSubscriptions](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/search-subscriptions) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "query": { "filter": { "location_ids": [ "S8GWD5R9QB376" ], "customer_ids": [ "CHFGVKYY8RSV93M5KCYTG4PN0G" ], "source_names": [ "My App" ] } } } } }, "SearchSubscriptionsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscriptions": { "type": "array", "items": { "$ref": "#/definitions/Subscription" }, "description": "The subscriptions matching the specified query expressions." }, "cursor": { "type": "string", "description": "When the total number of resulting subscription exceeds the limit of a paged response, \nthe response includes a cursor for you to use in a subsequent request to fetch the next set of results.\nIf the cursor is unset, the response contains the last page of the results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)." } }, "description": "Defines output parameters in a response from the\n[SearchSubscriptions](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/search-subscriptions) endpoint.", "x-release-status": "PUBLIC", "example": { "subscriptions": [ { "id": "de86fc96-8664-474b-af1a-abbe59cacf0e", "location_id": "S8GWD5R9QB376", "plan_variation_id": "L3TJVDHVBEQEGQDEZL2JJM7R", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "start_date": "2021-10-20", "canceled_date": "2021-10-30", "charged_through_date": "2021-11-20", "status": "CANCELED", "created_at": "2021-10-20T21:53:10Z", "card_id": "ccof:mueUsvgajChmjEbp4GB", "paid_until_date": "2021-11-20", "timezone": "UTC", "source": { "name": "My Application" } }, { "id": "56214fb2-cc85-47a1-93bc-44f3766bb56f", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "start_date": "2022-01-19", "charged_through_date": "2022-08-19", "status": "PAUSED", "invoice_ids": [ "grebK0Q_l8H4fqoMMVvt-Q", "rcX_i3sNmHTGKhI4W2mceA" ], "tax_percentage": "5", "price_override_money": { "amount": 1000, "currency": "USD" }, "version": 2, "created_at": "2022-01-19T21:53:10Z", "timezone": "America/Los_Angeles", "source": { "name": "My Application" } }, { "id": "56214fb2-cc85-47a1-93bc-44f3766bb56f", "location_id": "S8GWD5R9QB376", "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "start_date": "2023-06-20", "status": "ACTIVE", "version": 1, "created_at": "2023-06-20T21:53:10Z", "card_id": "ccof:qy5x8hHGYsgLrp4Q4GB", "phases": [ { "uid": "873451e0-745b-4e87-ab0b-c574933fe616", "ordinal": 0, "order_template_id": "U2NaowWxzXwpsZU697x7ZHOAnCNZY", "plan_phase_uid": "X2Q2AONPB3RB64Y27S25QCZP" } ], "timezone": "America/Los_Angeles", "source": { "name": "My Application" } } ] } }, "SearchTeamMembersFilter": { "type": "object", "properties": { "location_ids": { "type": "array", "items": { "type": "string" }, "description": "When present, filters by team members assigned to the specified locations.\nWhen empty, includes team members assigned to any location." }, "status": { "type": "string", "description": "When present, filters by team members who match the given status.\nWhen empty, includes team members of all statuses." }, "is_owner": { "type": "boolean", "description": "When present and set to true, returns the team member who is the owner of the Square account." } }, "description": "Represents a filter used in a search for `TeamMember` objects. `AND` logic is applied\nbetween the individual fields, and `OR` logic is applied within list-based fields.\nFor example, setting this filter value:\n```\nfilter \u003d (locations_ids \u003d [\"A\", \"B\"], status \u003d ACTIVE)\n```\nreturns only active team members assigned to either location \"A\" or \"B\".", "x-release-status": "PUBLIC" }, "SearchTeamMembersQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/SearchTeamMembersFilter", "description": "The options to filter by." } }, "description": "Represents the parameters in a search for `TeamMember` objects.", "x-release-status": "PUBLIC" }, "SearchTeamMembersRequest": { "type": "object", "properties": { "query": { "$ref": "#/definitions/SearchTeamMembersQuery", "description": "The query parameters." }, "limit": { "maximum": 200, "minimum": 1, "type": "integer", "description": "The maximum number of `TeamMember` objects in a page (100 by default)." }, "cursor": { "type": "string", "description": "The opaque cursor for fetching the next page. For more information, see\n[pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." } }, "description": "Represents a search request for a filtered list of `TeamMember` objects.", "x-release-status": "PUBLIC", "example": { "request_body": { "query": { "filter": { "location_ids": [ "0G5P3VGACMMQZ" ], "status": "ACTIVE" } }, "limit": 10 } } }, "SearchTeamMembersResponse": { "type": "object", "properties": { "team_members": { "type": "array", "items": { "$ref": "#/definitions/TeamMember" }, "description": "The filtered list of `TeamMember` objects." }, "cursor": { "type": "string", "description": "The opaque cursor for fetching the next page. For more information, see\n[pagination](https://developer.squareup.com/docs/working-with-apis/pagination)." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "The errors that occurred during the request." } }, "description": "Represents a response from a search request containing a filtered list of `TeamMember` objects.", "x-release-status": "PUBLIC", "example": { "team_members": [ { "id": "-3oZQKPKVk6gUXU_V5Qa", "reference_id": "12345678", "is_owner": false, "status": "ACTIVE", "given_name": "Johnny", "family_name": "Cash", "email_address": "johnny_cash@squareup.com", "created_at": "2019-07-10T17:26:48Z", "updated_at": "2020-04-28T21:49:28Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "1AVJj0DjkzbmbJw5r4KK", "reference_id": "abcded", "is_owner": false, "status": "ACTIVE", "given_name": "Lombard", "family_name": "Smith", "phone_number": "+14155552671", "created_at": "2020-03-24T18:14:01Z", "updated_at": "2020-06-09T17:38:05Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "2JCmiJol_KKFs9z2Evim", "is_owner": false, "status": "ACTIVE", "given_name": "Monica", "family_name": "Sway", "created_at": "2020-03-24T01:09:25Z", "updated_at": "2020-03-24T01:11:25Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "4uXcJQSLtbk3F0UQHFNQ", "is_owner": false, "status": "ACTIVE", "given_name": "Elton", "family_name": "Ipsum", "created_at": "2020-03-24T01:09:23Z", "updated_at": "2020-03-24T01:15:23Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "5CoUpyrw1YwGWcRd-eDL", "is_owner": false, "status": "ACTIVE", "given_name": "Steven", "family_name": "Lo", "created_at": "2020-03-24T01:09:23Z", "updated_at": "2020-03-24T01:19:23Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "5MRPTTp8MMBLVSmzrGha", "is_owner": false, "status": "ACTIVE", "given_name": "Patrick", "family_name": "Steward", "phone_number": "+14155552671", "created_at": "2020-03-24T18:14:03Z", "updated_at": "2020-03-24T18:18:03Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "7F5ZxsfRnkexhu1PTbfh", "is_owner": false, "status": "ACTIVE", "given_name": "Ivy", "family_name": "Manny", "created_at": "2020-03-24T01:09:25Z", "updated_at": "2020-03-24T01:09:25Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "808X9HR72yKvVaigQXf4", "is_owner": false, "status": "ACTIVE", "given_name": "John", "family_name": "Smith", "email_address": "john_smith@example.com", "phone_number": "+14155552671", "created_at": "2020-03-24T18:14:02Z", "updated_at": "2020-03-24T18:14:02Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "9MVDVoY4hazkWKGo_OuZ", "is_owner": false, "status": "ACTIVE", "given_name": "Robert", "family_name": "Wen", "email_address": "r_wen@example.com", "phone_number": "+14155552671", "created_at": "2020-03-24T18:14:00Z", "updated_at": "2020-03-24T18:14:00Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } }, { "id": "9UglUjOXQ13-hMFypCft", "is_owner": false, "status": "ACTIVE", "given_name": "Ashley", "family_name": "Simpson", "email_address": "asimpson@example.com", "phone_number": "+14155552671", "created_at": "2020-03-24T18:14:00Z", "updated_at": "2020-03-24T18:18:00Z", "assigned_locations": { "assignment_type": "ALL_CURRENT_AND_FUTURE_LOCATIONS" } } ], "cursor": "N:9UglUjOXQ13-hMFypCft" } }, "SearchTerminalActionsRequest": { "type": "object", "properties": { "query": { "$ref": "#/definitions/TerminalActionQuery", "description": "Queries terminal actions based on given conditions and sort order.\nLeaving this unset will return all actions with the default sort order." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more\ninformation." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "Limit the number of results returned for a single request." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "limit": 2, "query": { "sort": { "sort_order": "DESC" }, "filter": { "created_at": { "start_at": "2022-04-01T00:00:00.000Z" } } } } } }, "SearchTerminalActionsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "action": { "type": "array", "items": { "$ref": "#/definitions/TerminalAction" }, "description": "The requested search result of `TerminalAction`s." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty,\nthis is the final response.\n\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more\ninformation." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "action": [ { "id": "termapia:oBGWlAats8xWCiCE", "device_id": "DEVICE_ID", "deadline_duration": "PT5M", "status": "IN_PROGRESS", "created_at": "2022-04-08T15:14:04.895Z", "updated_at": "2022-04-08T15:14:05.446Z", "location_id": "LOCATION_ID", "type": "SAVE_CARD", "app_id": "APP_ID", "save_card_options": { "customer_id": "CUSTOMER_ID", "reference_id": "user-id-1" } }, { "id": "termapia:K2NY2YSSml3lTiCE", "device_id": "DEVICE_ID", "deadline_duration": "PT5M", "status": "COMPLETED", "created_at": "2022-04-08T15:14:01.210Z", "updated_at": "2022-04-08T15:14:09.861Z", "location_id": "LOCATION_ID", "type": "SAVE_CARD", "app_id": "APP_ID", "save_card_options": { "customer_id": "CUSTOMER_ID", "card_id": "ccof:CARD_ID", "reference_id": "user-id-1" } } ], "cursor": "CURSOR" } }, "SearchTerminalCheckoutsRequest": { "type": "object", "properties": { "query": { "$ref": "#/definitions/TerminalCheckoutQuery", "description": "Queries Terminal checkouts based on given conditions and the sort order.\nLeaving these unset returns all checkouts with the default sort order." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "Limits the number of results returned for a single request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "limit": 2, "query": { "filter": { "status": "COMPLETED" } } } } }, "SearchTerminalCheckoutsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "checkouts": { "type": "array", "items": { "$ref": "#/definitions/TerminalCheckout" }, "description": "The requested search result of `TerminalCheckout` objects." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty,\nthis is the final response.\n\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "checkouts": [ { "id": "tsQPvzwBpMqqO", "amount_money": { "amount": 2610, "currency": "USD" }, "reference_id": "id14467", "note": "A brief note", "device_options": { "device_id": "dbb5d83a-7838-11ea-bc55-0242ac130003", "tip_settings": { "allow_tipping": false }, "skip_receipt_screen": false }, "status": "COMPLETED", "payment_ids": [ "rXnhZzywrEk4vR6pw76fPZfgvaB" ], "created_at": "2020-03-31T18:13:15.921Z", "updated_at": "2020-03-31T18:13:52.725Z", "app_id": "APP_ID", "deadline_duration": "PT5M" }, { "id": "XlOPTgcEhrbqO", "amount_money": { "amount": 2610, "currency": "USD" }, "reference_id": "id41623", "note": "A brief note", "device_options": { "device_id": "dbb5d83a-7838-11ea-bc55-0242ac130003", "tip_settings": { "allow_tipping": false }, "skip_receipt_screen": true }, "status": "COMPLETED", "payment_ids": [ "VYBF861PaoKPP7Pih0TlbZiNvaB" ], "created_at": "2020-03-31T18:08:31.882Z", "updated_at": "2020-03-31T18:08:41.635Z", "app_id": "APP_ID", "deadline_duration": "PT5M" } ], "cursor": "RiTJqBoTuXlbLmmrPvEkX9iG7XnQ4W4RjGnH" } }, "SearchTerminalRefundsRequest": { "type": "object", "properties": { "query": { "$ref": "#/definitions/TerminalRefundQuery", "description": "Queries the Terminal refunds based on given conditions and the sort order. Calling\n`SearchTerminalRefunds` without an explicit query parameter returns all available\nrefunds with the default sort order." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query." }, "limit": { "maximum": 100, "minimum": 1, "type": "integer", "description": "Limits the number of results returned for a single request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "limit": 1, "query": { "filter": { "status": "COMPLETED" } } } } }, "SearchTerminalRefundsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "refunds": { "type": "array", "items": { "$ref": "#/definitions/TerminalRefund" }, "description": "The requested search result of `TerminalRefund` objects." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If empty,\nthis is the final response.\n\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information." } }, "description": "", "x-release-status": "PUBLIC", "example": { "refunds": [ { "id": "009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY", "refund_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY_43Q4iGp7sNeATiWrUruA1EYeMRUXaddXXlDDJ1EQLvb", "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY", "amount_money": { "amount": 111, "currency": "CAD" }, "reason": "Returning item", "device_id": "f72dfb8e-4d65-4e56-aade-ec3fb8d33291", "deadline_duration": "PT5M", "status": "COMPLETED", "created_at": "2020-09-29T15:21:46.771Z", "updated_at": "2020-09-29T15:21:48.675Z", "app_id": "sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ", "card": { "card_brand": "INTERAC", "last_4": "1111", "exp_month": 1, "exp_year": 2022, "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw", "card_type": "CREDIT", "bin": "411111" }, "order_id": "kcuKDKreRaI4gF4TjmEgZjHk8Z7YY", "location_id": "76C9W6K8CNNQ5" } ] } }, "SearchVendorsRequest": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/Filter", "description": "Specifies a filter used to search for vendors." }, "sort": { "$ref": "#/definitions/Sort", "description": "Specifies a sorter used to sort the returned vendors." }, "cursor": { "type": "string", "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } }, "description": "Represents an input into a call to [SearchVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/search-vendors).", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "query": { "filter": { "name": [ "Joe\u0027s Fresh Seafood", "Hannah\u0027s Bakery" ], "status": [ "ACTIVE" ] }, "sort": { "field": "CREATED_AT", "order": "ASC" } } } } }, "SearchVendorsRequestFilter": { "type": "object", "properties": { "name": { "type": "array", "items": { "maxLength": 100, "type": "string" }, "description": "The names of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects to retrieve." }, "status": { "type": "array", "items": { "type": "string" }, "description": "The statuses of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects to retrieve." } }, "description": "Defines supported query expressions to search for vendors by.", "x-release-status": "BETA", "x-is-beta": true }, "SearchVendorsRequestSort": { "type": "object", "properties": { "field": { "type": "string", "description": "Specifies the sort key to sort the returned vendors." }, "order": { "type": "string", "description": "Specifies the sort order for the returned vendors." } }, "description": "Defines a sorter used to sort results from [SearchVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/search-vendors).", "x-release-status": "BETA", "x-is-beta": true }, "SearchVendorsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered when the request fails." }, "vendors": { "type": "array", "items": { "$ref": "#/definitions/Vendor" }, "description": "The [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) objects matching the specified search filter." }, "cursor": { "type": "string", "description": "The pagination cursor to be used in a subsequent request. If unset,\nthis is the final response.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } }, "description": "Represents an output from a call to [SearchVendors](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/search-vendors).", "x-release-status": "BETA", "x-is-beta": true, "example": { "errors": [], "vendors": [ { "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2022-03-16T10:21:54.859Z", "updated_at": "2022-03-16T10:21:54.859Z", "name": "Joe\u0027s Fresh Seafood", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "id": "INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A", "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250" } ], "account_number": "4025391", "note": "a vendor", "version": 1, "status": "ACTIVE" } ] } }, "SegmentFilter": { "type": "object", "required": [ "service_variation_id" ], "properties": { "service_variation_id": { "minLength": 1, "maxLength": 36, "type": "string", "description": "The ID of the [CatalogItemVariation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogItemVariation) object representing the service booked in this segment." }, "team_member_id_filter": { "$ref": "#/definitions/FilterValue", "description": "A query filter to search for buyer-accessible appointment segments with service-providing team members matching the specified list of team member IDs. Supported query expressions are\n- `ANY`: return the appointment segments with team members whose IDs match any member in this list.\n- `NONE`: return the appointment segments with team members whose IDs are not in this list.\n- `ALL`: not supported.\n\nWhen no expression is specified, any service-providing team member is eligible to fulfill the Booking." } }, "description": "A query filter to search for buyer-accessible appointment segments by.", "x-release-status": "PUBLIC" }, "SelectOption": { "type": "object", "required": [ "reference_id", "title" ], "properties": { "reference_id": { "minLength": 1, "maxLength": 40, "type": "string", "description": "The reference id for the option." }, "title": { "minLength": 1, "maxLength": 250, "type": "string", "description": "The title text that displays in the select option button." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "SelectOptions": { "type": "object", "required": [ "title", "body", "options" ], "properties": { "title": { "minLength": 1, "maxLength": 250, "type": "string", "description": "The title text to display in the select flow on the Terminal." }, "body": { "minLength": 1, "maxLength": 10000, "type": "string", "description": "The body text to display in the select flow on the Terminal." }, "options": { "type": "array", "items": { "$ref": "#/definitions/SelectOption" }, "description": "Represents the buttons/options that should be displayed in the select flow on the Terminal." }, "selected_option": { "$ref": "#/definitions/SelectOption", "description": "The buyer’s selected option.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "Shift": { "type": "object", "required": [ "location_id", "start_at" ], "properties": { "id": { "maxLength": 255, "type": "string", "description": "The UUID for this object." }, "employee_id": { "type": "string", "description": "The ID of the employee this shift belongs to. DEPRECATED at version 2020-08-26. Use `team_member_id` instead.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "location_id": { "minLength": 1, "type": "string", "description": "The ID of the location this shift occurred at. The location should be based on\nwhere the employee clocked in." }, "timezone": { "type": "string", "description": "The read-only convenience value that is calculated from the location based\non the `location_id`. Format: the IANA timezone database identifier for the\nlocation timezone." }, "start_at": { "minLength": 1, "type": "string", "description": "RFC 3339; shifted to the location timezone + offset. Precision up to the\nminute is respected; seconds are truncated." }, "end_at": { "type": "string", "description": "RFC 3339; shifted to the timezone + offset. Precision up to the minute is\nrespected; seconds are truncated." }, "wage": { "$ref": "#/definitions/ShiftWage", "description": "Job and pay related information. If the wage is not set on create, it defaults to a wage\nof zero. If the title is not set on create, it defaults to the name of the role the employee\nis assigned to, if any." }, "breaks": { "type": "array", "items": { "$ref": "#/definitions/Break" }, "description": "A list of all the paid or unpaid breaks that were taken during this shift." }, "status": { "type": "string", "description": "Describes the working state of the current `Shift`." }, "version": { "type": "integer", "description": "Used for resolving concurrency issues. The request fails if the version\nprovided does not match the server version at the time of the request. If not provided,\nSquare executes a blind write; potentially overwriting data from another\nwrite." }, "created_at": { "type": "string", "description": "A read-only timestamp in RFC 3339 format; presented in UTC.", "x-read-only": true }, "updated_at": { "type": "string", "description": "A read-only timestamp in RFC 3339 format; presented in UTC.", "x-read-only": true }, "team_member_id": { "type": "string", "description": "The ID of the team member this shift belongs to. Replaced `employee_id` at version \"2020-08-26\"." }, "declared_cash_tip_money": { "$ref": "#/definitions/Money", "description": "The tips declared by the team member for the shift." } }, "description": "A record of the hourly rate, start, and end times for a single work shift\nfor an employee. This might include a record of the start and end times for breaks\ntaken during the shift.", "x-release-status": "PUBLIC" }, "ShiftFilter": { "type": "object", "required": [ "location_ids", "team_member_ids" ], "properties": { "location_ids": { "type": "array", "items": { "minLength": 1, "type": "string" }, "description": "Fetch shifts for the specified location." }, "employee_ids": { "type": "array", "items": { "type": "string" }, "description": "Fetch shifts for the specified employees. DEPRECATED at version 2020-08-26. Use `team_member_ids` instead.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "status": { "type": "string", "description": "Fetch a `Shift` instance by `Shift.status`." }, "start": { "$ref": "#/definitions/TimeRange", "description": "Fetch `Shift` instances that start in the time range - Inclusive." }, "end": { "$ref": "#/definitions/TimeRange", "description": "Fetch the `Shift` instances that end in the time range - Inclusive." }, "workday": { "$ref": "#/definitions/ShiftWorkday", "description": "Fetch the `Shift` instances based on the workday date range." }, "team_member_ids": { "type": "array", "items": { "minLength": 1, "type": "string" }, "description": "Fetch shifts for the specified team members. Replaced `employee_ids` at version \"2020-08-26\"." } }, "description": "Defines a filter used in a search for `Shift` records. `AND` logic is\nused by Square\u0027s servers to apply each filter property specified.", "x-release-status": "PUBLIC" }, "ShiftQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/ShiftFilter", "description": "Query filter options." }, "sort": { "$ref": "#/definitions/ShiftSort", "description": "Sort order details." } }, "description": "The parameters of a `Shift` search query, which includes filter and sort options.", "x-release-status": "PUBLIC" }, "ShiftSort": { "type": "object", "properties": { "field": { "type": "string", "description": "The field to sort on." }, "order": { "type": "string", "description": "The order in which results are returned. Defaults to DESC." } }, "description": "Sets the sort order of search results.", "x-release-status": "PUBLIC" }, "ShiftWage": { "type": "object", "properties": { "title": { "type": "string", "description": "The name of the job performed during this shift." }, "hourly_rate": { "$ref": "#/definitions/Money", "description": "Can be a custom-set hourly wage or the calculated effective hourly\nwage based on the annual wage and hours worked per week." }, "job_id": { "type": "string", "description": "The id of the job performed during this shift. Square\nlabor-reporting UIs might group shifts together by id. This cannot be used to retrieve the job.", "x-read-only": true }, "tip_eligible": { "type": "boolean", "description": "Whether team members are eligible for tips when working this job." } }, "description": "The hourly wage rate used to compensate an employee for this shift.", "x-release-status": "PUBLIC" }, "ShiftWorkday": { "type": "object", "properties": { "date_range": { "$ref": "#/definitions/DateRange", "description": "Dates for fetching the shifts." }, "match_shifts_by": { "type": "string", "description": "The strategy on which the dates are applied." }, "default_timezone": { "type": "string", "description": "Location-specific timezones convert workdays to datetime filters.\nEvery location included in the query must have a timezone or this field\nmust be provided as a fallback. Format: the IANA timezone database\nidentifier for the relevant timezone." } }, "description": "A `Shift` search query filter parameter that sets a range of days that\na `Shift` must start or end in before passing the filter condition.", "x-release-status": "PUBLIC" }, "ShippingFee": { "type": "object", "required": [ "charge" ], "properties": { "name": { "type": "string", "description": "The name for the shipping fee." }, "charge": { "$ref": "#/definitions/Money", "description": "The amount and currency for the shipping fee." } }, "description": "", "x-release-status": "PUBLIC" }, "SignatureImage": { "type": "object", "properties": { "image_type": { "type": "string", "description": "The mime/type of the image data.\nUse `image/png;base64` for png.", "x-read-only": true }, "data": { "type": "string", "description": "The base64 representation of the image.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "SignatureOptions": { "type": "object", "required": [ "title", "body" ], "properties": { "title": { "minLength": 1, "maxLength": 250, "type": "string", "description": "The title text to display in the signature capture flow on the Terminal." }, "body": { "minLength": 1, "maxLength": 10000, "type": "string", "description": "The body text to display in the signature capture flow on the Terminal." }, "signature": { "type": "array", "items": { "$ref": "#/definitions/SignatureImage" }, "description": "An image representation of the collected signature.", "x-read-only": true } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "Site": { "type": "object", "properties": { "id": { "maxLength": 32, "type": "string", "description": "The Square-assigned ID of the site.", "x-read-only": true }, "site_title": { "type": "string", "description": "The title of the site." }, "domain": { "type": "string", "description": "The domain of the site (without the protocol). For example, `mysite1.square.site`." }, "is_published": { "type": "boolean", "description": "Indicates whether the site is published." }, "created_at": { "type": "string", "description": "The timestamp of when the site was created, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp of when the site was last updated, in RFC 3339 format.", "x-read-only": true } }, "description": "Represents a Square Online site, which is an online store for a Square seller.", "x-release-status": "PUBLIC" }, "Snippet": { "type": "object", "required": [ "content" ], "properties": { "id": { "maxLength": 48, "type": "string", "description": "The Square-assigned ID for the snippet.", "x-read-only": true }, "site_id": { "type": "string", "description": "The ID of the site that contains the snippet.", "x-read-only": true }, "content": { "minLength": 1, "maxLength": 65535, "type": "string", "description": "The snippet code, which can contain valid HTML, JavaScript, or both." }, "created_at": { "type": "string", "description": "The timestamp of when the snippet was initially added to the site, in RFC 3339 format.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp of when the snippet was last updated on the site, in RFC 3339 format.", "x-read-only": true } }, "description": "Represents the snippet that is added to a Square Online site. The snippet code is injected into the `head` element of all pages on the site, except for checkout pages.", "x-release-status": "PUBLIC" }, "SnippetResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "snippet": { "$ref": "#/definitions/Snippet", "description": "The snippet." } }, "description": "", "x-release-status": "PUBLIC" }, "SourceApplication": { "type": "object", "properties": { "product": { "type": "string", "description": "__Read only__ The [product](https://developer.squareup.com/reference/square_2024-04-17/enums/Product) type of the application." }, "application_id": { "type": "string", "description": "__Read only__ The Square-assigned ID of the application. This field is used only if the\n[product](https://developer.squareup.com/reference/square_2024-04-17/enums/Product) type is `EXTERNAL_API`." }, "name": { "type": "string", "description": "__Read only__ The display name of the application\n(for example, `\"Custom Application\"` or `\"Square POS 4.74 for Android\"`)." } }, "description": "Represents information about the application used to generate a change.", "x-release-status": "PUBLIC" }, "SquareAccountDetails": { "type": "object", "properties": { "payment_source_token": { "maxLength": 255, "type": "string", "description": "Unique identifier for the payment source used for this payment." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Additional details about Square Account payments.", "x-release-status": "PUBLIC" }, "StandardUnitDescription": { "type": "object", "properties": { "unit": { "$ref": "#/definitions/MeasurementUnit", "description": "Identifies the measurement unit being described." }, "name": { "type": "string", "description": "UI display name of the measurement unit. For example, \u0027Pound\u0027." }, "abbreviation": { "type": "string", "description": "UI display abbreviation for the measurement unit. For example, \u0027lb\u0027." } }, "description": "Contains the name and abbreviation for standard measurement unit.", "x-release-status": "PUBLIC" }, "StandardUnitDescriptionGroup": { "type": "object", "properties": { "standard_unit_descriptions": { "type": "array", "items": { "$ref": "#/definitions/StandardUnitDescription" }, "description": "List of standard (non-custom) measurement units in this description group." }, "language_code": { "type": "string", "description": "IETF language tag." } }, "description": "Group of standard measurement units.", "x-release-status": "PUBLIC" }, "SubmitEvidenceRequest": { "type": "object", "properties": {}, "description": "Defines the parameters for a `SubmitEvidence` request.", "x-release-status": "PUBLIC", "example": { "request_body": {} } }, "SubmitEvidenceResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "dispute": { "$ref": "#/definitions/Dispute", "description": "The `Dispute` for which evidence was submitted." } }, "description": "Defines the fields in a `SubmitEvidence` response.", "x-release-status": "PUBLIC", "example": { "dispute": { "amount_money": { "amount": 4350, "currency": "USD" }, "reason": "CUSTOMER_REQUESTS_CREDIT", "state": "PROCESSING", "due_at": "2022-06-01T00:00:00.000Z", "disputed_payment": { "payment_id": "2yeBUWJzllJTpmnSqtMRAL19taB" }, "card_brand": "VISA", "created_at": "2022-05-18T16:02:15.313Z", "updated_at": "2022-05-18T16:02:15.313Z", "brand_dispute_id": "100000399240", "version": 4, "location_id": "LSY8XKGSMMX94", "id": "EAZoK70gX3fyvibecLwIGB", "reported_at": "2022-05-18T00:00:00.000Z" } } }, "Subscription": { "type": "object", "properties": { "id": { "maxLength": 255, "type": "string", "description": "The Square-assigned ID of the subscription.", "x-read-only": true }, "location_id": { "type": "string", "description": "The ID of the location associated with the subscription.", "x-read-only": true }, "plan_variation_id": { "type": "string", "description": "The ID of the subscribed-to [subscription plan variation](https://developer.squareup.com/reference/square_2024-04-17/objects/CatalogSubscriptionPlanVariation).", "x-read-only": true }, "customer_id": { "type": "string", "description": "The ID of the subscribing [customer](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) profile.", "x-read-only": true }, "start_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to start the subscription.", "x-read-only": true }, "canceled_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel the subscription, \nwhen the subscription status changes to `CANCELED` and the subscription billing stops.\n\nIf this field is not set, the subscription ends according its subscription plan.\n\nThis field cannot be updated, other than being cleared." }, "charged_through_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date up to when the subscriber is invoiced for the\nsubscription.\n\nAfter the invoice is sent for a given billing period,\nthis date will be the last day of the billing period.\nFor example,\nsuppose for the month of May a subscriber gets an invoice\n(or charged the card) on May 1. For the monthly billing scenario,\nthis date is then set to May 31.", "x-read-only": true }, "status": { "type": "string", "description": "The current status of the subscription.", "x-read-only": true }, "tax_percentage": { "type": "string", "description": "The tax amount applied when billing the subscription. The\npercentage is expressed in decimal form, using a `\u0027.\u0027` as the decimal\nseparator and without a `\u0027%\u0027` sign. For example, a value of `7.5`\ncorresponds to 7.5%." }, "invoice_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the [invoices](https://developer.squareup.com/reference/square_2024-04-17/objects/Invoice) created for the\nsubscription, listed in order when the invoices were created\n(newest invoices appear first).", "x-read-only": true }, "price_override_money": { "$ref": "#/definitions/Money", "description": "A custom price which overrides the cost of a subscription plan variation with `STATIC` pricing.\nThis field does not affect itemized subscriptions with `RELATIVE` pricing. Instead, \nyou should edit the Subscription\u0027s [order template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates)." }, "version": { "type": "integer", "format": "int64", "description": "The version of the object. When updating an object, the version\nsupplied must match the version in the database, otherwise the write will\nbe rejected as conflicting." }, "created_at": { "type": "string", "description": "The timestamp when the subscription was created, in RFC 3339 format.", "x-read-only": true }, "card_id": { "type": "string", "description": "The ID of the [subscriber\u0027s](https://developer.squareup.com/reference/square_2024-04-17/objects/Customer) [card](https://developer.squareup.com/reference/square_2024-04-17/objects/Card)\nused to charge for the subscription." }, "timezone": { "type": "string", "description": "Timezone that will be used in date calculations for the subscription.\nDefaults to the timezone of the location based on `location_id`.\nFormat: the IANA Timezone Database identifier for the location timezone (for example, `America/Los_Angeles`).", "x-read-only": true }, "source": { "$ref": "#/definitions/SubscriptionSource", "description": "The origination details of the subscription.", "x-release-status": "BETA", "x-is-beta": true }, "actions": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionAction" }, "description": "The list of scheduled actions on this subscription. It is set only in the response from \n[RetrieveSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/retrieve-subscription) with the query parameter\nof `include\u003dactions` or from \n[SearchSubscriptions](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/search-subscriptions) with the input parameter \nof `include:[\"actions\"]`.", "x-release-status": "BETA", "x-is-beta": true }, "monthly_billing_anchor_date": { "type": "integer", "description": "The day of the month on which the subscription will issue invoices and publish orders.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "phases": { "type": "array", "items": { "$ref": "#/definitions/Phase" }, "description": "array of phases for this subscription", "x-read-only": true } }, "description": "Represents a subscription purchased by a customer.\n\nFor more information, see\n[Manage Subscriptions](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions).", "x-release-status": "PUBLIC" }, "SubscriptionAction": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of an action scoped to a subscription." }, "type": { "type": "string", "description": "The type of the action." }, "effective_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date when the action occurs on the subscription." }, "monthly_billing_anchor_date": { "type": "integer", "description": "The new billing anchor day value, for a `CHANGE_BILLING_ANCHOR_DATE` action." }, "phases": { "type": "array", "items": { "$ref": "#/definitions/Phase" }, "description": "A list of Phases, to pass phase-specific information used in the swap." }, "new_plan_variation_id": { "type": "string", "description": "The target subscription plan variation that a subscription switches to, for a `SWAP_PLAN` action." } }, "description": "Represents an action as a pending change to a subscription.", "x-release-status": "BETA", "x-is-beta": true }, "SubscriptionEvent": { "type": "object", "required": [ "id", "subscription_event_type", "effective_date", "plan_variation_id" ], "properties": { "id": { "type": "string", "description": "The ID of the subscription event." }, "subscription_event_type": { "type": "string", "description": "Type of the subscription event." }, "effective_date": { "type": "string", "description": "The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) when the subscription event occurred." }, "monthly_billing_anchor_date": { "type": "integer", "description": "The day-of-the-month the billing anchor date was changed to, if applicable.", "x-release-status": "BETA", "x-is-beta": true, "x-read-only": true }, "info": { "$ref": "#/definitions/Info", "description": "Additional information about the subscription event." }, "phases": { "type": "array", "items": { "$ref": "#/definitions/Phase" }, "description": "A list of Phases, to pass phase-specific information used in the swap." }, "plan_variation_id": { "type": "string", "description": "The ID of the subscription plan variation associated with the subscription." } }, "description": "Describes changes to a subscription and the subscription status.", "x-release-status": "PUBLIC" }, "SubscriptionEventInfo": { "type": "object", "properties": { "detail": { "type": "string", "description": "A human-readable explanation for the event." }, "code": { "$ref": "#/definitions/InfoCode", "description": "An info code indicating the subscription event that occurred." } }, "description": "Provides information about the subscription event.", "x-release-status": "PUBLIC" }, "SubscriptionPhase": { "type": "object", "required": [ "cadence" ], "properties": { "uid": { "type": "string", "description": "The Square-assigned ID of the subscription phase. This field cannot be changed after a `SubscriptionPhase` is created." }, "cadence": { "type": "string", "description": "The billing cadence of the phase. For example, weekly or monthly. This field cannot be changed after a `SubscriptionPhase` is created." }, "periods": { "type": "integer", "description": "The number of `cadence`s the phase lasts. If not set, the phase never ends. Only the last phase can be indefinite. This field cannot be changed after a `SubscriptionPhase` is created." }, "recurring_price_money": { "$ref": "#/definitions/Money", "description": "The amount to bill for each `cadence`. Failure to specify this field results in a `MISSING_REQUIRED_PARAMETER` error at runtime." }, "ordinal": { "type": "integer", "format": "int64", "description": "The position this phase appears in the sequence of phases defined for the plan, indexed from 0. This field cannot be changed after a `SubscriptionPhase` is created." }, "pricing": { "$ref": "#/definitions/SubscriptionPricing", "description": "The subscription pricing." } }, "description": "Describes a phase in a subscription plan variation. For more information, see [Subscription Plans and Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).", "x-release-status": "PUBLIC" }, "SubscriptionPricing": { "type": "object", "properties": { "type": { "type": "string", "description": "RELATIVE or STATIC" }, "discount_ids": { "type": "array", "items": { "type": "string" }, "description": "The ids of the discount catalog objects" }, "price_money": { "$ref": "#/definitions/Money", "description": "The price of the subscription, if STATIC" } }, "description": "Describes the pricing for the subscription.", "x-release-status": "PUBLIC" }, "SubscriptionSource": { "type": "object", "properties": { "name": { "maxLength": 255, "type": "string", "description": "The name used to identify the place (physical or digital) that\na subscription originates. If unset, the name defaults to the name\nof the application that created the subscription." } }, "description": "The origination details of the subscription.", "x-release-status": "BETA", "x-is-beta": true }, "SubscriptionTestResult": { "type": "object", "properties": { "id": { "maxLength": 64, "type": "string", "description": "A Square-generated unique ID for the subscription test result.", "x-read-only": true }, "status_code": { "type": "integer", "description": "The status code returned by the subscription notification URL." }, "payload": { "type": "string", "description": "An object containing the payload of the test event. For example, a `payment.created` event." }, "created_at": { "type": "string", "description": "The timestamp of when the subscription was created, in RFC 3339 format. \nFor example, \"2016-09-04T23:59:33.123Z\".", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp of when the subscription was updated, in RFC 3339 format. For example, \"2016-09-04T23:59:33.123Z\".\nBecause a subscription test result is unique, this field is the same as the `created_at` field.", "x-read-only": true } }, "description": "Represents the details of a webhook subscription, including notification URL,\nevent types, and signature key.", "x-release-status": "PUBLIC" }, "SwapPlanRequest": { "type": "object", "properties": { "new_plan_variation_id": { "type": "string", "description": "The ID of the new subscription plan variation.\n\nThis field is required." }, "phases": { "type": "array", "items": { "$ref": "#/definitions/PhaseInput" }, "description": "A list of PhaseInputs, to pass phase-specific information used in the swap." } }, "description": "Defines input parameters in a call to the\n[SwapPlan](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/swap-plan) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "new_plan_variation_id": "FQ7CDXXWSLUJRPM3GFJSJGZ7", "phases": [ { "ordinal": 0, "order_template_id": "uhhnjH9osVv3shUADwaC0b3hNxQZY" } ] } } }, "SwapPlanResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The subscription with the updated subscription plan." }, "actions": { "type": "array", "items": { "$ref": "#/definitions/SubscriptionAction" }, "description": "A list of a `SWAP_PLAN` action created by the request." } }, "description": "Defines output parameters in a response of the \n[SwapPlan](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/swap-plan) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "subscription": { "id": "9ba40961-995a-4a3d-8c53-048c40cafc13", "location_id": "S8GWD5R9QB376", "plan_variation_id": "FQ7CDXXWSLUJRPM3GFJSJGZ7", "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G", "status": "ACTIVE", "price_override_money": { "amount": 2000, "currency": "USD" }, "version": 3, "created_at": "2023-06-20T21:53:10Z", "timezone": "America/Los_Angeles", "source": { "name": "My Application" }, "phases": [ { "uid": "98d6f53b-40e1-4714-8827-032fd923be25", "ordinal": 0, "order_template_id": "E6oBY5WfQ2eN4pkYZwq4ka6n7KeZY", "plan_phase_uid": "C66BKH3ASTDYGJJCEZXQQSS7" } ] }, "actions": [ { "id": "f0a1dfdc-675b-3a14-a640-99f7ac1cee83", "type": "SWAP_PLAN", "effective_date": "2023-11-17", "new_plan_variation_id": "FQ7CDXXWSLUJRPM3GFJSJGZ7", "phases": [ { "ordinal": 0, "order_template_id": "uhhnjH9osVv3shUADwaC0b3hNxQZY" } ] } ] } }, "TaxIds": { "type": "object", "properties": { "eu_vat": { "type": "string", "description": "The EU VAT number for this location. For example, `IE3426675K`.\nIf the EU VAT number is present, it is well-formed and has been\nvalidated with VIES, the VAT Information Exchange System.", "x-read-only": true }, "fr_siret": { "type": "string", "description": "The SIRET (Système d\u0027Identification du Répertoire des Entreprises et de leurs Etablissements)\nnumber is a 14-digit code issued by the French INSEE. For example, `39922799000021`.", "x-read-only": true }, "fr_naf": { "type": "string", "description": "The French government uses the NAF (Nomenclature des Activités Françaises) to display and\ntrack economic statistical data. This is also called the APE (Activite Principale de l’Entreprise) code.\nFor example, `6910Z`.", "x-read-only": true }, "es_nif": { "type": "string", "description": "The NIF (Numero de Identificacion Fiscal) number is a nine-character tax identifier used in Spain.\nIf it is present, it has been validated. For example, `73628495A`.", "x-read-only": true }, "jp_qii": { "type": "string", "description": "The QII (Qualified Invoice Issuer) number is a 14-character tax identifier used in Japan.\nFor example, `T1234567890123`.", "x-read-only": true } }, "description": "Identifiers for the location used by various governments for tax purposes.", "x-release-status": "BETA", "x-is-beta": true }, "TeamMember": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique ID for the team member.", "x-read-only": true }, "reference_id": { "type": "string", "description": "A second ID used to associate the team member with an entity in another system." }, "is_owner": { "type": "boolean", "description": "Whether the team member is the owner of the Square account.", "x-read-only": true }, "status": { "type": "string", "description": "Describes the status of the team member." }, "given_name": { "type": "string", "description": "The given name (that is, the first name) associated with the team member." }, "family_name": { "type": "string", "description": "The family name (that is, the last name) associated with the team member." }, "email_address": { "type": "string", "description": "The email address associated with the team member." }, "phone_number": { "type": "string", "description": "The team member\u0027s phone number, in E.164 format. For example:\n+14155552671 - the country code is 1 for US\n+551155256325 - the country code is 55 for BR" }, "created_at": { "type": "string", "description": "The timestamp, in RFC 3339 format, describing when the team member was created.\nFor example, \"2018-10-04T04:00:00-07:00\" or \"2019-02-05T12:00:00Z\".", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp, in RFC 3339 format, describing when the team member was last updated.\nFor example, \"2018-10-04T04:00:00-07:00\" or \"2019-02-05T12:00:00Z\".", "x-read-only": true }, "assigned_locations": { "$ref": "#/definitions/TeamMemberAssignedLocations", "description": "Describes the team member\u0027s assigned locations." } }, "description": "A record representing an individual team member for a business.", "x-release-status": "PUBLIC" }, "TeamMemberAssignedLocations": { "type": "object", "properties": { "assignment_type": { "type": "string", "description": "The current assignment type of the team member." }, "location_ids": { "type": "array", "items": { "type": "string" }, "description": "The explicit locations that the team member is assigned to." } }, "description": "An object that represents a team member\u0027s assignment to locations.", "x-release-status": "PUBLIC" }, "TeamMemberBookingProfile": { "type": "object", "properties": { "team_member_id": { "minLength": 0, "maxLength": 32, "type": "string", "description": "The ID of the [TeamMember](https://developer.squareup.com/reference/square_2024-04-17/objects/TeamMember) object for the team member associated with the booking profile.", "x-read-only": true }, "description": { "minLength": 0, "maxLength": 65536, "type": "string", "description": "The description of the team member.", "x-read-only": true }, "display_name": { "minLength": 0, "maxLength": 512, "type": "string", "description": "The display name of the team member.", "x-read-only": true }, "is_bookable": { "type": "boolean", "description": "Indicates whether the team member can be booked through the Bookings API or the seller\u0027s online booking channel or site (`true`) or not (`false`)." }, "profile_image_url": { "minLength": 0, "maxLength": 2048, "type": "string", "description": "The URL of the team member\u0027s image for the bookings profile.", "x-read-only": true } }, "description": "The booking profile of a seller\u0027s team member, including the team member\u0027s ID, display name, description and whether the team member can be booked as a service provider.", "x-release-status": "PUBLIC" }, "TeamMemberWage": { "type": "object", "properties": { "id": { "type": "string", "description": "The UUID for this object." }, "team_member_id": { "type": "string", "description": "The `TeamMember` that this wage is assigned to." }, "title": { "type": "string", "description": "The job title that this wage relates to." }, "hourly_rate": { "$ref": "#/definitions/Money", "description": "Can be a custom-set hourly wage or the calculated effective hourly\nwage based on the annual wage and hours worked per week." }, "job_id": { "type": "string", "description": "An identifier for the job that this wage relates to. This cannot be\nused to retrieve the job." }, "tip_eligible": { "type": "boolean", "description": "Whether team members are eligible for tips when working this job." } }, "description": "The hourly wage rate that a team member earns on a `Shift` for doing the job\nspecified by the `title` property of this object.", "x-release-status": "PUBLIC" }, "Tender": { "type": "object", "required": [ "type" ], "properties": { "id": { "maxLength": 192, "type": "string", "description": "The tender\u0027s unique ID. It is the associated payment ID." }, "location_id": { "maxLength": 50, "type": "string", "description": "The ID of the transaction\u0027s associated location." }, "transaction_id": { "maxLength": 192, "type": "string", "description": "The ID of the tender\u0027s associated transaction." }, "created_at": { "maxLength": 32, "type": "string", "description": "The timestamp for when the tender was created, in RFC 3339 format.", "x-read-only": true }, "note": { "maxLength": 500, "type": "string", "description": "An optional note associated with the tender at the time of payment." }, "amount_money": { "$ref": "#/definitions/Money", "description": "The total amount of the tender, including `tip_money`. If the tender has a `payment_id`,\nthe `total_money` of the corresponding [Payment](https://developer.squareup.com/reference/square_2024-04-17/objects/Payment) will be equal to the\n`amount_money` of the tender." }, "tip_money": { "$ref": "#/definitions/Money", "description": "The tip\u0027s amount of the tender." }, "processing_fee_money": { "$ref": "#/definitions/Money", "description": "The amount of any Square processing fees applied to the tender.\n\nThis field is not immediately populated when a new transaction is created.\nIt is usually available after about ten seconds." }, "customer_id": { "maxLength": 191, "type": "string", "description": "If the tender is associated with a customer or represents a customer\u0027s card on file,\nthis is the ID of the associated customer." }, "type": { "type": "string", "description": "The type of tender, such as `CARD` or `CASH`." }, "card_details": { "$ref": "#/definitions/TenderCardDetails", "description": "The details of the card tender.\n\nThis value is present only if the value of `type` is `CARD`." }, "cash_details": { "$ref": "#/definitions/TenderCashDetails", "description": "The details of the cash tender.\n\nThis value is present only if the value of `type` is `CASH`." }, "bank_account_details": { "$ref": "#/definitions/TenderBankAccountDetails", "description": "The details of the bank account tender.\n\nThis value is present only if the value of `type` is `BANK_ACCOUNT`." }, "buy_now_pay_later_details": { "$ref": "#/definitions/TenderBuyNowPayLaterDetails", "description": "The details of a Buy Now Pay Later tender.\n\nThis value is present only if the value of `type` is `BUY_NOW_PAY_LATER`." }, "square_account_details": { "$ref": "#/definitions/TenderSquareAccountDetails", "description": "The details of a Square Account tender.\n\nThis value is present only if the value of `type` is `SQUARE_ACCOUNT`." }, "additional_recipients": { "type": "array", "items": { "$ref": "#/definitions/AdditionalRecipient" }, "description": "Additional recipients (other than the merchant) receiving a portion of this tender.\nFor example, fees assessed on the purchase by a third party integration.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "payment_id": { "maxLength": 192, "type": "string", "description": "The ID of the [Payment](https://developer.squareup.com/reference/square_2024-04-17/objects/Payment) that corresponds to this tender.\nThis value is only present for payments created with the v2 Payments API." } }, "description": "Represents a tender (i.e., a method of payment) used in a Square transaction.", "x-release-status": "PUBLIC" }, "TenderBankAccountDetails": { "type": "object", "properties": { "status": { "type": "string", "description": "The bank account payment\u0027s current state.\n\nSee [TenderBankAccountPaymentDetailsStatus](https://developer.squareup.com/reference/square_2024-04-17/enums/TenderBankAccountDetailsStatus) for possible values." } }, "description": "Represents the details of a tender with `type` `BANK_ACCOUNT`.\n\nSee [BankAccountPaymentDetails](https://developer.squareup.com/reference/square_2024-04-17/objects/BankAccountPaymentDetails)\nfor more exposed details of a bank account payment.", "x-release-status": "PUBLIC" }, "TenderBuyNowPayLaterDetails": { "type": "object", "properties": { "buy_now_pay_later_brand": { "type": "string", "description": "The Buy Now Pay Later brand.", "x-read-only": true }, "status": { "type": "string", "description": "The buy now pay later payment\u0027s current state (such as `AUTHORIZED` or\n`CAPTURED`). See [TenderBuyNowPayLaterDetailsStatus](https://developer.squareup.com/reference/square_2024-04-17/enums/TenderBuyNowPayLaterDetailsStatus)\nfor possible values." } }, "description": "Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`.", "x-release-status": "PUBLIC" }, "TenderCardDetails": { "type": "object", "properties": { "status": { "type": "string", "description": "The credit card payment\u0027s current state (such as `AUTHORIZED` or\n`CAPTURED`). See [TenderCardDetailsStatus](https://developer.squareup.com/reference/square_2024-04-17/enums/TenderCardDetailsStatus)\nfor possible values." }, "card": { "$ref": "#/definitions/Card", "description": "The credit card\u0027s non-confidential details." }, "entry_method": { "type": "string", "description": "The method used to enter the card\u0027s details for the transaction." } }, "description": "Represents additional details of a tender with `type` `CARD` or `SQUARE_GIFT_CARD`", "x-release-status": "PUBLIC" }, "TenderCashDetails": { "type": "object", "properties": { "buyer_tendered_money": { "$ref": "#/definitions/Money", "description": "The total amount of cash provided by the buyer, before change is given." }, "change_back_money": { "$ref": "#/definitions/Money", "description": "The amount of change returned to the buyer." } }, "description": "Represents the details of a tender with `type` `CASH`.", "x-release-status": "PUBLIC" }, "TenderSquareAccountDetails": { "type": "object", "properties": { "status": { "type": "string", "description": "The Square Account payment\u0027s current state (such as `AUTHORIZED` or\n`CAPTURED`). See [TenderSquareAccountDetailsStatus](https://developer.squareup.com/reference/square_2024-04-17/enums/TenderSquareAccountDetailsStatus)\nfor possible values." } }, "description": "Represents the details of a tender with `type` `SQUARE_ACCOUNT`.", "x-release-status": "PUBLIC" }, "TerminalAction": { "type": "object", "properties": { "id": { "minLength": 10, "maxLength": 255, "type": "string", "description": "A unique ID for this `TerminalAction`.", "x-read-only": true }, "device_id": { "type": "string", "description": "The unique Id of the device intended for this `TerminalAction`.\nThe Id can be retrieved from /v2/devices api." }, "deadline_duration": { "type": "string", "description": "The duration as an RFC 3339 duration, after which the action will be automatically canceled.\nTerminalActions that are `PENDING` will be automatically `CANCELED` and have a cancellation reason\nof `TIMED_OUT`\n\nDefault: 5 minutes from creation\n\nMaximum: 5 minutes" }, "status": { "type": "string", "description": "The status of the `TerminalAction`.\nOptions: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`", "x-read-only": true }, "cancel_reason": { "type": "string", "description": "The reason why `TerminalAction` is canceled. Present if the status is `CANCELED`.", "x-read-only": true }, "created_at": { "type": "string", "description": "The time when the `TerminalAction` was created as an RFC 3339 timestamp.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The time when the `TerminalAction` was last updated as an RFC 3339 timestamp.", "x-read-only": true }, "app_id": { "type": "string", "description": "The ID of the application that created the action.", "x-read-only": true }, "location_id": { "maxLength": 64, "type": "string", "description": "The location id the action is attached to, if a link can be made.", "x-release-status": "PUBLIC", "x-read-only": true }, "type": { "type": "string", "description": "Represents the type of the action." }, "qr_code_options": { "$ref": "#/definitions/QrCodeOptions", "description": "Describes configuration for the QR code action. Requires `QR_CODE` type." }, "save_card_options": { "$ref": "#/definitions/SaveCardOptions", "description": "Describes configuration for the save-card action. Requires `SAVE_CARD` type." }, "signature_options": { "$ref": "#/definitions/SignatureOptions", "description": "Describes configuration for the signature capture action. Requires `SIGNATURE` type." }, "confirmation_options": { "$ref": "#/definitions/ConfirmationOptions", "description": "Describes configuration for the confirmation action. Requires `CONFIRMATION` type." }, "receipt_options": { "$ref": "#/definitions/ReceiptOptions", "description": "Describes configuration for the receipt action. Requires `RECEIPT` type." }, "data_collection_options": { "$ref": "#/definitions/DataCollectionOptions", "description": "Describes configuration for the data collection action. Requires `DATA_COLLECTION` type." }, "select_options": { "$ref": "#/definitions/SelectOptions", "description": "Describes configuration for the select action. Requires `SELECT` type." }, "device_metadata": { "$ref": "#/definitions/DeviceMetadata", "description": "Details about the Terminal that received the action request (such as battery level,\noperating system version, and network connection settings).\n\nOnly available for `PING` action type.", "x-read-only": true }, "await_next_action": { "type": "boolean", "description": "Indicates the action will be linked to another action and requires a waiting dialog to be\ndisplayed instead of returning to the idle screen on completion of the action.\n\nOnly supported on SIGNATURE, CONFIRMATION, DATA_COLLECTION, and SELECT types." }, "await_next_action_duration": { "type": "string", "description": "The timeout duration of the waiting dialog as an RFC 3339 duration, after which the\nwaiting dialog will no longer be displayed and the Terminal will return to the idle screen.\n\nDefault: 5 minutes from when the waiting dialog is displayed\n\nMaximum: 5 minutes" } }, "description": "Represents an action processed by the Square Terminal.", "x-release-status": "BETA", "x-is-beta": true }, "TerminalActionQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/TerminalActionQueryFilter", "description": "Options for filtering returned `TerminalAction`s" }, "sort": { "$ref": "#/definitions/TerminalActionQuerySort", "description": "Option for sorting returned `TerminalAction` objects." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "query": { "filter": { "status": "COMPLETED" } }, "limit": 2, "include": [ "CUSTOMER" ] } }, "TerminalActionQueryFilter": { "type": "object", "properties": { "device_id": { "type": "string", "description": "`TerminalAction`s associated with a specific device. If no device is specified then all\n`TerminalAction`s for the merchant will be displayed." }, "created_at": { "$ref": "#/definitions/TimeRange", "description": "Time range for the beginning of the reporting period. Inclusive.\nDefault value: The current time minus one day.\nNote that `TerminalAction`s are available for 30 days after creation." }, "status": { "type": "string", "description": "Filter results with the desired status of the `TerminalAction`\nOptions: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`" }, "type": { "type": "string", "description": "Filter results with the requested ActionType." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "TerminalActionQuerySort": { "type": "object", "properties": { "sort_order": { "type": "string", "description": "The order in which results are listed.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default)." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true }, "TerminalCheckout": { "type": "object", "required": [ "amount_money", "device_options" ], "properties": { "id": { "minLength": 10, "maxLength": 255, "type": "string", "description": "A unique ID for this `TerminalCheckout`.", "x-read-only": true }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money (including the tax amount) that the Square Terminal device should try to collect." }, "reference_id": { "maxLength": 40, "type": "string", "description": "An optional user-defined reference ID that can be used to associate\nthis `TerminalCheckout` to another entity in an external system. For example, an order\nID generated by a third-party shopping cart. The ID is also associated with any payments\nused to complete the checkout." }, "note": { "maxLength": 500, "type": "string", "description": "An optional note to associate with the checkout, as well as with any payments used to complete the checkout.\nNote: maximum 500 characters" }, "order_id": { "type": "string", "description": "The reference to the Square order ID for the checkout request. Supported only in the US." }, "payment_options": { "$ref": "#/definitions/PaymentOptions", "description": "Payment-specific options for the checkout request. Supported only in the US." }, "device_options": { "$ref": "#/definitions/DeviceCheckoutOptions", "description": "Options to control the display and behavior of the Square Terminal device." }, "deadline_duration": { "type": "string", "description": "An RFC 3339 duration, after which the checkout is automatically canceled.\nA `TerminalCheckout` that is `PENDING` is automatically `CANCELED` and has a cancellation reason\nof `TIMED_OUT`.\n\nDefault: 5 minutes from creation\n\nMaximum: 5 minutes", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "status": { "type": "string", "description": "The status of the `TerminalCheckout`.\nOptions: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`", "x-read-only": true }, "cancel_reason": { "type": "string", "description": "The reason why `TerminalCheckout` is canceled. Present if the status is `CANCELED`.", "x-read-only": true }, "payment_ids": { "type": "array", "items": { "type": "string" }, "description": "A list of IDs for payments created by this `TerminalCheckout`.", "x-read-only": true }, "created_at": { "type": "string", "description": "The time when the `TerminalCheckout` was created, as an RFC 3339 timestamp.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The time when the `TerminalCheckout` was last updated, as an RFC 3339 timestamp.", "x-read-only": true }, "app_id": { "type": "string", "description": "The ID of the application that created the checkout.", "x-read-only": true }, "location_id": { "maxLength": 64, "type": "string", "description": "The location of the device where the `TerminalCheckout` was directed.", "x-read-only": true }, "payment_type": { "type": "string", "description": "The type of payment the terminal should attempt to capture from. Defaults to `CARD_PRESENT`." }, "team_member_id": { "type": "string", "description": "An optional ID of the team member associated with creating the checkout.", "x-release-status": "BETA", "x-is-beta": true }, "customer_id": { "type": "string", "description": "An optional ID of the customer associated with the checkout." }, "app_fee_money": { "$ref": "#/definitions/Money", "description": "The amount the developer is taking as a fee for facilitating the payment on behalf\nof the seller.\n\nThe amount cannot be more than 90% of the total amount of the payment.\n\nThe amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).\n\nThe fee currency code must match the currency associated with the seller that is accepting the payment. The application must be from a developer account in the same country and using the same currency code as the seller.\n\nFor more information about the application fee scenario, see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).\n\nTo set this field, PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions).\n\nSupported only in the US." }, "statement_description_identifier": { "maxLength": 20, "type": "string", "description": "Optional additional payment information to include on the customer\u0027s card statement as\npart of the statement description. This can be, for example, an invoice number, ticket number,\nor short description that uniquely identifies the purchase. Supported only in the US.", "x-release-status": "BETA", "x-is-beta": true }, "tip_money": { "$ref": "#/definitions/Money", "description": "The amount designated as a tip, in addition to `amount_money`. This may only be set for a\ncheckout that has tipping disabled (`tip_settings.allow_tipping` is `false`). Supported only in\nthe US.", "x-release-status": "BETA", "x-is-beta": true } }, "description": "Represents a checkout processed by the Square Terminal.", "x-release-status": "PUBLIC" }, "TerminalCheckoutQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/TerminalCheckoutQueryFilter", "description": "Options for filtering returned `TerminalCheckout` objects." }, "sort": { "$ref": "#/definitions/TerminalCheckoutQuerySort", "description": "Option for sorting returned `TerminalCheckout` objects." } }, "description": "", "x-release-status": "PUBLIC" }, "TerminalCheckoutQueryFilter": { "type": "object", "properties": { "device_id": { "type": "string", "description": "The `TerminalCheckout` objects associated with a specific device. If no device is specified, then all\n`TerminalCheckout` objects for the merchant are displayed." }, "created_at": { "$ref": "#/definitions/TimeRange", "description": "The time range for the beginning of the reporting period, which is inclusive.\nDefault value: The current time minus one day.\nNote that `TerminalCheckout`s are available for 30 days after creation." }, "status": { "type": "string", "description": "Filtered results with the desired status of the `TerminalCheckout`.\nOptions: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`" } }, "description": "", "x-release-status": "PUBLIC" }, "TerminalCheckoutQuerySort": { "type": "object", "properties": { "sort_order": { "type": "string", "description": "The order in which results are listed.\nDefault: `DESC`" } }, "description": "", "x-release-status": "PUBLIC" }, "TerminalRefund": { "type": "object", "required": [ "payment_id", "amount_money", "reason", "device_id" ], "properties": { "id": { "minLength": 10, "maxLength": 255, "type": "string", "description": "A unique ID for this `TerminalRefund`.", "x-read-only": true }, "refund_id": { "type": "string", "description": "The reference to the payment refund created by completing this `TerminalRefund`.", "x-read-only": true }, "payment_id": { "minLength": 1, "type": "string", "description": "The unique ID of the payment being refunded." }, "order_id": { "type": "string", "description": "The reference to the Square order ID for the payment identified by the `payment_id`.", "x-read-only": true }, "amount_money": { "$ref": "#/definitions/Money", "description": "The amount of money, inclusive of `tax_money`, that the `TerminalRefund` should return.\nThis value is limited to the amount taken in the original payment minus any completed or\npending refunds." }, "reason": { "maxLength": 192, "type": "string", "description": "A description of the reason for the refund." }, "device_id": { "type": "string", "description": "The unique ID of the device intended for this `TerminalRefund`.\nThe Id can be retrieved from /v2/devices api." }, "deadline_duration": { "type": "string", "description": "The RFC 3339 duration, after which the refund is automatically canceled.\nA `TerminalRefund` that is `PENDING` is automatically `CANCELED` and has a cancellation reason\nof `TIMED_OUT`.\n\nDefault: 5 minutes from creation.\n\nMaximum: 5 minutes" }, "status": { "type": "string", "description": "The status of the `TerminalRefund`.\nOptions: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or `COMPLETED`.", "x-read-only": true }, "cancel_reason": { "type": "string", "description": "Present if the status is `CANCELED`.", "x-read-only": true }, "created_at": { "type": "string", "description": "The time when the `TerminalRefund` was created, as an RFC 3339 timestamp.", "x-read-only": true }, "updated_at": { "type": "string", "description": "The time when the `TerminalRefund` was last updated, as an RFC 3339 timestamp.", "x-read-only": true }, "app_id": { "type": "string", "description": "The ID of the application that created the refund.", "x-read-only": true }, "location_id": { "maxLength": 64, "type": "string", "description": "The location of the device where the `TerminalRefund` was directed.", "x-read-only": true } }, "description": "Represents a payment refund processed by the Square Terminal. Only supports Interac (Canadian debit network) payment refunds.", "x-release-status": "PUBLIC" }, "TerminalRefundQuery": { "type": "object", "properties": { "filter": { "$ref": "#/definitions/TerminalRefundQueryFilter", "description": "The filter for the Terminal refund query." }, "sort": { "$ref": "#/definitions/TerminalRefundQuerySort", "description": "The sort order for the Terminal refund query." } }, "description": "", "x-release-status": "PUBLIC" }, "TerminalRefundQueryFilter": { "type": "object", "properties": { "device_id": { "type": "string", "description": "`TerminalRefund` objects associated with a specific device. If no device is specified, then all\n`TerminalRefund` objects for the signed-in account are displayed." }, "created_at": { "$ref": "#/definitions/TimeRange", "description": "The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive.\nDefault value: The current time minus one day.\nNote that `TerminalRefund`s are available for 30 days after creation." }, "status": { "type": "string", "description": "Filtered results with the desired status of the `TerminalRefund`.\nOptions: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or `COMPLETED`." } }, "description": "", "x-release-status": "PUBLIC" }, "TerminalRefundQuerySort": { "type": "object", "properties": { "sort_order": { "type": "string", "description": "The order in which results are listed.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default)." } }, "description": "", "x-release-status": "PUBLIC" }, "TestWebhookSubscriptionRequest": { "type": "object", "properties": { "event_type": { "type": "string", "description": "The event type that will be used to test the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription). The event type must be\ncontained in the list of event types in the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)." } }, "description": "Tests a [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) by sending a test event to its notification URL.", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/webhooks/subscriptions/wbhk_b35f6b3145074cf9ad513610786c19d5/test", "request_body": { "event_type": "payment.created" } } }, "TestWebhookSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "subscription_test_result": { "$ref": "#/definitions/SubscriptionTestResult", "description": "The [SubscriptionTestResult](https://developer.squareup.com/reference/square_2024-04-17/objects/SubscriptionTestResult)." } }, "description": "Defines the fields that are included in the response body of\na request to the [TestWebhookSubscription](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/test-webhook-subscription) endpoint.\n\nNote: If there are errors processing the request, the [SubscriptionTestResult](https://developer.squareup.com/reference/square_2024-04-17/objects/SubscriptionTestResult) field is not\npresent.", "x-release-status": "PUBLIC", "example": { "subscription_test_result": { "id": "23eed5a9-2b12-403e-b212-7e2889aea0f6", "status_code": 404, "payload": "{\"merchant_id\":\"1ZYMKZY1YFGBW\",\"type\":\"payment.created\",\"event_id\":\"23eed5a9-2b12-403e-b212-7e2889aea0f6\",\"created_at\":\"2022-01-11T00:06:48.322945116Z\",\"data\":{\"type\":\"payment\",\"id\":\"KkAkhdMsgzn59SM8A89WgKwekxLZY\",\"object\":{\"payment\":{\"amount_money\":{\"amount\":100,\"currency\":\"USD\"},\"approved_money\":{\"amount\":100,\"currency\":\"USD\"},\"capabilities\":[\"EDIT_TIP_AMOUNT\",\"EDIT_TIP_AMOUNT_UP\",\"EDIT_TIP_AMOUNT_DOWN\"],\"card_details\":{\"avs_status\":\"AVS_ACCEPTED\",\"card\":{\"bin\":\"540988\",\"card_brand\":\"MASTERCARD\",\"card_type\":\"CREDIT\",\"exp_month\":11,\"exp_year\":2022,\"fingerprint\":\"sq-1-Tvruf3vPQxlvI6n0IcKYfBukrcv6IqWr8UyBdViWXU2yzGn5VMJvrsHMKpINMhPmVg\",\"last_4\":\"9029\",\"prepaid_type\":\"NOT_PREPAID\"},\"card_payment_timeline\":{\"authorized_at\":\"2020-11-22T21:16:51.198Z\"},\"cvv_status\":\"CVV_ACCEPTED\",\"entry_method\":\"KEYED\",\"statement_description\":\"SQ *DEFAULT TEST ACCOUNT\",\"status\":\"AUTHORIZED\"},\"created_at\":\"2020-11-22T21:16:51.086Z\",\"delay_action\":\"CANCEL\",\"delay_duration\":\"PT168H\",\"delayed_until\":\"2020-11-29T21:16:51.086Z\",\"id\":\"hYy9pRFVxpDsO1FB05SunFWUe9JZY\",\"location_id\":\"S8GWD5R9QB376\",\"order_id\":\"03O3USaPaAaFnI6kkwB1JxGgBsUZY\",\"receipt_number\":\"hYy9\",\"risk_evaluation\":{\"created_at\":\"2020-11-22T21:16:51.198Z\",\"risk_level\":\"NORMAL\"},\"source_type\":\"CARD\",\"status\":\"APPROVED\",\"total_money\":{\"amount\":100,\"currency\":\"USD\"},\"updated_at\":\"2020-11-22T21:16:51.198Z\",\"version_token\":\"FfQhQJf9r3VSQIgyWBk1oqhIwiznLwVwJbVVA0bdyEv6o\"}}}}", "created_at": "2022-01-11 00:06:48.322945116 +0000 UTC m\u003d+3863.054453746", "updated_at": "2022-01-11 00:06:48.322945116 +0000 UTC m\u003d+3863.054453746" } } }, "TimeRange": { "type": "object", "properties": { "start_at": { "type": "string", "description": "A datetime value in RFC 3339 format indicating when the time range\nstarts." }, "end_at": { "type": "string", "description": "A datetime value in RFC 3339 format indicating when the time range\nends." } }, "description": "Represents a generic time range. The start and end values are\nrepresented in RFC 3339 format. Time ranges are customized to be\ninclusive or exclusive based on the needs of a particular endpoint.\nRefer to the relevant endpoint-specific documentation to determine\nhow time ranges are handled.", "x-release-status": "PUBLIC" }, "TipSettings": { "type": "object", "properties": { "allow_tipping": { "type": "boolean", "description": "Indicates whether tipping is enabled for this checkout. Defaults to false." }, "separate_tip_screen": { "type": "boolean", "description": "Indicates whether tip options should be presented on the screen before presenting\nthe signature screen during card payment. Defaults to false." }, "custom_tip_field": { "type": "boolean", "description": "Indicates whether custom tip amounts are allowed during the checkout flow. Defaults to false." }, "tip_percentages": { "type": "array", "items": { "type": "integer" }, "description": "A list of tip percentages that should be presented during the checkout flow, specified as\nup to 3 non-negative integers from 0 to 100 (inclusive). Defaults to 15, 20, and 25." }, "smart_tipping": { "type": "boolean", "description": "Enables the \"Smart Tip Amounts\" behavior.\nExact tipping options depend on the region in which the Square seller is active.\n\nFor payments under 10.00, in the Australia, Canada, Ireland, United Kingdom, and United States, tipping options are presented as no tip, .50, 1.00 or 2.00.\n\nFor payment amounts of 10.00 or greater, tipping options are presented as the following percentages: 0%, 5%, 10%, 15%.\n\nIf set to true, the `tip_percentages` settings is ignored.\nDefaults to false.\n\nTo learn more about smart tipping, see [Accept Tips with the Square App](https://squareup.com/help/us/en/article/5069-accept-tips-with-the-square-app)." } }, "description": "", "x-release-status": "PUBLIC" }, "Transaction": { "type": "object", "properties": { "id": { "maxLength": 192, "type": "string", "description": "The transaction\u0027s unique ID, issued by Square payments servers." }, "location_id": { "maxLength": 50, "type": "string", "description": "The ID of the transaction\u0027s associated location." }, "created_at": { "maxLength": 32, "type": "string", "description": "The timestamp for when the transaction was created, in RFC 3339 format." }, "tenders": { "type": "array", "items": { "$ref": "#/definitions/Tender" }, "description": "The tenders used to pay in the transaction." }, "refunds": { "type": "array", "items": { "$ref": "#/definitions/Refund" }, "description": "Refunds that have been applied to any tender in the transaction." }, "reference_id": { "maxLength": 40, "type": "string", "description": "If the transaction was created with the [Charge](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/charge)\nendpoint, this value is the same as the value provided for the `reference_id`\nparameter in the request to that endpoint. Otherwise, it is not set." }, "product": { "type": "string", "description": "The Square product that processed the transaction." }, "client_id": { "maxLength": 192, "type": "string", "description": "If the transaction was created in the Square Point of Sale app, this value\nis the ID generated for the transaction by Square Point of Sale.\n\nThis ID has no relationship to the transaction\u0027s canonical `id`, which is\ngenerated by Square\u0027s backend servers. This value is generated for bookkeeping\npurposes, in case the transaction cannot immediately be completed (for example,\nif the transaction is processed in offline mode).\n\nIt is not currently possible with the Connect API to perform a transaction\nlookup by this value." }, "shipping_address": { "$ref": "#/definitions/Address", "description": "The shipping address provided in the request, if any." }, "order_id": { "maxLength": 192, "type": "string", "description": "The order_id is an identifier for the order associated with this transaction, if any." } }, "description": "Represents a transaction processed with Square, either with the\nConnect API or with Square Point of Sale.\n\nThe `tenders` field of this object lists all methods of payment used to pay in\nthe transaction.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "UnlinkCustomerFromGiftCardRequest": { "type": "object", "required": [ "customer_id" ], "properties": { "customer_id": { "minLength": 1, "maxLength": 191, "type": "string", "description": "The ID of the customer to unlink from the gift card." } }, "description": "A request to unlink a customer from a gift card.", "x-release-status": "PUBLIC", "example": { "request_params": "?gift_card_id\u003dgftc:71ea002277a34f8a945e284b04822edb", "request_body": { "customer_id": "GKY0FZ3V717AH8Q2D821PNT2ZW" } } }, "UnlinkCustomerFromGiftCardResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "gift_card": { "$ref": "#/definitions/GiftCard", "description": "The gift card with the ID of the unlinked customer removed from the `customer_ids` field. \nIf no other customers are linked, the `customer_ids` field is also removed." } }, "description": "A response that contains the unlinked `GiftCard` object. If the request resulted in errors, \nthe response contains a set of `Error` objects.", "x-release-status": "PUBLIC", "example": { "gift_card": { "id": "gftc:71ea002277a34f8a945e284b04822edb", "type": "DIGITAL", "gan_source": "SQUARE", "state": "ACTIVE", "balance_money": { "amount": 2500, "currency": "USD" }, "gan": "7783320005440920", "created_at": "2021-03-25T05:13:01Z" } } }, "UpdateBookingCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition that contains the fields to update. Only the following fields can be updated:\n- `name`\n- `description`\n- `visibility`\n- `schema` for a `Selection` data type. Only changes to the named options or the maximum number of allowed\nselections are supported.\n\nFor more information, see\n[Updatable definition fields](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields).\n\nTo enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include the optional `version` field and specify the current version of the custom attribute definition." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an [UpdateBookingCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/update-booking-custom-attribute-definition) request.", "x-release-status": "PUBLIC", "example": { "pathParameters": { "booking_id": "Z57QXKM2FGXEQDV42W8RBZY7BR", "key": "favoriteShampoo" }, "bodyParams": { "custom_attribute_definition": { "visibility": "VISIBILITY_READ_ONLY", "description": "Update the description as desired." } } } }, "UpdateBookingCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The updated custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents an [UpdateBookingCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/update-booking-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definition": { "key": "favoriteShampoo", "name": "Favorite shampoo", "description": "Update the description as desired.", "version": 2, "updated_at": "2022-11-16T15:39:38Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-11-16T15:27:30Z", "visibility": "VISIBILITY_READ_ONLY" }, "errors": [] } }, "UpdateBookingRequest": { "type": "object", "required": [ "booking" ], "properties": { "idempotency_key": { "minLength": 0, "maxLength": 255, "type": "string", "description": "A unique key to make this request an idempotent operation." }, "booking": { "$ref": "#/definitions/Booking", "description": "The booking to be updated. Individual attributes explicitly specified here override the corresponding values of the existing booking." } }, "description": "", "x-release-status": "PUBLIC", "example": { "booking": { "version": 1, "customer_note": "I would like to sit near the window please" } } }, "UpdateBookingResponse": { "type": "object", "properties": { "booking": { "$ref": "#/definitions/Booking", "description": "The booking that was updated." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors that occurred during the request." } }, "description": "", "x-release-status": "PUBLIC", "example": { "booking": { "id": "zkras0xv0xwswx", "version": 2, "status": "ACCEPTED", "created_at": "2020-10-28T15:47:41Z", "updated_at": "2020-10-28T15:49:25Z", "location_id": "LEQHH0YY8B42M", "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M", "customer_note": "I would like to sit near the window please", "seller_note": "", "start_at": "2020-11-26T13:00:00Z", "appointment_segments": [ { "duration_minutes": 60, "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC", "team_member_id": "TMXUrsBWWcHTt79t", "service_variation_version": 1599775456731 } ] }, "errors": [] } }, "UpdateBreakTypeRequest": { "type": "object", "required": [ "break_type" ], "properties": { "break_type": { "$ref": "#/definitions/BreakType", "description": "The updated `BreakType`." } }, "description": "A request to update a `BreakType`.", "x-release-status": "PUBLIC", "example": { "request_body": { "break_type": { "location_id": "26M7H24AZ9N6R", "break_name": "Lunch", "expected_duration": "PT50M", "is_paid": true, "version": 1 } } } }, "UpdateBreakTypeResponse": { "type": "object", "properties": { "break_type": { "$ref": "#/definitions/BreakType", "description": "The response object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "A response to a request to update a `BreakType`. The response contains\nthe requested `BreakType` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "break_type": { "id": "Q6JSJS6D4DBCH", "location_id": "26M7H24AZ9N6R", "break_name": "Lunch", "expected_duration": "PT50M", "is_paid": true, "version": 2, "created_at": "2018-06-12T20:19:12Z", "updated_at": "2019-02-26T23:12:59Z" } } }, "UpdateCustomerCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition that contains the fields to update. This endpoint\nsupports sparse updates, so only new or changed fields need to be included in the request.\nOnly the following fields can be updated:\n\n- `name`\n- `description`\n- `visibility`\n- `schema` for a `Selection` data type. Only changes to the named options or the maximum number of allowed\nselections are supported.\n\nFor more information, see\n[Updatable definition fields](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields).\n\nTo enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) \ncontrol, include the optional `version` field and specify the current version of the custom attribute definition." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an [UpdateCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/update-customer-custom-attribute-definition) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?key\u003dfavoritemovie", "request_body": { "custom_attribute_definition": { "visibility": "VISIBILITY_READ_ONLY", "description": "Update the description as desired." } } } }, "UpdateCustomerCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The updated custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents an [UpdateCustomerCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/update-customer-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute_definition": { "key": "favoritemovie", "name": "Favorite Movie", "description": "Update the description as desired.", "version": 2, "updated_at": "2022-04-26T15:39:38Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-04-26T15:27:30Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "UpdateCustomerGroupRequest": { "type": "object", "required": [ "group" ], "properties": { "group": { "$ref": "#/definitions/CustomerGroup", "description": "The `CustomerGroup` object including all the updates you want to make." } }, "description": "Defines the body parameters that can be included in a request to the\n[UpdateCustomerGroup](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/update-customer-group) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "group": { "name": "Loyal Customers" } } } }, "UpdateCustomerGroupResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "group": { "$ref": "#/definitions/CustomerGroup", "description": "The successfully updated customer group." } }, "description": "Defines the fields that are included in the response body of\na request to the [UpdateCustomerGroup](https://developer.squareup.com/reference/square_2024-04-17/customer-groups-api/update-customer-group) endpoint.\n\nEither `errors` or `group` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "group": { "id": "2TAT3CMH4Q0A9M87XJZED0WMR3", "name": "Loyal Customers", "created_at": "2020-04-13T21:54:57.863Z", "updated_at": "2020-04-13T21:54:58Z" } } }, "UpdateCustomerRequest": { "type": "object", "properties": { "given_name": { "type": "string", "description": "The given name (that is, the first name) associated with the customer profile.\n\nThe maximum length for this value is 300 characters." }, "family_name": { "type": "string", "description": "The family name (that is, the last name) associated with the customer profile.\n\nThe maximum length for this value is 300 characters." }, "company_name": { "type": "string", "description": "A business name associated with the customer profile.\n\nThe maximum length for this value is 500 characters." }, "nickname": { "type": "string", "description": "A nickname for the customer profile.\n\nThe maximum length for this value is 100 characters." }, "email_address": { "type": "string", "description": "The email address associated with the customer profile.\n\nThe maximum length for this value is 254 characters." }, "address": { "$ref": "#/definitions/Address", "description": "The physical address associated with the customer profile. Only new or changed fields are required in the request.\n\nFor maximum length constraints, see [Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address).\nThe `first_name` and `last_name` fields are ignored if they are present in the request." }, "phone_number": { "type": "string", "description": "The phone number associated with the customer profile. The phone number must be valid and can contain\n9–16 digits, with an optional `+` prefix and country code. For more information, see\n[Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number)." }, "reference_id": { "type": "string", "description": "An optional second ID used to associate the customer profile with an\nentity in another system.\n\nThe maximum length for this value is 100 characters." }, "note": { "type": "string", "description": "A custom note associated with the customer profile." }, "birthday": { "type": "string", "description": "The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format. For example,\nspecify `1998-09-21` for September 21, 1998, or `09-21` for September 21. Birthdays are returned in `YYYY-MM-DD`\nformat, where `YYYY` is the specified birth year or `0000` if a birth year is not specified." }, "version": { "type": "integer", "format": "int64", "description": "The current version of the customer profile.\n\nAs a best practice, you should include this field to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control. For more information, see [Update a customer profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#update-a-customer-profile)." }, "tax_ids": { "$ref": "#/definitions/CustomerTaxIds", "description": "The tax ID associated with the customer profile. This field is available only for customers of sellers\nin EU countries or the United Kingdom. For more information,\nsee [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids)." } }, "description": "Defines the body parameters that can be included in a request to the\n`UpdateCustomer` endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "phone_number": null, "email_address": "New.Amelia.Earhart@example.com", "note": "updated customer note", "version": 2 } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/UpdateCustomer/UpdateCustomerRequest.python", "csharp": "/sdk_samples/UpdateCustomer/UpdateCustomerRequest.csharp", "java": "/sdk_samples/UpdateCustomer/UpdateCustomerRequest.java", "php": "/sdk_samples/UpdateCustomer/UpdateCustomerRequest.php", "javascript": "/sdk_samples/UpdateCustomer/UpdateCustomerRequest.javascript", "ruby": "/sdk_samples/UpdateCustomer/UpdateCustomerRequest.ruby" } }, "UpdateCustomerResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "customer": { "$ref": "#/definitions/Customer", "description": "The updated customer." } }, "description": "Defines the fields that are included in the response body of\na request to the [UpdateCustomer](https://developer.squareup.com/reference/square_2024-04-17/customers-api/update-customer) or\n[BulkUpdateCustomers](https://developer.squareup.com/reference/square_2024-04-17/customers-api/bulk-update-customers) endpoint.\n\nEither `errors` or `customer` is present in a given response (never both).", "x-release-status": "PUBLIC", "example": { "customer": { "id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2016-03-23T20:21:54.859Z", "updated_at": "2016-05-15T20:21:55Z", "given_name": "Amelia", "family_name": "Earhart", "email_address": "New.Amelia.Earhart@example.com", "address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "reference_id": "YOUR_REFERENCE_ID", "note": "updated customer note", "preferences": { "email_unsubscribed": false }, "creation_source": "THIRD_PARTY", "version": 3 } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/UpdateCustomer/UpdateCustomerResponse.python", "csharp": "/sdk_samples/UpdateCustomer/UpdateCustomerResponse.csharp", "java": "/sdk_samples/UpdateCustomer/UpdateCustomerResponse.java", "php": "/sdk_samples/UpdateCustomer/UpdateCustomerResponse.php", "javascript": "/sdk_samples/UpdateCustomer/UpdateCustomerResponse.javascript", "ruby": "/sdk_samples/UpdateCustomer/UpdateCustomerResponse.ruby" } }, "UpdateInvoiceRequest": { "type": "object", "required": [ "invoice", "fields_to_clear" ], "properties": { "invoice": { "$ref": "#/definitions/Invoice", "description": "The invoice fields to update. \nThe current invoice version must be specified in the `version` field. For more information,\nsee [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices)." }, "idempotency_key": { "maxLength": 128, "type": "string", "description": "A unique string that identifies the `UpdateInvoice` request. If you do not\nprovide `idempotency_key` (or provide an empty string as the value), the endpoint\ntreats each request as independent.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." }, "fields_to_clear": { "type": "array", "items": { "minLength": 1, "type": "string" }, "description": "The list of fields to clear.\nFor examples, see [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices)." } }, "description": "Describes a `UpdateInvoice` request.", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "4ee82288-0910-499e-ab4c-5d0071dad1be", "invoice": { "payment_requests": [ { "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355", "tipping_enabled": false } ], "version": 1 }, "fields_to_clear": [ "payments_requests[2da7964f-f3d2-4f43-81e8-5aa220bf3355].reminders" ] } } }, "UpdateInvoiceResponse": { "type": "object", "properties": { "invoice": { "$ref": "#/definitions/Invoice", "description": "The updated invoice." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." } }, "description": "Describes a `UpdateInvoice` response.", "x-release-status": "PUBLIC", "example": { "invoice": { "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", "version": 2, "location_id": "ES0RJRZYEC39A", "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", "payment_requests": [ { "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355", "request_type": "BALANCE", "due_date": "2030-01-24", "tipping_enabled": false, "computed_amount_money": { "amount": 10000, "currency": "USD" }, "total_completed_amount_money": { "amount": 0, "currency": "USD" }, "automatic_payment_source": "NONE" } ], "invoice_number": "inv-100", "title": "Event Planning Services", "description": "We appreciate your business!", "scheduled_at": "2030-01-13T10:00:00Z", "status": "UNPAID", "timezone": "America/Los_Angeles", "created_at": "2020-06-18T17:45:13Z", "updated_at": "2020-06-18T18:23:11Z", "primary_recipient": { "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", "given_name": "Amelia", "family_name": "Earhart", "email_address": "Amelia.Earhart@example.com", "phone_number": "1-212-555-4240" }, "next_payment_amount_money": { "amount": 10000, "currency": "USD" }, "accepted_payment_methods": { "card": true, "square_gift_card": false, "bank_account": false, "buy_now_pay_later": false, "cash_app_pay": false }, "custom_fields": [ { "label": "Event Reference Number", "value": "Ref. #1234", "placement": "ABOVE_LINE_ITEMS" }, { "label": "Terms of Service", "value": "The terms of service are...", "placement": "BELOW_LINE_ITEMS" } ], "delivery_method": "EMAIL", "sale_or_service_date": "2030-01-24", "store_payment_method_enabled": false } } }, "UpdateItemModifierListsRequest": { "type": "object", "required": [ "item_ids" ], "properties": { "item_ids": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the catalog items associated with the CatalogModifierList objects being updated." }, "modifier_lists_to_enable": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the CatalogModifierList objects to enable for the CatalogItem.\nAt least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified." }, "modifier_lists_to_disable": { "type": "array", "items": { "type": "string" }, "description": "The IDs of the CatalogModifierList objects to disable for the CatalogItem.\nAt least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "item_ids": [ "H42BRLUJ5KTZTTMPVSLFAACQ", "2JXOBJIHCWBQ4NZ3RIXQGJA6" ], "modifier_lists_to_enable": [ "H42BRLUJ5KTZTTMPVSLFAACQ", "2JXOBJIHCWBQ4NZ3RIXQGJA6" ], "modifier_lists_to_disable": [ "7WRC16CJZDVLSNDQ35PP6YAD" ] } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsRequest.python", "csharp": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsRequest.csharp", "java": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsRequest.java", "php": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsRequest.php", "javascript": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsRequest.javascript", "ruby": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsRequest.ruby" } }, "UpdateItemModifierListsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "updated_at": { "type": "string", "description": "The database [timestamp](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "updated_at": "2016-11-16T22:25:24.878Z" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsResponse.python", "csharp": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsResponse.csharp", "java": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsResponse.java", "php": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsResponse.php", "javascript": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsResponse.javascript", "ruby": "/sdk_samples/Catalog/UpdateItemModifierLists/UpdateItemModifierListsResponse.ruby" } }, "UpdateItemTaxesRequest": { "type": "object", "required": [ "item_ids" ], "properties": { "item_ids": { "type": "array", "items": { "type": "string" }, "description": "IDs for the CatalogItems associated with the CatalogTax objects being updated.\nNo more than 1,000 IDs may be provided." }, "taxes_to_enable": { "type": "array", "items": { "type": "string" }, "description": "IDs of the CatalogTax objects to enable.\nAt least one of `taxes_to_enable` or `taxes_to_disable` must be specified." }, "taxes_to_disable": { "type": "array", "items": { "type": "string" }, "description": "IDs of the CatalogTax objects to disable.\nAt least one of `taxes_to_enable` or `taxes_to_disable` must be specified." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "item_ids": [ "H42BRLUJ5KTZTTMPVSLFAACQ", "2JXOBJIHCWBQ4NZ3RIXQGJA6" ], "taxes_to_enable": [ "4WRCNHCJZDVLSNDQ35PP6YAD" ], "taxes_to_disable": [ "AQCEGCEBBQONINDOHRGZISEX" ] } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesRequest.python", "csharp": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesRequest.csharp", "java": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesRequest.java", "php": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesRequest.php", "javascript": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesRequest.javascript", "ruby": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesRequest.ruby" } }, "UpdateItemTaxesResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "updated_at": { "type": "string", "description": "The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`." } }, "description": "", "x-release-status": "PUBLIC", "example": { "updated_at": "2016-11-16T22:25:24.878Z" }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesResponse.python", "csharp": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesResponse.csharp", "java": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesResponse.java", "php": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesResponse.php", "javascript": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesResponse.javascript", "ruby": "/sdk_samples/Catalog/UpdateItemTaxes/UpdateItemTaxesResponse.ruby" } }, "UpdateLocationCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition that contains the fields to update. This endpoint\nsupports sparse updates, so only new or changed fields need to be included in the request.\nOnly the following fields can be updated:\n- `name`\n- `description`\n- `visibility`\n- `schema` for a `Selection` data type. Only changes to the named options or the maximum number of allowed\nselections are supported.\n\nFor more information, see\n[Update a location custom attribute definition](https://developer.squareup.com/docs/location-custom-attributes-api/custom-attribute-definitions#update-custom-attribute-definition).\nTo enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, specify the current version of the custom attribute definition. \nIf this is not important for your application, `version` can be set to -1." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an [UpdateLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/update-location-custom-attribute-definition) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?key\u003dbestseller", "request_body": { "custom_attribute_definition": { "visibility": "VISIBILITY_READ_ONLY", "description": "Update the description as desired." } } } }, "UpdateLocationCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The updated custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents an [UpdateLocationCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/update-location-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "bestseller", "name": "Bestseller", "description": "Update the description as desired.", "version": 2, "updated_at": "2022-12-02T19:34:10.181Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2022-12-02T19:06:36.559Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "UpdateLocationRequest": { "type": "object", "properties": { "location": { "$ref": "#/definitions/Location", "description": "The `Location` object with only the fields to update." } }, "description": "The request object for the [UpdateLocation](https://developer.squareup.com/reference/square_2024-04-17/locations-api/update-location) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "location": { "description": "Midtown Atlanta store - Open weekends", "business_hours": { "periods": [ { "day_of_week": "FRI", "start_local_time": "07:00", "end_local_time": "18:00" }, { "day_of_week": "SAT", "start_local_time": "07:00", "end_local_time": "18:00" }, { "day_of_week": "SUN", "start_local_time": "09:00", "end_local_time": "15:00" } ] } } } } }, "UpdateLocationResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information about errors encountered during the request." }, "location": { "$ref": "#/definitions/Location", "description": "The updated `Location` object." } }, "description": "The response object returned by the [UpdateLocation](https://developer.squareup.com/reference/square_2024-04-17/locations-api/update-location) endpoint.", "x-release-status": "PUBLIC", "example": { "location": { "id": "3Z4V4WHQK64X9", "name": "Midtown", "address": { "address_line_1": "1234 Peachtree St. NE", "locality": "Atlanta", "administrative_district_level_1": "GA", "postal_code": "30309" }, "timezone": "America/New_York", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2022-02-19T17:58:25Z", "merchant_id": "3MYCJG5GVYQ8Q", "country": "US", "language_code": "en-US", "currency": "USD", "type": "PHYSICAL", "description": "Midtown Atlanta store - Open weekends", "coordinates": { "latitude": 33.788900, "longitude": -84.384100 }, "business_hours": { "periods": [ { "day_of_week": "FRI", "start_local_time": "07:00", "end_local_time": "18:00" }, { "day_of_week": "SAT", "start_local_time": "07:00", "end_local_time": "18:00" }, { "day_of_week": "SUN", "start_local_time": "09:00", "end_local_time": "15:00" } ] }, "business_name": "Jet Fuel Coffee", "mcc": "7299" } } }, "UpdateLocationSettingsRequest": { "type": "object", "required": [ "location_settings" ], "properties": { "location_settings": { "$ref": "#/definitions/CheckoutLocationSettings", "description": "Describe your updates using the `location_settings` object. Make sure it contains only the fields that have changed." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "location_settings": { "customer_notes_enabled": false, "policies": [ { "title": "Return Policy", "description": "Items may be returned within 30 days of purchase." } ], "branding": { "button_color": "#00b23b" }, "tipping": { "percentages": [ 15, 20, 25 ], "default_percent": 20 } } } }, "UpdateLocationSettingsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred when updating the location settings." }, "location_settings": { "$ref": "#/definitions/CheckoutLocationSettings", "description": "The updated location settings." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "location_settings": { "location_id": "LOCATION_ID_1", "updated_at": "2022-06-16T22:25:35Z", "customer_notes_enabled": false, "policies": [ { "uid": "POLICY_ID_1", "title": "Return Policy", "description": "This is my Return Policy" }, { "uid": "POLICY_ID_2", "title": "Return Policy", "description": "Items may be returned within 30 days of purchase." } ], "branding": { "header_type": "FRAMED_LOGO", "button_color": "#00b23b", "button_shape": "ROUNDED" }, "tipping": { "percentages": [ 15, 20, 25 ], "smart_tipping_enabled": true, "default_percent": 20, "default_whole_amount_money": { "amount": 100, "currency": "USD" }, "whole_amounts": [ { "amount": 1000, "currency": "USD" }, { "amount": 1500, "currency": "USD" }, { "amount": 2000, "currency": "USD" } ] } } } }, "UpdateMerchantCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition that contains the fields to update. This endpoint\nsupports sparse updates, so only new or changed fields need to be included in the request.\nOnly the following fields can be updated:\n- `name`\n- `description`\n- `visibility`\n- `schema` for a `Selection` data type. Only changes to the named options or the maximum number of allowed\nselections are supported.\nFor more information, see\n[Update a merchant custom attribute definition](https://developer.squareup.com/docs/merchant-custom-attributes-api/custom-attribute-definitions#update-custom-attribute-definition).\nThe version field must match the current version of the custom attribute definition to enable\n[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\nIf this is not important for your application, version can be set to -1. For any other values, the request fails with a BAD_REQUEST error." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an [UpdateMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/update-merchant-custom-attribute-definition) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?key\u003dalternative_seller_name", "request_body": { "custom_attribute_definition": { "visibility": "VISIBILITY_READ_ONLY", "description": "Update the description as desired." } } } }, "UpdateMerchantCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The updated custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents an [UpdateMerchantCustomAttributeDefinition](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/update-merchant-custom-attribute-definition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "alternative_seller_name", "name": "Alternative Merchant Name", "description": "Update the description as desired.", "version": 2, "updated_at": "2023-05-05T19:34:10.181Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" }, "created_at": "2023-05-05T19:06:36.559Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "UpdateMerchantSettingsRequest": { "type": "object", "required": [ "merchant_settings" ], "properties": { "merchant_settings": { "$ref": "#/definitions/CheckoutMerchantSettings", "description": "Describe your updates using the `merchant_settings` object. Make sure it contains only the fields that have changed." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "merchant_settings": { "payment_methods": { "apple_pay": { "enabled": false } } } } }, "UpdateMerchantSettingsResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred when updating the merchant settings." }, "merchant_settings": { "$ref": "#/definitions/CheckoutMerchantSettings", "description": "The updated merchant settings." } }, "description": "", "x-release-status": "BETA", "x-is-beta": true, "example": { "merchant_settings": { "merchant_id": "MERCHANT_ID", "updated_at": "2022-06-16T22:25:35Z", "payment_methods": { "apple_pay": { "enabled": false }, "google_pay": { "enabled": true }, "cash_app_pay": { "enabled": true }, "afterpay_clearpay": { "enabled": true, "order_eligibility_range": { "min": { "amount": 100, "currency": "USD" }, "max": { "amount": 10000, "currency": "USD" } }, "item_eligibility_range": { "min": { "amount": 100, "currency": "USD" }, "max": { "amount": 10000, "currency": "USD" } } } } } } }, "UpdateOrderCustomAttributeDefinitionRequest": { "type": "object", "required": [ "custom_attribute_definition" ], "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The custom attribute definition that contains the fields to update. This endpoint supports sparse updates, \nso only new or changed fields need to be included in the request. For more information, see \n[Updatable definition fields](https://developer.squareup.com/docs/orders-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields).\n\nTo enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control, include the optional `version` field and specify the current version of the custom attribute definition." }, "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. \nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an update request for an order custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?key\u003dcover-count", "request_body": { "custom_attribute_definition": { "visibility": "VISIBILITY_READ_ONLY", "key": "cover-count", "version": 1 }, "idempotency_key": "IDEMPOTENCY_KEY" } } }, "UpdateOrderCustomAttributeDefinitionResponse": { "type": "object", "properties": { "custom_attribute_definition": { "$ref": "#/definitions/CustomAttributeDefinition", "description": "The updated order custom attribute definition." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from updating an order custom attribute definition.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute_definition": { "key": "cover-count", "name": "Cover count", "description": "The number of people seated at a table", "version": 2, "updated_at": "2022-11-16T17:44:11.436Z", "schema": { "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" }, "created_at": "2022-11-16T16:53:23.141Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "UpdateOrderRequest": { "type": "object", "properties": { "order": { "$ref": "#/definitions/Order", "description": "The [sparse order](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#sparse-order-objects)\ncontaining only the fields to update and the version to which the update is\nbeing applied." }, "fields_to_clear": { "type": "array", "items": { "type": "string" }, "description": "The [dot notation paths](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#identifying-fields-to-delete)\nfields to clear. For example, `line_items[uid].note`.\nFor more information, see [Deleting fields](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#deleting-fields)." }, "idempotency_key": { "maxLength": 192, "type": "string", "description": "A value you specify that uniquely identifies this update request.\n\nIf you are unsure whether a particular update was applied to an order successfully,\nyou can reattempt it with the same idempotency key without\nworrying about creating duplicate updates to the order.\nThe latest order version is returned.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Defines the fields that are included in requests to the\n[UpdateOrder](https://developer.squareup.com/reference/square_2024-04-17/orders-api/update-order) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "idempotency_key": "UNIQUE_STRING", "order": { "version": 1, "line_items": [ { "uid": "cookie_uid", "quantity": "2", "name": "COOKIE", "base_price_money": { "amount": 200, "currency": "USD" } } ] }, "fields_to_clear": [ "discounts" ] } } }, "UpdateOrderResponse": { "type": "object", "properties": { "order": { "$ref": "#/definitions/Order", "description": "The updated order." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [UpdateOrder](https://developer.squareup.com/reference/square_2024-04-17/orders-api/update-order) endpoint.", "x-release-status": "BETA", "x-is-beta": true, "example": { "order": { "version": 2, "total_money": { "currency": "USD", "amount": 900 }, "source": { "name": "Cookies" }, "line_items": [ { "total_tax_money": { "currency": "USD", "amount": 0 }, "total_money": { "amount": 500, "currency": "USD" }, "gross_sales_money": { "amount": 500, "currency": "USD" }, "base_price_money": { "amount": 500, "currency": "USD" }, "quantity": "1", "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "currency": "USD", "amount": 0 }, "name": "Small Coffee", "uid": "EuYkakhmu3ksHIds5Hiot", "variation_total_price_money": { "amount": 500, "currency": "USD" } }, { "total_money": { "amount": 400, "currency": "USD" }, "gross_sales_money": { "currency": "USD", "amount": 400 }, "total_tax_money": { "currency": "USD", "amount": 0 }, "variation_total_price_money": { "currency": "USD", "amount": 400 }, "name": "COOKIE", "uid": "cookie_uid", "base_price_money": { "amount": 200, "currency": "USD" }, "quantity": "2", "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 0, "currency": "USD" } } ], "state": "OPEN", "total_service_charge_money": { "amount": 0, "currency": "USD" }, "id": "DREk7wJcyXNHqULq8JJ2iPAsluJZY", "location_id": "MXVQSVNDGN3C8", "total_tax_money": { "amount": 0, "currency": "USD" }, "created_at": "2019-08-23T18:26:18.243Z", "total_discount_money": { "amount": 0, "currency": "USD" }, "net_amounts": { "service_charge_money": { "currency": "USD", "amount": 0 }, "total_money": { "amount": 900, "currency": "USD" }, "discount_money": { "currency": "USD", "amount": 0 }, "tax_money": { "currency": "USD", "amount": 0 } }, "updated_at": "2019-08-23T18:33:47.523Z" } } }, "UpdatePaymentLinkRequest": { "type": "object", "required": [ "payment_link" ], "properties": { "payment_link": { "$ref": "#/definitions/PaymentLink", "description": "The `payment_link` object describing the updates to apply.\nFor more information, see [Update a payment link](https://developer.squareup.com/docs/checkout-api/manage-checkout#update-a-payment-link)." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "payment_link": { "version": 1, "checkout_options": { "ask_for_shipping_address": true } } } } }, "UpdatePaymentLinkResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred when updating the payment link." }, "payment_link": { "$ref": "#/definitions/PaymentLink", "description": "The updated payment link." } }, "description": "", "x-release-status": "PUBLIC", "example": { "payment_link": { "id": "TY4BWEDJ6AI5MBIV", "version": 2, "order_id": "Qqc8ypQGvxVwc46Cch4zHTaJqc4F", "checkout_options": { "ask_for_shipping_address": true }, "url": "https://square.link/u/EXAMPLE", "long_url": "https://checkout.square.site/EXAMPLE", "created_at": "2022-04-26T00:15:15Z", "updated_at": "2022-04-26T00:18:24Z", "payment_note": "test" } } }, "UpdatePaymentRequest": { "type": "object", "required": [ "idempotency_key" ], "properties": { "payment": { "$ref": "#/definitions/Payment", "description": "The updated `Payment` object." }, "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "A unique string that identifies this `UpdatePayment` request. Keys can be any valid string\nbut must be unique for every `UpdatePayment` request.\n\nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Describes a request to update a payment using\n[UpdatePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/update-payment).", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "956f8b13-e4ec-45d6-85e8-d1d95ef0c5de", "payment": { "amount_money": { "amount": 1000, "currency": "USD" }, "tip_money": { "amount": 100, "currency": "USD" }, "version_token": "ODhwVQ35xwlzRuoZEwKXucfu7583sPTzK48c5zoGd0g6o" } } } }, "UpdatePaymentResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "payment": { "$ref": "#/definitions/Payment", "description": "The updated payment." } }, "description": "Defines the response returned by\n[UpdatePayment](https://developer.squareup.com/reference/square_2024-04-17/payments-api/update-payment).", "x-release-status": "PUBLIC", "example": { "payment": { "id": "1QjqpBVyrI9S4H9sTGDWU9JeiWdZY", "created_at": "2021-10-13T20:26:44.191Z", "updated_at": "2021-10-13T20:26:44.364Z", "amount_money": { "amount": 1000, "currency": "USD" }, "tip_money": { "amount": 100, "currency": "USD" }, "status": "APPROVED", "delay_duration": "PT168H", "source_type": "CARD", "card_details": { "status": "AUTHORIZED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 11, "exp_year": 2022, "fingerprint": "sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "entry_method": "ON_FILE", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "auth_result_code": "68aLBM", "statement_description": "SQ *EXAMPLE TEST GOSQ.C", "card_payment_timeline": { "authorized_at": "2021-10-13T20:26:44.364Z" } }, "location_id": "L88917AVBK2S5", "order_id": "nUSN9TdxpiK3SrQg3wzmf6r8LP9YY", "risk_evaluation": { "created_at": "2021-10-13T20:26:45.271Z", "risk_level": "NORMAL" }, "note": "Example Note", "customer_id": "W92WH6P11H4Z77CTET0RNTGFW8", "total_money": { "amount": 1100, "currency": "USD" }, "approved_money": { "amount": 1000, "currency": "USD" }, "capabilities": [ "EDIT_AMOUNT_UP", "EDIT_AMOUNT_DOWN", "EDIT_TIP_AMOUNT_UP", "EDIT_TIP_AMOUNT_DOWN" ], "receipt_number": "1Qjq", "delay_action": "CANCEL", "delayed_until": "2021-10-20T20:26:44.191Z", "application_details": { "square_product": "ECOMMERCE_API", "application_id": "sq0ids-TcgftTEtKxJTRF1lCFJ9TA" }, "version_token": "rDrXnqiS7fJgexccgdpzmwqTiXui1aIKCp9EchZ7trE6o" } } }, "UpdateShiftRequest": { "type": "object", "required": [ "shift" ], "properties": { "shift": { "$ref": "#/definitions/Shift", "description": "The updated `Shift` object." } }, "description": "A request to update a `Shift` object.", "x-release-status": "PUBLIC", "example": { "request_body": { "shift": { "team_member_id": "ormj0jJJZ5OZIzxrZYJI", "location_id": "PAA1RJZZKXBFG", "start_at": "2019-01-25T03:11:00-05:00", "end_at": "2019-01-25T13:11:00-05:00", "wage": { "title": "Bartender", "hourly_rate": { "amount": 1500, "currency": "USD" }, "tip_eligible": true }, "breaks": [ { "id": "X7GAQYVVRRG6P", "start_at": "2019-01-25T06:11:00-05:00", "end_at": "2019-01-25T06:16:00-05:00", "break_type_id": "REGS1EQR1TPZ5", "name": "Tea Break", "expected_duration": "PT5M", "is_paid": true } ], "declared_cash_tip_money": { "amount": 500, "currency": "USD" }, "version": 1 } } } }, "UpdateShiftResponse": { "type": "object", "properties": { "shift": { "$ref": "#/definitions/Shift", "description": "The updated `Shift`." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request to update a `Shift`. The response contains\nthe updated `Shift` object and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "shift": { "id": "K0YH4CV5462JB", "team_member_id": "ormj0jJJZ5OZIzxrZYJI", "employee_id": "ormj0jJJZ5OZIzxrZYJI", "location_id": "PAA1RJZZKXBFG", "timezone": "America/New_York", "start_at": "2019-01-25T03:11:00-05:00", "end_at": "2019-01-25T13:11:00-05:00", "wage": { "title": "Bartender", "hourly_rate": { "amount": 1500, "currency": "USD" }, "job_id": "dZtrPh5GSDGugyXGByesVp51", "tip_eligible": true }, "breaks": [ { "id": "X7GAQYVVRRG6P", "start_at": "2019-01-25T06:11:00-05:00", "end_at": "2019-01-25T06:16:00-05:00", "break_type_id": "REGS1EQR1TPZ5", "name": "Tea Break", "expected_duration": "PT5M", "is_paid": true } ], "declared_cash_tip_money": { "amount": 500, "currency": "USD" }, "status": "CLOSED", "version": 2, "created_at": "2019-02-28T00:39:02Z", "updated_at": "2019-02-28T00:42:41Z" } } }, "UpdateSubscriptionRequest": { "type": "object", "properties": { "subscription": { "$ref": "#/definitions/Subscription", "description": "The subscription object containing the current version, and fields to update.\nUnset fields will be left at their current server values, and JSON `null` values will\nbe treated as a request to clear the relevant data." } }, "description": "Defines input parameters in a request to the \n[UpdateSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/update-subscription) endpoint.", "x-release-status": "PUBLIC", "example": { "request_body": { "subscription": { "card_id": "{NEW CARD ID}", "canceled_date": null } } } }, "UpdateSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors encountered during the request." }, "subscription": { "$ref": "#/definitions/Subscription", "description": "The updated subscription." } }, "description": "Defines output parameters in a response from the\n[UpdateSubscription](https://developer.squareup.com/reference/square_2024-04-17/subscriptions-api/update-subscription) endpoint.", "x-release-status": "PUBLIC", "example": { "subscription": { "id": "7217d8ca-1fee-4446-a9e5-8540b5d8c9bb", "location_id": "LPJKHYR7WFDKN", "plan_variation_id": "XOUNEKCE6NSXQW5NTSQ73MMX", "customer_id": "AM69AB81FT4479YH9HGWS1HZY8", "start_date": "2023-01-30", "charged_through_date": "2023-03-13", "card_id": "{NEW CARD ID}", "status": "ACTIVE", "invoice_ids": [ "inv:0-ChAPSfVYvNewckgf3x4iigN_ENMM", "inv:0-ChBQaCCLfjcm9WEUBGxvuydJENMM" ], "version": 3, "created_at": "2023-01-30T19:27:32Z", "timezone": "UTC", "source": { "name": "My Application" } } } }, "UpdateTeamMemberRequest": { "type": "object", "properties": { "team_member": { "$ref": "#/definitions/TeamMember", "description": "The data used to update the `TeamMember` object." } }, "description": "Represents an update request for a `TeamMember` object.", "x-release-status": "PUBLIC", "example": { "request_body": { "team_member": { "reference_id": "reference_id_1", "status": "ACTIVE", "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@gmail.com", "phone_number": "+14159283333", "assigned_locations": { "location_ids": [ "YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT" ], "assignment_type": "EXPLICIT_LOCATIONS" } } } } }, "UpdateTeamMemberResponse": { "type": "object", "properties": { "team_member": { "$ref": "#/definitions/TeamMember", "description": "The successfully updated `TeamMember` object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "The errors that occurred during the request." } }, "description": "Represents a response from an update request containing the updated `TeamMember` object or error messages.", "x-release-status": "PUBLIC", "example": { "team_member": { "id": "1yJlHapkseYnNPETIU1B", "reference_id": "reference_id_1", "is_owner": false, "status": "ACTIVE", "given_name": "Joe", "family_name": "Doe", "email_address": "joe_doe@example.com", "phone_number": "+14159283333", "created_at": "2021-06-11T22:55:45Z", "updated_at": "2021-06-15T17:38:05Z", "assigned_locations": { "assignment_type": "EXPLICIT_LOCATIONS", "location_ids": [ "GA2Y9HSJ8KRYT", "YSGH2WBKG94QZ" ] } } } }, "UpdateVendorRequest": { "type": "object", "required": [ "vendor" ], "properties": { "idempotency_key": { "maxLength": 128, "type": "string", "description": "A client-supplied, universally unique identifier (UUID) for the\nrequest.\n\nSee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the\n[API Development 101](https://developer.squareup.com/docs/buildbasics) section for more\ninformation." }, "vendor": { "$ref": "#/definitions/Vendor", "description": "The specified [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) to be updated." } }, "description": "Represents an input to a call to [UpdateVendor](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/update-vendor).", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "idempotency_key": "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", "vendor": { "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", "name": "Jack\u0027s Chicken Shack", "status": "ACTIVE", "version": 1 } } } }, "UpdateVendorResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Errors occurred when the request fails." }, "vendor": { "$ref": "#/definitions/Vendor", "description": "The [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) that has been updated." } }, "description": "Represents an output from a call to [UpdateVendor](https://developer.squareup.com/reference/square_2024-04-17/vendors-api/update-vendor).", "x-release-status": "BETA", "x-is-beta": true, "example": { "vendor": { "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", "created_at": "2022-03-16T10:21:54.859Z", "updated_at": "2022-03-16T20:21:54.859Z", "name": "Jack\u0027s Chicken Shack", "address": { "address_line_1": "505 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "contacts": [ { "id": "INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A", "name": "Joe Burrow", "email_address": "joe@joesfreshseafood.com", "phone_number": "1-212-555-4250", "ordinal": 0 } ], "account_number": "4025391", "version": 2, "status": "ACTIVE" }, "errors": [] } }, "UpdateWageSettingRequest": { "type": "object", "required": [ "wage_setting" ], "properties": { "wage_setting": { "$ref": "#/definitions/WageSetting", "description": "The new `WageSetting` object that completely replaces the existing one." } }, "description": "Represents an update request for the `WageSetting` object describing a `TeamMember`.", "x-release-status": "PUBLIC", "example": { "request_body": { "wage_setting": { "is_overtime_exempt": true, "job_assignments": [ { "job_title": "Manager", "pay_type": "SALARY", "annual_rate": { "amount": 3000000, "currency": "USD" }, "weekly_hours": 40 }, { "job_title": "Cashier", "pay_type": "HOURLY", "hourly_rate": { "amount": 1200, "currency": "USD" } } ] } } } }, "UpdateWageSettingResponse": { "type": "object", "properties": { "wage_setting": { "$ref": "#/definitions/WageSetting", "description": "The successfully updated `WageSetting` object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "The errors that occurred during the request." } }, "description": "Represents a response from an update request containing the updated `WageSetting` object\nor error messages.", "x-release-status": "PUBLIC", "example": { "wage_setting": { "team_member_id": "-3oZQKPKVk6gUXU_V5Qa", "job_assignments": [ { "job_title": "Manager", "pay_type": "SALARY", "hourly_rate": { "amount": 1443, "currency": "USD" }, "annual_rate": { "amount": 3000000, "currency": "USD" }, "weekly_hours": 40 }, { "job_title": "Cashier", "pay_type": "HOURLY", "hourly_rate": { "amount": 1200, "currency": "USD" } } ], "is_overtime_exempt": true, "version": 1, "created_at": "2019-07-10T17:26:48+00:00", "updated_at": "2020-06-11T23:12:04+00:00" } } }, "UpdateWebhookSubscriptionRequest": { "type": "object", "properties": { "subscription": { "$ref": "#/definitions/WebhookSubscription", "description": "The [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) to update." } }, "description": "Updates a [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription).", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/webhooks/subscriptions/wbhk_b35f6b3145074cf9ad513610786c19d5", "request_body": { "subscription": { "name": "Updated Example Webhook Subscription", "enabled": false } } } }, "UpdateWebhookSubscriptionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "subscription": { "$ref": "#/definitions/WebhookSubscription", "description": "The updated [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription)." } }, "description": "Defines the fields that are included in the response body of\na request to the [UpdateWebhookSubscription](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/update-webhook-subscription) endpoint.\n\nNote: If there are errors processing the request, the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) is not\npresent.", "x-release-status": "PUBLIC", "example": { "subscription": { "id": "wbhk_b35f6b3145074cf9ad513610786c19d5", "name": "Updated Example Webhook Subscription", "enabled": false, "event_types": [ "payment.created", "payment.updated" ], "notification_url": "https://example-webhook-url.com", "api_version": "2021-12-15", "created_at": "2022-01-10 23:29:48 +0000 UTC", "updated_at": "2022-01-10 23:45:51 +0000 UTC" } } }, "UpdateWebhookSubscriptionSignatureKeyRequest": { "type": "object", "properties": { "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique string that identifies the [UpdateWebhookSubscriptionSignatureKey](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/update-webhook-subscriptionSignatureKey) request." } }, "description": "Updates a [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) by replacing the existing signature key with a new one.", "x-release-status": "PUBLIC", "example": { "request_url": "/v2/webhooks/subscriptions/wbhk_b35f6b3145074cf9ad513610786c19d5/signature-key", "request_body": { "idempotency_key": "ed80ae6b-0654-473b-bbab-a39aee89a60d" } } }, "UpdateWebhookSubscriptionSignatureKeyResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Information on errors encountered during the request." }, "signature_key": { "type": "string", "description": "The new Square-generated signature key used to validate the origin of the webhook event.", "x-read-only": true } }, "description": "Defines the fields that are included in the response body of\na request to the [UpdateWebhookSubscriptionSignatureKey](https://developer.squareup.com/reference/square_2024-04-17/webhook-subscriptions-api/update-webhook-subscriptionSignatureKey) endpoint.\n\nNote: If there are errors processing the request, the [Subscription](https://developer.squareup.com/reference/square_2024-04-17/objects/WebhookSubscription) is not\npresent.", "x-release-status": "PUBLIC", "example": { "signature_key": "1k9bIJKCeTmSQwyagtNRLg" } }, "UpdateWorkweekConfigRequest": { "type": "object", "required": [ "workweek_config" ], "properties": { "workweek_config": { "$ref": "#/definitions/WorkweekConfig", "description": "The updated `WorkweekConfig` object." } }, "description": "A request to update a `WorkweekConfig` object.", "x-release-status": "PUBLIC", "example": { "request_body": { "workweek_config": { "start_of_week": "MON", "start_of_day_local_time": "10:00", "version": 10 } } } }, "UpdateWorkweekConfigResponse": { "type": "object", "properties": { "workweek_config": { "$ref": "#/definitions/WorkweekConfig", "description": "The response object." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "The response to a request to update a `WorkweekConfig` object. The response contains\nthe updated `WorkweekConfig` object and might contain a set of `Error` objects if\nthe request resulted in errors.", "x-release-status": "PUBLIC", "example": { "workweek_config": { "id": "FY4VCAQN700GM", "start_of_week": "MON", "start_of_day_local_time": "10:00", "version": 11, "created_at": "2016-02-04T00:58:24Z", "updated_at": "2019-02-28T01:04:35Z" } } }, "UpsertBookingCustomAttributeRequest": { "type": "object", "required": [ "custom_attribute" ], "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with the following fields:\n\n- `value`. This value must conform to the `schema` specified by the definition.\nFor more information, see [Value data types](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types).\n\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol for an update operation, include this optional field and specify the current version\nof the custom attribute." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an [UpsertBookingCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/upsert-booking-custom-attribute) request.", "x-release-status": "PUBLIC", "example": { "pathParameters": { "booking_id": "Z57QXKM2FGXEQDV42W8RBZY7BR", "key": "favoriteShampoo" }, "bodyParams": { "custom_attribute": { "value": "Spring Fresh" } } } }, "UpsertBookingCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The new or updated custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents an [UpsertBookingCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/booking-custom-attributes-api/upsert-booking-custom-attribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute": { "key": "favoriteShampoo", "version": 1, "updated_at": "2022-11-16T15:50:27Z", "value": "Spring Fresh", "created_at": "2022-11-16T15:50:27Z", "visibility": "VISIBILITY_READ_ONLY" }, "errors": [] } }, "UpsertCatalogObjectRequest": { "type": "object", "required": [ "idempotency_key", "object" ], "properties": { "idempotency_key": { "minLength": 1, "type": "string", "description": "A value you specify that uniquely identifies this\nrequest among all your requests. A common way to create\na valid idempotency key is to use a Universally unique\nidentifier (UUID).\n\nIf you\u0027re unsure whether a particular request was successful,\nyou can reattempt it with the same idempotency key without\nworrying about creating duplicate objects.\n\nSee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information." }, "object": { "$ref": "#/definitions/CatalogObject", "description": "A CatalogObject to be created or updated.\n\n- For updates, the object must be active (the `is_deleted` field is not `true`).\n- For creates, the object ID must start with `#`. The provided ID is replaced with a server-generated ID." } }, "description": "", "x-release-status": "PUBLIC", "example": { "request_body": { "idempotency_key": "af3d1afc-7212-4300-b463-0bfc5314a5ae", "object": { "id": "#Cocoa", "type": "ITEM", "item_data": { "abbreviation": "Ch", "description_html": "\u003cp\u003e\u003cstrong\u003eHot\u003c/strong\u003e Chocolate\u003c/p\u003e", "name": "Cocoa", "variations": [ { "id": "#Small", "type": "ITEM_VARIATION", "item_variation_data": { "item_id": "#Cocoa", "name": "Small", "pricing_type": "VARIABLE_PRICING" } }, { "id": "#Large", "type": "ITEM_VARIATION", "item_variation_data": { "item_id": "#Cocoa", "name": "Large", "pricing_type": "FIXED_PRICING", "price_money": { "amount": 400, "currency": "USD" } } } ] } } } }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectRequest.python", "csharp": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectRequest.csharp", "java": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectRequest.java", "php": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectRequest.php", "javascript": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectRequest.javascript", "ruby": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectRequest.ruby" } }, "UpsertCatalogObjectResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "catalog_object": { "$ref": "#/definitions/CatalogObject", "description": "The successfully created or updated CatalogObject." }, "id_mappings": { "type": "array", "items": { "$ref": "#/definitions/CatalogIdMapping" }, "description": "The mapping between client and server IDs for this upsert." } }, "description": "", "x-release-status": "PUBLIC", "example": { "catalog_object": { "type": "ITEM", "id": "R2TA2FOBUGCJZNIWJSOSNAI4", "updated_at": "2021-06-14T15:51:39.021Z", "version": 1623685899021, "is_deleted": false, "present_at_all_locations": true, "item_data": { "name": "Cocoa", "description": "Hot Chocolate", "description_html": "\u003cp\u003e\u003cstrong\u003eHot\u003c/strong\u003e Chocolate\u003c/p\u003e", "description_plaintext": "Hot Chocolate", "abbreviation": "Ch", "variations": [ { "type": "ITEM_VARIATION", "id": "QRT53UP4LITLWGOGBZCUWP63", "updated_at": "2021-06-14T15:51:39.021Z", "version": 1623685899021, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "R2TA2FOBUGCJZNIWJSOSNAI4", "name": "Small", "ordinal": 0, "pricing_type": "VARIABLE_PRICING", "stockable": true } }, { "type": "ITEM_VARIATION", "id": "NS77DKEIQ3AEQTCP727DSA7U", "updated_at": "2021-06-14T15:51:39.021Z", "version": 1623685899021, "is_deleted": false, "present_at_all_locations": true, "item_variation_data": { "item_id": "R2TA2FOBUGCJZNIWJSOSNAI4", "name": "Large", "ordinal": 1, "pricing_type": "FIXED_PRICING", "price_money": { "amount": 400, "currency": "USD" }, "stockable": true } } ], "product_type": "REGULAR" } }, "id_mappings": [ { "client_object_id": "#Cocoa", "object_id": "R2TA2FOBUGCJZNIWJSOSNAI4" }, { "client_object_id": "#Small", "object_id": "QRT53UP4LITLWGOGBZCUWP63" }, { "client_object_id": "#Large", "object_id": "NS77DKEIQ3AEQTCP727DSA7U" } ] }, "x-sq-sdk-sample-code": { "python": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectResponse.python", "csharp": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectResponse.csharp", "java": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectResponse.java", "php": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectResponse.php", "javascript": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectResponse.javascript", "ruby": "/sdk_samples/Catalog/UpsertCatalogObject/UpsertCatalogObjectResponse.ruby" } }, "UpsertCustomerCustomAttributeRequest": { "type": "object", "required": [ "custom_attribute" ], "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with the following fields:\n\n- `value`. This value must conform to the `schema` specified by the definition. \nFor more information, see [Value data types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types).\n\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol for an update operation, include this optional field and specify the current version\nof the custom attribute." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an [UpsertCustomerCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/upsert-customer-custom-attribute) request.", "x-release-status": "PUBLIC", "example": { "request_params": "?customer_id\u003dZ57QXKM2FGXEQDV42W8RBZY7BR\u0026key\u003dfavoritemovie", "request_body": { "custom_attribute": { "value": "Dune" } } } }, "UpsertCustomerCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The new or updated custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents an [UpsertCustomerCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/customer-custom-attributes-api/upsert-customer-custom-attribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "PUBLIC", "example": { "custom_attribute": { "key": "favoritemovie", "version": 1, "updated_at": "2022-04-26T15:50:27Z", "value": "Dune", "created_at": "2022-04-26T15:50:27Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "UpsertLocationCustomAttributeRequest": { "type": "object", "required": [ "custom_attribute" ], "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with the following fields:\n- `value`. This value must conform to the `schema` specified by the definition.\nFor more information, see [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol for an update operation, include the current version of the custom attribute.\nIf this is not important for your application, version can be set to -1." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an [UpsertLocationCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/upsert-location-custom-attribute) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?location_id\u003dL0TBCBTB7P8RQ\u0026key\u003dbestseller", "request_body": { "custom_attribute": { "value": "hot cocoa" } } } }, "UpsertLocationCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The new or updated custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents an [UpsertLocationCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/location-custom-attributes-api/upsert-location-custom-attribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute": { "key": "bestseller", "version": 2, "updated_at": "2023-01-09T19:21:04.551Z", "value": "hot cocoa", "created_at": "2023-01-09T19:02:58.647Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "UpsertMerchantCustomAttributeRequest": { "type": "object", "required": [ "custom_attribute" ], "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with the following fields:\n- `value`. This value must conform to the `schema` specified by the definition.\nFor more information, see [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).\n- The version field must match the current version of the custom attribute definition to enable\n[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\nIf this is not important for your application, version can be set to -1. For any other values, the request fails with a BAD_REQUEST error." }, "idempotency_key": { "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an [UpsertMerchantCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/upsert-merchant-custom-attribute) request.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_params": "?merchant_id\u003dDM7VKY8Q63GNP\u0026key\u003dalternative_seller_name", "request_body": { "custom_attribute": { "value": "Ultimate Sneaker Store" } } } }, "UpsertMerchantCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The new or updated custom attribute." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents an [UpsertMerchantCustomAttribute](https://developer.squareup.com/reference/square_2024-04-17/merchant-custom-attributes-api/upsert-merchant-custom-attribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute": { "key": "alternative_seller_name", "version": 2, "updated_at": "2023-05-06T19:21:04.551Z", "value": "Ultimate Sneaker Store", "created_at": "2023-05-06T19:02:58.647Z", "visibility": "VISIBILITY_READ_ONLY" } } }, "UpsertOrderCustomAttributeRequest": { "type": "object", "required": [ "custom_attribute" ], "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The custom attribute to create or update, with the following fields:\n\n- `value`. This value must conform to the `schema` specified by the definition. \nFor more information, see [Value data types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types).\n\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include this optional field and specify the current version of the custom attribute." }, "idempotency_key": { "minLength": 1, "maxLength": 45, "type": "string", "description": "A unique identifier for this request, used to ensure idempotency. \nFor more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)." } }, "description": "Represents an upsert request for an order custom attribute.", "x-release-status": "BETA", "x-is-beta": true, "example": { "request_body": { "custom_attribute": { "value": "42", "key": "table-number", "version": 1 } } } }, "UpsertOrderCustomAttributeResponse": { "type": "object", "properties": { "custom_attribute": { "$ref": "#/definitions/CustomAttribute", "description": "The order custom attribute that was created or modified." }, "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Represents a response from upserting order custom attribute definitions.", "x-release-status": "BETA", "x-is-beta": true, "example": { "custom_attribute": { "key": "table-number", "version": 1, "updated_at": "2022-10-06T20:41:22.673Z", "value": "42", "created_at": "2022-10-06T20:41:22.673Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } }, "UpsertSnippetRequest": { "type": "object", "required": [ "snippet" ], "properties": { "snippet": { "$ref": "#/definitions/Snippet", "description": "The snippet for the site." } }, "description": "Represents an `UpsertSnippet` request.", "x-release-status": "PUBLIC", "example": { "request_body": { "snippet": { "content": "\u003cscript\u003evar js \u003d 1;\u003c/script\u003e" } } } }, "UpsertSnippetResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "snippet": { "$ref": "#/definitions/Snippet", "description": "The new or updated snippet." } }, "description": "Represents an `UpsertSnippet` response. The response can include either `snippet` or `errors`.", "x-release-status": "PUBLIC", "example": { "snippet": { "id": "snippet_5d178150-a6c0-11eb-a9f1-437e6a2881e7", "site_id": "site_278075276488921835", "content": "\u003cscript\u003evar js \u003d 1;\u003c/script\u003e", "created_at": "2021-03-11T25:40:09.000000Z", "updated_at": "2021-03-11T25:40:09.000000Z" } } }, "V1Device": { "type": "object", "properties": { "id": { "type": "string", "description": "The device\u0027s Square-issued ID." }, "name": { "type": "string", "description": "The device\u0027s merchant-specified name." } }, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "V1ListOrdersRequest": { "type": "object", "properties": { "order": { "type": "string", "description": "The order in which payments are listed in the response." }, "limit": { "type": "integer", "description": "The maximum number of payments to return in a single response. This value cannot exceed 200." }, "batch_token": { "type": "string", "description": "A pagination cursor to retrieve the next set of results for your\noriginal query to the endpoint." } }, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "V1ListOrdersResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/V1Order" }, "description": "" } }, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "V1Money": { "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 \u0027cent\u0027 concept)." }, "currency_code": { "type": "string", "description": "" } }, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "V1Order": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." }, "id": { "type": "string", "description": "The order\u0027s unique identifier." }, "buyer_email": { "type": "string", "description": "The email address of the order\u0027s buyer." }, "recipient_name": { "type": "string", "description": "The name of the order\u0027s buyer." }, "recipient_phone_number": { "type": "string", "description": "The phone number to use for the order\u0027s delivery." }, "state": { "type": "string", "description": "Whether the tax is an ADDITIVE tax or an INCLUSIVE tax." }, "shipping_address": { "$ref": "#/definitions/Address", "description": "The address to ship the order to." }, "subtotal_money": { "$ref": "#/definitions/V1Money", "description": "The amount of all items purchased in the order, before taxes and shipping." }, "total_shipping_money": { "$ref": "#/definitions/V1Money", "description": "The shipping cost for the order." }, "total_tax_money": { "$ref": "#/definitions/V1Money", "description": "The total of all taxes applied to the order." }, "total_price_money": { "$ref": "#/definitions/V1Money", "description": "The total cost of the order." }, "total_discount_money": { "$ref": "#/definitions/V1Money", "description": "The total of all discounts applied to the order." }, "created_at": { "type": "string", "description": "The time when the order was created, in ISO 8601 format." }, "updated_at": { "type": "string", "description": "The time when the order was last modified, in ISO 8601 format." }, "expires_at": { "type": "string", "description": "The time when the order expires if no action is taken, in ISO 8601 format." }, "payment_id": { "type": "string", "description": "The unique identifier of the payment associated with the order." }, "buyer_note": { "type": "string", "description": "A note provided by the buyer when the order was created, if any." }, "completed_note": { "type": "string", "description": "A note provided by the merchant when the order\u0027s state was set to COMPLETED, if any" }, "refunded_note": { "type": "string", "description": "A note provided by the merchant when the order\u0027s state was set to REFUNDED, if any." }, "canceled_note": { "type": "string", "description": "A note provided by the merchant when the order\u0027s state was set to CANCELED, if any." }, "tender": { "$ref": "#/definitions/V1Tender", "description": "The tender used to pay for the order." }, "order_history": { "type": "array", "items": { "$ref": "#/definitions/V1OrderHistoryEntry" }, "description": "The history of actions associated with the order." }, "promo_code": { "type": "string", "description": "The promo code provided by the buyer, if any." }, "btc_receive_address": { "type": "string", "description": "For Bitcoin transactions, the address that the buyer sent Bitcoin to." }, "btc_price_satoshi": { "type": "number", "description": "For Bitcoin transactions, the price of the buyer\u0027s order in satoshi (100 million satoshi equals 1 BTC)." } }, "description": "V1Order", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "V1OrderHistoryEntry": { "type": "object", "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." } }, "description": "V1OrderHistoryEntry", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "V1PhoneNumber": { "type": "object", "required": [ "calling_code", "number" ], "properties": { "calling_code": { "type": "string", "description": "The phone number\u0027s international calling code. For US phone numbers, this value is +1." }, "number": { "type": "string", "description": "The phone number." } }, "description": "Represents a phone number.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "V1RetrieveOrderRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "V1Tender": { "type": "object", "properties": { "id": { "type": "string", "description": "The tender\u0027s unique ID." }, "type": { "type": "string", "description": "The type of tender." }, "name": { "type": "string", "description": "A human-readable description of the tender." }, "employee_id": { "type": "string", "description": "The ID of the employee that processed the tender." }, "receipt_url": { "type": "string", "description": "The URL of the receipt for the tender." }, "card_brand": { "type": "string", "description": "The brand of credit card provided." }, "pan_suffix": { "type": "string", "description": "The last four digits of the provided credit card\u0027s account number." }, "entry_method": { "type": "string", "description": "The tender\u0027s unique ID." }, "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." }, "total_money": { "$ref": "#/definitions/V1Money", "description": "The total amount of money provided in this form of tender." }, "tendered_money": { "$ref": "#/definitions/V1Money", "description": "The amount of total_money applied to the payment." }, "tendered_at": { "type": "string", "description": "The time when the tender was created, in ISO 8601 format." }, "settled_at": { "type": "string", "description": "The time when the tender was settled, in ISO 8601 format." }, "change_back_money": { "$ref": "#/definitions/V1Money", "description": "The amount of total_money returned to the buyer as change." }, "refunded_money": { "$ref": "#/definitions/V1Money", "description": "The total of all refunds applied to this tender. This amount is always negative or zero." }, "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." } }, "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.", "x-release-status": "DEPRECATED", "x-is-deprecated": true }, "V1UpdateOrderRequest": { "type": "object", "required": [ "action" ], "properties": { "action": { "type": "string", "description": "The action to perform on the order (COMPLETE, CANCEL, or REFUND)." }, "shipped_tracking_number": { "type": "string", "description": "The tracking number of the shipment associated with the order. Only valid if action is COMPLETE." }, "completed_note": { "type": "string", "description": "A merchant-specified note about the completion of the order. Only valid if action is COMPLETE." }, "refunded_note": { "type": "string", "description": "A merchant-specified note about the refunding of the order. Only valid if action is REFUND." }, "canceled_note": { "type": "string", "description": "A merchant-specified note about the canceling of the order. Only valid if action is CANCEL." } }, "description": "V1UpdateOrderRequest", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "x-visibility": "SDK_ONLY" }, "Vendor": { "type": "object", "properties": { "id": { "maxLength": 100, "type": "string", "description": "A unique Square-generated ID for the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor).\nThis field is required when attempting to update a [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." }, "created_at": { "maxLength": 34, "type": "string", "description": "An RFC 3339-formatted timestamp that indicates when the\n[Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) was created.", "x-read-only": true }, "updated_at": { "maxLength": 34, "type": "string", "description": "An RFC 3339-formatted timestamp that indicates when the\n[Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor) was last updated.", "x-read-only": true }, "name": { "maxLength": 100, "type": "string", "description": "The name of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor).\nThis field is required when attempting to create or update a [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." }, "address": { "$ref": "#/definitions/Address", "description": "The address of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." }, "contacts": { "type": "array", "items": { "$ref": "#/definitions/VendorContact" }, "description": "The contacts of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." }, "account_number": { "maxLength": 100, "type": "string", "description": "The account number of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." }, "note": { "maxLength": 4096, "type": "string", "description": "A note detailing information about the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." }, "version": { "type": "integer", "description": "The version of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." }, "status": { "type": "string", "description": "The status of the [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." } }, "description": "Represents a supplier to a seller.", "x-release-status": "BETA", "x-is-beta": true }, "VendorContact": { "type": "object", "required": [ "ordinal" ], "properties": { "id": { "maxLength": 100, "type": "string", "description": "A unique Square-generated ID for the [VendorContact](https://developer.squareup.com/reference/square_2024-04-17/objects/VendorContact).\nThis field is required when attempting to update a [VendorContact](https://developer.squareup.com/reference/square_2024-04-17/objects/VendorContact)." }, "name": { "maxLength": 255, "type": "string", "description": "The name of the [VendorContact](https://developer.squareup.com/reference/square_2024-04-17/objects/VendorContact).\nThis field is required when attempting to create a [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor)." }, "email_address": { "maxLength": 255, "type": "string", "description": "The email address of the [VendorContact](https://developer.squareup.com/reference/square_2024-04-17/objects/VendorContact)." }, "phone_number": { "maxLength": 255, "type": "string", "description": "The phone number of the [VendorContact](https://developer.squareup.com/reference/square_2024-04-17/objects/VendorContact)." }, "removed": { "type": "boolean", "description": "The state of the [VendorContact](https://developer.squareup.com/reference/square_2024-04-17/objects/VendorContact)." }, "ordinal": { "type": "integer", "description": "The ordinal of the [VendorContact](https://developer.squareup.com/reference/square_2024-04-17/objects/VendorContact)." } }, "description": "Represents a contact of a [Vendor](https://developer.squareup.com/reference/square_2024-04-17/objects/Vendor).", "x-release-status": "BETA", "x-is-beta": true }, "VoidTransactionRequest": { "type": "object", "properties": {}, "description": "", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/VoidTransaction/VoidTransactionRequest.python", "csharp": "/sdk_samples/VoidTransaction/VoidTransactionRequest.csharp", "java": "/sdk_samples/VoidTransaction/VoidTransactionRequest.java", "php": "/sdk_samples/VoidTransaction/VoidTransactionRequest.php", "javascript": "/sdk_samples/VoidTransaction/VoidTransactionRequest.javascript", "ruby": "/sdk_samples/VoidTransaction/VoidTransactionRequest.ruby" } }, "VoidTransactionResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/Error" }, "description": "Any errors that occurred during the request." } }, "description": "Defines the fields that are included in the response body of\na request to the [VoidTransaction](https://developer.squareup.com/reference/square_2024-04-17/transactions-api/void-transaction) endpoint.", "x-release-status": "DEPRECATED", "x-is-deprecated": true, "example": {}, "x-sq-sdk-sample-code": { "python": "/sdk_samples/VoidTransaction/VoidTransactionResponse.python", "csharp": "/sdk_samples/VoidTransaction/VoidTransactionResponse.csharp", "java": "/sdk_samples/VoidTransaction/VoidTransactionResponse.java", "php": "/sdk_samples/VoidTransaction/VoidTransactionResponse.php", "javascript": "/sdk_samples/VoidTransaction/VoidTransactionResponse.javascript", "ruby": "/sdk_samples/VoidTransaction/VoidTransactionResponse.ruby" } }, "WageSetting": { "type": "object", "properties": { "team_member_id": { "type": "string", "description": "The unique ID of the `TeamMember` whom this wage setting describes." }, "job_assignments": { "type": "array", "items": { "$ref": "#/definitions/JobAssignment" }, "description": "Required. The ordered list of jobs that the team member is assigned to.\nThe first job assignment is considered the team member\u0027s primary job.\n\nThe minimum length is 1 and the maximum length is 12." }, "is_overtime_exempt": { "type": "boolean", "description": "Whether the team member is exempt from the overtime rules of the seller\u0027s country." }, "version": { "type": "integer", "description": "Used for resolving concurrency issues. The request fails if the version\nprovided does not match the server version at the time of the request. If not provided,\nSquare executes a blind write, potentially overwriting data from another write. For more information,\nsee [optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency)." }, "created_at": { "type": "string", "description": "The timestamp, in RFC 3339 format, describing when the wage setting object was created.\nFor example, \"2018-10-04T04:00:00-07:00\" or \"2019-02-05T12:00:00Z\".", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp, in RFC 3339 format, describing when the wage setting object was last updated.\nFor example, \"2018-10-04T04:00:00-07:00\" or \"2019-02-05T12:00:00Z\".", "x-read-only": true } }, "description": "An object representing a team member\u0027s wage information.", "x-release-status": "PUBLIC" }, "WebhookSubscription": { "type": "object", "properties": { "id": { "maxLength": 64, "type": "string", "description": "A Square-generated unique ID for the subscription.", "x-read-only": true }, "name": { "maxLength": 64, "type": "string", "description": "The name of this subscription." }, "enabled": { "type": "boolean", "description": "Indicates whether the subscription is enabled (`true`) or not (`false`)." }, "event_types": { "type": "array", "items": { "type": "string" }, "description": "The event types associated with this subscription." }, "notification_url": { "type": "string", "description": "The URL to which webhooks are sent." }, "api_version": { "type": "string", "description": "The API version of the subscription.\nThis field is optional for `CreateWebhookSubscription`. \nThe value defaults to the API version used by the application." }, "signature_key": { "type": "string", "description": "The Square-generated signature key used to validate the origin of the webhook event.", "x-read-only": true }, "created_at": { "type": "string", "description": "The timestamp of when the subscription was created, in RFC 3339 format. For example, \"2016-09-04T23:59:33.123Z\".", "x-read-only": true }, "updated_at": { "type": "string", "description": "The timestamp of when the subscription was last updated, in RFC 3339 format.\nFor example, \"2016-09-04T23:59:33.123Z\".", "x-read-only": true } }, "description": "Represents the details of a webhook subscription, including notification URL,\nevent types, and signature key.", "x-release-status": "PUBLIC" }, "WorkweekConfig": { "type": "object", "required": [ "start_of_week", "start_of_day_local_time" ], "properties": { "id": { "type": "string", "description": "The UUID for this object." }, "start_of_week": { "type": "string", "description": "The day of the week on which a business week starts for\ncompensation purposes." }, "start_of_day_local_time": { "minLength": 1, "type": "string", "description": "The local time at which a business week starts. Represented as a\nstring in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are\ntruncated)." }, "version": { "type": "integer", "description": "Used for resolving concurrency issues. The request fails if the version\nprovided does not match the server version at the time of the request. If not provided,\nSquare executes a blind write; potentially overwriting data from another\nwrite." }, "created_at": { "type": "string", "description": "A read-only timestamp in RFC 3339 format; presented in UTC.", "x-read-only": true }, "updated_at": { "type": "string", "description": "A read-only timestamp in RFC 3339 format; presented in UTC.", "x-read-only": true } }, "description": "Sets the day of the week and hour of the day that a business starts a\nworkweek. This is used to calculate overtime pay.", "x-release-status": "PUBLIC" } } }