انتقل إلى المحتوى
الأقسام · عروض الأسعار

مرجع الواجهة البرمجية

عروض الأسعار

عروض أسعار المبيعات.

نقاط النهاية

المسارات نسبية إلى https://your-workspace.reevio.app/api/public/v1. يحتاج كل طلب إلى رمز وصول من نوع Bearer يحمل النطاق الموضّح.

كائن عرض السعر

  • idstring (id)

    المعرّف الفريد للمستند.

  • numberstringيقبل null

    الرقم المعروض، مثل SO-2026-00042؛ يُعيَّن عند الإصدار، لذا يكون null في المسودة الجديدة (المستند المُعاد إلى مسودة يحتفظ برقمه).

  • statusenum

    موضع عرض السعر في دورة حياته.

    القيم الممكنة:draftissuedconvertedcanceled

  • customerobjectيقبل null

    null لعملية بيع دون عميل.

    الحقول: id, code, name, status, is_trashed · التفاصيل

  • branchobject

    الفرع الذي ينتمي إليه المستند.

    الحقول: id, name · التفاصيل

  • salespersonobjectيقبل null

    مندوب المبيعات المسؤول، إن وُجد.

    الحقول: id, name · التفاصيل

  • issued_onstring (date)

    تاريخ المستند، وفق تقويم مساحة العمل.

  • currencyobject

    عملة المستند.

    الحقول: code, name, sign · التفاصيل

  • exchange_ratestring (decimal)يقبل null

    سعر الصرف من عملة المستند إلى العملة الوظيفية؛ null حتى يُسعَّر المستند أو يُصدر.

  • totalstring (decimal)

    الإجمالي شاملاً الضريبة، بعملة المستند.

  • base_totalstring (decimal)يقبل null

    بالعملة الوظيفية؛ يُحدَّد عند الإصدار.

  • notesstringيقبل null

    ملاحظات على المستند.

  • created_atstring (timestamp)

    وقت إنشاء المستند.

  • updated_atstring (timestamp)

    آخر وقت تغيّر فيه المستند. تقارن عمليات المزامنة عبر updated_since بهذه القيمة.

  • trashed_atstring (timestamp)يقبل null

    وقت نقل المستند إلى سلة المهملات؛ null إذا لم يكن فيها. لا تُعيد السجلات المحذوفة إلى سلة المهملات إلا عمليات المزامنة عبر updated_since.

  • expires_onstring (date)يقبل null

    آخر يوم يسري فيه عرض السعر؛ null إذا كان لا ينتهي.

  • lineslist of sales lines

    في طلب التفاصيل فقط.

مثال
{
  "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
  "number": "QT-2026-00003",
  "status": "draft",
  "customer": {
    "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
    "code": "CUS-000001",
    "name": "Acme Trading",
    "status": "active",
    "is_trashed": false
  },
  "branch": {
    "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
    "name": "Main branch"
  },
  "salesperson": {
    "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
    "name": "Sara Ahmed"
  },
  "issued_on": "2026-10-31",
  "currency": {
    "code": "IQD",
    "name": "Iraqi Dinar",
    "sign": "IQD"
  },
  "exchange_rate": "1.000000",
  "total": "10000.00",
  "base_total": "10000.00",
  "notes": "Deliver before noon.",
  "created_at": "2026-10-31T09:15:00.000000Z",
  "updated_at": "2026-10-31T09:15:00.000000Z",
  "trashed_at": null,
  "expires_on": "2026-10-31",
  "lines": [
    {
      "line_number": 1,
      "product": {
        "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
        "sku": "TEA-500",
        "barcode": "6260000000017",
        "name": "Black tea 500 g"
      },
      "description": "Example description.",
      "unit": "box",
      "quantity": "2.0000",
      "price": "10000.00",
      "discounted_price": "10000.00",
      "subtotal": "10000.00",
      "tax_rate": {
        "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
        "code": "VAT15",
        "rate_percent": "15.0000",
        "type": "exclusive"
      },
      "tax_amount": "10000.00",
      "line_total": "10000.00",
      "notes": "Deliver before noon."
    }
  ]
}

عرض قائمة عروض الأسعار

GET/quotations

النطاق sales.quotations.read

البيانات الرئيسية لعروض الأسعار، دون البنود؛ اجلب عرضاً واحداً للحصول على بنوده. صفِّ النتائج حسب التاريخ أو الحالة أو العميل أو الفرع.

عوامل التصفية

  • issued_fromstring (date)

    أول تاريخ إصدار، شاملاً.

  • issued_tostring (date)

    آخر تاريخ إصدار، شاملاً.

  • statusstring

    حالات السجل، مفصولة بفواصل.

  • customer_idstring (id)

    سجلات هذا العميل فقط، حسب المعرّف.

  • branch_idstring (id)

    سجلات هذا الفرع فقط، حسب المعرّف.

القيمة المُعادة

يعيد قائمة بكائنات عرض السعر، صفحةً تلو الأخرى.

curl "https://your-workspace.reevio.app/api/public/v1/quotations" \
  -H "Authorization: Bearer $REEVIO_TOKEN"
الاستجابة
{
  "data": [
    {
      "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
      "number": "QT-2026-00003",
      "status": "draft",
      "customer": {
        "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
        "code": "CUS-000001",
        "name": "Acme Trading",
        "status": "active",
        "is_trashed": false
      },
      "branch": {
        "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
        "name": "Main branch"
      },
      "salesperson": {
        "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
        "name": "Sara Ahmed"
      },
      "issued_on": "2026-10-31",
      "currency": {
        "code": "IQD",
        "name": "Iraqi Dinar",
        "sign": "IQD"
      },
      "exchange_rate": "1.000000",
      "total": "10000.00",
      "base_total": "10000.00",
      "notes": "Deliver before noon.",
      "created_at": "2026-10-31T09:15:00.000000Z",
      "updated_at": "2026-10-31T09:15:00.000000Z",
      "trashed_at": null,
      "expires_on": "2026-10-31",
      "lines": [
        {
          "line_number": 1,
          "product": {
            "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
            "sku": "TEA-500",
            "barcode": "6260000000017",
            "name": "Black tea 500 g"
          },
          "description": "Example description.",
          "unit": "box",
          "quantity": "2.0000",
          "price": "10000.00",
          "discounted_price": "10000.00",
          "subtotal": "10000.00",
          "tax_rate": {
            "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
            "code": "VAT15",
            "rate_percent": "15.0000",
            "type": "exclusive"
          },
          "tax_amount": "10000.00",
          "line_total": "10000.00",
          "notes": "Deliver before noon."
        }
      ]
    }
  ],
  "meta": {
    "page_size": 50,
    "has_more": false,
    "next_page_cursor": null
  }
}

جلب عرض سعر

GET/quotations/{id}

النطاق sales.quotations.read

عرض سعر واحد حسب المعرّف، مع بنوده.

المعاملات

  • idstring (id)مطلوب

    معرّف السجل.

القيمة المُعادة

يعيد كائن عرض السعر.

curl "https://your-workspace.reevio.app/api/public/v1/quotations/01K2ZQ7M4X8N6P3R9T5V7W1Y2A" \
  -H "Authorization: Bearer $REEVIO_TOKEN"
الاستجابة
{
  "data": {
    "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
    "number": "QT-2026-00003",
    "status": "draft",
    "customer": {
      "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
      "code": "CUS-000001",
      "name": "Acme Trading",
      "status": "active",
      "is_trashed": false
    },
    "branch": {
      "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
      "name": "Main branch"
    },
    "salesperson": {
      "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
      "name": "Sara Ahmed"
    },
    "issued_on": "2026-10-31",
    "currency": {
      "code": "IQD",
      "name": "Iraqi Dinar",
      "sign": "IQD"
    },
    "exchange_rate": "1.000000",
    "total": "10000.00",
    "base_total": "10000.00",
    "notes": "Deliver before noon.",
    "created_at": "2026-10-31T09:15:00.000000Z",
    "updated_at": "2026-10-31T09:15:00.000000Z",
    "trashed_at": null,
    "expires_on": "2026-10-31",
    "lines": [
      {
        "line_number": 1,
        "product": {
          "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
          "sku": "TEA-500",
          "barcode": "6260000000017",
          "name": "Black tea 500 g"
        },
        "description": "Example description.",
        "unit": "box",
        "quantity": "2.0000",
        "price": "10000.00",
        "discounted_price": "10000.00",
        "subtotal": "10000.00",
        "tax_rate": {
          "id": "01K2ZQ7M4X8N6P3R9T5V7W1Y2A",
          "code": "VAT15",
          "rate_percent": "15.0000",
          "type": "exclusive"
        },
        "tax_amount": "10000.00",
        "line_total": "10000.00",
        "notes": "Deliver before noon."
      }
    ]
  }
}