This year CodesWholesale IT team has released the updated version 2 of API. We highly recommend switching to the newest version since the old one is no longer developed. Here’s a quick tutorial on how to update your current version to API 2.0.

Step 1

Log into your CodesWholesale account and click on API tab on the left bar menu.

CodesWholesale API update

Step 2

In the upper tab click on “API keys”. Here you can choose your preferred version of API. If you’re already an API user, then, by default, you’ll see the older version. Click on API Version 2.


Step 3

Click on “Generate API Version 2 credentials” button. You’ll notice that the new API comes with an additional safety measure – a client signature. You can either paste your new client credentials into the plugin settings or add them to the connection source code if your store is custom-built.

CodesWholesale API update

Note that generating new client credentials will automatically remove the old ones. Your store will, therefore, stop working in the live environment. Choose the right time to do it – try to avoid peak business hours.


Step 4

Use the postback test tool in the box on the right to check if everything works as planned. The functionality of the postback was recently improved, so now you can only put the URL of your store once to test pre-orders, new products, stock, products updated, and products hidden. Select one of the postback types from the drop-down menu, click on the “Send test request” button to see all stock, price and product changes. In response to your request, pop-up notification with request status will be displayed. Read more about the correct implementation of request service on our GitHub repository.

CodesWholesale API update

200 OK means that we have got your URL. It works only when you are using the official plugin. We are now able to send requests to your store.
Keep in mind that when you decide to use custom implementation, the request handling will depend on your developers.

Step 5

Paste your production-ready postback URL into the field on the bottom left of API 2.0 tab and click on “Save configuration”.

CodesWholesale API update

Congratulations, you have made it! Now you can enjoy all the new features of API 2.0.