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

{{ '/api/reference/customer.png' | image }}

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:

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.

## Resource Properties ### Customer * addresses:

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

* Type: x-string * Example: [{"id"=>207119551, "customer_id"=>6940095564, "first_name"=>"Bob", "last_name"=>"Norman", "company"=>nil, "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:

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.

* Type: x-string * Example: "JPY" * created_at: The date and time (ISO 8601 format) when the customer was created. * Type: x-string * Example: "2013-06-27T08:48:27-04:00" * default_address:

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

* Type: x-string * Example: {"address1"=>"Chestnut Street 92", "address2"=>"Apartment 2", "city"=>"Louisville", "company"=>nil, "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: The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error. * Type: x-string * Example: "bob.norman@mail.example.com" * 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:

* Type: x-string * Example: {"state"=>"subscribed", "opt_in_level"=>"confirmed_opt_in", "consent_updated_at"=>"2022-04-01T11:22:06-04:00"} * first_name: The customer's first name. * Type: x-string * Example: "John" * id: A unique identifier for the customer. * Type: x-string * Example: 207119551 * last_name: The customer's last name. * Type: x-string * Example: "Norman" * last_order_id: The ID of the customer's last order. * Type: x-string * Example: 234132602919 * last_order_name: The name of the customer's last order. This is directly related to the name field on the Order resource. * Type: x-string * Example: "#1169" * metafield:

Attaches additional metadata to a shop's resources:

* Type: x-string * Example: {"key"=>"new", "namespace"=>"global", "value"=>"newvalue", "type"=>"string"} * marketing_opt_in_level:

As of API version 2022-04, this property is deprecated. Use email_marketing_consent instead. 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. If the customer does not accept email marketing, then this property will be set to null. Valid values:

* Type: x-string * Example: "confirmed_opt_in" * multipass_identifier: A unique identifier for the customer that's used with Multipass login. * Type: x-string * Example: nil * note: A note about the customer. * Type: x-string * Example: "Placed an order that had a fraud warning" * orders_count: The number of orders associated with this customer. Test and archived orders aren't counted. * Type: x-string * Example: 3 * password: The customer's password. * Type: x-string * Example: "password" * password_confirmation: The customer's password that's confirmed. * Type: x-string * Example: "password_confirmation" * phone:

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:

* Type: x-string * Example: "+16135551111" * sms_marketing_consent:

The marketing consent information when the customer consented to receiving marketing material by SMS. The phone property is required to create a customer with SMS consent information and to perform an SMS update on a customer that doesn't have a phone number recorded. The customer must have a unique phone number associated to the record. The SMS marketing consent has the following properties:

* Type: x-string * Example: {"state"=>"subscribed", "opt_in_level"=>"single_opt_in", "consent_updated_at"=>"2021-08-03T15:31:06-04:00", "consent_collected_from"=>"OTHER"} * state:

The state of the customer's account with a shop. Default value: disabled. Valid values:

* Type: x-string * Example: "disabled" * tags: 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. * Type: x-string * Example: "loyal" * tax_exempt: Whether the customer is exempt from paying taxes on their order. If true, then taxes won't be applied to an order at checkout. If false, then taxes will be applied at checkout. * Type: x-string * Example: true * tax_exemptions:

Whether the customer is exempt from paying specific taxes on their order. Canadian taxes only. Valid values:

* Type: x-string * Example: ["CA_STATUS_CARD_EXEMPTION", "CA_BC_RESELLER_EXEMPTION"] * total_spent: The total amount of money that the customer has spent across their order history. * Type: x-string * Example: "375.30" * updated_at: The date and time (ISO 8601 format) when the customer information was last updated. * Type: x-string * Example: "2012-08-24T14:01:46-04:00" * verified_email: Whether the customer has verified their email address. * Type: x-string * Example: true ## Retrieves a list of customers 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. ### Endpoint /admin/api/#{api_version}/customers.json?ids=207119551,1073339460 (GET) ### Parameters * api_version (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: 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) ### Responses #### 200 Retrieves a list of customers Examples: ##### Retrieve a list of specific customers Request: ``` GET /admin/api/unstable/customers.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":1073339460,"email":"steve.lastnameson@example.com","created_at":"2024-11-05T14:06:07-05:00","updated_at":"2024-11-05T14:06:07-05: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":1053317290,"customer_id":1073339460,"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/1073339460","default_address":{"id":1053317290,"customer_id":1073339460,"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-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}]} ``` ##### Retrieve all customers after a specified ID Request: ``` GET /admin/api/unstable/customers.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":1073339462,"email":"steve.lastnameson@example.com","created_at":"2024-11-05T14:07:00-05:00","updated_at":"2024-11-05T14:07:00-05: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":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}}]} ``` ##### Retrieve all customers changed after a certain date Request: ``` GET /admin/api/unstable/customers.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":207119551,"email":"bob.norman@mail.example.com","created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}]} ``` ##### Retrieve all customers for a shop Request: ``` GET /admin/api/unstable/customers.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":207119551,"email":"bob.norman@mail.example.com","created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}]} ``` ##### Retrieve only the specified customer fields Request: ``` GET /admin/api/unstable/customers.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":207119551,"email":"bob.norman@mail.example.com","tags":"Léon, Noël"}]} ``` ## Searches for customers that match a supplied query 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. ### Endpoint /admin/api/#{api_version}/customers/search.json?query=email:bob.norman@mail.example.com (GET) ### Parameters * api_version (required): * fields: Show only certain fields, specified by a comma-separated list of field names. * limit: The maximum number of results to show. * order: 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. ### Responses #### 200 Searches for customers that match a supplied query Examples: ##### Search for a customer with a specified email address Request: ``` GET /admin/api/unstable/customers/search.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":207119551,"email":"bob.norman@mail.example.com","created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}]} ``` ##### Search for all customers with a specified last name and show certain fields Request: ``` GET /admin/api/unstable/customers/search.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":207119551,"email":"bob.norman@mail.example.com","first_name":"Bob","last_name":"Norman"}]} ``` ##### Search for all customers with a specified tag and show only certain fields Request: ``` GET /admin/api/unstable/customers/search.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":1073339464,"email":"isabella.garcia@example.com","first_name":"Isabella","last_name":"Garcia","tags":"New Customer"}]} ``` ##### Search for all customers with an address in the United States and a specified first name Request: ``` GET /admin/api/unstable/customers/search.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":207119551,"email":"bob.norman@mail.example.com","created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}]} ``` ##### Search for customers matching a specified email domain Request: ``` GET /admin/api/unstable/customers/search.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":207119551,"email":"bob.norman@mail.example.com","created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}]} ``` ##### Search for customers who have verified their email address and show only certain fields Request: ``` GET /admin/api/unstable/customers/search.json ``` Response: ``` HTTP/1.1 200 OK {"customers":[{"id":1073339457,"email":"isabella.garcia@example.com","first_name":"Isabella","last_name":"Garcia","verified_email":true},{"id":207119551,"email":"bob.norman@mail.example.com","first_name":"Bob","last_name":"Norman","verified_email":true}]} ``` ## Retrieves a single customer Retrieves a single customer. ### Endpoint /admin/api/#{api_version}/customers/{customer_id}.json (GET) ### Parameters * api_version (required): * customer_id (required): * fields: Show only certain fields, specified by a comma-separated list of field names. ### Responses #### 200 Retrieves a single customer Examples: ##### Retrieve a single customer by their ID Request: ``` GET /admin/api/unstable/customers/207119551.json ``` Response: ``` HTTP/1.1 200 OK {"customer":{"id":207119551,"email":"bob.norman@mail.example.com","created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}} ``` ## Updates a customer Updates a customer. ### Endpoint /admin/api/#{api_version}/customers/{customer_id}.json (PUT) ### Parameters * api_version (required): * customer_id (required): ### Responses #### 200 Updates a customer Examples: ##### Add metafield to an existing customer Request: ``` PUT /admin/api/unstable/customers/207119551.json {"customer":{"id":207119551,"metafields":[{"key":"new","value":"newvalue","type":"single_line_text_field","namespace":"global"}]}} ``` Response: ``` HTTP/1.1 200 OK {"customer":{"email":"bob.norman@mail.example.com","first_name":"Bob","last_name":"Norman","id":207119551,"created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}} ``` ##### Update a customer's marketing opt-in state Request: ``` PUT /admin/api/unstable/customers/207119551.json {"customer":{"id":207119551,"accepts_marketing":true,"accepts_marketing_updated_at":"2024-11-02T14:06:25-04:00","marketing_opt_in_level":"confirmed_opt_in"}} ``` Response: ``` HTTP/1.1 200 OK {"customer":{"email":"bob.norman@mail.example.com","first_name":"Bob","last_name":"Norman","id":207119551,"created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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}}} ``` ##### Update a customer's tags Request: ``` PUT /admin/api/unstable/customers/207119551.json {"customer":{"id":207119551,"tags":"New Customer, Repeat Customer"}} ``` Response: ``` HTTP/1.1 200 OK {"customer":{"email":"bob.norman@mail.example.com","first_name":"Bob","last_name":"Norman","id":207119551,"created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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":"New Customer, Repeat Customer","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-11-05T14:04:06-05: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}}} ``` ##### Update details for a customer Request: ``` PUT /admin/api/unstable/customers/207119551.json {"customer":{"id":207119551,"email":"changed@example.com","note":"Customer is a great guy"}} ``` Response: ``` HTTP/1.1 200 OK {"customer":{"email":"changed@example.com","note":"Customer is a great guy","first_name":"Bob","last_name":"Norman","id":207119551,"created_at":"2024-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:05:40-05:00","orders_count":1,"state":"disabled","total_spent":"199.65","last_order_id":450789469,"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":"single_opt_in","consent_updated_at":null},"sms_marketing_consent":{"state":"not_subscribed","opt_in_level":"single_opt_in","consent_updated_at":"2024-11-05T14:04:06-05: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}}} ``` #### 404 Updates a customer Examples: ##### Updating a customer that doesn't exist returns an error Request: ``` PUT /admin/api/unstable/customers/123.json {"customer":{"id":123,"tags":"New Customer, Repeat Customer"}} ``` Response: ``` HTTP/1.1 404 Not Found {"errors":"Not Found"} ``` ## Deletes a customer Deletes a customer. A customer can't be deleted if they have existing orders. ### Endpoint /admin/api/#{api_version}/customers/{customer_id}.json (DELETE) ### Parameters * api_version (required): * customer_id (required): ### Responses #### 200 Deletes a customer Examples: ##### Remove an existing customer Request: ``` DELETE /admin/api/unstable/customers/207119551.json ``` Response: ``` HTTP/1.1 200 OK {} ``` ## Creates a customer Creates a customer. ### Endpoint /admin/api/#{api_version}/customers.json (POST) ### Parameters * api_version (required): ### Responses #### 201 Creates a customer Examples: ##### Create a customer with password and password_confirmation and skip sending the welcome email Request: ``` POST /admin/api/unstable/customers.json {"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}} ``` Response: ``` HTTP/1.1 201 Created {"customer":{"id":1073339463,"email":"steve.lastnameson@example.com","created_at":"2024-11-05T14:07:15-05:00","updated_at":"2024-11-05T14:07:15-05: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":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}}} ``` ##### Create a customer with send_email_invite Request: ``` POST /admin/api/unstable/customers.json {"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"}],"send_email_invite":true}} ``` Response: ``` HTTP/1.1 201 Created {"customer":{"id":1073339461,"email":"steve.lastnameson@example.com","created_at":"2024-11-05T14:06:36-05:00","updated_at":"2024-11-05T14:06:36-05: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":1053317291,"customer_id":1073339461,"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/1073339461","default_address":{"id":1053317291,"customer_id":1073339461,"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}}} ``` ##### Create a customer with a metafield Request: ``` POST /admin/api/unstable/customers.json {"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"}],"metafields":[{"key":"new","value":"newvalue","type":"single_line_text_field","namespace":"global"}]}} ``` Response: ``` HTTP/1.1 201 Created {"customer":{"id":1073339456,"email":"steve.lastnameson@example.com","created_at":"2024-11-05T14:04:26-05:00","updated_at":"2024-11-05T14:04:26-05: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":1053317286,"customer_id":1073339456,"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/1073339456","default_address":{"id":1053317286,"customer_id":1073339456,"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}}} ``` ##### Create a new customer record Request: ``` POST /admin/api/unstable/customers.json {"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"}]}} ``` Response: ``` HTTP/1.1 201 Created {"customer":{"id":1073339459,"email":"steve.lastnameson@example.com","created_at":"2024-11-05T14:05:51-05:00","updated_at":"2024-11-05T14:05:51-05: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":1053317289,"customer_id":1073339459,"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/1073339459","default_address":{"id":1053317289,"customer_id":1073339459,"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}}} ``` #### 422 Creates a customer Examples: ##### Creating a customer with a phone number that belongs to an existing customer returns an error Request: ``` POST /admin/api/unstable/customers.json {"customer":{"phone":"+16136120707","first_name":"Tobi","last_name":"Lutke"}} ``` Response: ``` HTTP/1.1 422 Unprocessable Entity {"errors":{"phone":["Phone has already been taken"]}} ``` ##### Creating a customer with an email that belongs to an existing customer returns an error Request: ``` POST /admin/api/unstable/customers.json {"customer":{"email":"bob.norman@mail.example.com","first_name":"Tobi","last_name":"Lutke"}} ``` Response: ``` HTTP/1.1 422 Unprocessable Entity {"errors":{"email":["has already been taken"]}} ``` ##### Creating a customer without an email or name fails and returns an error Request: ``` POST /admin/api/unstable/customers.json {"customer":{"email":null,"first_name":null,"last_name":null}} ``` Response: ``` HTTP/1.1 422 Unprocessable Entity {"errors":{"base":["Customer must have a name, phone number or email address"]}} ``` ## Creates an account activation URL for a customer

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.

### Endpoint /admin/api/#{api_version}/customers/{customer_id}/account_activation_url.json (POST) ### Parameters * api_version (required): * customer_id (required): ### Responses #### 200 Creates an account activation URL for a customer Examples: ##### Create an account activation URL for an invited or disabled customer Request: ``` POST /admin/api/unstable/customers/207119551/account_activation_url.json {} ``` Response: ``` HTTP/1.1 200 OK {"account_activation_url":"https://jsmith.myshopify.com/account/activate/207119551/9d10ba421022b7f47ca54985aa1ccc4d-1730833591"} ``` #### 422 Creates an account activation URL for a customer Examples: ##### Creating an account activation URL for an enabled customer fails and returns an error Request: ``` POST /admin/api/unstable/customers/207119551/account_activation_url.json {} ``` Response: ``` HTTP/1.1 422 Unprocessable Entity {"errors":["account already enabled"]} ``` ## Sends an account invite to a customer Sends an account invite to a customer. ### Endpoint /admin/api/#{api_version}/customers/{customer_id}/send_invite.json (POST) ### Parameters * api_version (required): * customer_id (required): ### Responses #### 201 Sends an account invite to a customer Examples: ##### Send a customized invite Request: ``` POST /admin/api/unstable/customers/207119551/send_invite.json {"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"}} ``` Response: ``` 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"]}} ``` ##### Send the default invite Request: ``` POST /admin/api/unstable/customers/207119551/send_invite.json {"customer_invite":{}} ``` Response: ``` HTTP/1.1 201 Created {"customer_invite":{"to":"bob.norman@mail.example.com","from":"j.smith@example.com","subject":"Customer account activation","custom_message":"","bcc":[]}} ``` ## Retrieves a count of customers Retrieves a count of all customers. ### Endpoint /admin/api/#{api_version}/customers/count.json (GET) ### Parameters * api_version (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) ### Responses #### 200 Retrieves a count of customers Examples: ##### Retrieve a count of all customers Request: ``` GET /admin/api/unstable/customers/count.json ``` Response: ``` HTTP/1.1 200 OK {"count":1} ``` ##### Retrieve a count of customers changed after a specified date Request: ``` GET /admin/api/unstable/customers/count.json ``` Response: ``` HTTP/1.1 200 OK {"count":1} ``` ##### Retrieve a count of customers created after a specified date Request: ``` GET /admin/api/unstable/customers/count.json ``` Response: ``` HTTP/1.1 200 OK {"count":1} ``` ## Retrieves 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. ### Endpoint /admin/api/#{api_version}/customers/{customer_id}/orders.json (GET) ### Parameters * api_version (required): * customer_id (required): * status: The status of the orders to return. ### Responses #### 200 Retrieves all orders that belong to a customer Examples: ##### Retrieve all open orders from a customer Request: ``` GET /admin/api/unstable/customers/207119551/orders.json ``` Response: ``` 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-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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-11-05T14:04:06-05: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-11-05T14:04:06-05: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-11-05T14:04:06-05:00","note":"it broke during shipping","order_id":450789469,"processed_at":"2024-11-05T14:04:06-05: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":[]}]}]} ``` ##### Retrieve all previous orders from a customer. Request: ``` GET /admin/api/unstable/customers/207119551/orders.json ``` Response: ``` 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-11-05T14:04:06-05:00","updated_at":"2024-11-05T14:04:06-05: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-11-05T14:04:06-05: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-11-05T14:04:06-05: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-11-05T14:04:06-05: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-11-05T14:04:06-05:00","note":"it broke during shipping","order_id":450789469,"processed_at":"2024-11-05T14:04:06-05: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":[]}]}]} ```