GET https://app.alaaqat.com/api/invoices/{invoice_id}
حيث invoice_id هو قيمة _id للفاتورة. تُرجع هذه النقطة سجلاً واحداً. يحتاج مفتاح واجهة التطبيق البرمجية إلى الإمكانية invoice-show.
{
"Accept": "application/json"
}
200 OK، ويأتي السجل ضمن data وقيم خصائصه ضمن data.properties، وبنود الفاتورة ضمن data.items. لا تظهر في الاستجابة الخاصية التي لا قيمة لها.
تأتي معرّفات السجلات المرتبطة بالفاتورة ضمن contact_ids وdeal_ids وما يشبهها، وعددها ضمن contacts_count وdeals_count وما يشبهها. راجع الارتباطات.
{
"data": {
"properties": {
"_id": "6657c1d2e3f4a5b6c7d8e901",
"title": "Office chairs, October order",
"status": "open",
"currency": "JOD",
"discount_rate": 5,
"tax_rate": 16,
"invoice_number": "INV-1001",
"amount": 523.45,
"created_by": 12,
"updated_at": "2026-10-20T09:30:00.000000Z",
"created_at": "2026-10-20T09:30:00.000000Z",
"contact_ids": [
"6650f1a2b3c4d5e6f7a8b901"
],
"contacts_count": 1
},
"account_id": 1024,
"items": [
{
"net_price": 440,
"name": "Ergonomic office chair",
"unit_price": 120,
"quantity": 4,
"description": "Black mesh back",
"unit_discount": 10,
"tax_rate": 0
},
{
"net_price": 35,
"name": "Delivery and assembly",
"unit_price": 35,
"quantity": 1,
"description": null,
"unit_discount": 0,
"tax_rate": 0
}
]
}
}
| الرمز | المعنى |
|---|---|
| 403 | السجل موجود، لكن عضو الفريق الذي أنشأ المفتاح لا يرى إلا الفواتير التي يملكها هو أو فرقه، وهذا السجل ليس منها. |
| 404 | لا يوجد في حسابك سجل بقيمة _id هذه. |