Making Requests
How to authenticate and make requests to the Kogan Ecommerce APIs
Request Types
All requests accept JSON data and return JSON data. You should specify the Content-Type
header in your request to application/json
.
Authentication
Once you receive your API key from your account manager, you can start interacting with the API.
The API key should be in the request header named Authorization
with the prefix Token
. For example, if your API key is abcdef
then your request will look like this:
curl --request GET \
--url $API_URL \
--header 'Authorization: Token <your token>' \
--header 'Content-Type: application/json'
import requests
headers = {
"Content-Type": "application/json",
"Authorization": "Token <your token>"
}
response = requests.get(url, headers=headers)
You will have different API keys for the playground and production environments. Both of which will be provided to you by your account manager.
Updated over 1 year ago