Development
  • Guides
  • API Reference
  • API Explorer
  • SDKs
  • Sample apps
  • System status
Support
  • Developer forums
  • Developer blog
  • YouTube
  • X
More
  • Square Home
  • Square Developer
  • App Marketplace
  • Partner with Square
  • Solutions Partner Program
  • Pricing
  • Sales

© 2026 Square, Inc.

  • Developer terms of service
  • Developer Integration and Marketing Agreement
  • Privacy policy
  • Partnerships
  • Sign In
  • Sign In

    Location Custom Attributes

  • List location custom attribute definitions

  • Create location custom attribute definition

  • Delete location custom attribute definition

  • Retrieve location custom attribute definition

  • Update location custom attribute definition

  • Bulk delete location custom attributes

  • Bulk upsert location custom attributes

  • List location custom attributes

  • Delete location custom attribute

  • Retrieve location custom attribute

  • Upsert location custom attribute

  • Webhooks

  • location.custom_attribute_definition.owned.created

  • location.custom_attribute_definition.owned.deleted

  • location.custom_attribute_definition.owned.updated

  • location.custom_attribute_definition.visible.created

  • location.custom_attribute_definition.visible.deleted

  • location.custom_attribute_definition.visible.updated

  • location.custom_attribute.owned.deleted

  • location.custom_attribute.owned.updated

  • location.custom_attribute.visible.deleted

  • location.custom_attribute.visible.updated

<- Location Custom Attributes API

Location Custom Attributes API

All versions ->

Bulk upsert location custom attributesBeta

POST

 /v2/locations/custom-attributes/bulk-upsert

Creates or updates custom attributes for locations as a bulk operation.

Use this endpoint to set the value of one or more custom attributes for one or more locations. A custom attribute is based on a custom attribute definition in a Square seller account, which is created using the CreateLocationCustomAttributeDefinition endpoint. This BulkUpsertLocationCustomAttributes endpoint accepts a map of 1 to 25 individual upsert requests and returns a map of individual upsert responses. Each upsert request has a unique ID and provides a location ID and custom attribute. Each upsert response is returned with the ID of the corresponding request. To create or update a custom attribute owned by another application, the visibility setting must be VISIBILITY_READ_WRITE_VALUES.

Permissions:MERCHANT_PROFILE_WRITE

Guide

Bulk upsert location custom attributes

Try in API Explorer
Link to section

Request body

Example code

Link to section

values

Required

A map containing 1 to 25 individual upsert requests. For each request, provide an arbitrary ID that is unique for this BulkUpsertLocationCustomAttributes request and the information needed to create or update a custom attribute.

Link to section

Response fields

Link to section

values

A map of responses that correspond to individual upsert requests. Each response has the same ID as the corresponding request and contains either a location_id and custom_attribute or an errors field.

Link to section

errors

Any errors that occurred during the request.

Link to section

Examples

All versions ->

POST /v2/locations/custom-attributes/bulk-upsert
curl https://connect.squareup.com/v2/locations/custom-attributes/bulk-upsert \ -X POST \ -H 'Square-Version: 2026-11-18' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "values": { "id1": { "custom_attribute": { "key": "bestseller", "value": "hot cocoa" }, "location_id": "L0TBCBTB7P8RQ" }, "id2": { "custom_attribute": { "key": "bestseller", "value": "berry smoothie" }, "location_id": "L9XMD04V3STJX" }, "id3": { "custom_attribute": { "key": "phone-number", "value": "+12223334444" }, "location_id": "L0TBCBTB7P8RQ" } } }'

Response JSON

{ "values": { "id1": { "location_id": "L0TBCBTB7P8RQ", "custom_attribute": { "key": "bestseller", "version": 2, "updated_at": "2023-01-09T19:21:04.551Z", "value": "hot cocoa", "created_at": "2023-01-09T19:02:58.647Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } }, "id2": { "location_id": "L9XMD04V3STJX", "custom_attribute": { "key": "bestseller", "version": 1, "updated_at": "2023-01-09T19:21:04.551Z", "value": "berry smoothie", "created_at": "2023-01-09T19:02:58.647Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } }, "id3": { "location_id": "L0TBCBTB7P8RQ", "custom_attribute": { "key": "phone-number", "version": 2, "updated_at": "2023-01-09T19:21:04.563Z", "value": "+12239903892", "created_at": "2023-01-09T19:04:57.985Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } } } }