T-Code API
Smart addressing for your applications. Integrate T-Code's precise geolocation directly into your system — delivery, logistics, fintech, or public services.
Features built for performance
T-Code API was designed to meet the demands of modern applications: speed, reliability, security and scalability.
Average latency under 50ms. The API returns a T-Code or GPS position in real time, even under heavy load.
API key authentication, HTTPS encryption, and rate limiting by default. Your data and your users' data are protected.
Guaranteed 99.9% SLA. Redundant infrastructure hosted in Tunisia for local compliance and minimal latency.
JSON format, compatible with all languages (JavaScript, Python, PHP, Java, C#). Simple integration in a few lines of code.
Built to handle thousands of simultaneous requests. Ideal for high-traffic e-commerce, logistics and fintech platforms.
Getting-started guides, endpoint reference, code examples in multiple languages, and dedicated technical support.
A clear, well-structured API
All endpoints return JSON and follow REST conventions. Authentication via the X-API-Key header.
/v1/encode
Converts GPS coordinates to a T-Code
/v1/decode
Converts a T-Code to GPS coordinates
/v1/validate
Checks whether a T-Code is valid and active
/v1/batch
Batch processing of up to 500 addresses
// Encode GPS → T-Code
const response = await fetch(
'https://api.t-code.tn/v1/encode' +
'?lat=36.8065&lng=10.1815',
{
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
}
);
const data = await response.json();
// { tcode: "TN-1000-XK7",
// region: "Tunis",
// postal: "1000",
// verified: true }
Compatible with your existing technologies
T-Code API integrates seamlessly into your current tech stack.
Getting Started
Send us an email at support@t-code.tn with your use case. We'll reply within 48 hours.
Once approved, you will receive your unique API key and access to the sandbox environment to test without impacting production.
Use our SDK or call the REST API directly. Test in sandbox, then switch to production.
Deploy your integration with dedicated technical support. We guide every partner through the go-live process.
Need help or a custom solution?
Our technical team is available to guide you through your T-Code API integration.
Contact the Team