There are many ways to retrieve a list of all customers. You can export all customers in the Shopify admin. However, this shows you basic parameters like name, status, location, and orders. If you want more customer information, you can easily retrieve a list of all customers using Postman with Shopify API.
This is why 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 of 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.
Shopify Salesforce Integration
Shopify Zoho Integration
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
-
- {API_key} – The API key that you generated.
-
- {admin_API_access_token} – The admin API access token that you generated.
-
- {shop} – The name of your development store.
-
- {api-version} – The supported API version that you want to use.
-
- {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
-
- Paste the URL above.
-
- 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
},
.
.
.
.
The above are all steps to retrieve a list of all customers using Postman with Shopify API. If you have 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 to watch more about the Shopify API tutorial.
Hopefully, you can do it!