Bulk upsert customer custom attributes
POST
/v2/customers/custom-attributes/bulk-upsert
Creates or updates custom attributes for customer profiles as a bulk operation.
Use this endpoint to set the value of one or more custom attributes for one or more customer profiles. A custom attribute is based on a custom attribute definition in a Square seller account, which is created using the CreateCustomerCustomAttributeDefinition endpoint.
This BulkUpsertCustomerCustomAttributes
endpoint accepts a map of 1 to 25 individual upsert
requests and returns a map of individual upsert responses. Each upsert request has a unique ID
and provides a customer ID and custom attribute. Each upsert response is returned with the ID
of the corresponding request.
To create or update a custom attribute owned by another application, the visibility
setting
must be VISIBILITY_READ_WRITE_VALUES
. Note that seller-defined custom attributes
(also known as custom fields) are always set to VISIBILITY_READ_WRITE_VALUES
.
Request body
Example code
A map of responses that correspond to individual upsert requests. Each response has the
same ID as the corresponding request and contains either a customer_id
and custom_attribute
or an errors
field.