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

Optional Parameters

key
your API key

Providers list

1
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.

Register tracking

POST https://aftership.com.ua/v1/tracking
tracking_number
Tracking number to process
provider_id
Provider id, whom this number belongs
recipient_phone
Recipient phone, like +380509563528 (for SMS notification events)
{
"data": [{
"id": "1001",
"tracking_number": "20450000000000",
"provider_id": "1",
"recipient_phone": "+380509563528"
}]
}

Get tracking status

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

Get tracking list

GET https://aftership.com.ua/trackings
page
Pagination page
{
"data": [
{
"id": "1001",
"tracking_number": "20450000000001"
"provider_id": "1"
},{
"id": "1002",
"tracking_number": "20450000000002"
"provider_id": "1"
}
]
}