AWT Public API Documentation
Welcome to the Africa Wildlife Tracking (AWT) Public API documentation. This API provides programmatic access to wildlife tracking data from AWT devices, enabling you to integrate real-time animal tracking capabilities into your applications.
https://api-next.africawildlifetracking.com/v2
Key Features
- Real time and historical data of GPS tracking devices
- Support for standard LoRa network formats (TTN, Chirpstack, Actility)
- Device management and monitoring
- Archive data access
- RESTful design with JSON responses
Getting Started
- Contact AWT support to obtain an API key
- Authenticate with your API key and credentials to obtain a bearer token
- Use the bearer token with your API key for all subsequent requests
- Refresh your token at least once per hour
Response Format
All API responses are returned in JSON format. The API uses conventional HTTP response codes to indicate success or failure.
Authentication
The AWT API uses a two-step authentication process combining API keys and bearer tokens for secure access.
Step 1: Obtain Bearer Token
First, authenticate with your API key and user credentials to obtain a bearer token. This token is valid for 1 hour and must be refreshed regularly.
Retrieve a new session token for authorization.
⚠️ Rate limit: 1 request per minute
Authentication Headers
Request Example
Response
Step 2: Use Bearer Token
Include both your API key and the bearer token in all subsequent requests.
Request Headers
- Never expose your API key in client-side code or public repositories
- Refresh your bearer token before it expires (at least once per hour)
- Contact AWT support to rotate your API keys if needed
- Use HTTPS for all API requests
Devices
Manage and retrieve information about tracking devices associated with your account.
Retrieve a complete list of all tags (devices) associated with your account.
⚠️ Rate limit: 1 request per minute
Response Example
Response Fields
| Field | Type | Description |
|---|---|---|
tag_id |
string | Unique identifier of the AWT tag/device |
imei |
string | Unique identifier of the modem |
device_type |
string | Type of modem (e.g., "LoRA") |
asset |
string | Type of asset/animal being tracked |
software_version |
integer | Software version on the device |
created_at |
integer | Start date of manufacture (epoch seconds) |
Tracking Data
Access real-time and historical tracking data from your devices. The API provides multiple endpoints optimized for different use cases.
Latest Data (24 Hours)
Retrieve the latest tracking data for all tags, covering up to 24 hours back or since the previous request.
⚠️ Rate limit: 1 request every 10 seconds
inserted_at (when the record was inserted into the database),
not the reading timestamp.
Recent Data (90 Days)
Retrieve paginated tracking data for all tags, up to 90 days back. Returns up to 1000 records per request.
⚠️ Rate limit: 1 request every 30 seconds (shared with /data/{tagId})
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start |
integer | Optional |
Start timestamp (epoch seconds). Filters by inserted_at. Defaults to 90
days ago.
|
end |
integer | Optional |
End timestamp (epoch seconds). Filters by inserted_at. Defaults to
current time.
|
offset |
integer | Optional | Number of records to skip for pagination |
Retrieve paginated tracking data for a specific tag, up to 90 days back. Returns up to 1000 records per request.
⚠️ Rate limit: 1 request every 30 seconds (shared with /data)
Path Parameters
| Parameter | Type | Description |
|---|---|---|
tagId |
integer | The unique tag/device ID |
Archive Data
Retrieve paginated archive tracking data for all tags. Returns up to 50,000 records per request.
⚠️ Rate limit: 1 request every 30 seconds (shared with /data/archive/{tagId})
timestamp field (actual reading time from device), not
inserted_at. This allows querying historical data based on when
readings were taken.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start |
integer | Optional |
Start timestamp (epoch seconds). Filters by reading timestamp. Defaults
to 2016-01-01 (1451606400).
|
end |
integer | Optional |
End timestamp (epoch seconds). Filters by reading timestamp. Defaults
to current time.
|
offset |
integer | Optional | Number of records to skip for pagination |
Retrieve paginated archive tracking data for a specific tag. Returns up to 50,000 records per request.
⚠️ Rate limit: 1 request every 30 seconds (shared with /data/archive)
Response Example
Utilities
Submit LoRa data from external network sources. These endpoints support multiple LoRa network formats for flexibility in data integration.
X-API-KEY header and Basic Authentication (no bearer token
needed).
AWT Format
Submit LoRa data in AWT's native format.
Request Body
TTN Format
Webhook endpoint for The Things Network (TTN) format.
Request Body
Chirpstack Format
Webhook endpoint for Chirpstack format.
Request Body
Actility Format
Webhook endpoint for Actility format.
Request Body
Error Handling
The AWT API uses conventional HTTP response codes to indicate the success or failure of requests. Codes in the 2xx range indicate success, codes in the 4xx range indicate client errors, and codes in the 5xx range indicate server errors.
HTTP Status Codes
| Code | Status | Description |
|---|---|---|
200 |
OK | Request successful. Returns data array (may be empty if no data matches criteria). |
201 |
Created | Resource created successfully (LoRa data endpoints). |
400 |
Bad Request | Malformed request. Check your parameters are correct. |
401 |
Unauthorized | Invalid API key or token. Token may need to be refreshed. |
403 |
Forbidden | You do not have permission to access this resource. |
404 |
Not Found | Resource not found or you do not have permission to access it. |
429 |
Too Many Requests | Rate limit exceeded. Violation of Fair Usage Policy. |
500 |
Internal Server Error | Something went wrong on our end. Try again later or contact support. |
Error Response Format
All error responses follow a consistent JSON structure:
Common Error Examples
400 Bad Request
401 Unauthorized
404 Not Found
429 Rate Limit
Rate Limits & Fair Usage Policy
To ensure service quality and fair access for all users, the AWT API implements rate limiting on all endpoints. Please adhere to these limits to avoid service interruption.
Endpoint Rate Limits
| Endpoint | Rate Limit | Notes |
|---|---|---|
POST /token |
1 request/minute | Token valid for 1 hour |
GET /devices |
1 request/minute | - |
GET /data/latest |
1 request/10 seconds | - |
GET /data |
1 request/30 seconds | Shared with /data/{tagId} |
GET /data/{tagId} |
1 request/30 seconds | Shared with /data |
GET /data/archive |
1 request/30 seconds | Shared with /data/archive/{tagId} |
GET /data/archive/{tagId} |
1 request/30 seconds | Shared with /data/archive |
/data and
/data/{tagId} both count toward the same 30-second limit.
Best Practices
- Cache responses: Store frequently accessed data locally to reduce API calls
- Use pagination efficiently: Request only the data you need using offset parameters
- Implement exponential backoff: If you receive a 429 error, wait before retrying
- Monitor usage: Track your API calls to stay within limits
-
Use appropriate endpoints: Use
/data/latestfor real-time updates, archive endpoints for historical analysis
Handling Rate Limit Errors
When you exceed a rate limit, the API returns a
429 Too Many Requests response:
Implement proper error handling and retry logic with appropriate delays between requests.
Data Models
Reading Object
The primary data structure returned by tracking data endpoints.
| Field | Type | Description |
|---|---|---|
recordId |
string | Unique identifier for this reading |
tagId |
number | Device/tag identifier |
softwareVersion |
number | Software version running on device |
reportingInterval |
string | Configured reporting interval (e.g., "1_hour") |
voltage |
number | Battery voltage in volts |
batteryPercentage |
number | Estimated battery percentage |
timestamp |
number | Reading timestamp (epoch seconds) |
latitude |
number | GPS latitude coordinate |
longitude |
number | GPS longitude coordinate |
accelerometer |
object | 3-axis accelerometer data (x, y, z) |
hdop |
string | Horizontal dilution of precision (e.g., "10m") |
hdopRaw |
number | Raw HDOP value |
movement |
boolean | Movement detected |
alarm |
boolean | Alarm status |
coverage |
boolean | Network coverage status |
retries |
number | Number of transmission retries |
speed |
number | Speed in kilometers per hour (KPH) |
temperature |
number | Temperature in degrees Celsius |
altitude |
number | Altitude in meters above sea level |
lux |
number | Ambient light level in lux |
error |
string | Error message if payload parsing failed (optional field) |
error field is present, it
indicates payload parsing failed. Other fields may be null in this case.