Square Customers API

The Customers API from Square — 10 operation(s) for customers.

Documentation

📖
Documentation
https://developer.squareup.com/docs/payments-overview
📖
APIReference
https://developer.squareup.com/reference/square/payments-api
📖
Documentation
https://developer.squareup.com/docs/orders-api/what-it-does
📖
APIReference
https://developer.squareup.com/reference/square/orders-api
📖
Documentation
https://developer.squareup.com/docs/catalog-api/what-it-does
📖
APIReference
https://developer.squareup.com/reference/square/catalog-api
📖
Documentation
https://developer.squareup.com/docs/inventory-api/what-it-does
📖
APIReference
https://developer.squareup.com/reference/square/inventory-api
📖
Documentation
https://developer.squareup.com/docs/customers
📖
APIReference
https://developer.squareup.com/reference/square/customers-api
📖
Documentation
https://developer.squareup.com/docs/locations-api
📖
APIReference
https://developer.squareup.com/reference/square/locations-api
📖
Documentation
https://developer.squareup.com/docs/team/overview
📖
APIReference
https://developer.squareup.com/reference/square/team-api
📖
Documentation
https://developer.squareup.com/docs/labor-api/what-it-does
📖
APIReference
https://developer.squareup.com/reference/square/labor-api
📖
Documentation
https://developer.squareup.com/docs/bookings-api/what-it-is
📖
APIReference
https://developer.squareup.com/reference/square/bookings-api
📖
Documentation
https://developer.squareup.com/docs/loyalty-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/loyalty-api
📖
Documentation
https://developer.squareup.com/docs/gift-cards/using-gift-cards-api
📖
APIReference
https://developer.squareup.com/reference/square/gift-cards-api
📖
Documentation
https://developer.squareup.com/docs/invoices-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/invoices-api
📖
Documentation
https://developer.squareup.com/docs/subscriptions-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/subscriptions-api
📖
Documentation
https://developer.squareup.com/docs/checkout-api
📖
APIReference
https://developer.squareup.com/reference/square/checkout-api
📖
Documentation
https://developer.squareup.com/docs/terminal-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/terminal-api
📖
Documentation
https://developer.squareup.com/docs/payments-refunds
📖
APIReference
https://developer.squareup.com/reference/square/refunds-api
📖
Documentation
https://developer.squareup.com/docs/disputes-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/disputes-api
📖
Documentation
https://developer.squareup.com/docs/merchants-api
📖
APIReference
https://developer.squareup.com/reference/square/merchants-api
📖
Documentation
https://developer.squareup.com/docs/cards-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/cards-api
📖
Documentation
https://developer.squareup.com/docs/vendors-api/manage-vendors-in-apps
📖
APIReference
https://developer.squareup.com/reference/square/vendors-api
📖
Documentation
https://developer.squareup.com/docs/cashdrawershift-api/reporting
📖
APIReference
https://developer.squareup.com/reference/square/cash-drawers-api
📖
Documentation
https://developer.squareup.com/docs/bank-accounts-api
📖
APIReference
https://developer.squareup.com/reference/square/bank-accounts-api
📖
Documentation
https://developer.squareup.com/docs/payouts-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/payouts-api
📖
Documentation
https://developer.squareup.com/docs/web-payments/apple-pay
📖
APIReference
https://developer.squareup.com/reference/square/apple-pay-api
📖
Documentation
https://developer.squareup.com/docs/sites-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/sites-api
📖
Documentation
https://developer.squareup.com/docs/snippets-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/snippets-api
📖
Documentation
https://developer.squareup.com/docs/oauth-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/oauth-api
📖
Documentation
https://developer.squareup.com/docs/webhooks/overview
📖
APIReference
https://developer.squareup.com/reference/square/webhook-subscriptions-api
📖
Documentation
https://developer.squareup.com/docs/events-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/events-api
📖
Documentation
https://developer.squareup.com/docs/devices-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/devices-api
📖
Documentation
https://developer.squareup.com/docs/customer-groups-api/what-it-does
📖
APIReference
https://developer.squareup.com/reference/square/customer-groups-api
📖
Documentation
https://developer.squareup.com/docs/customer-segments-api/what-it-does
📖
APIReference
https://developer.squareup.com/reference/square/customer-segments-api
📖
Documentation
https://developer.squareup.com/docs/gift-cards/using-gift-card-activities-api
📖
APIReference
https://developer.squareup.com/reference/square/gift-card-activities-api
📖
Documentation
https://developer.squareup.com/docs/customer-custom-attributes-api/overview
📖
APIReference
https://developer.squareup.com/reference/square/customer-custom-attributes-api

Specifications

Other Resources

OpenAPI Specification

square-customers-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: '2.0'
  title: Square ApplePay Customers API
  description: 'Supercharge Square for sellers of every size. Our entire connected commerce platform  from elegant hardware to a rich suite of Square APIs  is yours to build with. Whether youre developing an app or composing a bespoke solution, this is the place to make it happen. '
  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/
  x-server-configuration:
    default-environment: production
    default-server: default
    environments:
    - name: production
      servers:
      - name: default
        url: https://connect.squareup.com
    - name: sandbox
      servers:
      - name: default
        url: https://connect.squareupsandbox.com
    - name: custom
      servers:
      - name: default
        url: '{custom_url}'
    parameters:
    - name: custom_url
      description: Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`
      type: string
      example: https://connect.squareup.com
  x-square-generic-error-codes:
  - ACCESS_TOKEN_EXPIRED
  - ACCESS_TOKEN_REVOKED
  - API_VERSION_INCOMPATIBLE
  - APPLICATION_DISABLED
  - ARRAY_EMPTY
  - ARRAY_LENGTH_TOO_LONG
  - ARRAY_LENGTH_TOO_SHORT
  - BAD_CERTIFICATE
  - BAD_GATEWAY
  - BAD_REQUEST
  - CONFLICT
  - CONFLICTING_PARAMETERS
  - CURRENCY_MISMATCH
  - EXPECTED_ARRAY
  - EXPECTED_BASE64_ENCODED_BYTE_ARRAY
  - EXPECTED_BOOLEAN
  - EXPECTED_FLOAT
  - EXPECTED_INTEGER
  - EXPECTED_JSON_BODY
  - EXPECTED_MAP
  - EXPECTED_OBJECT
  - EXPECTED_STRING
  - FORBIDDEN
  - GATEWAY_TIMEOUT
  - GONE
  - IDEMPOTENCY_KEY_REUSED
  - INCORRECT_TYPE
  - INSUFFICIENT_SCOPES
  - INTERNAL_SERVER_ERROR
  - INVALID_ARRAY_VALUE
  - INVALID_CONTENT_TYPE
  - INVALID_CURSOR
  - INVALID_ENUM_VALUE
  - INVALID_FORM_VALUE
  - INVALID_SORT_ORDER
  - INVALID_SQUARE_VERSION_FORMAT
  - INVALID_TIME
  - INVALID_TIME_RANGE
  - INVALID_VALUE
  - LOCATION_MISMATCH
  - MAP_KEY_LENGTH_TOO_LONG
  - MAP_KEY_LENGTH_TOO_SHORT
  - MERCHANT_SUBSCRIPTION_NOT_FOUND
  - METHOD_NOT_ALLOWED
  - MISSING_REQUIRED_PARAMETER
  - NOT_ACCEPTABLE
  - NOT_FOUND
  - NOT_IMPLEMENTED
  - NO_FIELDS_SET
  - RATE_LIMITED
  - REQUEST_ENTITY_TOO_LARGE
  - REQUEST_TIMEOUT
  - SANDBOX_NOT_SUPPORTED
  - SERVICE_UNAVAILABLE
  - TOO_MANY_MAP_ENTRIES
  - UNAUTHORIZED
  - UNEXPECTED_VALUE
  - UNKNOWN_BODY_PARAMETER
  - UNKNOWN_QUERY_PARAMETER
  - UNPROCESSABLE_ENTITY
  - UNSUPPORTED_MEDIA_TYPE
  - V1_ACCESS_TOKEN
  - V1_APPLICATION
  - VALUE_EMPTY
  - VALUE_REGEX_MISMATCH
  - VALUE_TOO_HIGH
  - VALUE_TOO_LONG
  - VALUE_TOO_LOW
  - VALUE_TOO_SHORT
servers:
- url: https://connect.squareup.com
  variables: {}
tags:
- name: Customers
paths:
  /v2/customers:
    get:
      tags:
      - Customers
      summary: Square List Customers
      operationId: ListCustomers
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Lists customer profiles associated with a Square account.


        Under normal operating conditions, newly created or updated customer profiles become available

        for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated

        profiles can take closer to one minute or longer, especially during network incidents and outages.'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_READ
      parameters:
      - name: cursor
        description: 'A pagination cursor returned by a previous call to this endpoint.

          Provide this cursor to retrieve the next set of results for your original query.


          For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).'
        schema:
          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.

          If 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.


          For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).'
        schema:
          type: integer
        in: query
        required: false
      - name: sort_field
        description: 'Indicates how customers should be sorted.


          The default value is `DEFAULT`.'
        schema:
          $ref: '#/components/schemas/CustomerSortField'
        in: query
        required: false
      - name: sort_order
        description: 'Indicates whether customers should be sorted in ascending (`ASC`) or

          descending (`DESC`) order.


          The default value is `ASC`.'
        schema:
          $ref: '#/components/schemas/SortOrder'
        in: query
        required: false
      - name: count
        description: 'Indicates whether to return the total count of customers in the `count` field of the response.


          The default value is `false`.'
        schema:
          type: boolean
          default: false
        in: query
        required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomersResponse'
    post:
      tags:
      - Customers
      summary: Square Create Customer
      operationId: CreateCustomer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Creates a new customer for a business.


        You must provide at least one of the following values in your request to this

        endpoint:


        - `given_name`

        - `family_name`

        - `company_name`

        - `email_address`

        - `phone_number`'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters: []
      requestBody:
        required: true
        description: 'An object containing the fields to POST for the request.


          See the corresponding object definition for field details.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCustomerResponse'
      x-endpoint-errors:
      - error-code: INVALID_EMAIL_ADDRESS
      - error-code: INVALID_PHONE_NUMBER
      - error-code: INVALID_TIME
      - error-code: VALUE_TOO_LONG
  /v2/customers/bulk-create:
    post:
      tags:
      - Customers
      summary: Square Bulk Create Customers
      operationId: BulkCreateCustomers
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Creates multiple [customer profiles](entity:Customer) for a business.


        This endpoint takes a map of individual create requests and returns a map of responses.


        You must provide at least one of the following values in each create request:


        - `given_name`

        - `family_name`

        - `company_name`

        - `email_address`

        - `phone_number`'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters: []
      requestBody:
        required: true
        description: 'An object containing the fields to POST for the request.


          See the corresponding object definition for field details.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkCreateCustomersRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkCreateCustomersResponse'
  /v2/customers/bulk-delete:
    post:
      tags:
      - Customers
      summary: Square Bulk Delete Customers
      operationId: BulkDeleteCustomers
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Deletes multiple customer profiles.


        The endpoint takes a list of customer IDs and returns a map of responses.'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters: []
      requestBody:
        required: true
        description: 'An object containing the fields to POST for the request.


          See the corresponding object definition for field details.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteCustomersRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteCustomersResponse'
  /v2/customers/bulk-retrieve:
    post:
      tags:
      - Customers
      summary: Square Bulk Retrieve Customers
      operationId: BulkRetrieveCustomers
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Retrieves multiple customer profiles.


        This endpoint takes a list of customer IDs and returns a map of responses.'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_READ
      parameters: []
      requestBody:
        required: true
        description: 'An object containing the fields to POST for the request.


          See the corresponding object definition for field details.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkRetrieveCustomersRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkRetrieveCustomersResponse'
  /v2/customers/bulk-update:
    post:
      tags:
      - Customers
      summary: Square Bulk Update Customers
      operationId: BulkUpdateCustomers
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Updates multiple customer profiles.


        This endpoint takes a map of individual update requests and returns a map of responses.'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters: []
      requestBody:
        required: true
        description: 'An object containing the fields to POST for the request.


          See the corresponding object definition for field details.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateCustomersRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateCustomersResponse'
  /v2/customers/search:
    post:
      tags:
      - Customers
      summary: Square Search Customers
      operationId: SearchCustomers
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Searches the customer profiles associated with a Square account using one or more supported query filters.


        Calling `SearchCustomers` without any explicit query filter returns all

        customer profiles ordered alphabetically based on `given_name` and

        `family_name`.


        Under normal operating conditions, newly created or updated customer profiles become available

        for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated

        profiles can take closer to one minute or longer, especially during network incidents and outages.'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_READ
      parameters: []
      requestBody:
        required: true
        description: 'An object containing the fields to POST for the request.


          See the corresponding object definition for field details.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchCustomersRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchCustomersResponse'
  /v2/customers/{customer_id}:
    delete:
      tags:
      - Customers
      summary: Square Delete Customer
      operationId: DeleteCustomer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Deletes a customer profile from a business.


        To 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
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters:
      - name: customer_id
        description: The ID of the customer to delete.
        schema:
          type: string
        in: path
        required: true
      - name: version
        description: 'The current version of the customer profile.


          As 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).'
        schema:
          type: integer
          format: int64
        in: query
        required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCustomerResponse'
    get:
      tags:
      - Customers
      summary: Square Retrieve Customer
      operationId: RetrieveCustomer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: Returns details for a single customer.
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_READ
      parameters:
      - name: customer_id
        description: The ID of the customer to retrieve.
        schema:
          type: string
        in: path
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveCustomerResponse'
    put:
      tags:
      - Customers
      summary: Square Update Customer
      operationId: UpdateCustomer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Updates a customer profile. This endpoint supports sparse updates, so only new or changed fields are required in the request.

        To add or update a field, specify the new value. To remove a field, specify `null`.


        To update a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters:
      - name: customer_id
        description: The ID of the customer to update.
        schema:
          type: string
        in: path
        required: true
      requestBody:
        required: true
        description: 'An object containing the fields to POST for the request.


          See the corresponding object definition for field details.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCustomerResponse'
      x-endpoint-errors:
      - error-code: INVALID_EMAIL_ADDRESS
      - error-code: INVALID_PHONE_NUMBER
      - error-code: INVALID_TIME
      - error-code: VALUE_TOO_LONG
  /v2/customers/{customer_id}/cards:
    post:
      tags:
      - Customers
      summary: Square Create Customer Card
      operationId: CreateCustomerCard
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Adds a card on file to an existing customer.


        As with charges, calls to `CreateCustomerCard` are idempotent. Multiple

        calls with the same card nonce return the same card record that was created

        with the provided nonce during the _first_ call.'
      x-release-status: DEPRECATED
      deprecated: true
      x-deprecation:
        deprecationDate: '2021-06-16'
        replacedBy: CreateCard
        guideUrl: https://developer.squareup.com/docs/customers-api/what-it-does#deprecated-createcustomercard-endpoint
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters:
      - name: customer_id
        description: The Square ID of the customer profile the card is linked to.
        schema:
          type: string
        in: path
        required: true
      requestBody:
        required: true
        description: 'An object containing the fields to POST for the request.


          See the corresponding object definition for field details.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerCardRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCustomerCardResponse'
      x-endpoint-errors:
      - error-code: CARD_EXPIRED
      - error-code: CARD_PROCESSING_NOT_ENABLED
      - error-code: CARD_TOKEN_EXPIRED
      - error-code: CARD_TOKEN_USED
      - error-code: INVALID_CARD
      - error-code: INVALID_CARD_DATA
      - error-code: INVALID_EXPIRATION
      - error-code: UNSUPPORTED_ENTRY_METHOD
      - error-code: VERIFY_AVS_FAILURE
      - error-code: VERIFY_CVV_FAILURE
  /v2/customers/{customer_id}/cards/{card_id}:
    delete:
      tags:
      - Customers
      summary: Square Delete Customer Card
      operationId: DeleteCustomerCard
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: Removes a card on file from a customer.
      x-release-status: DEPRECATED
      deprecated: true
      x-deprecation:
        deprecationDate: '2021-06-16'
        replacedBy: DisableCard
        guideUrl: https://developer.squareup.com/docs/customers-api/what-it-does#deprecated-deletecustomercard-endpoint
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters:
      - name: customer_id
        description: The ID of the customer that the card on file belongs to.
        schema:
          type: string
        in: path
        required: true
      - name: card_id
        description: The ID of the card on file to delete.
        schema:
          type: string
        in: path
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCustomerCardResponse'
  /v2/customers/{customer_id}/groups/{group_id}:
    delete:
      tags:
      - Customers
      summary: Square Remove Group from Customer
      operationId: RemoveGroupFromCustomer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Removes a group membership from a customer.


        The customer is identified by the `customer_id` value

        and the customer group is identified by the `group_id` value.'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters:
      - name: customer_id
        description: The ID of the customer to remove from the group.
        schema:
          type: string
        in: path
        required: true
      - name: group_id
        description: The ID of the customer group to remove the customer from.
        schema:
          type: string
        in: path
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveGroupFromCustomerResponse'
    put:
      tags:
      - Customers
      summary: Square Add Group to Customer
      operationId: AddGroupToCustomer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      description: 'Adds a group membership to a customer.


        The customer is identified by the `customer_id` value

        and the customer group is identified by the `group_id` value.'
      x-release-status: PUBLIC
      security:
      - oauth2:
        - CUSTOMERS_WRITE
      parameters:
      - name: customer_id
        description: The ID of the customer to add to a group.
        schema:
          type: string
        in: path
        required: true
      - name: group_id
        description: The ID of the customer group to add the customer to.
        schema:
          type: string
        in: path
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddGroupToCustomerResponse'
components:
  schemas:
    Address:
      type: object
      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
      properties:
        address_line_1:
          type: string
          description: 'The first line of the address.


            Fields that start with `address_line` provide the address''s most specific

            details, like street number, street name, and building name. They do *not*

            provide less specific details like city, state/province, or country (these

            details are provided in other fields).'
          nullable: true
        address_line_2:
          type: string
          description: The second line of the address, if any.
          nullable: true
        address_line_3:
          type: string
          description: The third line of the address, if any.
          nullable: true
        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).
          nullable: true
        sublocality:
          type: string
          description: A civil region within the address's `locality`, if any.
          nullable: true
        sublocality_2:
          type: string
          description: A civil region within the address's `sublocality`, if any.
          nullable: true
        sublocality_3:
          type: string
          description: A civil region within the address's `sublocality_2`, if any.
          nullable: true
        administrative_district_level_1:
          type: string
          description: 'A civil entity within the address''s country. In the US, this

            is 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).'
          nullable: true
        administrative_district_level_2:
          type: string
          description: 'A civil entity within the address''s `administrative_district_level_1`.

            In the US, this is the county.'
          nullable: true
        administrative_district_level_3:
          type: string
          description: 'A civil entity within the address''s `administrative_district_level_2`,

            if any.'
          nullable: true
        postal_code:
          type: string
          description: The address's 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).
          nullable: true
        country:
          $ref: '#/components/schemas/Country'
          description: 'The address''s country, in the two-letter format of ISO 3166. For example, `US` or `FR`.

            See [Country](#type-country) for possible values'
          nullable: true
        first_name:
          type: string
          description: Optional first name when it's representing recipient.
          nullable: true
        last_name:
          type: string
          description: Optional last name when it's representing recipient.
          nullable: true
    BulkCreateCustomersResponse:
      type: object
      description: 'Defines the fields included in the response body from the

        [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) endpoint.'
      x-release-status: PUBLIC
      properties:
        responses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CreateCustomerResponse'
          description: 'A map of responses that correspond to individual create requests, represented by

            key-value pairs.


            Each key is the idempotency key that was provided for a create request and each value

            is the corresponding response.

            If the request succeeds, the value is the new customer profile.

            If the request fails, the value contains any errors that occurred during the request.'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          description: Any top-level errors that prevented the bulk operation from running.
      example:
        responses:
          8bb76c4f-e35d-4c5b-90de-1194cd9179f4:
            customer:
              address:
                address_line_1: 500 Electric Ave
                address_line_2: Suite 600
                administrative_district_level_1: NY
                country: US
                locality: New York
                postal_code: '10003'
              created_at: '2024-03-23T20:21:54.859Z'
              creation_source: THIRD_PARTY
              email_address: Amelia.Earhart@example.com
              family_name: Earhart
              given_name: Amelia
              id: 8DDA5NZVBZFGAX0V3HPF81HHE0
              note: a customer
              phone_number: +1-212-555-4240
              preferences:
                email_unsubscribed: false
              reference_id: YOUR_REFERENCE_ID
              updated_at: '2024-03-23T20:21:54.859Z'
              version: 0
          d1689f23-b25d-4932-b2f0-aed00f5e2029:
            customer:
              address:
                address_line_1: 500 Electric Ave
                address_line_2: Suite 601
                administrative_district_level_1: NY
                country: US
                locality: New York
                postal_code: '10003'
              created_at: '2024-03-23T20:21:54.859Z'
              creation_source: THIRD_PARTY
              email_address: Marie.Curie@example.com
              family_name: Curie
              given_name: Marie
              id: N18CPRVXR5214XPBBA6BZQWF3C
              note: another customer
              phone_number: +1-212-444-4240
              preferences:
                email_unsubscribed: false
              reference_id: YOUR_REFERENCE_ID
              updated_at: '2024-03-23T20:21:54.859Z'
              version: 0
    FloatNumberRange:
      type: object
      description: Specifies a decimal number range.
      x-release-status: PUBLIC
      properties:
        start_at:
          type: string
          description: A decimal value indicating where the range starts.
          nullable: true
        end_at:
          type: string
          description: A decimal value indicating where the range ends.
          nullable: 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: Bolivi

# --- truncated at 32 KB (175 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/square/refs/heads/main/openapi/square-customers-api-openapi.yml