> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# إنشاء نطاق تسلسلي GS1 بالجملة

> POST /bulk-operation/gs1/serial-range-generate/

ينشئ نطاقًا متسلسلًا من رموز QR الخاصة بـ GS1 انطلاقًا من رقم تسلسلي بداية، بشكل غير متزامن، على مضيف **Management API** (‏`api.scanova.io`‏)، مع المصادقة باستخدام مفتاح Management API الخام الخاص بك.

```
POST https://api.scanova.io/bulk-operation/gs1/serial-range-generate/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
```

<Note>
  لا يوجد رفع ملف — تُنشئ نقطة النهاية هذه النطاق برمجيًا من `start_serial` و`count`.
</Note>

<ParamField body="name" type="string" required>
  تسمية لهذه العملية.
</ParamField>

<ParamField body="start_serial" type="string" required>
  الرقم التسلسلي الأول في النطاق، أرقام فقط، بحد أقصى 20 حرفًا.
</ParamField>

<ParamField body="count" type="integer" required>
  عدد الأرقام التسلسلية المتتالية المراد إنشاؤها، بحد أدنى 1.
</ParamField>

<ParamField body="sample_qrid" type="string">
  معرّف رمز QR موجود من نوع GS1 يُنسخ منه قيم الحقول المشتركة. قدّم هذا **أو** `shared_info`، وليس كلاهما غائبًا.
</ParamField>

<ParamField body="shared_info" type="array">
  قيم حقول GS1 المشتركة بين كل رقم تسلسلي في النطاق، بصيغة JSON. قدّم هذا **أو** `sample_qrid`، وليس كلاهما غائبًا.
</ParamField>

<ParamField body="custom_domain" type="integer">
  معرّف نطاق مخصص يُستخدم للروابط القصيرة لرموز QR المُنشأة.
</ParamField>

<ParamField body="pattern_info" type="string">
  بيانات نمط التصميم المطبّقة على جميع رموز QR المُنشأة.
</ParamField>

<ParamField body="auto_deactivate" type="object">
  قاعدة اختيارية لإلغاء التنشيط التلقائي تُطبَّق على جميع رموز QR المُنشأة.
</ParamField>

<ParamField body="utm_parameters" type="object">
  معاملات تتبّع UTM المطبّقة على روابط جميع رموز QR المُنشأة.
</ParamField>

<ParamField body="folder" type="integer">
  معرّف مجلد لحفظ رموز QR المُنشأة فيه.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.scanova.io/bulk-operation/gs1/serial-range-generate/" \
    -H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "GS1 batch 001-100",
      "start_serial": "00000001",
      "count": 100,
      "sample_qrid": "a1b2c3d4"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "operation_id": "bo-gs1-001",
    "message": ["Your GS1 serial range is being processed. We'll email you once it's ready."]
  }
  ```
</ResponseExample>

نفس النمط غير المتزامن كما في [إنشاء رموز QR بالجملة](/ar/api-reference/management-api/bulk-operation/generate) — استطلع [سرد العمليات بالجملة](/ar/api-reference/management-api/bulk-operation/list). يُتحقَّق من مخطط أول حمولة GS1 مُجمَّعة في النطاق قبل إنشاء أي رموز QR، لذا فإن شكل `shared_info` المُشوَّه يفشل بسرعة.

يُعاد `400` إذا تجاوز الرقم التسلسلي الناتج 20 حرفًا في أي نقطة من النطاق، أو إذا لم يُقدَّم أي من `shared_info` أو `sample_qrid`، أو إذا تم تجاوز الحصة (‏`BULK_OPERATION` أو `TOTAL_QR_CODES`، مُتحقَّق منها مقابل `count` الكامل). يُعاد `403` إذا كان الحساب يفتقر إلى حصة `BULK_OPERATION`، أو كانت خطته غير مفعّلة، أو يفتقر إلى صلاحية `BULK_OPERATION_CAN_GENERATE`.

## ذات صلة

* [إنشاء رموز QR بالجملة](/ar/api-reference/management-api/bulk-operation/generate) — النظير العام القائم على الملفات لفئات غير GS1.
* [سرد العمليات بالجملة](/ar/api-reference/management-api/bulk-operation/list) — انتظار الاكتمال.
* [نظرة عامة على Management API](/ar/api-reference/management-api/overview) — مخطط المصادقة وقواعد الحصة المطبّقة على نقطة النهاية هذه.


## OpenAPI

````yaml api-reference/openapi/management-api.json POST /bulk-operation/gs1/serial-range-generate/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /bulk-operation/gs1/serial-range-generate/:
    post:
      summary: Bulk-generate a GS1 serial range
      description: >-
        Generates a contiguous range of GS1 QR codes from a starting serial and
        count, without a file upload. Requires either `shared_info` or
        `sample_qrid` to supply the shared GS1 field values applied to every
        serial in the range.
      operationId: generateGs1SerialRange
      requestBody:
        content:
          application/json:
            example:
              name: GS1 batch 001-100
              start_serial: '00000001'
              count: 100
              sample_qrid: a1b2c3d4
              custom_domain: null
              folder: null
      responses:
        '200':
          description: Generation started.
          content:
            application/json:
              example:
                operation_id: bo-gs1-001
                message:
                  - >-
                    Your GS1 serial range is being processed. We'll email you
                    once it's ready.
        '400':
          description: >-
            Serial range too long (>20 characters), neither shared_info nor
            sample_qrid provided, or quota exceeded.
        '403':
          description: >-
            Missing BULK_OPERATION quota, inactive plan, or missing
            BULK_OPERATION_CAN_GENERATE permission.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````