<- Order Custom Attributes API

Order Custom Attributes API

Update order custom attribute definitionBeta

PUT

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

Updates an order-related custom attribute definition for a Square seller account.

Only the definition owner can update a custom attribute definition. Note that sellers can view all custom attributes in exported customer data, including those set to VISIBILITY_HIDDEN.

Permissions:ORDERS_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. For more information, see Updatable definition fields.

To enable optimistic concurrency control, include the optional version field and specify the current version of the custom attribute definition.

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 order custom attribute definition.

Link to section

errors

Any errors that occurred during the request.