Square Customers API

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

Operations 14

GET /v2/customers Square List Customers #
POST /v2/customers Square Create Customer #
POST /v2/customers/bulk-create Square Bulk Create Customers #
POST /v2/customers/bulk-delete Square Bulk Delete Customers #
POST /v2/customers/bulk-retrieve Square Bulk Retrieve Customers #
POST /v2/customers/bulk-update Square Bulk Update Customers #
POST /v2/customers/search Square Search Customers #
DELETE /v2/customers/{customer_id} Square Delete Customer #
GET /v2/customers/{customer_id} Square Retrieve Customer #
PUT /v2/customers/{customer_id} Square Update Customer #
POST /v2/customers/{customer_id}/cards Square Create Customer Card #
DELETE /v2/customers/{customer_id}/cards/{card_id} Square Delete Customer Card #
DELETE /v2/customers/{customer_id}/groups/{group_id} Square Remove Group from Customer #
PUT /v2/customers/{customer_id}/groups/{group_id} Square Add Group to Customer #

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

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/square-customers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

square-customers-api-openapi.yml Raw ↑
openapi: 3.2.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:
    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's brand, such as `VISA` or `MASTERCARD`.
      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's type, such as `CREDIT` or `DEBIT`.
      x-release-status: PUBLIC
    CreateCustomerResponse:
      type: object
      description: 'Defines the fields that are included in the response body of

        a request to the [CreateCustomer](api-endpoint:Customers-CreateCustomer) or

        [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) endpoint.


        Either `errors` or `customer` is present in a given response (never both).'
      x-release-status: PUBLIC
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          description: Any errors that occurred during the request.
        customer:
          $ref: '#/components/schemas/Customer'
          description: The created customer.
      example:
        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: '2016-03-23T20:21:54.859Z'
          creation_source: THIRD_PARTY
          email_address: Amelia.Earhart@example.com
          family_name: Earhart
          given_name: Amelia
          id: JDKYHBWT1D4F8MFH63DBMEN8Y4
          note: a customer
          phone_number: +1-212-555-4240
          preferences:
            email_unsubscribed: false
          reference_id: YOUR_REFERENCE_ID
          updated_at: '2016-03-23T20:21:54.859Z'
          version: 0
      x-sq-sdk-sample-code:
        csharp: /sdk_samples/CreateCustomer/CreateCustomerResponse.csharp
        java: /sdk_samples/CreateCustomer/CreateCustomerResponse.java
        javascript: /sdk_samples/CreateCustomer/CreateCustomerResponse.javascript
        php: /sdk_samples/CreateCustomer/CreateCustomerResponse.php
        python: /sdk_samples/CreateCustomer/CreateCustomerResponse.python
        ruby: /sdk_samples/CreateCustomer/CreateCustomerResponse.ruby
    BulkUpdateCustomersResponse:
      type: object
      description: 'Defines the fields included in the response body from the

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

            key-value pairs.


            Each key is the customer ID that was specified for an update request and each value

            is the corresponding response.

            If the request succeeds, the value is the updated 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:
          8DDA5NZVBZFGAX0V3HPF81HHE0:
            customer:
              birthday: '1897-07-24'
              created_at: '2024-01-19T00:27:54.59Z'
              creation_source: THIRD_PARTY
              email_address: New.Amelia.Earhart@example.com
              family_name: Earhart
              given_name: Amelia
              id: 8DDA5NZVBZFGAX0V3HPF81HHE0
              note: updated customer note
              preferences:
                email_unsubscribed: false
              updated_at: '2024-01-19T00:38:06Z'
              version: 3
          N18CPRVXR5214XPBBA6BZQWF3C:
            customer:
              created_at: '2024-01-19T00:27:54.59Z'
              creation_source: THIRD_PARTY
              family_name: Curie
              given_name: Marie
              id: N18CPRVXR5214XPBBA6BZQWF3C
              preferences:
                email_unsubscribed: false
              updated_at: '2024-01-19T00:38:06Z'
              version: 1
    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's prepaid type, such as `NOT_PREPAID` or `PREPAID`.
      x-release-status: PUBLIC
    CustomerPreferences:
      type: object
      description: Represents communication preferences for the customer profile.
      x-release-status: PUBLIC
      properties:
        email_unsubscribed:
          type:
          - boolean
          - 'null'
          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.
    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:

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