Overview
igts2B is a node-type driven iGaming translation platform that provides fast, consistent, and placeholder-safe localization for market, competitor, season, and related betting entities.
Production Base URL: https://igts2b.xyz Rules version field: 0.2.26
- Use
GET /api/languagesto load supported target languages. - Use
POST /api/excel/parseto normalize CSV/XLSX uploads. - Use
POST /api/processfor real-time translation/transliteration. - Use
/api/jobs*only if async batch mode is required.
Authentication
All /api/* endpoints require auth except /api/health and /api/auth/login.
- Preferred:
X-API-Key: <api_key> - Optional:
Authorization: Bearer <token> - Do not send both headers together (
400 ambiguous_auth).
API key scopes
| SCOPE | PURPOSE |
|---|---|
translation.read | Read language catalog |
translation.parse | Parse spreadsheet uploads |
translation.process | Run translation/transliteration |
translation.jobs | Async job endpoints |
Security
Enforced by platform
- API key active/revoked/expired validation.
- Scope-based access control per API key.
- IP whitelist enforcement (single IP and CIDR supported).
- Per-client-per-IP rate limiting.
- Prompt-injection and quality guard filters in translation pipeline.
Recommended for integrators
- Use dedicated API keys per environment.
- Rotate keys regularly and store in a secret manager.
- Use retry with exponential backoff for
429and5xx. - Track error codes and latency in your observability stack.
Core Workflow
- Authenticate using API key. Use
X-API-Keyfor machine-to-machine integration and assign only required scopes. - Read language list from
/api/languages. Validate target language values before submitting workload. - Parse files with
/api/excel/parsewhen needed. This normalizes CSV/XLSX into API-readyitems[]. - Submit normalized records to
/api/process. Use sync processing for low-latency, near-real-time flows. - Consume minimal output contract. In production, consume
id+result_text, and logrules_version.
Implementation Notes
- Chunk large requests before sync processing (
/api/processmax 200 items). - Preserve placeholders before and after translation.
- Retry only on
429and5xx. - Do not retry
4xxvalidation errors; fix payload first. - Log latency, HTTP status, error code, and
rules_versionfor supportability.
Happy Path Example
GET /api/languagesand validatetarget_lang.POST /api/excel/parse(if source is spreadsheet).POST /api/processand consume translated items.- Persist
id,result_text,rules_version.
Error Path Example
- Request with too many items returns
413 items_limit_exceeded. - Split payload and resubmit in chunks.
- If throttled (
429), backoff with jitter and retry.
Endpoint Reference
| METHOD | PATH | AUTH | PURPOSE |
|---|---|---|---|
| GET | /api/health | No | Health probe |
| POST | /api/auth/login | No | Bearer login (optional) |
| GET | /api/languages | Yes | Supported target languages |
| POST | /api/excel/parse | Yes | CSV/XLSX parser to API items |
| POST | /api/process | Yes | Real-time translation/transliteration |
| POST | /api/jobs | Yes | Create async job (optional) |
| GET | /api/jobs | Yes | List async jobs (optional) |
| GET | /api/jobs/:id | Yes | Get job status/output (optional) |
POST /api/process request
{
"mode": "translation",
"node_type": "bet_type_group",
"target_lang": "pt-BR",
"include_meta": false,
"items": [
{ "id": "1001", "source_text": "First Goal Scorer" }
]
}
| FIELD | REQUIRED | DESCRIPTION |
|---|---|---|
mode | Yes | translation for localized translation, transliteration for script/phonetic conversion. |
node_type | Yes | Selects runtime pipeline (standard vs hybrid behavior). |
target_lang | Yes | Target locale code (for example pt-BR). |
items | Yes | Array of input records (id, source_text). |
If you omit mode, the API returns 400 (for example: mode must be translation or transliteration).
entity_type is optional (advanced). Most integrations should only send node_type.
Excel Upload via API
Use POST /api/excel/parse to convert CSV/XLSX into normalized items[], then send those items to POST /api/process.
- Convert the file to a full Data URL string (
data:<mime>;base64,<payload>). - Send
file_name,node_type, andfile_datato/api/excel/parse. - Use the returned
itemsdirectly in/api/process.
Auth rule: use exactly one method per request (X-API-Key or Authorization: Bearer ...). Do not send both.
FILE="bet_type_group.xlsx"
BASE64=$(base64 -i "$FILE" | tr -d '\n')
curl -sS -X POST https://igts2b.xyz/api/excel/parse \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d "{
\"file_name\":\"$FILE\",
\"node_type\":\"bet_type_group\",
\"file_data\":\"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,$BASE64\"
}"
`file_data` must include the data:...;base64, prefix. Raw base64 without prefix is invalid.
Node Mapping
| node_type | behavior |
|---|---|
| bet_type_group | standard translation |
| category | standard translation |
| header_set | standard translation |
| league | standard translation |
| long_text | standard translation (long-form iGaming copy, natural casing) |
| mixed | per-row auto-routing across standard + hybrid entity pipelines |
| named_value | standard translation |
| outcome_value | standard translation |
| period_type | standard translation |
| sport_type | standard translation |
| competitor | hybrid translation/transliteration |
| season | hybrid translation/transliteration |
Processing behavior is inferred from node_type. mode is required and selects translation vs transliteration.
Node Selection Cheat Sheet
To ensure the highest translation quality, integrators must send the correct node_type based on the nature of the content being translated.
The system does not guess entity intent. It relies on the provided node_type to select the appropriate processing pipeline.
Sending all content under a single node (for example always bet_type_group) may lead to reduced terminology accuracy.
How to Select the Correct Node
| CONTENT TYPE | USE THIS node_type | PROCESSING BEHAVIOUR |
|---|---|---|
| Market / Bet Category Names | bet_type_group | Standard translation |
| Player / Team Names | competitor | Hybrid (translation + transliteration) |
| Season Names | season | Hybrid |
| League / Tournament Names | league | Standard translation |
| Long marketing / promotional text | long_text | Standard translation (iGaming market terminology + no title-case post-format) |
| Mixed-content files (UI + competitor + season together) | mixed | Per-row auto-routing |
| Generic UI Betting Terms | named_value | Terminology-aware translation |
| Outcome Labels | outcome_value | Context-aware translation |
Note: Use node_type league for league and tournament names. Use mixed when one file contains competitor names, season labels, and standard/UI rows together. Processing behavior is selected by node_type; refer to the Node Mapping section for authoritative behavior.
Examples
Market Name
First Goal Scorer
Match Winner
Total Goals Over/Under
{
"node_type": "bet_type_group"
}
Player / Team Name
Cristiano Ronaldo
Manchester United
{
"node_type": "competitor"
}
Season
2024/2025
Spring Split
{
"node_type": "season"
}
League / Tournament Name
Premier League
{
"node_type": "league"
}
{
"target_lang": "pt-BR",
"items": [
{
"id": "L1",
"result_text": "Premier League"
}
]
}
Mixed Content File
FC Buxoro
2024/2025
Account Activity
{
"node_type": "mixed"
}
Outcome Label
Anytime Scorer
First Half Winner
Yes / No
{
"node_type": "outcome_value"
}
Important Notes
- The processing pipeline is selected based on
node_type. - Hybrid pipelines apply transliteration when needed.
- Standard pipelines apply terminology normalization.
Incorrect node selection may result in inconsistent translations, glossary misses, and incorrect name handling.
Best Practice
Integrators should map their internal entity types to IGTS node types before sending requests.
| INTERNAL FIELD | RECOMMENDED node_type |
|---|---|
market_name | bet_type_group |
team_name | competitor |
player_name | competitor |
season_name | season |
league_name | league |
mixed_translation_file | mixed |
outcome_label | outcome_value |
This ensures optimal translation quality across all supported languages.
Limits & Timeouts
| ENDPOINT | LIMIT | VALUE |
|---|---|---|
| /api/process | Max items | 200 |
| /api/process | Max chars per item | 400 |
| /api/process | Max total source chars | 40,000 |
| /api/process | Timeout | 55,000 ms |
| /api/excel/parse | Max file_data chars | 14,000,000 |
| /api/excel/parse | Max rows | 10,000 |
| /api/jobs | Max items per job create | 5,000 |
HTTP Status Codes
| CODE | MEANING |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Validation/malformed request |
| 401 | Missing/invalid authentication |
| 403 | Permission/scope/IP denied |
| 404 | Resource not found |
| 408 | Processing timeout |
| 413 | Payload/size limit exceeded |
| 429 | Rate limit exceeded |
| 500 | Internal processing error |
Common Error Codes
| ERROR | CAUSE |
|---|---|
auth_required | No auth provided |
ambiguous_auth | Bearer + API key sent together |
invalid_session | Bearer token invalid/expired |
invalid_api_key | API key invalid/revoked/expired |
api_scope_denied | Missing required API key scope |
ip_not_allowed | Caller IP not in whitelist |
rate_limit_exceeded | Rate limit threshold reached |
items_required | items missing/empty |
invalid_item_source_text | source_text missing for an item |
items_limit_exceeded | Sync item count above max |
source_text_too_long | Per-item text length above max |
payload_text_too_large | Total text payload above max |
processing_timeout | Sync processing exceeded timeout |
missing_file_data | Missing file_data in excel parse request |
file_too_large | Uploaded file payload too large |
row_limit_exceeded | Parsed row count above max |
Output Examples
POST /api/process (200, minimal output)
{
"target_lang": "pt-BR",
"rules_version": "0.2.26",
"items": [
{
"id": "1001",
"result_text": "Primeiro Marcador"
}
]
}
POST /api/process (413, validation error)
{
"ok": false,
"error": "items_limit_exceeded",
"message": "items exceeds sync limit (200). Use /api/jobs for larger batches.",
"details": { "max_items": 200 }
}
POST /api/excel/parse (200, shape)
{
"ok": true,
"file_name": "bet_type_group.xlsx",
"node_type": "bet_type_group",
"summary": {
"row_count": 430,
"skipped_empty_value": 0
},
"items": [
{ "id": "1001", "source_text": "First Goal Scorer" }
]
}
cURL Samples
curl -sS https://igts2b.xyz/api/health
curl -sS https://igts2b.xyz/api/languages \ -H "X-API-Key: YOUR_API_KEY"
curl -sS -X POST https://igts2b.xyz/api/process \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"mode":"translation",
"node_type":"bet_type_group",
"target_lang":"pt-BR",
"items":[{"id":"1001","source_text":"First Goal Scorer"}]
}'