1.0.0
OAS3
This is the colete-online API for generating new courier orders.
To access the api all requests should be made to:
For every request a valid authorization token should be used, otherwise a 401 Unauthorized code will be given.
To get the token, a post request to https://auth.colete-online.ro/token should be made with the body:
{ grant_type: 'client_credentials' }
and the authorization header set to
Basic <base64 encoding of 'clientId':'clientSecret'>
The clientId and clientSecret are generated by the colete-online staff, so if you want to use the API, please contact us for your credentials. If the authentication request is successful, the response will contain the access_token, token_type amd expires_in value: Example:
{
"access_token": "token",
"token_type": "Bearer",
"expires_in": 7199
}
Then all the requests should contain the authorization header set to 'Bearer <token>'. The token is active for 2 hours. It should be stored and only when it is about to expire a new request to the authentication server should be made.
Helper endpoints for searching and validating locations
Get the list of available services
Endpoints for getting the price and activating an order