The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Multiple access scopes needed — refer to each endpoint for access scope requirements.

Requires access to protected customer data.

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.

Was this section helpful?

Properties

addresses

A list of the ten most recently updated addresses for the customer. Each address has the following properties:


currency
deprecated

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.


created_at
read-only
The date and time (ISO 8601 format) when the customer was created.

default_address
read-only

The default address for the customer. The default address has the following properties:


email
The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.

email_marketing_consent

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:


first_name
The customer's first name.

id
->id
A unique identifier for the customer.

last_name
The customer's last name.

last_order_id
read-only
The ID of the customer's last order.

last_order_name
read-only
The name of the customer's last order. This is directly related to the name field on the Order resource.

metafield

Attaches additional metadata to a shop's resources:


Was this section helpful?
{}The Customer resource
{
  "addresses": [
    {
      "id": 207119551,
      "customer_id": 6940095564,
      "first_name": "Bob",
      "last_name": "Norman",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "Apartment 2",
      "city": "Louisville",
      "province": "Kentucky",
      "country": "United States",
      "zip": "40202",
      "phone": "555-625-1199",
      "province_code": "KY",
      "country_code": "US",
      "country_name": "United States",
      "default": true
    }
  ],
  "currency": "JPY",
  "created_at": "2013-06-27T08:48:27-04:00",
  "default_address": {
    "address1": "Chestnut Street 92",
    "address2": "Apartment 2",
    "city": "Louisville",
    "company": null,
    "country": "united states",
    "first_name": "Bob",
    "id": 207119551,
    "last_name": "Norman",
    "phone": "555-625-1199",
    "province": "Kentucky",
    "zip": "40202",
    "province_code": "KY",
    "country_code": "US",
    "country_name": "United States",
    "default": true
  },
  "email": "bob.norman@mail.example.com",
  "email_marketing_consent": {
    "state": "subscribed",
    "opt_in_level": "confirmed_opt_in",
    "consent_updated_at": "2022-04-01T11:22:06-04:00"
  },
  "first_name": "John",
  "id": 207119551,
  "last_name": "Norman",
  "last_order_id": 234132602919,
  "last_order_name": "#1169",
  "metafield": {
    "key": "new",
    "namespace": "global",
    "value": "newvalue",
    "type": "string"
  },
  "marketing_opt_in_level": "confirmed_opt_in",
  "multipass_identifier": null,
  "note": "Placed an order that had a fraud warning",
  "orders_count": 3,
  "password": "password",
  "password_confirmation": "password_confirmation",
  "phone": "+16135551111",
  "sms_marketing_consent": {
    "state": "subscribed",
    "opt_in_level": "single_opt_in",
    "consent_updated_at": "2021-08-03T15:31:06-04:00",
    "consent_collected_from": "OTHER"
  },
  "state": "disabled",
  "tags": "loyal",
  "tax_exempt": true,
  "tax_exemptions": [
    "CA_STATUS_CARD_EXEMPTION",
    "CA_BC_RESELLER_EXEMPTION"
  ],
  "total_spent": "375.30",
  "updated_at": "2012-08-24T14:01:46-04:00",
  "verified_email": true
}

Requires customers access scope.

Creates a customer.

api_version
string
required

Was this section helpful?
Was this section helpful?
post
/admin/api/2024-10/customers.json
Copy
curl -d '{"customer":{"first_name":"Steve","last_name":"Lastnameson","email":"steve.lastnameson@example.com","phone":"+15142546011","verified_email":true,"addresses":[{"address1":"123 Oak St","city":"Ottawa","province":"ON","phone":"555-1212","zip":"123 ABC","last_name":"Lastnameson","first_name":"Mother","country":"CA"}],"password":"newpass","password_confirmation":"newpass","send_email_welcome":false}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-10/customers.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 201 Created
{
  "customer": {
    "id": 1073339462,
    "email": "steve.lastnameson@example.com",
    "created_at": "2024-09-25T17:18:24-04:00",
    "updated_at": "2024-09-25T17:18:24-04:00",
    "first_name": "Steve",
    "last_name": "Lastnameson",
    "orders_count": 0,
    "state": "enabled",
    "total_spent": "0.00",
    "last_order_id": null,
    "note": null,
    "verified_email": true,
    "multipass_identifier": null,
    "tax_exempt": false,
    "tags": "",
    "last_order_name": null,
    "currency": "USD",
    "phone": "+15142546011",
    "addresses": [
      {
        "id": 1053317292,
        "customer_id": 1073339462,
        "first_name": "Mother",
        "last_name": "Lastnameson",
        "company": null,
        "address1": "123 Oak St",
        "address2": null,
        "city": "Ottawa",
        "province": "Ontario",
        "country": "Canada",
        "zip": "123 ABC",
        "phone": "555-1212",
        "name": "Mother Lastnameson",
        "province_code": "ON",
        "country_code": "CA",
        "country_name": "Canada",
        "default": true
      }
    ],
    "tax_exemptions": [],
    "email_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": "single_opt_in",
      "consent_updated_at": null
    },
    "sms_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": "single_opt_in",
      "consent_updated_at": null,
      "consent_collected_from": "OTHER"
    },
    "admin_graphql_api_id": "gid://shopify/Customer/1073339462",
    "default_address": {
      "id": 1053317292,
      "customer_id": 1073339462,
      "first_name": "Mother",
      "last_name": "Lastnameson",
      "company": null,
      "address1": "123 Oak St",
      "address2": null,
      "city": "Ottawa",
      "province": "Ontario",
      "country": "Canada",
      "zip": "123 ABC",
      "phone": "555-1212",
      "name": "Mother Lastnameson",
      "province_code": "ON",
      "country_code": "CA",
      "country_name": "Canada",
      "default": true
    }
  }
}

Requires 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.


api_version
string
required

customer_id
string
required

Was this section helpful?
Path parameters
customerid=207119551
string
required
Was this section helpful?
post
/admin/api/2024-10/customers/207119551/account_activation_url.json
Copy
curl -d '{}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-10/customers/207119551/account_activation_url.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 200 OK
{
  "account_activation_url": "https://jsmith.myshopify.com/account/activate/207119551/a2a5eba1c047c935af4ad60f37910d77-1727299276"
}

Requires customers access scope.

Sends an account invite to a customer.

api_version
string
required

customer_id
string
required

Was this section helpful?
Path parameters
customerid=207119551
string
required
Was this section helpful?
post
/admin/api/2024-10/customers/207119551/send_invite.json
Copy
curl -d '{"customer_invite":{"to":"new_test_email@shopify.com","from":"j.limited@example.com","bcc":["j.limited@example.com"],"subject":"Welcome to my new shop","custom_message":"My awesome new store"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-10/customers/207119551/send_invite.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 201 Created
{
  "customer_invite": {
    "to": "new_test_email@shopify.com",
    "from": "j.limited@example.com",
    "subject": "Welcome to my new shop",
    "custom_message": "My awesome new store",
    "bcc": [
      "j.limited@example.com"
    ]
  }
}

Requires 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.

api_version
string
required

created_at_max
Show customers created before a specified date.
(format: 2014-04-25T16:15:47-04:00)

created_at_min
Show customers created after a specified date.
(format: 2014-04-25T16:15:47-04:00)

fields
Show only certain fields, specified by a comma-separated list of field names.

ids
Restrict results to customers specified by a comma-separated list of IDs.

limit
≤ 250
default 50
The maximum number of results to show.

since_id
Restrict results to those after the specified ID.

updated_at_max
Show customers last updated before a specified date.
(format: 2014-04-25T16:15:47-04:00)

updated_at_min
Show customers last updated after a specified date.
(format: 2014-04-25T16:15:47-04:00)

Was this section helpful?
Query parameters
ids=2071195511073339463
Restrict results to customers specified by a comma-separated list of IDs.
Was this section helpful?
get
/admin/api/2024-10/customers.json?ids=2071195511073339463
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/customers.json?ids=207119551%2C1073339463" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "customers": [
    {
      "id": 1073339463,
      "email": "steve.lastnameson@example.com",
      "created_at": "2024-09-25T17:20:40-04:00",
      "updated_at": "2024-09-25T17:20:40-04:00",
      "first_name": "Steve",
      "last_name": "Lastnameson",
      "orders_count": 0,
      "state": "disabled",
      "total_spent": "0.00",
      "last_order_id": null,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "",
      "last_order_name": null,
      "currency": "USD",
      "phone": "+15142546011",
      "addresses": [
        {
          "id": 1053317293,
          "customer_id": 1073339463,
          "first_name": "Mother",
          "last_name": "Lastnameson",
          "company": null,
          "address1": "123 Oak St",
          "address2": null,
          "city": "Ottawa",
          "province": "Ontario",
          "country": "Canada",
          "zip": "123 ABC",
          "phone": "555-1212",
          "name": "Mother Lastnameson",
          "province_code": "ON",
          "country_code": "CA",
          "country_name": "Canada",
          "default": true
        }
      ],
      "tax_exemptions": [],
      "email_marketing_consent": {
        "state": "not_subscribed",
        "opt_in_level": "single_opt_in",
        "consent_updated_at": null
      },
      "sms_marketing_consent": {
        "state": "not_subscribed",
        "opt_in_level": "single_opt_in",
        "consent_updated_at": null,
        "consent_collected_from": "OTHER"
      },
      "admin_graphql_api_id": "gid://shopify/Customer/1073339463",
      "default_address": {
        "id": 1053317293,
        "customer_id": 1073339463,
        "first_name": "Mother",
        "last_name": "Lastnameson",
        "company": null,
        "address1": "123 Oak St",
        "address2": null,
        "city": "Ottawa",
        "province": "Ontario",
        "country": "Canada",
        "zip": "123 ABC",
        "phone": "555-1212",
        "name": "Mother Lastnameson",
        "province_code": "ON",
        "country_code": "CA",
        "country_name": "Canada",
        "default": true
      }
    },
    {
      "id": 207119551,
      "email": "bob.norman@mail.example.com",
      "created_at": "2024-09-25T17:20:24-04:00",
      "updated_at": "2024-09-25T17:20:24-04:00",
      "first_name": "Bob",
      "last_name": "Norman",
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "199.65",
      "last_order_id": 450789469,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "Léon, Noël",
      "last_order_name": "#1001",
      "currency": "USD",
      "phone": "+16136120707",
      "addresses": [
        {
          "id": 207119551,
          "customer_id": 207119551,
          "first_name": null,
          "last_name": null,
          "company": null,
          "address1": "Chestnut Street 92",
          "address2": "",
          "city": "Louisville",
          "province": "Kentucky",
          "country": "United States",
          "zip": "40202",
          "phone": "555-625-1199",
          "name": "",
          "province_code": "KY",
          "country_code": "US",
          "country_name": "United States",
          "default": true
        }
      ],
      "tax_exemptions": [],
      "email_marketing_consent": {
        "state": "not_subscribed",
        "opt_in_level": null,
        "consent_updated_at": "2004-06-13T11:57:11-04:00"
      },
      "sms_marketing_consent": {
        "state": "not_subscribed",
        "opt_in_level": "single_opt_in",
        "consent_updated_at": "2024-09-25T17:20:24-04:00",
        "consent_collected_from": "OTHER"
      },
      "admin_graphql_api_id": "gid://shopify/Customer/207119551",
      "default_address": {
        "id": 207119551,
        "customer_id": 207119551,
        "first_name": null,
        "last_name": null,
        "company": null,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "province": "Kentucky",
        "country": "United States",
        "zip": "40202",
        "phone": "555-625-1199",
        "name": "",
        "province_code": "KY",
        "country_code": "US",
        "country_name": "United States",
        "default": true
      }
    }
  ]
}

Requires customers access scope.

Retrieves a single customer.

api_version
string
required

customer_id
string
required

fields
Show only certain fields, specified by a comma-separated list of field names.

Was this section helpful?
Path parameters
customerid=207119551
string
required
Was this section helpful?
get
/admin/api/2024-10/customers/207119551.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/customers/207119551.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "customer": {
    "id": 207119551,
    "email": "bob.norman@mail.example.com",
    "created_at": "2024-09-25T17:21:34-04:00",
    "updated_at": "2024-09-25T17:21:34-04:00",
    "first_name": "Bob",
    "last_name": "Norman",
    "orders_count": 1,
    "state": "disabled",
    "total_spent": "199.65",
    "last_order_id": 450789469,
    "note": null,
    "verified_email": true,
    "multipass_identifier": null,
    "tax_exempt": false,
    "tags": "Léon, Noël",
    "last_order_name": "#1001",
    "currency": "USD",
    "phone": "+16136120707",
    "addresses": [
      {
        "id": 207119551,
        "customer_id": 207119551,
        "first_name": null,
        "last_name": null,
        "company": null,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "province": "Kentucky",
        "country": "United States",
        "zip": "40202",
        "phone": "555-625-1199",
        "name": "",
        "province_code": "KY",
        "country_code": "US",
        "country_name": "United States",
        "default": true
      }
    ],
    "tax_exemptions": [],
    "email_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": null,
      "consent_updated_at": "2004-06-13T11:57:11-04:00"
    },
    "sms_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": "single_opt_in",
      "consent_updated_at": "2024-09-25T17:21:34-04:00",
      "consent_collected_from": "OTHER"
    },
    "admin_graphql_api_id": "gid://shopify/Customer/207119551",
    "default_address": {
      "id": 207119551,
      "customer_id": 207119551,
      "first_name": null,
      "last_name": null,
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "country": "United States",
      "zip": "40202",
      "phone": "555-625-1199",
      "name": "",
      "province_code": "KY",
      "country_code": "US",
      "country_name": "United States",
      "default": true
    }
  }
}

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.

api_version
string
required

customer_id
string
required

status
enum
default open
The status of the orders to return.

Was this section helpful?
Path parameters
customerid=207119551
string
required
Was this section helpful?
get
/admin/api/2024-10/customers/207119551/orders.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/customers/207119551/orders.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "orders": [
    {
      "id": 450789469,
      "admin_graphql_api_id": "gid://shopify/Order/450789469",
      "app_id": null,
      "browser_ip": "0.0.0.0",
      "buyer_accepts_marketing": false,
      "cancel_reason": null,
      "cancelled_at": null,
      "cart_token": "68778783ad298f1c80c3bafcddeea02f",
      "checkout_id": 901414060,
      "checkout_token": "bd5a8aa1ecd019dd3520ff791ee3a24c",
      "client_details": {
        "accept_language": null,
        "browser_height": null,
        "browser_ip": "0.0.0.0",
        "browser_width": null,
        "session_hash": null,
        "user_agent": null
      },
      "closed_at": null,
      "confirmation_number": null,
      "confirmed": true,
      "contact_email": "bob.norman@mail.example.com",
      "created_at": "2008-01-10T11:00:00-05:00",
      "currency": "USD",
      "current_subtotal_price": "195.67",
      "current_subtotal_price_set": {
        "shop_money": {
          "amount": "195.67",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "195.67",
          "currency_code": "USD"
        }
      },
      "current_total_additional_fees_set": null,
      "current_total_discounts": "3.33",
      "current_total_discounts_set": {
        "shop_money": {
          "amount": "3.33",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "3.33",
          "currency_code": "USD"
        }
      },
      "current_total_duties_set": null,
      "current_total_price": "199.65",
      "current_total_price_set": {
        "shop_money": {
          "amount": "199.65",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "199.65",
          "currency_code": "USD"
        }
      },
      "current_total_tax": "3.98",
      "current_total_tax_set": {
        "shop_money": {
          "amount": "3.98",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "3.98",
          "currency_code": "USD"
        }
      },
      "customer_locale": null,
      "device_id": null,
      "discount_codes": [
        {
          "code": "TENOFF",
          "amount": "10.00",
          "type": "fixed_amount"
        }
      ],
      "duties_included": false,
      "email": "bob.norman@mail.example.com",
      "estimated_taxes": false,
      "financial_status": "partially_refunded",
      "fulfillment_status": null,
      "landing_site": "http://www.example.com?source=abc",
      "landing_site_ref": "abc",
      "location_id": null,
      "merchant_business_entity_id": "MTU0ODM4MDAwOQ",
      "merchant_of_record_app_id": null,
      "name": "#1001",
      "note": null,
      "note_attributes": [
        {
          "name": "custom engraving",
          "value": "Happy Birthday"
        },
        {
          "name": "colour",
          "value": "green"
        }
      ],
      "number": 1,
      "order_number": 1001,
      "order_status_url": "https://jsmith.myshopify.com/548380009/orders/b1946ac92492d2347c6235b4d2611184/authenticate?key=imasecretipod",
      "original_total_additional_fees_set": null,
      "original_total_duties_set": null,
      "payment_gateway_names": [
        "bogus"
      ],
      "phone": "+557734881234",
      "po_number": "ABC123",
      "presentment_currency": "USD",
      "processed_at": "2008-01-10T11:00:00-05:00",
      "reference": "fhwdgads",
      "referring_site": "http://www.otherexample.com",
      "source_identifier": "fhwdgads",
      "source_name": "web",
      "source_url": null,
      "subtotal_price": "597.00",
      "subtotal_price_set": {
        "shop_money": {
          "amount": "597.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "597.00",
          "currency_code": "USD"
        }
      },
      "tags": "",
      "tax_exempt": false,
      "tax_lines": [
        {
          "price": "11.94",
          "rate": 0.06,
          "title": "State Tax",
          "price_set": {
            "shop_money": {
              "amount": "11.94",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "11.94",
              "currency_code": "USD"
            }
          },
          "channel_liable": null
        }
      ],
      "taxes_included": false,
      "test": false,
      "token": "b1946ac92492d2347c6235b4d2611184",
      "total_cash_rounding_payment_adjustment_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "USD"
        }
      },
      "total_cash_rounding_refund_adjustment_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "USD"
        }
      },
      "total_discounts": "10.00",
      "total_discounts_set": {
        "shop_money": {
          "amount": "10.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "10.00",
          "currency_code": "USD"
        }
      },
      "total_line_items_price": "597.00",
      "total_line_items_price_set": {
        "shop_money": {
          "amount": "597.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "597.00",
          "currency_code": "USD"
        }
      },
      "total_outstanding": "0.00",
      "total_price": "598.94",
      "total_price_set": {
        "shop_money": {
          "amount": "598.94",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "598.94",
          "currency_code": "USD"
        }
      },
      "total_shipping_price_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "USD"
        }
      },
      "total_tax": "11.94",
      "total_tax_set": {
        "shop_money": {
          "amount": "11.94",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "11.94",
          "currency_code": "USD"
        }
      },
      "total_tip_received": "0.00",
      "total_weight": 0,
      "updated_at": "2008-01-10T11:00:00-05:00",
      "user_id": null,
      "billing_address": {
        "first_name": "Bob",
        "address1": "Chestnut Street 92",
        "phone": "+1(502)-459-2181",
        "city": "Louisville",
        "zip": "40202",
        "province": "Kentucky",
        "country": "United States",
        "last_name": "Norman",
        "address2": "",
        "company": null,
        "latitude": 45.41634,
        "longitude": -75.6868,
        "name": "Bob Norman",
        "country_code": "US",
        "province_code": "KY"
      },
      "customer": {
        "id": 207119551,
        "email": "bob.norman@mail.example.com",
        "created_at": "2024-09-25T17:16:38-04:00",
        "updated_at": "2024-09-25T17:16:38-04:00",
        "first_name": "Bob",
        "last_name": "Norman",
        "state": "disabled",
        "note": null,
        "verified_email": true,
        "multipass_identifier": null,
        "tax_exempt": false,
        "phone": "+16136120707",
        "email_marketing_consent": {
          "state": "not_subscribed",
          "opt_in_level": null,
          "consent_updated_at": "2004-06-13T11:57:11-04:00"
        },
        "sms_marketing_consent": {
          "state": "not_subscribed",
          "opt_in_level": "single_opt_in",
          "consent_updated_at": "2024-09-25T17:16:38-04:00",
          "consent_collected_from": "OTHER"
        },
        "tags": "Léon, Noël",
        "currency": "USD",
        "tax_exemptions": [],
        "admin_graphql_api_id": "gid://shopify/Customer/207119551",
        "default_address": {
          "id": 207119551,
          "customer_id": 207119551,
          "first_name": null,
          "last_name": null,
          "company": null,
          "address1": "Chestnut Street 92",
          "address2": "",
          "city": "Louisville",
          "province": "Kentucky",
          "country": "United States",
          "zip": "40202",
          "phone": "555-625-1199",
          "name": "",
          "province_code": "KY",
          "country_code": "US",
          "country_name": "United States",
          "default": true
        }
      },
      "discount_applications": [
        {
          "target_type": "line_item",
          "type": "discount_code",
          "value": "10.0",
          "value_type": "fixed_amount",
          "allocation_method": "across",
          "target_selection": "all",
          "code": "TENOFF"
        }
      ],
      "fulfillments": [
        {
          "id": 255858046,
          "admin_graphql_api_id": "gid://shopify/Fulfillment/255858046",
          "created_at": "2024-09-25T17:16:38-04:00",
          "location_id": 655441491,
          "name": "#1001.0",
          "order_id": 450789469,
          "origin_address": {},
          "receipt": {
            "testcase": true,
            "authorization": "123456"
          },
          "service": "manual",
          "shipment_status": null,
          "status": "failure",
          "tracking_company": "USPS",
          "tracking_number": "1Z1234512345123456",
          "tracking_numbers": [
            "1Z1234512345123456"
          ],
          "tracking_url": "https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=1Z1234512345123456",
          "tracking_urls": [
            "https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=1Z1234512345123456"
          ],
          "updated_at": "2024-09-25T17:16:38-04:00",
          "line_items": [
            {
              "id": 466157049,
              "admin_graphql_api_id": "gid://shopify/LineItem/466157049",
              "attributed_staffs": [],
              "current_quantity": 0,
              "fulfillable_quantity": 0,
              "fulfillment_service": "manual",
              "fulfillment_status": null,
              "gift_card": false,
              "grams": 200,
              "name": "IPod Nano - 8gb - green",
              "price": "199.00",
              "price_set": {
                "shop_money": {
                  "amount": "199.00",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "199.00",
                  "currency_code": "USD"
                }
              },
              "product_exists": true,
              "product_id": 632910392,
              "properties": [
                {
                  "name": "Custom Engraving Front",
                  "value": "Happy Birthday"
                },
                {
                  "name": "Custom Engraving Back",
                  "value": "Merry Christmas"
                }
              ],
              "quantity": 1,
              "requires_shipping": true,
              "sku": "IPOD2008GREEN",
              "taxable": true,
              "title": "IPod Nano - 8gb",
              "total_discount": "0.00",
              "total_discount_set": {
                "shop_money": {
                  "amount": "0.00",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "0.00",
                  "currency_code": "USD"
                }
              },
              "variant_id": 39072856,
              "variant_inventory_management": "shopify",
              "variant_title": "green",
              "vendor": null,
              "tax_lines": [
                {
                  "channel_liable": null,
                  "price": "3.98",
                  "price_set": {
                    "shop_money": {
                      "amount": "3.98",
                      "currency_code": "USD"
                    },
                    "presentment_money": {
                      "amount": "3.98",
                      "currency_code": "USD"
                    }
                  },
                  "rate": 0.06,
                  "title": "State Tax"
                }
              ],
              "duties": [],
              "discount_allocations": [
                {
                  "amount": "3.34",
                  "amount_set": {
                    "shop_money": {
                      "amount": "3.34",
                      "currency_code": "USD"
                    },
                    "presentment_money": {
                      "amount": "3.34",
                      "currency_code": "USD"
                    }
                  },
                  "discount_application_index": 0
                }
              ]
            }
          ]
        }
      ],
      "line_items": [
        {
          "id": 466157049,
          "admin_graphql_api_id": "gid://shopify/LineItem/466157049",
          "attributed_staffs": [],
          "current_quantity": 0,
          "fulfillable_quantity": 0,
          "fulfillment_service": "manual",
          "fulfillment_status": null,
          "gift_card": false,
          "grams": 200,
          "name": "IPod Nano - 8gb - green",
          "price": "199.00",
          "price_set": {
            "shop_money": {
              "amount": "199.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "199.00",
              "currency_code": "USD"
            }
          },
          "product_exists": true,
          "product_id": 632910392,
          "properties": [
            {
              "name": "Custom Engraving Front",
              "value": "Happy Birthday"
            },
            {
              "name": "Custom Engraving Back",
              "value": "Merry Christmas"
            }
          ],
          "quantity": 1,
          "requires_shipping": true,
          "sku": "IPOD2008GREEN",
          "taxable": true,
          "title": "IPod Nano - 8gb",
          "total_discount": "0.00",
          "total_discount_set": {
            "shop_money": {
              "amount": "0.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "0.00",
              "currency_code": "USD"
            }
          },
          "variant_id": 39072856,
          "variant_inventory_management": "shopify",
          "variant_title": "green",
          "vendor": null,
          "tax_lines": [
            {
              "channel_liable": null,
              "price": "3.98",
              "price_set": {
                "shop_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                }
              },
              "rate": 0.06,
              "title": "State Tax"
            }
          ],
          "duties": [],
          "discount_allocations": [
            {
              "amount": "3.34",
              "amount_set": {
                "shop_money": {
                  "amount": "3.34",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "3.34",
                  "currency_code": "USD"
                }
              },
              "discount_application_index": 0
            }
          ]
        },
        {
          "id": 518995019,
          "admin_graphql_api_id": "gid://shopify/LineItem/518995019",
          "attributed_staffs": [],
          "current_quantity": 1,
          "fulfillable_quantity": 1,
          "fulfillment_service": "manual",
          "fulfillment_status": null,
          "gift_card": false,
          "grams": 200,
          "name": "IPod Nano - 8gb - red",
          "price": "199.00",
          "price_set": {
            "shop_money": {
              "amount": "199.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "199.00",
              "currency_code": "USD"
            }
          },
          "product_exists": true,
          "product_id": 632910392,
          "properties": [],
          "quantity": 1,
          "requires_shipping": true,
          "sku": "IPOD2008RED",
          "taxable": true,
          "title": "IPod Nano - 8gb",
          "total_discount": "0.00",
          "total_discount_set": {
            "shop_money": {
              "amount": "0.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "0.00",
              "currency_code": "USD"
            }
          },
          "variant_id": 49148385,
          "variant_inventory_management": "shopify",
          "variant_title": "red",
          "vendor": null,
          "tax_lines": [
            {
              "channel_liable": null,
              "price": "3.98",
              "price_set": {
                "shop_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                }
              },
              "rate": 0.06,
              "title": "State Tax"
            }
          ],
          "duties": [],
          "discount_allocations": [
            {
              "amount": "3.33",
              "amount_set": {
                "shop_money": {
                  "amount": "3.33",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "3.33",
                  "currency_code": "USD"
                }
              },
              "discount_application_index": 0
            }
          ]
        },
        {
          "id": 703073504,
          "admin_graphql_api_id": "gid://shopify/LineItem/703073504",
          "attributed_staffs": [],
          "current_quantity": 0,
          "fulfillable_quantity": 0,
          "fulfillment_service": "manual",
          "fulfillment_status": null,
          "gift_card": false,
          "grams": 200,
          "name": "IPod Nano - 8gb - black",
          "price": "199.00",
          "price_set": {
            "shop_money": {
              "amount": "199.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "199.00",
              "currency_code": "USD"
            }
          },
          "product_exists": true,
          "product_id": 632910392,
          "properties": [],
          "quantity": 1,
          "requires_shipping": true,
          "sku": "IPOD2008BLACK",
          "taxable": true,
          "title": "IPod Nano - 8gb",
          "total_discount": "0.00",
          "total_discount_set": {
            "shop_money": {
              "amount": "0.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "0.00",
              "currency_code": "USD"
            }
          },
          "variant_id": 457924702,
          "variant_inventory_management": "shopify",
          "variant_title": "black",
          "vendor": null,
          "tax_lines": [
            {
              "channel_liable": null,
              "price": "3.98",
              "price_set": {
                "shop_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                }
              },
              "rate": 0.06,
              "title": "State Tax"
            }
          ],
          "duties": [],
          "discount_allocations": [
            {
              "amount": "3.33",
              "amount_set": {
                "shop_money": {
                  "amount": "3.33",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "3.33",
                  "currency_code": "USD"
                }
              },
              "discount_application_index": 0
            }
          ]
        }
      ],
      "payment_terms": null,
      "refunds": [
        {
          "id": 509562969,
          "admin_graphql_api_id": "gid://shopify/Refund/509562969",
          "created_at": "2024-09-25T17:16:38-04:00",
          "note": "it broke during shipping",
          "order_id": 450789469,
          "processed_at": "2024-09-25T17:16:38-04:00",
          "restock": true,
          "total_additional_fees_set": {
            "shop_money": {
              "amount": "0.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "0.00",
              "currency_code": "USD"
            }
          },
          "total_duties_set": {
            "shop_money": {
              "amount": "0.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "0.00",
              "currency_code": "USD"
            }
          },
          "user_id": 548380009,
          "order_adjustments": [],
          "transactions": [
            {
              "id": 179259969,
              "admin_graphql_api_id": "gid://shopify/OrderTransaction/179259969",
              "amount": "209.00",
              "authorization": "authorization-key",
              "created_at": "2005-08-05T12:59:12-04:00",
              "currency": "USD",
              "device_id": null,
              "error_code": null,
              "gateway": "bogus",
              "kind": "refund",
              "location_id": null,
              "message": null,
              "order_id": 450789469,
              "parent_id": 801038806,
              "payment_id": "#1001.3",
              "processed_at": "2005-08-05T12:59:12-04:00",
              "receipt": {},
              "source_name": "web",
              "status": "success",
              "test": false,
              "user_id": null
            }
          ],
          "refund_line_items": [
            {
              "id": 104689539,
              "line_item_id": 703073504,
              "location_id": 487838322,
              "quantity": 1,
              "restock_type": "legacy_restock",
              "subtotal": 195.66,
              "subtotal_set": {
                "shop_money": {
                  "amount": "195.66",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "195.66",
                  "currency_code": "USD"
                }
              },
              "total_tax": 3.98,
              "total_tax_set": {
                "shop_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                }
              },
              "line_item": {
                "id": 703073504,
                "admin_graphql_api_id": "gid://shopify/LineItem/703073504",
                "attributed_staffs": [],
                "current_quantity": 0,
                "fulfillable_quantity": 0,
                "fulfillment_service": "manual",
                "fulfillment_status": null,
                "gift_card": false,
                "grams": 200,
                "name": "IPod Nano - 8gb - black",
                "price": "199.00",
                "price_set": {
                  "shop_money": {
                    "amount": "199.00",
                    "currency_code": "USD"
                  },
                  "presentment_money": {
                    "amount": "199.00",
                    "currency_code": "USD"
                  }
                },
                "product_exists": true,
                "product_id": 632910392,
                "properties": [],
                "quantity": 1,
                "requires_shipping": true,
                "sku": "IPOD2008BLACK",
                "taxable": true,
                "title": "IPod Nano - 8gb",
                "total_discount": "0.00",
                "total_discount_set": {
                  "shop_money": {
                    "amount": "0.00",
                    "currency_code": "USD"
                  },
                  "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "USD"
                  }
                },
                "variant_id": 457924702,
                "variant_inventory_management": "shopify",
                "variant_title": "black",
                "vendor": null,
                "tax_lines": [
                  {
                    "channel_liable": null,
                    "price": "3.98",
                    "price_set": {
                      "shop_money": {
                        "amount": "3.98",
                        "currency_code": "USD"
                      },
                      "presentment_money": {
                        "amount": "3.98",
                        "currency_code": "USD"
                      }
                    },
                    "rate": 0.06,
                    "title": "State Tax"
                  }
                ],
                "duties": [],
                "discount_allocations": [
                  {
                    "amount": "3.33",
                    "amount_set": {
                      "shop_money": {
                        "amount": "3.33",
                        "currency_code": "USD"
                      },
                      "presentment_money": {
                        "amount": "3.33",
                        "currency_code": "USD"
                      }
                    },
                    "discount_application_index": 0
                  }
                ]
              }
            },
            {
              "id": 709875399,
              "line_item_id": 466157049,
              "location_id": 487838322,
              "quantity": 1,
              "restock_type": "legacy_restock",
              "subtotal": 195.67,
              "subtotal_set": {
                "shop_money": {
                  "amount": "195.67",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "195.67",
                  "currency_code": "USD"
                }
              },
              "total_tax": 3.98,
              "total_tax_set": {
                "shop_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                },
                "presentment_money": {
                  "amount": "3.98",
                  "currency_code": "USD"
                }
              },
              "line_item": {
                "id": 466157049,
                "admin_graphql_api_id": "gid://shopify/LineItem/466157049",
                "attributed_staffs": [],
                "current_quantity": 0,
                "fulfillable_quantity": 0,
                "fulfillment_service": "manual",
                "fulfillment_status": null,
                "gift_card": false,
                "grams": 200,
                "name": "IPod Nano - 8gb - green",
                "price": "199.00",
                "price_set": {
                  "shop_money": {
                    "amount": "199.00",
                    "currency_code": "USD"
                  },
                  "presentment_money": {
                    "amount": "199.00",
                    "currency_code": "USD"
                  }
                },
                "product_exists": true,
                "product_id": 632910392,
                "properties": [
                  {
                    "name": "Custom Engraving Front",
                    "value": "Happy Birthday"
                  },
                  {
                    "name": "Custom Engraving Back",
                    "value": "Merry Christmas"
                  }
                ],
                "quantity": 1,
                "requires_shipping": true,
                "sku": "IPOD2008GREEN",
                "taxable": true,
                "title": "IPod Nano - 8gb",
                "total_discount": "0.00",
                "total_discount_set": {
                  "shop_money": {
                    "amount": "0.00",
                    "currency_code": "USD"
                  },
                  "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "USD"
                  }
                },
                "variant_id": 39072856,
                "variant_inventory_management": "shopify",
                "variant_title": "green",
                "vendor": null,
                "tax_lines": [
                  {
                    "channel_liable": null,
                    "price": "3.98",
                    "price_set": {
                      "shop_money": {
                        "amount": "3.98",
                        "currency_code": "USD"
                      },
                      "presentment_money": {
                        "amount": "3.98",
                        "currency_code": "USD"
                      }
                    },
                    "rate": 0.06,
                    "title": "State Tax"
                  }
                ],
                "duties": [],
                "discount_allocations": [
                  {
                    "amount": "3.34",
                    "amount_set": {
                      "shop_money": {
                        "amount": "3.34",
                        "currency_code": "USD"
                      },
                      "presentment_money": {
                        "amount": "3.34",
                        "currency_code": "USD"
                      }
                    },
                    "discount_application_index": 0
                  }
                ]
              }
            }
          ],
          "duties": [],
          "additional_fees": []
        }
      ],
      "shipping_address": {
        "first_name": "Bob",
        "address1": "Chestnut Street 92",
        "phone": "+1(502)-459-2181",
        "city": "Louisville",
        "zip": "40202",
        "province": "Kentucky",
        "country": "United States",
        "last_name": "Norman",
        "address2": "",
        "company": null,
        "latitude": 45.41634,
        "longitude": -75.6868,
        "name": "Bob Norman",
        "country_code": "US",
        "province_code": "KY"
      },
      "shipping_lines": [
        {
          "id": 369256396,
          "carrier_identifier": null,
          "code": "Free Shipping",
          "discounted_price": "0.00",
          "discounted_price_set": {
            "shop_money": {
              "amount": "0.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "0.00",
              "currency_code": "USD"
            }
          },
          "is_removed": false,
          "phone": null,
          "price": "0.00",
          "price_set": {
            "shop_money": {
              "amount": "0.00",
              "currency_code": "USD"
            },
            "presentment_money": {
              "amount": "0.00",
              "currency_code": "USD"
            }
          },
          "requested_fulfillment_service_id": null,
          "source": "shopify",
          "title": "Free Shipping",
          "tax_lines": [],
          "discount_allocations": []
        }
      ]
    }
  ]
}

Requires customers access scope.

Retrieves a count of all customers.

api_version
string
required

created_at_max
Count customers created before a specified date.
(format: 2014-04-25T16:15:47-04:00)

created_at_min
Count customers created after a specified date.
(format: 2014-04-25T16:15:47-04:00)

updated_at_max
Count customers last updated before a specified date.
(format: 2014-04-25T16:15:47-04:00)

updated_at_min
Count customers last updated after a specified date.
(format: 2014-04-25T16:15:47-04:00)

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-10/customers/count.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/customers/count.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "count": 1
}

Requires 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.

api_version
string
required

fields
Show only certain fields, specified by a comma-separated list of field names.

limit
≤ 250
default 50
The maximum number of results to show.

order
default last_order_date DESC
Set the field and direction by which to order results.

query
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.

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-10/customers/search.json?query=email:bob.norman@mail.example.com
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/customers/search.json?query=email%3Abob.norman%40mail.example.com" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "customers": [
    {
      "id": 207119551,
      "email": "bob.norman@mail.example.com",
      "created_at": "2024-09-25T17:22:57-04:00",
      "updated_at": "2024-09-25T17:22:57-04:00",
      "first_name": "Bob",
      "last_name": "Norman",
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "199.65",
      "last_order_id": 450789469,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "Léon, Noël",
      "last_order_name": "#1001",
      "currency": "USD",
      "phone": "+16136120707",
      "addresses": [
        {
          "id": 207119551,
          "customer_id": 207119551,
          "first_name": null,
          "last_name": null,
          "company": null,
          "address1": "Chestnut Street 92",
          "address2": "",
          "city": "Louisville",
          "province": "Kentucky",
          "country": "United States",
          "zip": "40202",
          "phone": "555-625-1199",
          "name": "",
          "province_code": "KY",
          "country_code": "US",
          "country_name": "United States",
          "default": true
        }
      ],
      "tax_exemptions": [],
      "email_marketing_consent": {
        "state": "not_subscribed",
        "opt_in_level": null,
        "consent_updated_at": "2004-06-13T11:57:11-04:00"
      },
      "sms_marketing_consent": {
        "state": "not_subscribed",
        "opt_in_level": "single_opt_in",
        "consent_updated_at": "2024-09-25T17:22:57-04:00",
        "consent_collected_from": "OTHER"
      },
      "admin_graphql_api_id": "gid://shopify/Customer/207119551",
      "default_address": {
        "id": 207119551,
        "customer_id": 207119551,
        "first_name": null,
        "last_name": null,
        "company": null,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "province": "Kentucky",
        "country": "United States",
        "zip": "40202",
        "phone": "555-625-1199",
        "name": "",
        "province_code": "KY",
        "country_code": "US",
        "country_name": "United States",
        "default": true
      }
    }
  ]
}

Requires customers access scope.

Updates a customer.

api_version
string
required

customer_id
string
required

Was this section helpful?
Path parameters
customerid=207119551
string
required
Request body
customer
Learn more about accessing protected customer data
Customer resource
Was this section helpful?
put
/admin/api/2024-10/customers/207119551.json
Copy
curl -d '{"customer":{"id":207119551,"metafields":[{"key":"new","value":"newvalue","type":"single_line_text_field","namespace":"global"}]}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2024-10/customers/207119551.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 200 OK
{
  "customer": {
    "email": "bob.norman@mail.example.com",
    "first_name": "Bob",
    "last_name": "Norman",
    "id": 207119551,
    "created_at": "2024-09-25T17:20:07-04:00",
    "updated_at": "2024-09-25T17:20:07-04:00",
    "orders_count": 1,
    "state": "disabled",
    "total_spent": "199.65",
    "last_order_id": 450789469,
    "note": null,
    "verified_email": true,
    "multipass_identifier": null,
    "tax_exempt": false,
    "tags": "Léon, Noël",
    "last_order_name": "#1001",
    "currency": "USD",
    "phone": "+16136120707",
    "addresses": [
      {
        "id": 207119551,
        "customer_id": 207119551,
        "first_name": null,
        "last_name": null,
        "company": null,
        "address1": "Chestnut Street 92",
        "address2": "",
        "city": "Louisville",
        "province": "Kentucky",
        "country": "United States",
        "zip": "40202",
        "phone": "555-625-1199",
        "name": "",
        "province_code": "KY",
        "country_code": "US",
        "country_name": "United States",
        "default": true
      }
    ],
    "tax_exemptions": [],
    "email_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": null,
      "consent_updated_at": "2004-06-13T11:57:11-04:00"
    },
    "sms_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": "single_opt_in",
      "consent_updated_at": "2024-09-25T17:20:07-04:00",
      "consent_collected_from": "OTHER"
    },
    "admin_graphql_api_id": "gid://shopify/Customer/207119551",
    "default_address": {
      "id": 207119551,
      "customer_id": 207119551,
      "first_name": null,
      "last_name": null,
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "country": "United States",
      "zip": "40202",
      "phone": "555-625-1199",
      "name": "",
      "province_code": "KY",
      "country_code": "US",
      "country_name": "United States",
      "default": true
    }
  }
}

Requires customers access scope.

Deletes a customer. A customer can't be deleted if they have existing orders.

api_version
string
required

customer_id
string
required

Was this section helpful?
Path parameters
customerid=207119551
string
required
Was this section helpful?
del
/admin/api/2024-10/customers/207119551.json
Copy
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2024-10/customers/207119551.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{}