You need an access token to be able to communicate with our API. The token has to be submitted on every call in the request header/gRPC metadata using method Plain.
{
"Authorization": "Plain xxxxxxx-xxxx-xxxx-be5d-80a446a3d0dd"
}
**You can request your access token here https://supplier.refurbed.com/api-token-request/**
<aside> ⚠️ Unused API token will expire after 2 months. In case you are affected, please request a new API token from us.
</aside>
<aside> ⚠️
Please use a meaningful user-agent in your API requests. We suggest a format like “seller/integrator name - <default by the used request library>”, e.g.: ”refurbed - GuzzleHttp/7”
</aside>
<aside> ℹ️ In this documentation, we will focus on setting up the HTTP version of our API. It is also possible to use the gRPC framework if you are familiar with it and your programming language supports it.
</aside>
To make your first API calls we suggest using a REST Client like Postman or Insomnia.
For Postman, you can download the files to import both the collection and the production and sandbox environments below. This will give you the possibility to comfortably test and develop your API connector. Our API uses only POST method.
<aside> 📎 Postman API config
Collection:
refurbed_merchant_api.postman_collection.json
Sandbox environment
refurbed_merchant_api.postman_environment.sandbox.json
Prod environment
refurbed_merchant_api.postman_environment.prod.json
</aside>
For Insomnia, you can find a guide below on how to set up an environment where you can test and develop your API connector.
1) Install Insomnnia on your device and open it.
2) Install the following Insomnia Plugin: Global Headers. Go to Preferences → Plugins → enter insomnia-plugin-global-headers and hit “Install Plugin”.
3) In your workspace click on the (➕) sign top right and choose Import. Download the following file and import it. It will also create the environments prod and sandbox for you.
<aside> 📎 Insomnia API config
refurbed_merchant_api.insomnia.json
</aside>
4) Open the newly imported collection, find the ⚙ icon in the top of the left panel next to the environment. Click to manage your environments. For prod please add your prod API token after Plain. For sandbox please replace <merchantname> with the sandbox name, that you receive from the integrations team. Close the the environments settings.
5) To do your first request expand Currency Service in the left panel and select Gets a single supported currency. In the JSON tab change the content to the following:
{
"code": "EUR"
}
6) Press Send and check the Response to the right. You should see Status: 200 OK and in the response the current exchange rates from EUR to other currencies.