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

    Order Custom Attributes

  • List order custom attribute definitions

  • Create order custom attribute definition

  • Delete order custom attribute definition

  • Retrieve order custom attribute definition

  • Update order custom attribute definition

  • Bulk delete order custom attributes

  • Bulk upsert order custom attributes

  • List order custom attributes

  • Delete order custom attribute

  • Retrieve order custom attribute

  • Upsert order custom attribute

  • Webhooks

  • order.custom_attribute_definition.owned.created

  • order.custom_attribute_definition.owned.deleted

  • order.custom_attribute_definition.owned.updated

  • order.custom_attribute_definition.visible.created

  • order.custom_attribute_definition.visible.deleted

  • order.custom_attribute_definition.visible.updated

  • order.custom_attribute.owned.deleted

  • order.custom_attribute.owned.updated

  • order.custom_attribute.visible.deleted

  • order.custom_attribute.visible.updated

<- Order Custom Attributes API

Order Custom Attributes API

All versions ->

Retrieve order custom attributeBeta

GET

 /v2/orders/{order_id}/custom-attributes/{custom_attribute_key}

Retrieves a custom attribute associated with an order.

You can use the with_definition query parameter to also retrieve the custom attribute definition in the same call.

To retrieve a custom attribute owned by another application, the visibility setting must be VISIBILITY_READ_ONLY or VISIBILITY_READ_WRITE_VALUES. Note that seller-defined custom attributes also known as custom fields) are always set to VISIBILITY_READ_WRITE_VALUES.

Permissions:ORDERS_READ

Guide

Retrieve an order custom attribute

Try in API Explorer
Link to section

Path parameters

Example code

Link to section

order_id

string

Required

The ID of the target order.

Link to section

custom_attribute_key

string

Required

The key of the custom attribute to retrieve. This key must match the key of an existing custom attribute definition.

Link to section

Query parameters

Link to section

version

integer(32-bit)

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

Link to section

with_definition

boolean

Indicates whether to return the custom attribute definition in the definition field of each custom attribute. Set this parameter to true to get the name and description of each custom attribute, information about the data type, or other definition details. The default value is false.

Link to section

Response fields

Link to section

custom_attribute

The retrieved custom attribute. If with_definition was set to true in the request, the custom attribute definition is returned in the `definition field.

Link to section

errors

Any errors that occurred during the request.

Link to section

Examples

All versions ->

GET /v2/orders/{order_id}/custom-attributes/{custom_attribute_key}
curl https://connect.squareup.com/v2/orders/7BbXGEIWNldxAzrtGf9GPVZTwZ4F/custom-attributes/custom_attribute_key1 \ -H 'Square-Version: 2026-11-18' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json'

Response JSON

{ "custom_attribute": { "key": "cover-count", "version": 1, "updated_at": "2022-11-22T21:28:35.721Z", "value": "6", "created_at": "2022-11-22T21:27:33.429Z", "visibility": "VISIBILITY_READ_WRITE_VALUES" } }