Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.
Attributes API
The Attributes API provides read-only access to the custom key-value pairs attached to the order. Use this API to read custom attributes attached to the order, such as delivery instructions or gift messages.
This API reads attributes that were set when the order was placed. To store your own custom data on orders, use metafields instead.
Anchor to Use casesUse cases
- Display delivery instructions: Read and display special instructions the buyer provided, such as "Leave at the back door."
- Show gift messages: Display a gift message the buyer attached to their order.
- Process custom data: Access key-value pairs added by other extensions during checkout, such as a preferred delivery date.
Supported targets
- customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. page. render
Supported targets
- customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. page. render
Anchor to PropertiesProperties
The Attributes API object provides custom attributes from the order. Access the following properties on the API object to read attribute data.
- Anchor to attributesattributesattributesStatefulRemoteSubscribable<Attribute[] | undefined>StatefulRemoteSubscribable<Attribute[] | undefined>requiredrequired
Custom key-value pairs that the buyer attached to the order during cart or checkout, commonly used for special instructions or order customization.
Attribute
- key
The attribute name. Keys are unique within the attribute list.
string - value
The attribute value as a string.
string
Anchor to Best practicesBest practices
- Use
useAttributeValuesfor known keys: When you need a specific attribute, useuseAttributeValuesinstead of filtering the full list. - Handle missing attributes gracefully: Attributes are optional. The list may be empty or
undefinedif the buyer didn't add any custom data.
Anchor to LimitationsLimitations
- Attribute values are always strings. If you stored structured data during checkout, you need to parse it in your extension.
- There's no metadata about who set an attribute. You can't determine whether an attribute was set by the buyer, a theme, or another extension.