API لبياناتك أنت داخل عقاري AI: عقارات، وحدات، مستأجرين، عقود، دفعات، مصروفات، صيانة، مهام، مقاولين. نفس الرمز يعمل مع خادم MCP للوكلاء الذكية.
أنشئ رمزاً من الإعدادات ‹ الربط بالذكاء. اختر الصلاحيات: قراءة، تعديل، حذف، وحذف السجلات المالية. أرسله في كل طلب:
Authorization: Bearer aqk_xxxxxxxx
الرمز يصل لبيانات صاحبه فقط. لا يصل لإيجار أو الفواتير أو الإرسال أو الحسابات الأخرى.
GET /api/v1/me | معلومات الرمز والصلاحيات والحد اليومي |
GET /api/v1/summary | أعداد السجلات وإجماليات الدفعات حسب الحالة (بدون حساب أرصدة) |
GET /api/v1/{نوع} | قائمة. فلترة بأي عمود: ?status=paid، وlimit حتى ٢٠٠ وoffset |
GET /api/v1/{نوع}/{id} | سجل واحد |
POST /api/v1/{نوع} | إنشاء (صلاحية تعديل). الجسم JSON |
PATCH /api/v1/{نوع}/{id} | تعديل حقول محددة (صلاحية تعديل) |
DELETE /api/v1/{نوع}/{id}?confirm=true | حذف مؤقت مع نسخة احتياطية (صلاحية حذف). إن كان له سجلات مرتبطة أضف &cascade=true. حذف الدفعات يحتاج صلاحية السجلات المالية |
GET /api/v1/trash | المحذوفات القابلة للاستعادة (٩٠ يوماً) |
POST /api/v1/trash/{trash_id}/restore | استعادة العنصر مع كل ما يرتبط به |
GET /api/v1/openapi.json | مواصفات OpenAPI (عامة) |
propertiesالعقارات / Properties | مطلوب: title, type, cityالحقول: title, type, city, district, street, purchase_price, usage_type, postal_code, description, deed_number, deed_issue_date, lat, lng, building_number |
unitsالوحدات / Units | مطلوب: property_idالحقول: property_id, unit_number, floor_number, monthly_rent, status, area_sqm, bedrooms, bathrooms, electricity_meter, notes, commission_pct, legal_status, water_meter, gas_meter |
tenantsالمستأجرون / Tenants | مطلوب: nameالحقول: name, phone, email, id_number, nationality, notes |
contractsالعقود / Contracts | مطلوب: monthly_rentالحقول: unit_id, property_id, unit_label, tenant_id, tenant_name, monthly_rent, payment_frequency, start_date, end_date, status, escalation_schedule, vacate_date, lessor_name, lessor_id_number, lessor_phone |
paymentsالدفعات / Payments | مطلوب: contract_id, amountالحقول: contract_id, amount, due_date, paid_date, status, method, late_fee, late_fee_days, notes, method_detail, received_by, schedule_date |
expensesالمصروفات / Expenses | مطلوب: category, amountالحقول: property_id, category, description, amount, date, paid_status |
maintenanceالصيانة / Maintenance | مطلوب: titleالحقول: unit_id, property_id, title, description, priority, status, cost |
tasksالمهام / Tasks | مطلوب: titleالحقول: title, note, due_date, priority, category, property_id, done, done_at |
vendorsالمقاولون / Vendors | مطلوب: nameالحقول: name, trade, phone, area, rating, min_price, max_price, jobs_count, last_used_at, last_job_title, notes, favorite |
curl https://aiaqari.com/api/v1/payments?status=pending&limit=20 \
-H "Authorization: Bearer aqk_xxx"
curl -X POST https://aiaqari.com/api/v1/expenses \
-H "Authorization: Bearer aqk_xxx" -H "Content-Type: application/json" \
-d '{"category":"صيانة","amount":450,"description":"سباكة"}'
curl -X DELETE "https://aiaqari.com/api/v1/tasks/ID?confirm=true" \
-H "Authorization: Bearer aqk_xxx"
import requests
H = {"Authorization": "Bearer aqk_xxx"}
r = requests.get("https://aiaqari.com/api/v1/properties", headers=H)
print(r.json()["data"])للوكلاء مثل Claude Code وأي عميل MCP يدعم HTTP:
claude mcp add --transport http aiaqari https://aiaqari.com/mcp \ --header "Authorization: Bearer aqk_xxx"
الأدوات: aiaqari_summary، aiaqari_schema، aiaqari_list، aiaqari_get، aiaqari_create، aiaqari_update، aiaqari_delete، aiaqari_trash، aiaqari_restore. تظهر حسب صلاحيات الرمز.
401 | الرمز مفقود أو غير صالح أو موقوف أو منتهي |
403 | الصلاحية غير مفعّلة لهذا الرمز (scope_missing أو money_delete_off) |
400 | حقل مفقود أو غير مسموح أو مرجع لا يخصك |
404 | السجل غير موجود في حسابك |
409 | للسجل سجلات مرتبطة، أو تعارض عند الاستعادة |
429 | تجاوزت ١٢٠٠ طلب في الدقيقة (Retry-After) |
شكل الخطأ: {"error":{"code":"...","message":"..."}}. كل تعديل يُسجَّل بالقيم القديمة، ونسخة احتياطية كاملة لبياناتك تُحفظ قبل أول حذف كل يوم.
An API for your own data in aiaqari: properties, units, tenants, contracts, payments, expenses, maintenance, tasks and vendors. The same token also works with the MCP server for AI agents.
Create a token in Settings › AI & API access. Choose permissions: read, edit, delete, and delete money records. Send it on every request:
Authorization: Bearer aqk_xxxxxxxx
A token reaches its owner's data only. It cannot reach Ejar, billing, messaging, or other accounts.
GET /api/v1/me | Token info, scopes, daily cap |
GET /api/v1/summary | Record counts and payment totals by status (no balances computed) |
GET /api/v1/{entity} | List. Filter by any column: ?status=paid, limit up to 200, offset |
GET /api/v1/{entity}/{id} | One record |
POST /api/v1/{entity} | Create (edit scope). JSON body |
PATCH /api/v1/{entity}/{id} | Update given fields (edit scope) |
DELETE /api/v1/{entity}/{id}?confirm=true | Soft delete with backup (delete scope). Add &cascade=true if it has dependents. Payment records need the money switch |
GET /api/v1/trash | Deleted items you can restore (90 days) |
POST /api/v1/trash/{trash_id}/restore | Restore an item with everything linked to it |
GET /api/v1/openapi.json | OpenAPI spec (public) |
properties | required: title, type, cityfields: title, type, city, district, street, purchase_price, usage_type, postal_code, description, deed_number, deed_issue_date, lat, lng, building_number |
units | required: property_idfields: property_id, unit_number, floor_number, monthly_rent, status, area_sqm, bedrooms, bathrooms, electricity_meter, notes, commission_pct, legal_status, water_meter, gas_meter |
tenants | required: namefields: name, phone, email, id_number, nationality, notes |
contracts | required: monthly_rentfields: unit_id, property_id, unit_label, tenant_id, tenant_name, monthly_rent, payment_frequency, start_date, end_date, status, escalation_schedule, vacate_date, lessor_name, lessor_id_number, lessor_phone |
payments | required: contract_id, amountfields: contract_id, amount, due_date, paid_date, status, method, late_fee, late_fee_days, notes, method_detail, received_by, schedule_date |
expenses | required: category, amountfields: property_id, category, description, amount, date, paid_status |
maintenance | required: titlefields: unit_id, property_id, title, description, priority, status, cost |
tasks | required: titlefields: title, note, due_date, priority, category, property_id, done, done_at |
vendors | required: namefields: name, trade, phone, area, rating, min_price, max_price, jobs_count, last_used_at, last_job_title, notes, favorite |
curl "https://aiaqari.com/api/v1/payments?status=pending&limit=20" \
-H "Authorization: Bearer aqk_xxx"
curl -X POST https://aiaqari.com/api/v1/expenses \
-H "Authorization: Bearer aqk_xxx" -H "Content-Type: application/json" \
-d '{"category":"maintenance","amount":450,"description":"plumbing"}'
curl -X DELETE "https://aiaqari.com/api/v1/tasks/ID?confirm=true" \
-H "Authorization: Bearer aqk_xxx"
import requests
H = {"Authorization": "Bearer aqk_xxx"}
r = requests.get("https://aiaqari.com/api/v1/properties", headers=H)
print(r.json()["data"])For Claude Code and any MCP client with HTTP support:
claude mcp add --transport http aiaqari https://aiaqari.com/mcp \ --header "Authorization: Bearer aqk_xxx"
Tools: aiaqari_summary, aiaqari_schema, aiaqari_list, aiaqari_get, aiaqari_create, aiaqari_update, aiaqari_delete, aiaqari_trash, aiaqari_restore. Shown according to the token's permissions.
401 | Missing, invalid, revoked or expired token |
403 | Permission not enabled on this token (scope_missing, money_delete_off) |
400 | Missing or non-writable field, or a reference to a record that is not yours |
404 | Record not found in your account |
409 | Record has dependents, or a restore conflict |
429 | More than 1200 requests per minute (Retry-After) |
Error shape: {"error":{"code":"...","message":"..."}}. Every change is logged with before-values, and a full backup of your data is saved before the first delete each day.