Square · Schema

UpsertLocationCustomAttributeRequest

Represents an [UpsertLocationCustomAttribute](api-endpoint:LocationCustomAttributes-UpsertLocationCustomAttribute) request.

BookingLocationSquareRestaurantCatalogCheckoutCustomersDisputesE-CommerceFinancial TechnologyGift CardsInventoryInvoicingLaborLoyaltyMerchantsOrderPaymentsPoint-of-SaleRefundsRetailSubscriptionTeamWebhookPayment ProcessingPayment Terminals

Properties

Name Type Description
custom_attribute object The custom attribute to create or update, with the following fields: - `value`. This value must conform to the `schema` specified by the definition. For more information, see [Supported data types](ht
idempotency_key stringnull A unique identifier for this request, used to ensure idempotency. For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
View JSON Schema on GitHub

JSON Schema

square-upsert-location-custom-attribute-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/square/main/json-schema/square-upsert-location-custom-attribute-request-schema.json",
  "title": "UpsertLocationCustomAttributeRequest",
  "description": "Represents an [UpsertLocationCustomAttribute](api-endpoint:LocationCustomAttributes-UpsertLocationCustomAttribute) request.",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/square-locationcustomattributes-api-openapi.yml#/components/schemas/UpsertLocationCustomAttributeRequest",
  "type": "object",
  "x-release-status": "BETA",
  "x-params-example": "?location_id=L0TBCBTB7P8RQ&key=bestseller",
  "required": [
    "custom_attribute"
  ],
  "properties": {
    "custom_attribute": {
      "$ref": "#/$defs/CustomAttribute",
      "description": "The custom attribute to create or update, with the following fields:\n- `value`. This value must conform to the `schema` specified by the definition.\nFor more information, see [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).\n- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol for an update operation, include the current version of the custom attribute.\nIf this is not important for your application, version can be set to -1."
    },
    "idempotency_key": {
      "type": [
        "string",
        "null"
      ],
      "description": "A unique identifier for this request, used to ensure idempotency. For more information,\nsee [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).",
      "maxLength": 45
    }
  },
  "$defs": {
    "CustomAttribute": {
      "type": "object",
      "description": "A custom attribute value. Each custom attribute value has a corresponding\n`CustomAttributeDefinition` object.",
      "x-release-status": "PUBLIC",
      "properties": {
        "key": {
          "type": [
            "string",
            "null"
          ],
          "description": "The identifier\nof the custom attribute definition and its corresponding custom attributes. This value\ncan be a simple key, which is the key that is provided when the custom attribute definition\nis created, or a qualified key, if the requesting\napplication is not the definition owner. The qualified key consists of the application ID\nof the custom attribute definition owner\nfollowed by the simple key that was provided when the definition was created. It has the\nformat application_id:simple key.\n\nThe value for a simple key can contain up to 60 alphanumeric characters, periods (.),\nunderscores (_), and hyphens (-).",
          "minLength": 1,
          "pattern": "^([a-zA-Z0-9\\._-]+:)?[a-zA-Z0-9\\._-]{1,60}$"
        },
        "value": {
          "description": "The value assigned to the custom attribute. It is validated against the custom\nattribute definition's schema on write operations. For more information about custom\nattribute values,\nsee [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview)."
        },
        "version": {
          "type": "integer",
          "description": "Read only. The current version of the custom attribute. This field is incremented when the custom attribute is changed.\nWhen updating an existing custom attribute value, you can provide this field\nand specify the current version of the custom attribute to enable\n[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency).\nThis field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,\nsee [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview)."
        },
        "visibility": {
          "$ref": "#/$defs/CustomAttributeDefinitionVisibility",
          "description": "A copy of the `visibility` field value for the associated custom attribute definition.\nSee [CustomAttributeDefinitionVisibility](#type-customattributedefinitionvisibility) for possible values",
          "readOnly": true
        },
        "definition": {
          "$ref": "#/$defs/CustomAttributeDefinition",
          "description": "A copy of the associated custom attribute definition object. This field is only set when\nthe optional field is specified on the request.",
          "readOnly": true
        },
        "updated_at": {
          "type": "string",
          "description": "The timestamp that indicates when the custom attribute was created or was most recently\nupdated, in RFC 3339 format.",
          "readOnly": true
        },
        "created_at": {
          "type": "string",
          "description": "The timestamp that indicates when the custom attribute was created, in RFC 3339 format.",
          "readOnly": true
        }
      }
    },
    "CustomAttributeDefinition": {
      "type": "object",
      "description": "Represents a definition for custom attribute values. A custom attribute definition\nspecifies the key, visibility, schema, and other properties for a custom attribute.",
      "x-release-status": "PUBLIC",
      "properties": {
        "key": {
          "type": [
            "string",
            "null"
          ],
          "description": "The identifier\nof the custom attribute definition and its corresponding custom attributes. This value\ncan be a simple key, which is the key that is provided when the custom attribute definition\nis created, or a qualified key, if the requesting\napplication is not the definition owner. The qualified key consists of the application ID\nof the custom attribute definition owner\nfollowed by the simple key that was provided when the definition was created. It has the\nformat application_id:simple key.\n\nThe value for a simple key can contain up to 60 alphanumeric characters, periods (.),\nunderscores (_), and hyphens (-).\n\nThis field can not be changed\nafter the custom attribute definition is created. This field is required when creating\na definition and must be unique per application, seller, and resource type.",
          "minLength": 1,
          "pattern": "^([a-zA-Z0-9\\._-]+:)?[a-zA-Z0-9\\._-]{1,60}$"
        },
        "schema": {
          "type": [
            "object",
            "null"
          ],
          "description": "The JSON schema for the custom attribute definition, which determines the data type of the corresponding custom attributes. For more information,\nsee [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). This field is required when creating a definition."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the custom attribute definition for API and seller-facing UI purposes. The name must\nbe unique within the seller and application pair. This field is required if the\n`visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.",
          "maxLength": 255
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Seller-oriented description of the custom attribute definition, including any constraints\nthat the seller should observe. May be displayed as a tooltip in Square UIs. This field is\nrequired if the `visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.",
          "maxLength": 255
        },
        "visibility": {
          "$ref": "#/$defs/CustomAttributeDefinitionVisibility",
          "description": "Specifies how the custom attribute definition and its values should be shared with\nthe seller and other applications. If no value is specified, the value defaults to `VISIBILITY_HIDDEN`.\nSee [Visibility](#type-visibility) for possible values"
        },
        "version": {
          "type": "integer",
          "description": "Read only. The current version of the custom attribute definition.\nThe value is incremented each time the custom attribute definition is updated.\nWhen updating a custom attribute definition, you can provide this field\nand specify the current version of the custom attribute definition to enable\n[optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency).\n\nOn writes, this field must be set to the latest version. Stale writes are rejected.\n\nThis field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,\nsee [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview)."
        },
        "updated_at": {
          "type": "string",
          "description": "The timestamp that indicates when the custom attribute definition was created or most recently updated,\nin RFC 3339 format.",
          "readOnly": true
        },
        "created_at": {
          "type": "string",
          "description": "The timestamp that indicates when the custom attribute definition was created, in RFC 3339 format.",
          "readOnly": true
        }
      }
    },
    "CustomAttributeDefinitionVisibility": {
      "type": "string",
      "enum": [
        "VISIBILITY_HIDDEN",
        "VISIBILITY_READ_ONLY",
        "VISIBILITY_READ_WRITE_VALUES"
      ],
      "x-enum-elements": [
        {
          "name": "VISIBILITY_HIDDEN",
          "description": "The custom attribute definition and values are hidden from the seller (except on export\nof all seller data) and other developers."
        },
        {
          "name": "VISIBILITY_READ_ONLY",
          "description": "The seller and other developers can read the custom attribute definition and values\non resources."
        },
        {
          "name": "VISIBILITY_READ_WRITE_VALUES",
          "description": "The seller and other developers can read the custom attribute definition,\nand can read and write values on resources. A custom attribute definition\ncan only be edited or deleted by the application that created it."
        }
      ],
      "description": "The level of permission that a seller or other applications requires to\nview this custom attribute definition.\nThe `Visibility` field controls who can read and write the custom attribute values\nand custom attribute definition.",
      "x-release-status": "PUBLIC"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/square-upsert-location-custom-attribute-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.