v1

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

UpdateLocationCustomAttributeDefinition

Updates a location-related custom attribute definition for a Square seller account. 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.

put/v2/locations/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": {
    "description": "Update the description as desired.",
    "visibility": "VISIBILITY_READ_ONLY"
  }
}

Response

Success

Example response

{
  "custom_attribute_definition": {
    "created_at": "2022-12-02T19:06:36.559Z",
    "description": "Update the description as desired.",
    "key": "bestseller",
    "name": "Bestseller",
    "schema": {
      "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String"
    },
    "updated_at": "2022-12-02T19:34:10.181Z",
    "version": 2,
    "visibility": "VISIBILITY_READ_ONLY"
  }
}