EL OUATINETECHNICIEN OUATINE

الفوترة API جديد

أنشئ فواتير EL OUATINE من تطبيقك أو نظامك — نفس محرك الفوترة في المنصة، نفس تسلسل الأرقام، ونفس التحقق برمز QR.

الخطة المجانية: 50 فاتورة / شهر لكل زبون

🔑 المصادقة

كل الطلبات تتطلب مفتاح API. أرسله في الترويسة:

Authorization: Bearer elo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# أو بدلاً من ذلك:
X-API-Key: elo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

مفاتيح API تُنشأ من ورشة EL OUATINE (تبويب «الفوترة API») وتُعرض مرة واحدة فقط.

1. إنشاء فاتورة

POST /api/invoices/v1/create — يُرجع رقم الفاتورة، رابط PDF، ورابط التحقق.

customer_name · customer_email? · customer_phone? · lang: fr|en · items: [{description, qty, unit_price}] · notes? · status: paid|pending|proforma

curl -X POST https://securecelleouatine.com/api/invoices/v1/create \
  -H "Authorization: Bearer elo_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_name": "Ahmed Benali",
    "customer_phone": "+213600000000",
    "lang": "fr",
    "items": [
      { "description": "iCloud removal - iPhone 14", "qty": 1, "unit_price": 45.00 },
      { "description": "Screen protector", "qty": 2, "unit_price": 3.50 }
    ],
    "notes": "Paid in cash"
  }'
{
  "ok": true,
  "data": {
    "id": 128,
    "number": "INV-2026-0042",
    "total": 52.00,
    "currency": "USD",
    "status": "paid",
    "pdf_url": "https://securecelleouatine.com/api/invoices/v1/128/pdf",
    "verify_url": "https://securecelleouatine.com/verify-invoice?inv=INV-2026-0042&code=A1B2C3D4",
    "verify_code": "A1B2C3D4",
    "warnings": [],
    "quota": { "limit": 50, "used": 7, "month": "2026-10" }
  }
}

2. قائمة الفواتير

GET /api/invoices/v1 — فواتيرك فقط، مع ترقيم الصفحات.

curl https://securecelleouatine.com/api/invoices/v1?limit=20 \
  -H "Authorization: Bearer elo_YOUR_KEY_HERE"

3. تحميل PDF

GET /api/invoices/v1/:id/pdf — نفس تصميم «كيما تاع العقد» بالفرنسية والإنجليزية.

curl -o INV-2026-0042.pdf \
  https://securecelleouatine.com/api/invoices/v1/128/pdf \
  -H "Authorization: Bearer elo_YOUR_KEY_HERE"

ملاحظة: ملفات PDF تدعم الأحرف اللاتينية فقط — الأسماء العربية تُطبع بعلامة «؟».

⚠️ الأخطاء

400 = بيانات غير صالحة · 401 = مفتاح مفقود أو غير صالح · 404 = فاتورة غير موجودة · 429 = تجاوزت الحصة الشهرية أو حد المعدل

🎫 الحصول على مفتاح

مفاتيح API تُنشأ من ورشة EL OUATINE (تبويب «الفوترة API») وتُعرض مرة واحدة فقط.

فوترة احترافية لنظامك — EL OUATINE

اطلب مفتاحك الآن