توثيق REST API
مرجع المطوّرين لربط Sham Cash وSyriatel Cash عبر واجهة واحدة. اربط الحسابات من لوحة التحكم، ثم استدعِ النقاط أدناه بمفتاح API الخاص بك.
نظرة عامة
كل الطلبات تمر عبر /api/v1 مع resource وaction.
المصادقة بمفتاح API من صفحة إدارة API في لوحة التحكم.
عنوان الـ API (Base URL)
https://tsa-api.com/api/v1
استبدل YOUR_API_KEY بمفتاحك الحقيقي من لوحة التحكم.
بداية سريعة
أرسل المفتاح في Header (مُفضّل) أو كمعامل api_key في الرابط.
GET https://tsa-api.com/api/v1?resource=status&api_key=YOUR_API_KEY
GET https://tsa-api.com/api/v1?resource=status
X-Api-Key: YOUR_API_KEY
Accept: application/json
curl -s "https://tsa-api.com/api/v1?resource=status" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Accept: application/json"
نقاط النهاية
1) فحص الحالة GET
تأكد أن الـ API يعمل واطّلع على بيانات حسابك وحدود الربط.
https://tsa-api.com/api/v1?resource=status&api_key=YOUR_API_KEY
api_key— إجباري
{
"success": true,
"message": "API is working.",
"user": { "id": 1, "name": "User Name", "email": "[email protected]" },
"limits": { "max_linked_accounts": 10 }
}
2) الحسابات المرتبطة GET
قائمة حسابات Sham و Syriatel الفعّالة ضمن باقتك.
https://tsa-api.com/api/v1?resource=accounts&action=list&api_key=YOUR_API_KEY
{
"success": true,
"data": {
"shamcash": [
{ "account_address": "a8f3e2b1c9d04f5678901234abcdef01" }
],
"syriatel": [
{ "gsm": "09330000001", "cash_code": "07184562", "line_name": "", "group_label": "bot", "login_gsm": "09330000001", "is_primary": true }
]
}
}
group_label— اسم مجموعة سيرياتيل في لوحة التحكم (مثلbot،Shark)line_name— اسم الخط داخل تطبيق سيرياتيل (اختياري)login_gsm— رقم تسجيل الدخول للحساب (الخط الأساسي)is_primary—trueإذا كان هذا الخط هو الرقم الأساسي (★)
Sham Cash
3) Sham Cash — الرصيد GET
https://tsa-api.com/api/v1?resource=shamcash&action=balance&account_address=YOUR_SHAM_ADDRESS&api_key=YOUR_API_KEY
account_address— إجباريapi_key— إجباري
{
"success": true,
"data": {
"account_address": "a8f3e2b1c9d04f5678901234abcdef01",
"balances": [
{ "currency": "USD", "balance": 0.05 },
{ "currency": "SYP", "balance": 6880 },
{ "currency": "EUR", "balance": 0 }
]
}
}
4) Sham Cash — سجلات واردة GET
آخر التحويلات الواردة (~50 عملية).
https://tsa-api.com/api/v1?resource=shamcash&action=logs&account_address=YOUR_SHAM_ADDRESS&api_key=YOUR_API_KEY
{
"success": true,
"data": {
"account_address": "a8f3e2b1c9d04f5678901234abcdef01",
"log_type": "incoming",
"items": [
{
"tran_id": "288100001",
"tran_kind": 1,
"direction": "incoming",
"from_name": "Sender",
"to_name": "Receiver",
"currency": "SYP",
"amount": 8500,
"datetime": "2026-06-15 09:22:11",
"account": "b7c2d1e0f9a84b5632109876fedcba98",
"note": ""
}
]
}
}
4.1) Sham Cash — سجلات صادرة GET
https://tsa-api.com/api/v1?resource=shamcash&action=outgoing_logs&account_address=YOUR_SHAM_ADDRESS&api_key=YOUR_API_KEY
account_address— إجباريapi_key— إجباري
5) Sham Cash — بحث عملية GET
بحث برقم العملية ضمن حساب واحد — الواردة فقط.
https://tsa-api.com/api/v1?resource=shamcash&action=find_tx&tx=288100001&account_address=YOUR_SHAM_ADDRESS&api_key=YOUR_API_KEY
tx— إجباريaccount_address— إجباريapi_key— إجباري
{
"success": true,
"data": {
"found": true,
"transaction": {
"tran_id": "288100001",
"from_name": "Sender",
"to_name": "Receiver",
"currency": "SYP",
"amount": 8500,
"datetime": "2026-06-15 09:22:11",
"account": "b7c2d1e0f9a84b5632109876fedcba98",
"note": ""
},
"account": { "account_address": "a8f3e2b1c9d04f5678901234abcdef01" }
}
}
إن لم تُوجد: "found": false مع HTTP 200.
5.1) Sham Cash — التحقق من مستلم GET
تحقق من عنوان المستلم قبل التحويل.
https://tsa-api.com/api/v1?resource=shamcash&action=resolve&account_address=YOUR_SHAM_ADDRESS&to_address=RECEIVER_ADDRESS&api_key=YOUR_API_KEY
{
"success": true,
"data": {
"address": "b7c2d1e0f9a84b5632109876fedcba98",
"name": "Recipient Name",
"account_number": "..."
}
}
6) Sham Cash — تحويل POST
POST فقط — أرسل X-Api-Key في Header. Body يقبل form أو JSON. ضع to_address وamount في Body فقط.
POST https://tsa-api.com/api/v1?resource=shamcash&action=transfer&account_address=YOUR_SHAM_ADDRESS
to_address— إجباريamount— إجباريcurrency— اختياري · الافتراضيSYP· القيم:USD·SYP·EURnote— اختياريpin— اختياري
Body (form):
to_address=b7c2d1e0f9a84b5632109876fedcba98
amount=1200
currency=SYP
note=
pin=****
Body (JSON):
{
"to_address": "b7c2d1e0f9a84b5632109876fedcba98",
"amount": "1200",
"currency": "SYP",
"note": "",
"pin": "****"
}
curl -X POST "https://tsa-api.com/api/v1?resource=shamcash&action=transfer&account_address=YOUR_SHAM_ADDRESS" \
-H "X-Api-Key: YOUR_API_KEY" \
-d "to_address=b7c2d1e0f9a84b5632109876fedcba98" \
-d "amount=1200" \
-d "currency=SYP"
{
"success": true,
"data": {
"tran_id": "288100002",
"amount": 1200,
"currency": "SYP",
"to_address": "b7c2d1e0f9a84b5632109876fedcba98",
"message": "تم الإرسال"
}
}
Syriatel Cash
معامل gsm = رقم الموبايل المربوط (مثل 09330000001) —
لا تستخدم cash_code مكانه. خذ الرقم من accounts/list.
7) Syriatel Cash — الرصيد GET
https://tsa-api.com/api/v1?resource=syriatel&action=balance&gsm=09330000001&api_key=YOUR_API_KEY
gsm— إجباري · رقم الموبايل فقط (ليسcash_code)api_key— إجباري
{
"success": true,
"data": { "gsm": "09330000001", "balance": "482500" }
}
8) Syriatel Cash — سجلات واردة GET
معامل period اختياري: 7 (افتراضي) · 30 · all
https://tsa-api.com/api/v1?resource=syriatel&action=history&gsm=09330000001&period=7&api_key=YOUR_API_KEY
{
"success": true,
"data": {
"gsm": "09330000001",
"period": "7",
"history_type": "incoming",
"items": [
{
"transaction_no": "600100002",
"date": "2026-06-14 18:40:02",
"from": "09440000002",
"to": "09330000001",
"amount": "5000",
"fee": "0",
"channel": "أقرب إليك",
"status": "1"
}
]
}
}
8.1) Syriatel Cash — سجلات صادرة GET
بدائل: outgoing_history · history_outgoing · sent_history
https://tsa-api.com/api/v1?resource=syriatel&action=outgoing_history&gsm=09330000001&period=30&api_key=YOUR_API_KEY
9) Syriatel Cash — بحث عملية GET
بحث وارد وصادر ضمن خط واحد — الحقل history_type يحدد النوع (incoming / outgoing).
https://tsa-api.com/api/v1?resource=syriatel&action=find_tx&gsm=09330000001&tx=600100002&api_key=YOUR_API_KEY
{
"success": true,
"data": {
"found": true,
"transaction": {
"transaction_no": "600100002",
"date": "2026-06-14 18:40:02",
"from": "09440000002",
"to": "09330000001",
"amount": "5000",
"fee": "0",
"channel": "أقرب إليك",
"status": "1",
"history_type": "incoming"
},
"account": { "gsm": "09330000001" }
}
}
10) Syriatel Cash — تحويل كاش POST
Body يقبل form أو JSON.
to_gsm وamount وpin_code في Body فقط — لا تضعها في الرابط.
gsm في الرابط أو Body.
POST https://tsa-api.com/api/v1?resource=syriatel&action=transfer_cash
Body (form):
gsm=09330000001
to_gsm=09980000003
amount=250
pin_code=****
Body (JSON):
{
"gsm": "09330000001",
"to_gsm": "09980000003",
"amount": "250",
"pin_code": "****"
}
curl -X POST "https://tsa-api.com/api/v1?resource=syriatel&action=transfer_cash" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "gsm=09330000001" \
-d "to_gsm=09980000003" \
-d "amount=250" \
-d "pin_code=****"
{
"success": true,
"data": {
"source_gsm": "09330000001",
"beneficiary_gsm": "09980000003",
"amount": "250",
"fee": "1.50",
"billcode": "X7M4P2Q1",
"message": "تم التحويل"
}
}
11) Syriatel — شحن موبايل POST
amount = المبلغ المخصوم من الكاش (شامل الضريبة والعمولة).
Body يقبل form أو JSON — مثل التحويل.
POST https://tsa-api.com/api/v1?resource=syriatel&action=mobile_recharge
Body (form):
gsm=09330000001
to_gsm=09990000004
amount=210
pin_code=****
Body (JSON):
{
"gsm": "09330000001",
"to_gsm": "09990000004",
"amount": "210",
"pin_code": "****"
}
{
"success": true,
"data": {
"source_gsm": "09330000001",
"target_gsm": "09990000004",
"amount": "210",
"recharge_amount": "200.00",
"tax": "8.50",
"fee": "1.50",
"bill_code": "8844221100",
"message": "تم شحن الرصيد"
}
}
الأخطاء
شكل الرد: { "success": false, "error": "..." }
- 400 — معاملات ناقصة أو رفض العملية
- 401 — مفتاح API مفقود أو خاطئ
- 403 — حساب موقوف أو اشتراك منتهٍ
- 404 — endpoint أو حساب غير موجود
- 405 — التحويل والشحن يتطلبان POST
- 429 — تجاوز حد الطلبات
- 502 — تعذّر الاتصال بشام/سيرياتيل
- 503 — سيرياتيل كاش في صيانة
HTTP 401
{ "success": false, "error": "Missing API key. استخدم X-Api-Key أو ?api_key=" }
HTTP 404
{ "success": false, "error": "لا يوجد حساب Syriatel مرتبط بهذا الرقم" }
HTTP 429
{ "success": false, "error": "تجاوزت حد الطلبات — انتظر قليلاً" }
TSA API — Developer Overview
TSA API (tsa-api.com) is a REST API platform
for Sham Cash integration and Syriatel Cash integration in Syria.
Link wallets from your dashboard, use your private X-Api-Key, and call
https://tsa-api.com/api/v1 from PHP, Python, Node.js, or any HTTP client.
Guides: Sham Cash · Syriatel Cash · FAQ · llms.txt