The documentation of the WeSupply API can be found at: WeSupply API documentation
You can test out a simple order import into WeSupply via API, using Postman, by following the below steps:
1. Install and open Postman: https://www.postman.com/downloads/
2. Create a POST to your WeSupply client domain in order to obtain a token needed for other API operations.
To get your client_id and client_secret, log into your WeSupply Admin Panel and head into the Settings -> Webhook & API -> OAuth Credentials section and copy the Client ID and Client Secret keys.
Send a POST request to clientname.labs.wesupply.xyz/api/oauth/token with the required details in the body section using the x-www-form-urlencoded format as follows:
*Make sure you replace "clientname" with your real Client Name, which you can also find under the OAuth Credentials section of your WeSupply Admin.
client_id - Your Client ID
client_secret - Your Client Secret
grant_type - client_credentials
Save the access_token received because it is required to make other API operations. For example, we will use it in the next step for the Order Import.
3. Create a new POST request for Order import. Fill in the Token obtained in the previous step. The Authorization Token must be of type Bearer Token.
4. In the Body section of the import, you will need to select raw with type JSON.
In the body, the full JSON must be inserted with all required order details. An example request of the JSON can be found on the Order import example
5. If all order details are correct, after Sending the data, you receive the Successfully imported 1 order message. At this point, you can check into your WeSupply account and this order should be available.
Comments
0 comments
Article is closed for comments.