Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Not getting the customer details like first name, last name and email after hitting the API.
end point - admin/api/2024-04/customers.json
Solved! Go to the solution
This is an accepted solution.
Hello Hardik,
Here is the response that we are getting after the API hit-
{"customers":[{"id":6859268259894,"created_at":"2024-06-07T17:39:58+05:30","updated_at":"2024-06-07T17:39:58+05:30","orders_count":0,"state":"disabled","total_spent":"0.00","last_order_id":null,"note":"","verified_email":true,"multipass_identifier":null,"tax_exempt":false,"tags":"","last_order_name":null,"currency":"INR","addresses":[{"id":8025632047158,"customer_id":6859268259894,"company":"566655","province":"Karnataka","country":"India","province_code":"KA","country_code":"IN","country_name":"India","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":"SHOPIFY"},"admin_graphql_api_id":"gid://shopify/Customer/6859268259894","default_address":{"id":8025632047158,"customer_id":6859268259894,"company":"566655","province":"Karnataka","country":"India","province_code":"KA","country_code":"IN","country_name":"India","default":true}},{"id":6851297280054,"created_at":"2024-06-03T18:04:31+05:30","updated_at":"2024-06-04T13:56:41+05:30","orders_count":0,"state":"disabled","total_spent":"0.00","last_order_id":null,"note":"Notes testing","verified_email":true,"multipass_identifier":null,"tax_exempt":false,"tags":"tags","last_order_name":null,"currency":"INR","addresses":[{"id":8018286772278,"customer_id":6851297280054,"company":"360DegreeCloud","province":"Andaman and Nicobar Islands","country":"India","province_code":"AN","country_code":"IN","country_name":"India","default":false},{"id":8017114398774,"customer_id":6851297280054,"company":"360 Degree cloud","province":"Uttar Pradesh","country":"India","province_code":"UP","country_code":"IN","country_name":"India","default":true}],"tax_exemptions":[],"email_marketing_consent":{"state":"subscribed","opt_in_level":"single_opt_in","consent_updated_at":"2024-06-03T18:04:32+05:30"},"sms_marketing_consent":{"state":"subscribed","opt_in_level":"single_opt_in","consent_updated_at":"2024-06-03T18:04:32+05:30","consent_collected_from":"SHOPIFY"},"admin_graphql_api_id":"gid://shopify/Customer/6851297280054","default_address":{"id":8017114398774,"customer_id":6851297280054,"company":"360 Degree cloud","province":"Uttar Pradesh","country":"India","province_code":"UP","country_code":"IN","country_name":"India","default":true}}]}
Could you please suggest what is the best solution for getting the details
Hey @DeepakGoswami
I hope you're doing well!
Could you please provide me with some logs or API responses? Additionally, I believe you have to request permission from Shopify to access certain customer fields via the API.
This is an accepted solution.
Hello Hardik,
Here is the response that we are getting after the API hit-
{"customers":[{"id":6859268259894,"created_at":"2024-06-07T17:39:58+05:30","updated_at":"2024-06-07T17:39:58+05:30","orders_count":0,"state":"disabled","total_spent":"0.00","last_order_id":null,"note":"","verified_email":true,"multipass_identifier":null,"tax_exempt":false,"tags":"","last_order_name":null,"currency":"INR","addresses":[{"id":8025632047158,"customer_id":6859268259894,"company":"566655","province":"Karnataka","country":"India","province_code":"KA","country_code":"IN","country_name":"India","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":"SHOPIFY"},"admin_graphql_api_id":"gid://shopify/Customer/6859268259894","default_address":{"id":8025632047158,"customer_id":6859268259894,"company":"566655","province":"Karnataka","country":"India","province_code":"KA","country_code":"IN","country_name":"India","default":true}},{"id":6851297280054,"created_at":"2024-06-03T18:04:31+05:30","updated_at":"2024-06-04T13:56:41+05:30","orders_count":0,"state":"disabled","total_spent":"0.00","last_order_id":null,"note":"Notes testing","verified_email":true,"multipass_identifier":null,"tax_exempt":false,"tags":"tags","last_order_name":null,"currency":"INR","addresses":[{"id":8018286772278,"customer_id":6851297280054,"company":"360DegreeCloud","province":"Andaman and Nicobar Islands","country":"India","province_code":"AN","country_code":"IN","country_name":"India","default":false},{"id":8017114398774,"customer_id":6851297280054,"company":"360 Degree cloud","province":"Uttar Pradesh","country":"India","province_code":"UP","country_code":"IN","country_name":"India","default":true}],"tax_exemptions":[],"email_marketing_consent":{"state":"subscribed","opt_in_level":"single_opt_in","consent_updated_at":"2024-06-03T18:04:32+05:30"},"sms_marketing_consent":{"state":"subscribed","opt_in_level":"single_opt_in","consent_updated_at":"2024-06-03T18:04:32+05:30","consent_collected_from":"SHOPIFY"},"admin_graphql_api_id":"gid://shopify/Customer/6851297280054","default_address":{"id":8017114398774,"customer_id":6851297280054,"company":"360 Degree cloud","province":"Uttar Pradesh","country":"India","province_code":"UP","country_code":"IN","country_name":"India","default":true}}]}
Could you please suggest what is the best solution for getting the details
Hello @DeepakGoswami
I think you have to take permission for the field. Please check this docs which one help you https://shopify.dev/docs/apps/launch/protected-customer-data#request-access-to-protected-customer-da... .
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025