<- Merchant Custom Attributes API

Merchant Custom Attributes API

Bulk upsert merchant custom attributesBeta

POST

 /v2/merchants/custom-attributes/bulk-upsert

Use this endpoint to set the value of one or more custom attributes for a merchant. A custom attribute is based on a custom attribute definition in a Square seller account, which is created using the CreateMerchantCustomAttributeDefinition endpoint. This BulkUpsertMerchantCustomAttributes 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 merchant 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.

Permissions:MERCHANT_PROFILE_WRITE
Link to section

Request body

Example code

Link to section

values

Required

A map containing 1 to 25 individual upsert requests. For each request, provide an arbitrary ID that is unique for this BulkUpsertMerchantCustomAttributes request and the information needed to create or update a custom attribute.

Link to section

Response fields

Link to section

values

A map of responses that correspond to individual upsert requests. Each response has the same ID as the corresponding request and contains either a merchant_id and custom_attribute or an errors field.

Link to section

errors

Any errors that occurred during the request.