For developers
TakaTech Partner API v1.1.0
API for partners, Zalo Mini Apps and external landing pages to submit consultation requests / demo sign-ups into the TakaTech system and fetch the product catalog.
- Base URL:
https://takatech.vn/api/v1 - Format: JSON (UTF-8), OpenAPI 3.1 – importable into Postman, Insomnia and Swagger.
- CORS is supported, but you should not call it with an API key from the browser; call it from your server / Cloud Function instead.
Authentication
Each partner is issued an API key of the form tk_live_… (contact TakaTech). Send the key in the header:
Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxThe key is shown only once when created; TakaTech stores it hashed and can revoke it at any time. If you suspect a leak, tell us immediately to get a new key.
Limits & error codes
| Code | Meaning |
|---|---|
201 | Created successfully |
400 | Body is not valid JSON |
401 | Missing, invalid or revoked API key |
422 | Invalid data – see error.details (per-field errors) |
429 | More than 60 requests/minute for a key |
Endpoints
/api/v1/leadsAPI key requiredSubmit a consultation request / demo sign-up
Creates a new request; the TakaTech sales team is notified instantly. Limited to 60 requests/minute per API key.
/api/v1/productsPublicProduct catalog
List of TakaTech software products (no API key needed).
/api/v1/healthPublicAPI health check
POST /leads – fields
| Field | Type | Description |
|---|---|---|
type | CONSULT | DEMO | TRAINING | Request type |
name* | string (≤120) | Contact person’s full name e.g. Nguyễn Văn A |
phone* | string | Vietnamese phone number (0xxxxxxxxx or +84xxxxxxxxx) e.g. 0914586999 |
email | Email address e.g. a@donvi.vn | |
organization | string (≤200) | Organization name (required on the website form for demo/training) e.g. UBND phường X |
service | string (≤120) | Field / service of interest e.g. Website & Trang thông tin điện tử |
product | string (≤120) | Product – required when type=DEMO e.g. TakaTech ZNS Portal |
attendees | integer | Number of trainees (type=TRAINING) |
message | string (≤3000) | Request details |
utmSource | string (≤100) | |
utmMedium | string (≤100) | |
utmCampaign | string (≤100) | |
source | string (≤255) | Source, e.g. zalo-mini-app, landing-hoi-cho e.g. zalo-mini-app |
Examples
curl -X POST https://takatech.vn/api/v1/leads \
-H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"type": "DEMO",
"name": "Nguyễn Văn A",
"phone": "0914586999",
"organization": "UBND phường X",
"product": "TakaTech ZNS Portal",
"source": "landing-hoi-cho"
}'// Run on your server (never expose the API key in the browser)
const res = await fetch('https://takatech.vn/api/v1/leads', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TAKATECH_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Nguyễn Văn A', phone: '0914586999', message: 'Need advice on a website' }),
});
const body = await res.json();
if (!body.success) throw new Error(body.error.message);
const { id } = body.data;<?php
$ch = curl_init('https://takatech.vn/api/v1/leads');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('TAKATECH_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Nguyễn Văn A', 'phone' => '0914586999', 'service' => 'Website & Trang thông tin điện tử',
]),
]);
$res = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE); // 201 = success{ "success": true, "data": { "id": "6674d02a-85f1-4e47-a427-f762338c2dd5" } }{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "Vui lòng kiểm tra lại thông tin.", "details": { "phone": "Số điện thoại chưa đúng định dạng" } } }GET /products
curl https://takatech.vn/api/v1/productsReturns the product list (slug, name, tagline, audience, url) to show as options in your form; the name value is used for the product field when requesting a demo.