API Documentation
This page documents the real, currently-live HTTP endpoints served by www.badirtech.com. There are three: an AI assistant endpoint, a trial/support request form endpoint, and a health check. No other public API endpoints exist on this domain. All endpoints are JSON over HTTPS.
POST/api/ask
Sanid AI Assistant — answers questions about Jordanian tax law/regulations (from an official legal-text library, with citations) and about BadirTech/Sanid products and services. Falls back to a DeepSeek-based answer, still scoped to the same two topics, when the question is in-scope but not found in any local source.
Rate limit
10 requests per IP address per 24 hours.
Request parameters
| Field | Type | Required | Notes |
|---|---|---|---|
| question | string | yes | 2–500 characters |
Example request
POST /api/ask
Content-Type: application/json
{"question": "كم ضريبة المبيعات على الطحينة؟"}
Example response
200 OK
{
"success": true,
"source_type": "library",
"answer": "بحسب المكتبة القانونية الرسمية: ...",
"sources": [{ "source": "...", "title": "..." }]
}
source_type is one of: library (legal library, exempt-entity list, or company profile match), ai (DeepSeek fallback), scope (question politely declined as out of scope), none (no source available).
Expected errors
| Status | Body | Cause |
|---|---|---|
| 400 | {"error":"INVALID_INPUT"} | question missing or outside 2–500 chars |
| 429 | {"error":"DAILY_LIMIT", "answer": "..."} | 10/24h rate limit exceeded (includes a friendly bilingual message) |
Usage notes
Scoped strictly to Jordanian tax law and BadirTech/Sanid topics; questions about other countries or unrelated subjects are declined, not answered. All answers are informational only and are not a substitute for a certified tax, legal, or accounting advisor.
POST/api/register
Submits a Sanid trial request or opens a technical support ticket. The same endpoint handles both; a field distinguishes the two. Delivered by email to the BadirTech team — there is no server-side database storage.
Rate limit
5 requests per IP address per 10 minutes.
Request parameters
| Field | Type | Required | Notes |
|---|---|---|---|
| fullName | string | yes | 3–100 characters |
| phoneNumber | string | yes | phone-number-like pattern, 7–20 characters |
| businessSector | string | yes | 3–2000 characters (free text: sector / issue details) |
| formType | string | no | "trial" (default) or "support" |
Example request
POST /api/register
Content-Type: application/json
{
"fullName": "أحمد علي",
"phoneNumber": "+962791234567",
"businessSector": "شركة توزيع مواد غذائية بحاجة لتطبيق مبيعات ميدانية",
"formType": "trial"
}
Example response
200 OK
{"success": true}
Expected errors
| Status | Body | Cause |
|---|---|---|
| 400 | {"error":"INVALID_INPUT","fields":[...]} | one or more fields failed validation (named in fields) |
| 429 | {"error":"RATE_LIMITED"} | 5/10min rate limit exceeded |
| 500 | {"error":"MAIL_SEND_FAILED"} | outgoing email could not be delivered |
GET/api/health
Service health/uptime check. Intended for automated monitoring and load-balancer checks. No authentication, no rate limit, no sensitive data exposed.
Request parameters
None.
Example request
GET /api/health
Example response
200 OK
{
"status": "ok",
"uptime": 12345,
"timestamp": "2026-07-14T15:00:00.000Z"
}
Expected errors
None expected under normal operation.
Machine-readable catalog: /.well-known/api-catalog (RFC 9727) ·
Agent skills: /.well-known/agent-skills/index.json
Last updated: 2026-07-14
