Wix API: How to retrieve all products using Postman

Wix API: How to retrieve all products using Postman

This article will show you how to retrieve all products using Postman with Wix API. There are many ways to get all products in the Wix Store. You can easily export all products in the Wix admin but it just outputs simple information like name, size, type, etc. 

This is a reason, Beehexa will show you how to retrieve all products using Postman with Wix API, it will return all the information about the products. 

If this is the first time you make a call in the Postman, you must generate API credentials from the Wix Developers website.

Step 1: Generate API credentials from the Wix Developers’ Website.

Follow the process in Wix API: How to get an access token and refresh the access token? to know how to access Wix API. 

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

Step 2: Refresh the access token using Postman. 

Wix’s access token is only valid for 5 minutes, so you need to use the refresh token to request a new access token.

Flowing these steps below for refreshing the access token. 

  • Log in to your Postman and create a new workspace.
  • Create a new POST with this URL:
https://www.wix.com/oauth/access
Code language: JavaScript (javascript)
How to get an access token and refresh the access token?
  • In the body section, enter the code.

Payload

{ "grant_type": "refresh_token", "client_id": <APP_ID>, "client_secret": <APP_SECRET>, "refresh_token": <REFRESH_TOKEN> }
Code language: JSON / JSON with Comments (json)
body_How to get an access token and refresh the access token?

Body Params:

NAMETYPEDESCRIPTION
grant_typeStringValue must be set to “refresh_token”
client_idStringThe App ID as defined in the Wix Developers Center
client_secretStringThe Secret Key for your app as defined in your Wix Developers Center
refresh_tokenStringThe refresh token issued with the access token
  • Then click SEND

Response:

The Postman will return the new access token and the refresh token in order to request a new access token. 

{ "refresh_token": "OAUTH2.eyJraWQiOiJkZ0x3cjNRMCIsImFsZyI6IkhTMjU2In0.eyJkYXRhIjoie1wiaWRcIjpcIjc2ZmQ4ZTc4LWVmMWItNDFmNC05MzUyLTk2ZWU4NGQzM2NkNlwifSIsImlhdCI6MTY1NDY1NDMyMiwiZXhwIjoxNzE3NzI2MzIyfQ.E8OMrqqR_d2lNb-ztHDFhyfjG2leKIVofA_UDJQkhg4", "access_token": "OAUTH2.eyJraWQiOiJLaUp3NXZpeSIsImFsZyI6IlJTMjU2In0.eyJkYXRhIjoie1wiYXBwSWRcIjpc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iFAhNJsw-qlquaj_ZTs845AyS74nd4Sy7Kk2j7Q0JHb3ArXgQmt-jQBKef09RADaJ_Sntj1q57qduzENB3gLdF6KKrpdUwHpjyZ4PirJP-jZELXNczmfFqOv4hZnW5IOVOyArHXV9SYhF_bv3a9EcDPAVPeSMK0Ys2OW9kJo3xgffhGDd5FC-sRgT1I6Wr-Tnh9m2ag10HV6lj1EKMMsm9eTOYSyLg9oLWsztBSloHLvqUld53Kr-b5K3iDbYfhmPwltD-wCQDBbLVoaX_-y2Cbw" }
Code language: JSON / JSON with Comments (json)
response_How to get an access token and refresh the access token?

Step 3: Retrieve all products using Postman

Now, we are ready to retrieve all products using Postman with Wix API. 

  • Log in to your Postman and create a new workspace
  • Create a new POST with this URL:
https://www.wixapis.com/stores/v1/products/query
Code language: JavaScript (javascript)

-HEADER:  ‘Authorization: <ACCESS TOKEN>’

How to retrieve all products using Postman in Wix API?
  • Then click Send

Response: 

{ "products": [ { "id": "df19c1f7-07d8-a265-42f8-e8dfa824cc6e", "name": "I'm a product", "slug": "i-m-a-product", "visible": true, "productType": "physical", "description": "I'm a product description. I'm a great place to add more details about your product such as sizing, material, care instructions and cleaning instructions.", "sku": "364215376135191", "weight": 0, "weightRange": { "minValue": 0, "maxValue": 0 }, "stock": { "trackInventory": false, "inStock": true, "inventoryStatus": "IN_STOCK" . . . . .
Code language: JSON / JSON with Comments (json)
response_How to retrieve all products using Postman in Wix API?

As you can see, the Postman returned all information of the products.

The above are all steps to retrieve all products using Postman with Wix API. In the next article, we will explore Wix rest API, and multiple ways to make the API calls. 

If you have any questions, let us know in the comment below or refer to our Wix API documentation.

These steps will be shown visually in the infographic below.

How to retrieve all products using Postman in Wix API?

Or you can watch this video for more overview.

Wix API – How to retrieve all products using Postman

Hopefully, you can do it!

Wix API: How to retrieve all products using Postman

Wix API: How to retrieve all products using Postman

Join The Ride

Subscribe to our fortnightly newsletter with stories from our latest adventures and the best travel tips

Table of Contents