---
title: Attribute - Customer API
description: >-
  A custom property. Attributes are used to store additional information about a
  Shopify resource, such as

  products, customers, or orders. Attributes are stored as key-value pairs.


  For example, a list of attributes might include whether a customer is a
  first-time buyer (`"customer_first_order": "true"`),

  whether an order is gift-wrapped (`"gift_wrapped": "true"`), a preferred
  delivery date

  (`"preferred_delivery_date": "2025-10-01"`), the discount applied
  (`"loyalty_discount_applied": "10%"`), and any

  notes provided by the customer (`"customer_notes": "Please leave at the front
  door"`).
api_version: 2025-04
api_name: customer
type: object
api_type: graphql
source_url:
  html: 'https://shopify.dev/docs/api/customer/2025-04/objects/Attribute'
  md: 'https://shopify.dev/docs/api/customer/2025-04/objects/Attribute.md'
---

# Attribute

object

A custom property. Attributes are used to store additional information about a Shopify resource, such as products, customers, or orders. Attributes are stored as key-value pairs.

For example, a list of attributes might include whether a customer is a first-time buyer (`"customer_first_order": "true"`), whether an order is gift-wrapped (`"gift_wrapped": "true"`), a preferred delivery date (`"preferred_delivery_date": "2025-10-01"`), the discount applied (`"loyalty_discount_applied": "10%"`), and any notes provided by the customer (`"customer_notes": "Please leave at the front door"`).

## Fields

* key

  [String!](https://shopify.dev/docs/api/customer/2025-04/scalars/String)

  non-null[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

  The key or name of the attribute. For example, `"customer_first_order"`.

* value

  [String](https://shopify.dev/docs/api/customer/2025-04/scalars/String)

  [Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

  The value of the attribute. For example, `"true"`.

***

## Map

### Fields with this object

* [Checkout.customAttributes](https://shopify.dev/docs/api/customer/2025-04/objects/Checkout#field-Checkout.fields.customAttributes)
* [CheckoutLineItem.customAttributes](https://shopify.dev/docs/api/customer/2025-04/objects/CheckoutLineItem#field-CheckoutLineItem.fields.customAttributes)
* [LineItem.customAttributes](https://shopify.dev/docs/api/customer/2025-04/objects/LineItem#field-LineItem.fields.customAttributes)
* [SubscriptionContract.customAttributes](https://shopify.dev/docs/api/customer/2025-04/objects/SubscriptionContract#field-SubscriptionContract.fields.customAttributes)
* [SubscriptionContractBase.customAttributes](https://shopify.dev/docs/api/customer/2025-04/interfaces/SubscriptionContractBase#fields-customAttributes)
* [SubscriptionLine.customAttributes](https://shopify.dev/docs/api/customer/2025-04/objects/SubscriptionLine#field-SubscriptionLine.fields.customAttributes)
