v1

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

UpdateOrderCustomAttributeDefinition

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.

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

Path parameters

keystring required

The key of the custom attribute definition to update.

Request body

idempotency_keystring nullable

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

Example request

{
  "custom_attribute_definition": {
    "key": "cover-count",
    "version": 1,
    "visibility": "VISIBILITY_READ_ONLY"
  },
  "idempotency_key": "IDEMPOTENCY_KEY"
}

Response

Success

Example response

{
  "custom_attribute_definition": {
    "created_at": "2022-11-16T16:53:23.141Z",
    "description": "The number of people seated at a table",
    "key": "cover-count",
    "name": "Cover count",
    "schema": {
      "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number"
    },
    "updated_at": "2022-11-16T17:44:11.436Z",
    "version": 2,
    "visibility": "VISIBILITY_READ_ONLY"
  }
}