Address API Reference
Base URL: https://api.ttpost.tt/v1/address
Authentication
Include your API key in the Authorization header on every request.
cURL
curl https://api.ttpost.tt/v1/address/... \ -H "Authorization: Bearer sk_test_addr_..."
Quickstart
Resolve any T&T address string to a postal code and coordinates.
cURL
curl "https://api.ttpost.tt/v1/address/lookup?q=12+Maraval+Rd" \ -H "Authorization: Bearer sk_test_addr_..."
JavaScript
const res = await fetch(
'https://api.ttpost.tt/v1/address/lookup?q=12+Maraval+Rd',
{ headers: { 'Authorization': 'Bearer sk_test_addr_...' } }
);
const data = await res.json();
console.log(data.postal_code); // "POS-100345"
Endpoints
GET
/lookup
Resolve an address string or postal code. Pass either q (address text) or postal (S-42 code).
| Parameter | Type | Description |
|---|---|---|
q | string | Address text to resolve |
postal | string | S-42 postal code to expand |
limit | integer | Max results (default 5) |
GET
/reverse
Reverse geocode a lat/lng to the nearest validated T&T address.
cURL
curl "https://api.ttpost.tt/v1/address/reverse?lat=10.6549&lng=-61.5019" \ -H "Authorization: Bearer sk_test_addr_..."
GET
/validate
Check whether an address or postal code is valid and deliverable. Returns a confidence score and validation status.
{ "valid": true, "confidence": 0.98, "deliverable": true }
POST
/correction
Submit an address correction for TTPOST review. Partners and postmasters can flag wrong codes or new addresses.
{
"address": "22 Marryat St, San Fernando",
"current_postal": "SFD-200110",
"correct_postal": "SFD-200115",
"type": "wrong_postal_code",
"notes": "Verified on ground visit 2026-08-22"
}
Error codes
| Code | Meaning |
|---|---|
400 | Missing or invalid query parameter |
401 | Invalid or missing API key |
404 | Address or postal code not found |
429 | Rate limit exceeded |
503 | Service temporarily unavailable |
SDKs
JS
JavaScript / Node
npm i @ttpost/address
๐
Python
pip install ttpost-address
PHP
PHP
composer require ttpost/address