This quick start guide is meant to help you obtain your user credentials, generate an access token and make your first request to the EPCOM API.
The API allows you to fetch and search products, create and modify custom product listings, and obtain current product prices and availability in real time.
https://developers.epcom.net/api/v1/
.X-RateLimit-Limit→60
.Content-Type: application/json
Authentication follows the OAuth 2.0 protocol with the client_credentials flow.
In order to obtain your access token you must generate your user credentials (client id and client secret) first.
You can login using your regular Epcom account and register a new app to obtain your Client ID and Client Secret.
Issue a new access token by sending a POST request to the following endpoint: https://developers.epcom.net/oauth/token
.
curl --request POST --url https://developers.epcom.net/oauth/token
-H 'Content-Type: application/x-www-form-urlencoded'
--data 'client_id={YOUR_CLIENT_ID}&client_secret={YOUR_CLIENT_SECRET}&grant_type=client_credentials'
You will get back a JSON response with three keys: token_type, expires_in and access_token. Access tokens have a default lifetime of 365 days.
{
"token_type": "Bearer",
"expires_in": 31536000,
"access_token": "ACCESS_TOKEN"
}
Once you have an ACCESS_TOKEN
, add it to the Authorization header as shown below:
curl "https://developers.epcom.net/api/v1/{RESOURCE}"
-H "Authorization: Bearer ACCESS_TOKEN"
What follows is a sample request and sucessful response to the categories endpoint.
For further information please refer to the full API Documentation. Read the docs.
Request
curl --request GET \
--url https://developers.epcom.net/api/v1/categories \
--header 'Authorization: Bearer TOKEN_VALUE'
Response
[
{
"id": "22",
"name": "Video Surveillance",
"level": 1
},
{
"id": "25",
"name": "Radio Communication",
"level": 1
},
{
"id": "26",
"name": "Networking",
"level": 1
},
{
"id": "27",
"name": "GPS, Light Bars and Traffic Control",
"level": 1
},
{
"id": "30",
"name": "Energy",
"level": 1
},
{
"id": "32",
"name": "IntrusionSystems",
"level": 1
},
{
"id": "37",
"name": "Access Control",
"level": 1
},
{
"id": "38",
"name": "FireDetection",
"level": 1
},
{
"id": "65811",
"name": "Structured Cabling",
"level": 1
}
]