v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
MerchantCustomAttributes

UpsertMerchantCustomAttribute

Creates or updates a custom attribute for a merchant. Use this endpoint to set the value of a custom attribute for a specified merchant. A custom attribute is based on a custom attribute definition in a Square seller account, which is created using the CreateMerchantCustomAttributeDefinition endpoint. To create or update a custom attribute owned by another application, the visibility setting must be VISIBILITY_READ_WRITE_VALUES.

post/v2/merchants/{merchant_id}/custom-attributes/{key}

Path parameters

merchant_idstring required

The ID of the target merchant.

keystring required

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.

Request body

idempotency_keystring nullable

A unique identifier for this request, used to ensure idempotency. For more information, see Idempotency.

Example request

{
  "custom_attribute": {
    "value": "Ultimate Sneaker Store"
  }
}

Response

Success

Example response

{
  "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"
  }
}