Basic Usage

To retrieve an access to api, simply make a requests to https://aftership.com.ua/v1/... endpoints.

To have some basic tests you could use our postman.json file.

Required Parameters

api_token
your API key

Required Headers

Content-Type
application/json
Accept
application/json

Providers list

novaposhta
novaposhta.ua

Status Codes

Status codes are universal interface to describe whole response state.

We use default states according to REST standard. Examples are provided below:

200
Success! Everything is A-OK
401
Unauthorized (did you remember your API key?)
402
Payment required
403
Forbidden (this API is HTTPS-only)
404
Target object not found
422
Invalid params passed / validation failed
429
Rate limit exceeded
500
OH NOES!!~! Something is wrong on our end

Rate Limits

Limits vary by plan, once exceeded the API will return the 429 status code.

Get tracking list

GET https://aftership.com.ua/api/v1/trackings
page
Pagination page
{
"data": [
{
"id": "1001",
"tracking_number": "20450000000001"
"integration_id": "2002",
"history": [{
"old_status": "Newly created",
"new_status": "Відправлення прямує до міста Київ.",
"created_at": "11.11.2020 05:11:54",
}]
}
]
}

Get integrations list

GET https://aftership.com.ua/api/v1/integrations
{
"data": [
{
"id": "2002",
"title": "Title integration one"
"provider": "novaposhta"
}
]
}

Get tracking status

GET https://aftership.com.ua/api/v1/tracking/{tracking_number}
tracking_number
Tracking number to process
{
"data": {
"id": "1001",
"tracking_number": "20450000000000"
"integration_id": "2002"
"history": [{
"old_status": "Newly created",
"new_status": "Відправлення прямує до міста Київ.",
"created_at": "11.11.2020 05:11:54",
}]
}
}

Register tracking

POST https://aftership.com.ua/api/v1/tracking
tracking_number
Tracking number to process
integration_id
Integration id, see this id on integrations list
phone
Phone manager or recipient, like +380509005599 (required, for tracking data)
{
"data": [{
"id": "1001",
"tracking_number": "20450000000000",
"integration_id": "2002",
}]
}