<- Merchant Custom Attributes API

Merchant Custom Attributes API

Update merchant custom attribute definitionBeta

PUT

 /v2/merchants/custom-attribute-definitions/{key}

Use this endpoint to update the following fields: name, description, visibility, or the schema for a Selection data type. Only the definition owner can update a custom attribute definition.

Permissions:MERCHANT_PROFILE_WRITE
Link to section

Path parameters

Example code

Link to section

key

string

Required

The key of the custom attribute definition to update.

Link to section

Request body

Link to section

custom_attribute_definition

Required

The custom attribute definition that contains the fields to update. This endpoint supports sparse updates, so only new or changed fields need to be included in the request. Only the following fields can be updated:

  • name
  • description
  • visibility
  • schema for a Selection data type. Only changes to the named options or the maximum number of allowed selections are supported. For more information, see Update a merchant custom attribute definition. The version field must match the current version of the custom attribute definition to enable optimistic concurrency If this is not important for your application, version can be set to -1. For any other values, the request fails with a BAD_REQUEST error.
Link to section

idempotency_key

string

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

Link to section

Response fields

Link to section

custom_attribute_definition

The updated custom attribute definition.

Link to section

errors

Any errors that occurred during the request.