/square-customers | Type: Application | PCID required: Yes
Tools
square_customers_accumulate_loyalty_points
AccumulateLoyaltyPoints Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
account_id | string | Yes | — | The ID of the target loyalty account. |
accumulate_points | object | Yes | — | Provides metadata when the event type is ACCUMULATE_POINTS. |
idempotency_key | string | Yes | — | A unique string that identifies the AccumulateLoyaltyPoints request. Keys can be any valid string but must be unique for every request. |
location_id | string | Yes | — | The location where the purchase was made. |
square_customers_add_group_to_customer
AddGroupToCustomer Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the customer to add to a group. |
group_id | string | Yes | — | The ID of the customer group to add the customer to. |
square_customers_adjust_loyalty_points
AdjustLoyaltyPoints Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
account_id | string | Yes | — | The ID of the target loyalty account. |
adjust_points | object | Yes | — | Provides metadata when the event type is ADJUST_POINTS. |
allow_negative_balance | boolean | No | — | Indicates whether to allow a negative adjustment to result in a negative balance. If true, a negative balance is allowed when subtracting points. If false, Square returns a BAD_REQUEST error when subtracting the specified number of points would result in a negative balance. The default value is false. |
idempotency_key | string | Yes | — | A unique string that identifies this AdjustLoyaltyPoints request. Keys can be any valid string, but must be unique for every request. |
square_customers_bulk_create_customers
BulkCreateCustomers Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customers | object | Yes | — | A map of 1 to 100 individual create requests, represented by idempotency key: { customer data } key-value pairs. Each key is an idempotency key that uniquely identifies the create request. Each value contains the customer data used to create the customer profile. |
square_customers_bulk_delete_customers
BulkDeleteCustomers Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_ids | string[] | Yes | — | The IDs of the customer profiles to delete. |
square_customers_bulk_retrieve_customers
BulkRetrieveCustomers Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_ids | string[] | Yes | — | The IDs of the customer profiles to retrieve. |
square_customers_bulk_update_customers
BulkUpdateCustomers Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customers | object | Yes | — | A map of 1 to 100 individual update requests, represented by customer ID: { customer data } key-value pairs. Each key is the ID of the customer profile to update. To update a customer profile that was created by merging existing profiles, provide the ID of the newly created profile. Each value contains the updated customer data. Only new or changed fields are required. To add or update a field, specify the new value. To remove a field, specify null. |
square_customers_bulk_upsert_customer_custom_attributes
BulkUpsertCustomerCustomAttributes Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
values | object | Yes | — | A map containing 1 to 25 individual upsert requests. For each request, provide an arbitrary ID that is unique for this BulkUpsertCustomerCustomAttributes request and the information needed to create or update a custom attribute. |
square_customers_calculate_loyalty_points
CalculateLoyaltyPoints Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
program_id | string | Yes | — | The ID of the loyalty program, which defines the rules for accruing points. |
loyalty_account_id | string | No | — | The ID of the target loyalty account. Optionally specify this field if your application uses the Orders API to process orders. If specified, the promotion_points field in the response shows the number of points the buyer would earn from the purchase. In this case, Square uses the account ID to determine whether the promotion’s trigger_limit (the maximum number of times that a buyer can trigger the promotion) has been reached. If not specified, the promotion_points field shows the number of points the purchase qualifies for regardless of the trigger limit. |
order_id | string | No | — | The order ID for which to calculate the points. Specify this field if your application uses the Orders API to process orders. Otherwise, specify the transaction_amount_money. |
transaction_amount_money | object | No | — | Represents an amount of money. Money fields can be signed or unsigned. Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information. |
square_customers_cancel_loyalty_promotion
CancelLoyaltyPromotion Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
promotion_id | string | Yes | — | The ID of the loyalty promotion to cancel. You can cancel a promotion that has an ACTIVE or SCHEDULED status. |
program_id | string | Yes | — | The ID of the base loyalty program. |
square_customers_create_customer
CreateCustomer Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
address | object | No | — | Represents a postal address in a country. For more information, see Working with Addresses. |
birthday | string | No | — | The birthday associated with the customer profile, in YYYY-MM-DD or MM-DD format. For example, specify 1998-09-21 for September 21, 1998, or 09-21 for September 21. Birthdays are returned in YYYY-MM-DD format, where YYYY is the specified birth year or 0000 if a birth year is not specified. |
company_name | string | No | — | A business name associated with the customer profile. The maximum length for this value is 500 characters. |
email_address | string | No | — | The email address associated with the customer profile. The maximum length for this value is 254 characters. |
family_name | string | No | — | The family name (that is, the last name) associated with the customer profile. The maximum length for this value is 300 characters. |
given_name | string | No | — | The given name (that is, the first name) associated with the customer profile. The maximum length for this value is 300 characters. |
idempotency_key | string | No | — | The idempotency key for the request. For more information, see Idempotency. |
nickname | string | No | — | A nickname for the customer profile. The maximum length for this value is 100 characters. |
note | string | No | — | A custom note associated with the customer profile. |
phone_number | string | No | — | The phone number associated with the customer profile. The phone number must be valid and can contain 9–16 digits, with an optional + prefix and country code. For more information, see Customer phone numbers. |
reference_id | string | No | — | An optional second ID used to associate the customer profile with an entity in another system. The maximum length for this value is 100 characters. |
tax_ids | object | No | — | Represents the tax ID associated with a customer profile. The corresponding tax_ids field is available only for customers of sellers in EU countries or the United Kingdom. For more information, see Customer tax IDs. |
square_customers_create_customer_custom_attribute_definition
CreateCustomerCustomAttributeDefinition Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
custom_attribute_definition | object | Yes | — | Represents a definition for custom attribute values. A custom attribute definition specifies the key, visibility, schema, and other properties for a custom attribute. |
idempotency_key | string | No | — | A unique identifier for this request, used to ensure idempotency. For more information, see Idempotency. |
square_customers_create_customer_group
CreateCustomerGroup Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
group | object | Yes | — | Represents a group of customer profiles. Customer groups can be created, be modified, and have their membership defined using the Customers API or within the Customer Directory in the Square Seller Dashboard or Point of Sale. |
idempotency_key | string | No | — | The idempotency key for the request. For more information, see Idempotency. |
square_customers_create_loyalty_account
CreateLoyaltyAccount Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
idempotency_key | string | Yes | — | A unique string that identifies this CreateLoyaltyAccount request. Keys can be any valid string, but must be unique for every request. |
loyalty_account | object | Yes | — | Describes a loyalty account in a loyalty program. For more information, see Create and Retrieve Loyalty Accounts. |
square_customers_create_loyalty_promotion
CreateLoyaltyPromotion Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
program_id | string | Yes | — | The ID of the loyalty program to associate with the promotion. To get the program ID, call RetrieveLoyaltyProgram using the main keyword. |
idempotency_key | string | Yes | — | A unique identifier for this request, which is used to ensure idempotency. For more information, see Idempotency. |
loyalty_promotion | object | Yes | — | Represents a promotion for a loyalty program. Loyalty promotions enable buyers to earn extra points on top of those earned from the base program. A loyalty program can have a maximum of 10 loyalty promotions with an ACTIVE or SCHEDULED status. |
square_customers_create_loyalty_reward
CreateLoyaltyReward Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
idempotency_key | string | Yes | — | A unique string that identifies this CreateLoyaltyReward request. Keys can be any valid string, but must be unique for every request. |
reward | object | Yes | — | Represents a contract to redeem loyalty points for a reward tier discount. Loyalty rewards can be in an ISSUED, REDEEMED, or DELETED state. For more information, see Manage loyalty rewards. |
square_customers_delete_customer
DeleteCustomer Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the customer to delete. |
version | integer | No | — | The current version of the customer profile. As a best practice, you should include this parameter to enable optimistic concurrency control. For more information, see Delete a customer profile. |
square_customers_delete_customer_custom_attribute
DeleteCustomerCustomAttribute Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the target customer profile. |
key | string | Yes | — | The key of the custom attribute to delete. This key must match the key of a custom attribute definition in the Square seller account. If the requesting application is not the definition owner, you must use the qualified key. |
square_customers_delete_customer_custom_attribute_definition
DeleteCustomerCustomAttributeDefinition Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | — | The key of the custom attribute definition to delete. |
square_customers_delete_customer_group
DeleteCustomerGroup Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
group_id | string | Yes | — | The ID of the customer group to delete. |
square_customers_delete_loyalty_reward
DeleteLoyaltyReward Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
reward_id | string | Yes | — | The ID of the loyalty reward to delete. |
square_customers_list_customer_custom_attribute_definitions
ListCustomerCustomAttributeDefinitions Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | — | The maximum number of results to return in a single paged response. This limit is advisory. The response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. The default value is 20. For more information, see Pagination. |
cursor | string | No | — | The cursor returned in the paged response from the previous call to this endpoint. Provide this cursor to retrieve the next page of results for your original request. For more information, see Pagination. |
square_customers_list_customer_custom_attributes
ListCustomerCustomAttributes Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the target customer profile. |
limit | integer | No | — | The maximum number of results to return in a single paged response. This limit is advisory. The response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. The default value is 20. For more information, see Pagination. |
cursor | string | No | — | The cursor returned in the paged response from the previous call to this endpoint. Provide this cursor to retrieve the next page of results for your original request. For more information, see Pagination. |
with_definitions | boolean | No | — | Indicates whether to return the custom attribute definition in the definition field of each custom attribute. Set this parameter to true to get the name and description of each custom attribute, information about the data type, or other definition details. The default value is false. |
square_customers_list_customer_groups
ListCustomerGroups Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cursor | string | No | — | 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. |
limit | integer | No | — | 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 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. For more information, see Pagination. |
square_customers_list_customer_segments
ListCustomerSegments Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cursor | string | No | — | A pagination cursor returned by previous calls to ListCustomerSegments. This cursor is used to retrieve the next set of query results. For more information, see Pagination. |
limit | integer | No | — | 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 50, Square returns a 400 VALUE_TOO_LOW or 400 VALUE_TOO_HIGH error. The default value is 50. For more information, see Pagination. |
square_customers_list_customers
ListCustomers Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cursor | string | No | — | 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. |
limit | integer | No | — | 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. |
sort_field | string | No | — | Indicates how customers should be sorted. The default value is DEFAULT. |
sort_order | string | No | — | Indicates whether customers should be sorted in ascending (ASC) or descending (DESC) order. The default value is ASC. |
count | boolean | No | — | Indicates whether to return the total count of customers in the count field of the response. The default value is false. |
square_customers_list_loyalty_promotions
ListLoyaltyPromotions Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
program_id | string | Yes | — | The ID of the base loyalty program. To get the program ID, call RetrieveLoyaltyProgram using the main keyword. |
status | string | No | — | The status to filter the results by. If a status is provided, only loyalty promotions with the specified status are returned. Otherwise, all loyalty promotions associated with the loyalty program are returned. |
cursor | string | No | — | The cursor returned in the paged response from the previous call to this endpoint. Provide this cursor to retrieve the next page of results for your original request. For more information, see Pagination. |
limit | integer | No | — | The maximum number of results to return in a single paged response. The minimum value is 1 and the maximum value is 30. The default value is 30. For more information, see Pagination. |
square_customers_redeem_loyalty_reward
RedeemLoyaltyReward Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
reward_id | string | Yes | — | The ID of the loyalty reward to redeem. |
idempotency_key | string | Yes | — | A unique string that identifies this RedeemLoyaltyReward request. Keys can be any valid string, but must be unique for every request. |
location_id | string | Yes | — | The ID of the location where the reward is redeemed. |
square_customers_remove_group_from_customer
RemoveGroupFromCustomer Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the customer to remove from the group. |
group_id | string | Yes | — | The ID of the customer group to remove the customer from. |
square_customers_retrieve_customer
RetrieveCustomer Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the customer to retrieve. |
square_customers_retrieve_customer_custom_attribute
RetrieveCustomerCustomAttribute Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the target customer profile. |
key | string | Yes | — | The key of the custom attribute to retrieve. This key must match the key of a custom attribute definition in the Square seller account. If the requesting application is not the definition owner, you must use the qualified key. |
with_definition | boolean | No | — | Indicates whether to return the custom attribute definition in the definition field of the custom attribute. Set this parameter to true to get the name and description of the custom attribute, information about the data type, or other definition details. The default value is false. |
version | integer | No | — | The current version of the custom attribute, which is used for strongly consistent reads to guarantee that you receive the most up-to-date data. When included in the request, Square returns the specified version or a higher version if one exists. If the specified version is higher than the current version, Square returns a BAD_REQUEST error. |
square_customers_retrieve_customer_custom_attribute_definition
RetrieveCustomerCustomAttributeDefinition Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | — | The key of the custom attribute definition to retrieve. If the requesting application is not the definition owner, you must use the qualified key. |
version | integer | No | — | The current version of the custom attribute definition, which is used for strongly consistent reads to guarantee that you receive the most up-to-date data. When included in the request, Square returns the specified version or a higher version if one exists. If the specified version is higher than the current version, Square returns a BAD_REQUEST error. |
square_customers_retrieve_customer_group
RetrieveCustomerGroup Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
group_id | string | Yes | — | The ID of the customer group to retrieve. |
square_customers_retrieve_customer_segment
RetrieveCustomerSegment Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
segment_id | string | Yes | — | The Square-issued ID of the customer segment. |
square_customers_retrieve_loyalty_account
RetrieveLoyaltyAccount Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
account_id | string | Yes | — | The ID of the loyalty account to retrieve. |
square_customers_retrieve_loyalty_program
RetrieveLoyaltyProgram Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
program_id | string | Yes | — | 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. |
square_customers_retrieve_loyalty_promotion
RetrieveLoyaltyPromotion Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
promotion_id | string | Yes | — | The ID of the loyalty promotion to retrieve. |
program_id | string | Yes | — | The ID of the base loyalty program. To get the program ID, call RetrieveLoyaltyProgram using the main keyword. |
square_customers_retrieve_loyalty_reward
RetrieveLoyaltyReward Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
reward_id | string | Yes | — | The ID of the loyalty reward to retrieve. |
square_customers_search_customers
SearchCustomers Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
count | boolean | No | — | Indicates whether to return the total count of matching customers in the count field of the response. The default value is false. |
cursor | string | No | — | Include the pagination cursor in subsequent calls to this endpoint to retrieve the next set of results associated with the original query. For more information, see Pagination. |
limit | integer | No | — | 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 invalid, Square returns a 400 VALUE_TOO_LOW or 400 VALUE_TOO_HIGH error. The default value is 100. For more information, see Pagination. |
query | object | No | — | Represents filtering and sorting criteria for a SearchCustomers request. |
square_customers_search_loyalty_accounts
SearchLoyaltyAccounts Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cursor | string | No | — | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. For more information, see Pagination. |
limit | integer | No | — | The maximum number of results to include in the response. The default value is 30. |
query | object | No | — | The search criteria for the loyalty accounts. |
square_customers_search_loyalty_events
SearchLoyaltyEvents Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cursor | string | No | — | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. For more information, see Pagination. |
limit | integer | No | — | The maximum number of results to include in the response. The last page might contain fewer events. The default is 30 events. |
query | object | No | — | Represents a query used to search for loyalty events. |
square_customers_search_loyalty_rewards
SearchLoyaltyRewards Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cursor | string | No | — | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. For more information, see Pagination. |
limit | integer | No | — | The maximum number of results to return in the response. The default value is 30. |
query | object | No | — | The set of search requirements. |
square_customers_update_customer
UpdateCustomer Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the customer to update. |
address | object | No | — | Represents a postal address in a country. For more information, see Working with Addresses. |
birthday | string | No | — | The birthday associated with the customer profile, in YYYY-MM-DD or MM-DD format. For example, specify 1998-09-21 for September 21, 1998, or 09-21 for September 21. Birthdays are returned in YYYY-MM-DD format, where YYYY is the specified birth year or 0000 if a birth year is not specified. |
company_name | string | No | — | A business name associated with the customer profile. The maximum length for this value is 500 characters. |
email_address | string | No | — | The email address associated with the customer profile. The maximum length for this value is 254 characters. |
family_name | string | No | — | The family name (that is, the last name) associated with the customer profile. The maximum length for this value is 300 characters. |
given_name | string | No | — | The given name (that is, the first name) associated with the customer profile. The maximum length for this value is 300 characters. |
nickname | string | No | — | A nickname for the customer profile. The maximum length for this value is 100 characters. |
note | string | No | — | A custom note associated with the customer profile. |
phone_number | string | No | — | The phone number associated with the customer profile. The phone number must be valid and can contain 9–16 digits, with an optional + prefix and country code. For more information, see Customer phone numbers. |
reference_id | string | No | — | An optional second ID used to associate the customer profile with an entity in another system. The maximum length for this value is 100 characters. |
tax_ids | object | No | — | Represents the tax ID associated with a customer profile. The corresponding tax_ids field is available only for customers of sellers in EU countries or the United Kingdom. For more information, see Customer tax IDs. |
version | integer | No | — | The current version of the customer profile. As a best practice, you should include this field to enable optimistic concurrency control. For more information, see Update a customer profile. |
square_customers_update_customer_custom_attribute_definition
UpdateCustomerCustomAttributeDefinition Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | — | The key of the custom attribute definition to update. |
custom_attribute_definition | object | Yes | — | Represents a definition for custom attribute values. A custom attribute definition specifies the key, visibility, schema, and other properties for a custom attribute. |
idempotency_key | string | No | — | A unique identifier for this request, used to ensure idempotency. For more information, see Idempotency. |
square_customers_update_customer_group
UpdateCustomerGroup Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
group_id | string | Yes | — | The ID of the customer group to update. |
group | object | Yes | — | Represents a group of customer profiles. Customer groups can be created, be modified, and have their membership defined using the Customers API or within the Customer Directory in the Square Seller Dashboard or Point of Sale. |
square_customers_upsert_customer_custom_attribute
UpsertCustomerCustomAttribute Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customer_id | string | Yes | — | The ID of the target customer profile. |
key | string | Yes | — | The key of the custom attribute to create or update. This key must match the key of a custom attribute definition in the Square seller account. If the requesting application is not the definition owner, you must use the qualified key. |
custom_attribute | object | Yes | — | A custom attribute value. Each custom attribute value has a corresponding CustomAttributeDefinition object. |
idempotency_key | string | No | — | A unique identifier for this request, used to ensure idempotency. For more information, see Idempotency. |

