BulkUpsertMerchantCustomAttributes
Creates or updates custom attributes for a merchant as a bulk operation. 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.
Request body
Example request
{
"values": {
"id1": {
"custom_attribute": {
"key": "alternative_seller_name",
"value": "Ultimate Sneaker Store"
},
"merchant_id": "DM7VKY8Q63GNP"
},
"id2": {
"custom_attribute": {
"key": "has_seen_tutorial",
"value": true
},
"merchant_id": "DM7VKY8Q63GNP"
}
}
}Response
Success
Example response
{
"values": {
"id1": {
"custom_attribute": {
"created_at": "2023-05-06T19:02:58.647Z",
"key": "alternative_seller_name",
"updated_at": "2023-05-06T19:21:04.551Z",
"value": "Ultimate Sneaker Store",
"version": 2,
"visibility": "VISIBILITY_READ_ONLY"
},
"merchant_id": "DM7VKY8Q63GNP"
},
"id2": {
"custom_attribute": {
"created_at": "2023-05-06T19:02:58.647Z",
"key": "has_seen_tutorial",
"updated_at": "2023-05-06T19:21:04.551Z",
"value": true,
"version": 1,
"visibility": "VISIBILITY_READ_WRITE_VALUES"
},
"merchant_id": "DM7VKY8Q63GNP"
}
}
}