Pull Customer Type in REST Admin API

Hi All,

I am trying to pull the customer type info from Admin REST API. I can see this info on my shopify UI when I login (Screenshot Attached). Can anyone please let me know how can I do this? Or if there is any logic of calculating this?

Also, one more information that I am looking for is returns but can’t find in API.

Thanks,

Mayank

hello there

To retrieve the customer type information from the Admin REST API, you can use the Customers API endpoint and include the customer_type field in the query parameters. Here is an example API request URL:

/admin/api/2021-09/customers.json?fields=id,email,customer_type

This will return a JSON response containing the id, email, and customer_type fields for all customers on your store.

Regarding returns, the Shopify API provides a Returns API endpoint that you can use to manage returns on your store. You can use this API to create, read, update, and delete returns. Here is the link to the Shopify Returns API documentation:

https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/return

Hi, thanks for replying.

The admin api version you mentioned for customer type is now deprecated. Is there any way in the latest api to pull this info?

Also, the link you shared for Returns data is showing error “404 Page Not Found”. Can you please check if the link shared is correct?

Thanks,

Mayank