واجهة القراءة لنظام الميزان · Al-Mizan read API for AI apps
تستخدم تطبيقات الذكاء الاصطناعي أدوات محددة (أرصدة العملاء، ملخص المبيعات، المخزون…)، ولما لا تغطيه تلك الأدوات أداة
عامة واحدة للقراءة فقط: call_read_endpoint.
- ماذا تستدعي: واجهة REST الخاصة بنظام الميزان لشركة المستخدم نفسها
(
https://{company}.al-mizan.net/api/...) — تقارير واستعلامات للقراءة فقط من دليل واجهات الميزان. - كيف تختار: بالمعرّف (id) من أداة
search_endpoints، ثمdescribe_endpointلمعرفة المعاملات. - للقراءة فقط: لا يمكنها الإنشاء أو التعديل أو الحذف؛ ويرفض النظام أي طلب يغيّر البيانات حتى لو وصله.
- بالصلاحيات نفسها: كل استدعاء يتم كمستخدم الشركة الذي سجّل الدخول، بصلاحياته وفروعه فقط.
- النتائج: JSON مختصر، مع تقسيم القوائم الطويلة (max_rows و skip).
مجموعات التقارير المتاحة (بحسب ترخيص الشركة وصلاحيات المستخدم)
- المحاسبة: دليل الحسابات، الأرصدة، كشوف الحسابات، المصروفات والإيرادات، القيود، السندات، الشيكات، مراكز التكلفة.
- المبيعات والعملاء: الفواتير، المرتجعات، أرصدة العملاء وأعمار الديون، المبيعات اليومية والشهرية، أرباح الأصناف، المناديب.
- المشتريات والموردون: الفواتير، المرتجعات، أرصدة الموردين.
- المخزون: الأصناف والفئات، الأرصدة بالفروع والمستودعات، الحركات، التحويلات، الجرد.
- أخرى بحسب الوحدات المفعّلة (مثل شؤون الموظفين، نقاط البيع، الأصول الثابتة).
AI apps use specific tools (customer balances, sales summary, stock…) and, for anything else, one generic
read-only tool: call_read_endpoint.
- What it calls: the user's own company Al-Mizan ERP REST API (
https://{company}.al-mizan.net/api/...) — read-only report and lookup endpoints from the Al-Mizan API catalog. - How: by endpoint id from
search_endpoints; parameters fromdescribe_endpoint. - Read-only: it cannot create, change or delete data; the ERP also refuses any data-changing request.
- Permissions: every call runs as the signed-in company user, with that user's permissions and branches.
- Results: compact JSON; long lists are paged (max_rows, skip).
Report groups (depending on the company's licence and the user's permissions): accounting (chart of accounts, balances, statements, expenses / revenues, journal entries, vouchers, cheques, cost centers); sales & customers (invoices, returns, balances and aging, daily / monthly sales, profit by item, salesmen); purchases & suppliers; inventory (items, categories, stock per branch / warehouse, movements, transfers, stock counts); other enabled modules (e.g. HR, POS, fixed assets).
