The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Customer
The Customer resource stores information about a shop's customers, such as their contact details, their order history, and whether they've agreed to receive email marketing.

The Customer resource also holds information on the status of a customer's account. Customers with accounts save time at checkout when they're logged in because they don't need to enter their contact information. You can use the Customer API to check whether a customer has an active account, and then invite them to create one if they don't.
For security reasons, the Customer resource doesn't store credit card information. Customers always need to enter this information at checkout.
In a shop's checkout settings, there are three options for customer accounts:
- Accounts are disabled: Customers can't create accounts and can check out only as guests.
- Accounts are optional: Customers have the choice of either signing into their account or checking out as a guest. Customers can create accounts for themselves, and the shop owner can create an account for a customer and then invite them by email to use it.
- Accounts are required: Customers can't check out unless they're logged in, and the shop owner must create their accounts.
Caution: Only use this data if it is necessary for the intended app functionality. Shopify retains the ability to restrict access to API Access scopes for apps not requiring legitimate use of the associated data.
Endpoints
- post/admin/api/latest/customers.
json Creates a customer - post/admin/api/latest/customers/{customer_
id}/account_ activation_ url. json Creates an account activation URL for a customer - post/admin/api/latest/customers/{customer_
id}/send_ invite. json Sends an account invite to a customer - get/admin/api/latest/customers.
json?ids=207119551,562393516,1073339464 Retrieves a list of customers - get/admin/api/latest/customers/{customer_
id}. json Retrieves a single customer - get/admin/api/latest/customers/{customer_
id}/orders. json Retrieves all orders that belong to a customer - get/admin/api/latest/customers/count.
json Retrieves a count of customers - get/admin/api/latest/customers/search.
json?query=email:bob. norman@mail. example. com Searches for customers that match a supplied query - put/admin/api/latest/customers/{customer_
id}. json Updates a customer - del/admin/api/latest/customers/{customer_
id}. json Deletes a customer
The Customer resource
Properties
A list of the ten most recently updated addresses for the customer. Each address has the following properties:
Show addresses properties
- address1: The customer's mailing address.
- address2: An additional field for the customer's mailing address.
- city: The customer's city, town, or village.
- company: The customer's company.
- country: The customer's country.
- country_code: The two-letter country code corresponding to the customer's country.
- country_name: The customer's normalized country name.
- customer_id: A unique identifier for the customer.
- default: Whether this address is the default address for the customer.
- first_name: The customer's first name.
- id: A unique identifier for the address.
- last_name: The customer's last name.
- name: The customer's first and last names.
- phone: The customer's phone number at this address.
- province: The customer's region name. Typically a province, a state, or a prefecture.
- province_code: The code for the region of the address, such as the province, state, or district. For example QC for Quebec, Canada.
- zip: The customer's postal code, also known as zip, postcode, Eircode, etc.
The three-letter code (ISO 4217 format) for the currency that the customer used when they paid for their last order. Defaults to the shop currency. Returns the shop currency for test orders.
The default address for the customer. The default address has the following properties:
Show default_address properties
- address1: The first line of the customer's mailing address.
- address2: An additional field for the customer's mailing address.
- city: The customer's city, town, or village.
- company: The customer's company.
- country: The customer's country.
- country_code: The two-letter country code corresponding to the customer's country.
- country_name: The customer's normalized country name.
- customer_id: A unique identifier for the customer.
- default: Returns
true
for each default address. - first_name: The customer's first name.
- id: A unique identifier for the address.
- last_name: The customer's last name.
- name: The customer's first and last names.
- phone: The customer's phone number at this address.
- province: The customer's region name. Typically a province, a state, or a prefecture.
- province_code: The alphanumeric code for the customer's region.
- zip: The customer's postal code, also known as zip, postcode, Eircode, etc.
The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
The marketing consent information when the customer consented to receiving marketing
material by email. The email
property is required to create a customer with email
consent information and to update a customer for email consent that doesn't have an email recorded.
The customer must have a unique email address associated to the record. The email marketing consent has the following properties:
Show email_marketing_consent properties
- state: The current email marketing state for the customer.
- opt_in_level: The marketing subscription opt-in level, as described in the M3AAWG Sender Best Common Practices, that the customer gave when they consented to receive marketing material by email.
- consent_updated_at: The date and time when the customer consented to receive marketing material by email. If no date is provided, then the date and time when the consent information was sent is used.
The customer's first name.
A unique identifier for the customer.
The customer's last name.
The ID of the customer's last order.
The name of the customer's last order. This is directly related to the name
field on the Order resource.
Attaches additional metadata to a shop's resources:
Show metafield properties
- key (required): An identifier for the metafield (maximum of 30 characters).
- namespace(required): A container for a set of metadata (maximum of 20 characters). Namespaces help distinguish between metadata that you created and metadata created by another individual with a similar namespace.
- value (required): Information to be stored as metadata.
- type (required): The type. Refer to the full list of types.
- description (optional): Additional information about the metafield.
The Customer resource
Anchor to POST request, Creates a customerpostCreates a customer
customers
access scope.Creates a customer.
Create a customer with password
and password_confirmation
and skip sending the welcome email
Create a customer with password
and password_confirmation
and skip sending the welcome email
Show customer properties
The customer's first name.
The customer's last name.
The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error. The property can be set using different formats, but each format must represent a number that can be dialed from anywhere in the world. The following formats are all valid:
Show phone properties
- 6135551212
- +16135551212
- (613)555-1212
- +1 613-555-1212
Whether the customer has verified their email address.
A list of the ten most recently updated addresses for the customer. Each address has the following properties:
Show addresses properties
- address1: The customer's mailing address.
- address2: An additional field for the customer's mailing address.
- city: The customer's city, town, or village.
- company: The customer's company.
- country: The customer's country.
- country_code: The two-letter country code corresponding to the customer's country.
- country_name: The customer's normalized country name.
- customer_id: A unique identifier for the customer.
- default: Whether this address is the default address for the customer.
- first_name: The customer's first name.
- id: A unique identifier for the address.
- last_name: The customer's last name.
- name: The customer's first and last names.
- phone: The customer's phone number at this address.
- province: The customer's region name. Typically a province, a state, or a prefecture.
- province_code: The code for the region of the address, such as the province, state, or district. For example QC for Quebec, Canada.
- zip: The customer's postal code, also known as zip, postcode, Eircode, etc.
The customer's password.
The customer's password that's confirmed.
Create a customer with send_email_invite
Create a customer with send_email_invite
Show customer properties
The customer's first name.
The customer's last name.
The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error. The property can be set using different formats, but each format must represent a number that can be dialed from anywhere in the world. The following formats are all valid:
Show phone properties
- 6135551212
- +16135551212
- (613)555-1212
- +1 613-555-1212
Whether the customer has verified their email address.
A list of the ten most recently updated addresses for the customer. Each address has the following properties:
Show addresses properties
- address1: The customer's mailing address.
- address2: An additional field for the customer's mailing address.
- city: The customer's city, town, or village.
- company: The customer's company.
- country: The customer's country.
- country_code: The two-letter country code corresponding to the customer's country.
- country_name: The customer's normalized country name.
- customer_id: A unique identifier for the customer.
- default: Whether this address is the default address for the customer.
- first_name: The customer's first name.
- id: A unique identifier for the address.
- last_name: The customer's last name.
- name: The customer's first and last names.
- phone: The customer's phone number at this address.
- province: The customer's region name. Typically a province, a state, or a prefecture.
- province_code: The code for the region of the address, such as the province, state, or district. For example QC for Quebec, Canada.
- zip: The customer's postal code, also known as zip, postcode, Eircode, etc.
Create a customer with a metafield
Create a customer with a metafield
Show customer properties
The customer's first name.
The customer's last name.
The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error. The property can be set using different formats, but each format must represent a number that can be dialed from anywhere in the world. The following formats are all valid:
Show phone properties
- 6135551212
- +16135551212
- (613)555-1212
- +1 613-555-1212
Whether the customer has verified their email address.
A list of the ten most recently updated addresses for the customer. Each address has the following properties:
Show addresses properties
- address1: The customer's mailing address.
- address2: An additional field for the customer's mailing address.
- city: The customer's city, town, or village.
- company: The customer's company.
- country: The customer's country.
- country_code: The two-letter country code corresponding to the customer's country.
- country_name: The customer's normalized country name.
- customer_id: A unique identifier for the customer.
- default: Whether this address is the default address for the customer.
- first_name: The customer's first name.
- id: A unique identifier for the address.
- last_name: The customer's last name.
- name: The customer's first and last names.
- phone: The customer's phone number at this address.
- province: The customer's region name. Typically a province, a state, or a prefecture.
- province_code: The code for the region of the address, such as the province, state, or district. For example QC for Quebec, Canada.
- zip: The customer's postal code, also known as zip, postcode, Eircode, etc.
Create a new customer record
Create a new customer record
Show customer properties
The customer's first name.
The customer's last name.
The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error. The property can be set using different formats, but each format must represent a number that can be dialed from anywhere in the world. The following formats are all valid:
Show phone properties
- 6135551212
- +16135551212
- (613)555-1212
- +1 613-555-1212
Whether the customer has verified their email address.
A list of the ten most recently updated addresses for the customer. Each address has the following properties:
Show addresses properties
- address1: The customer's mailing address.
- address2: An additional field for the customer's mailing address.
- city: The customer's city, town, or village.
- company: The customer's company.
- country: The customer's country.
- country_code: The two-letter country code corresponding to the customer's country.
- country_name: The customer's normalized country name.
- customer_id: A unique identifier for the customer.
- default: Whether this address is the default address for the customer.
- first_name: The customer's first name.
- id: A unique identifier for the address.
- last_name: The customer's last name.
- name: The customer's first and last names.
- phone: The customer's phone number at this address.
- province: The customer's region name. Typically a province, a state, or a prefecture.
- province_code: The code for the region of the address, such as the province, state, or district. For example QC for Quebec, Canada.
- zip: The customer's postal code, also known as zip, postcode, Eircode, etc.
Creating a customer with a phone number that belongs to an existing customer returns an error
Creating a customer with a phone number that belongs to an existing customer returns an error
Show customer properties
The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error. The property can be set using different formats, but each format must represent a number that can be dialed from anywhere in the world. The following formats are all valid:
Show phone properties
- 6135551212
- +16135551212
- (613)555-1212
- +1 613-555-1212
The customer's first name.
The customer's last name.
Creating a customer with an email that belongs to an existing customer returns an error
Creating a customer with an email that belongs to an existing customer returns an error
Show customer properties
Creating a customer without an email or name fails and returns an error
Creating a customer without an email or name fails and returns an error
/admin/api/2025-07/customers. json
Response
Anchor to POST request, Creates an account activation URL for a customerpostCreates an account activation URL for a customer
customers
access scope.Generate an account activation URL for a customer whose account is not yet enabled. This is useful when you've imported a large number of customers and want to send them activation emails all at once. Using this approach, you'll need to generate and send the activation emails yourself.
The account activation URL generated by this endpoint is for one-time use and will expire after 30 days. If you make a new POST request to this endpoint, then a new URL will be generated. The new URL will be again valid for 30 days, but the previous URL will no longer be valid.
Create an account activation URL for an invited or disabled customer
Create an account activation URL for an invited or disabled customer
Creating an account activation URL for an enabled customer fails and returns an error
Creating an account activation URL for an enabled customer fails and returns an error
/admin/api/2025-07/customers/207119551/account_ activation_ url. json
Response
Anchor to POST request, Sends an account invite to a customerpostSends an account invite to a customer
customers
access scope.Sends an account invite to a customer.
Send a customized invite
Send a customized invite
Send the default invite
Send the default invite
/admin/api/2025-07/customers/207119551/send_ invite. json
Response
Anchor to GET request, Retrieves a list of customersgetRetrieves a list of customers
customers
access scope.Retrieves a list of customers. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.
Show customers created before a specified date.
(format: 2014-04-25T16:15:47-04:00)
Show customers created after a specified date.
(format: 2014-04-25T16:15:47-04:00)
Show only certain fields, specified by a comma-separated list of field names.
Restrict results to customers specified by a comma-separated list of IDs.
The maximum number of results to show.
Restrict results to those after the specified ID.
Show customers last updated before a specified date.
(format: 2014-04-25T16:15:47-04:00)
Show customers last updated after a specified date.
(format: 2014-04-25T16:15:47-04:00)
Retrieve a list of specific customers
Retrieve a list of specific customers
Restrict results to customers specified by a comma-separated list of IDs.
Retrieve all customers after a specified ID
Retrieve all customers after a specified ID
Restrict results to those after the specified ID.
Retrieve all customers changed after a certain date
Retrieve all customers changed after a certain date
Show customers last updated after a specified date.
(format: 2014-04-25T16:15:47-04:00)
Retrieve all customers for a shop
Retrieve all customers for a shop
Retrieve only the specified customer fields
Retrieve only the specified customer fields
Show only certain fields, specified by a comma-separated list of field names.
/admin/api/2025-07/customers. json?ids= 207119551, 562393516, 1073339464
Response
Anchor to GET request, Retrieves a single customergetRetrieves a single customer
customers
access scope.Retrieves a single customer.
Show only certain fields, specified by a comma-separated list of field names.
Retrieve a single customer by their ID
Retrieve a single customer by their ID
/admin/api/2025-07/customers/207119551. json
Response
Anchor to GET request, Retrieves all orders that belong to a customergetRetrieves all orders that belong to a customer
Retrieves all orders that belong to a customer. By default, only open orders are returned. The query string parameters in the Order resource are also available at this endpoint.
The status of the orders to return.
Show status properties
open: Show only open orders.
closed: Show only closed orders.
cancelled: Show only canceled orders.
any: Show orders of any status, including archived orders.
Retrieve all open orders from a customer
Retrieve all open orders from a customer
Retrieve all previous orders from a customer.
Retrieve all previous orders from a customer.
The status of the orders to return.
Show status properties
open: Show only open orders.
closed: Show only closed orders.
cancelled: Show only canceled orders.
any: Show orders of any status, including archived orders.
/admin/api/2025-07/customers/207119551/orders. json
Response
Anchor to GET request, Retrieves a count of customersgetRetrieves a count of customers
customers
access scope.Retrieves a count of all customers.
Count customers created before a specified date.
(format: 2014-04-25T16:15:47-04:00)
Count customers created after a specified date.
(format: 2014-04-25T16:15:47-04:00)
Count customers last updated before a specified date.
(format: 2014-04-25T16:15:47-04:00)
Count customers last updated after a specified date.
(format: 2014-04-25T16:15:47-04:00)
Retrieve a count of all customers
Retrieve a count of all customers
Retrieve a count of customers changed after a specified date
Retrieve a count of customers changed after a specified date
Count customers last updated after a specified date.
(format: 2014-04-25T16:15:47-04:00)
Retrieve a count of customers created after a specified date
Retrieve a count of customers created after a specified date
Count customers created after a specified date.
(format: 2014-04-25T16:15:47-04:00)
/admin/api/2025-07/customers/count. json
Response
Anchor to GET request, Searches for customers that match a supplied querygetSearches for customers that match a supplied query
customers
access scope.Searches for customers that match a supplied query. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.
Show only certain fields, specified by a comma-separated list of field names.
The maximum number of results to show.
Set the field and direction by which to order results.
Text to search for in the shop's customer data.
Note: Supported queries: accepts_marketing
,
activation_date
, address1
, address2
, city
,
company
, country
, customer_date
, customer_first_name
,
customer_id
, customer_last_name
, customer_tag
, email
,
email_marketing_state
, first_name
, first_order_date
, id
,
last_abandoned_order_date
, last_name
, multipass_identifier
,
orders_count
, order_date
, phone
, province
,
shop_id
, state
, tag
, total_spent
,
updated_at
, verified_email
, product_subscriber_status
. All other queries
returns all customers.
Search for a customer with a specified email address
Search for a customer with a specified email address
Text to search for in the shop's customer data.
Note: Supported queries: accepts_marketing
,
activation_date
, address1
, address2
, city
,
company
, country
, customer_date
, customer_first_name
,
customer_id
, customer_last_name
, customer_tag
, email
,
email_marketing_state
, first_name
, first_order_date
, id
,
last_abandoned_order_date
, last_name
, multipass_identifier
,
orders_count
, order_date
, phone
, province
,
shop_id
, state
, tag
, total_spent
,
updated_at
, verified_email
, product_subscriber_status
. All other queries
returns all customers.
Search for all customers with a specified last name and show certain fields
Search for all customers with a specified last name and show certain fields
Show only certain fields, specified by a comma-separated list of field names.
Text to search for in the shop's customer data.
Note: Supported queries: accepts_marketing
,
activation_date
, address1
, address2
, city
,
company
, country
, customer_date
, customer_first_name
,
customer_id
, customer_last_name
, customer_tag
, email
,
email_marketing_state
, first_name
, first_order_date
, id
,
last_abandoned_order_date
, last_name
, multipass_identifier
,
orders_count
, order_date
, phone
, province
,
shop_id
, state
, tag
, total_spent
,
updated_at
, verified_email
, product_subscriber_status
. All other queries
returns all customers.
Search for all customers with a specified tag and show only certain fields
Search for all customers with a specified tag and show only certain fields
Show only certain fields, specified by a comma-separated list of field names.
Text to search for in the shop's customer data.
Note: Supported queries: accepts_marketing
,
activation_date
, address1
, address2
, city
,
company
, country
, customer_date
, customer_first_name
,
customer_id
, customer_last_name
, customer_tag
, email
,
email_marketing_state
, first_name
, first_order_date
, id
,
last_abandoned_order_date
, last_name
, multipass_identifier
,
orders_count
, order_date
, phone
, province
,
shop_id
, state
, tag
, total_spent
,
updated_at
, verified_email
, product_subscriber_status
. All other queries
returns all customers.
Search for all customers with an address in the United States and a specified first name
Search for all customers with an address in the United States and a specified first name
Text to search for in the shop's customer data.
Note: Supported queries: accepts_marketing
,
activation_date
, address1
, address2
, city
,
company
, country
, customer_date
, customer_first_name
,
customer_id
, customer_last_name
, customer_tag
, email
,
email_marketing_state
, first_name
, first_order_date
, id
,
last_abandoned_order_date
, last_name
, multipass_identifier
,
orders_count
, order_date
, phone
, province
,
shop_id
, state
, tag
, total_spent
,
updated_at
, verified_email
, product_subscriber_status
. All other queries
returns all customers.
Search for customers matching a specified email domain
Search for customers matching a specified email domain
Text to search for in the shop's customer data.
Note: Supported queries: accepts_marketing
,
activation_date
, address1
, address2
, city
,
company
, country
, customer_date
, customer_first_name
,
customer_id
, customer_last_name
, customer_tag
, email
,
email_marketing_state
, first_name
, first_order_date
, id
,
last_abandoned_order_date
, last_name
, multipass_identifier
,
orders_count
, order_date
, phone
, province
,
shop_id
, state
, tag
, total_spent
,
updated_at
, verified_email
, product_subscriber_status
. All other queries
returns all customers.
Search for customers who have verified their email address and show only certain fields
Search for customers who have verified their email address and show only certain fields
Show only certain fields, specified by a comma-separated list of field names.
Text to search for in the shop's customer data.
Note: Supported queries: accepts_marketing
,
activation_date
, address1
, address2
, city
,
company
, country
, customer_date
, customer_first_name
,
customer_id
, customer_last_name
, customer_tag
, email
,
email_marketing_state
, first_name
, first_order_date
, id
,
last_abandoned_order_date
, last_name
, multipass_identifier
,
orders_count
, order_date
, phone
, province
,
shop_id
, state
, tag
, total_spent
,
updated_at
, verified_email
, product_subscriber_status
. All other queries
returns all customers.
/admin/api/2025-07/customers/search. json?query= email:bob.norman@mail.example.com
Response
Anchor to PUT request, Updates a customerputUpdates a customer
customers
access scope.Updates a customer.
Add metafield to an existing customer
Add metafield to an existing customer
Update details for a customer
Update details for a customer
Show customer properties
Updating a customer that doesn't exist returns an error
Updating a customer that doesn't exist returns an error
Show customer properties
A unique identifier for the customer.
Tags that the shop owner has attached to the customer, formatted as a string of comma-separated values. A customer can have up to 250 tags. Each tag can have up to 255 characters.
/admin/api/2025-07/customers/207119551. json
Response
Anchor to DELETE request, Deletes a customerdelDeletes a customer
customers
access scope.Deletes a customer. A customer can't be deleted if they have existing orders.
Remove an existing customer
Remove an existing customer