Shopify API - How to retrieve a list of all customers using Postman

Shopify API – How to retrieve a list of all customers using Postman

There are a lot of ways to retrieve a list of all customers, you can export all customers in the Shopify admin. However, this just shows you some basic parameters like name, status, location, and orders. If you want to get more customer information, you can easily do it by using Postman with Shopify API. 

This is a reason, Beehexa will show you how to retrieve a list of all customers using Postman with Shopify API. 

Let’s dive into this subject a little deeper to know more overview.

If this is the first time you make a call in the Postman, you must generate API credentials from the Shopify admin

Step 1: Generate API credentials from Shopify Admin

Follow the process in How to build a custom app for Shopify in 2022? to know how to access Shopify API. 

  • After creating an app, remember the Admin API access token and the API key to send requests in the Postman. 

Step 2: Retrieve a list of all customers using Postman

Now, you can get all customers with Shopify API. 

  • Log in to your Postman and create a new workspace
  • Create a new GET with this URL:
https://{API_key}:{admin_API_access_token}@{shop}.myshopify.com/admin/api/{api-version}/{resource}.json
Code language: JavaScript (javascript)
  1. {API_key} – The API key that you generated.
  2. {admin_API_access_token} – The admin API access token that you generated.
  3. {shop} – The name of your development store.
  4. {api-version} – The supported API version that you want to use.
  5. {resource} – A resource endpoint from the REST Admin API.

Or you can copy this example, remember to change {resource} to {customers}:

https://ed86d512a2c95387ffa25f67074a222b:[email protected]/admin/api/2021-10/customers.json
Code language: JavaScript (javascript)
  • Paste the URL above.
How to retrieve a list of all customers using Postman with Shopify API
Shopify API - How to retrieve a list of all customers using Postman 3
  • Then click Send

Response:

The API will return the data like this.

{ "customers": [ { "id": 5839066693695, "email": "[email protected]", "accepts_marketing": false, "created_at": "2022-05-31T17:14:03+09:00", "updated_at": "2022-05-31T17:37:30+09:00", "first_name": "Hoai", "last_name": "Lam", "orders_count": 1, "state": "disabled", "total_spent": "153.00", "last_order_id": 4498286018623, "note": null, "verified_email": true, "multipass_identifier": null, "tax_exempt": false, "phone": null, "tags": "", "last_order_name": "#1328", "currency": "AUD", "addresses": [ { "id": 7152555491391, "customer_id": 5839066693695, "first_name": "Hoai", "last_name": "Lam", "company": "Beehexa", "address1": "20 Le Loi", "address2": "", "city": "Hue", "province": null, "country": "Vietnam", "zip": "52000", "phone": "0373 289 426", "name": "Hoai Lam", "province_code": null, "country_code": "VN", "country_name": "Vietnam", "default": false }, . . . .
Code language: JSON / JSON with Comments (json)
How to retrieve a list of all customers using Postman with Shopify API
Shopify API - How to retrieve a list of all customers using Postman 4

The above are all steps to retrieve a list of all customers using Postman with Shopify API. If you have any questions about Shopify customers  API, let us know in the comment below or refer to our Shopify API integration.

These steps will be shown visually in the video below. Click on the video for watching more about the Shopify API tutorial. 

Shopify API – How to retrieve a list of all customers using Postman

Hopefully, you can do it!