API Colete-Online.ro
 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:

  • https://api.colete-online.ro/v1/ - for production requests
  • https://api.colete-online.ro/v1/staging/ - for test requests

Authentication

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.

Servers

Address

Interact with saved addresses in the colete-online database

GET​/address
Get the full list of saved addresses

Service

Get the list of available services

GET​/service​/list
Get the list of available services

Order

Endpoints for getting the price and activating an order

POST​/order
Create a new courier order
POST​/order​/price
Get the price of a order request
GET​/order​/status​/{uniqueId}
Get the status history of an expedition
GET​/order​/awb​/{uniqueId}
Get the AWB file for an expedition

User

GET​/user​/balance
Get user balance

Schemas

ErrorResponse
OrderBody
OrderAddressById
OrderAddressObject
OrderBody_packages_list
OrderBody_packages
OrderAddressObject_contact
OrderAddressObject_address
OrderExtraOptions_option
OrderPriceItem