انتقل إلى المحتوى

لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.

Create ZATCA unit

POST/admin/v1/stores/{store_id}/zatca/units
  • settings:write
  • يدعم Idempotency-Key

Start onboarding an e-invoicing unit: generates its secp256k1 key pair and the CSR ZATCA asks for. Next: the OTP from the Fatoora portal.

معاملات المسار

  • store_idstringمطلوب

    معرّف من نوع store، مثل store_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.

الترويسات

  • Idempotency-Keystring

    أرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.

  • shop-api-versionYYYY-MM

    الإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.

الجسم

  • environmentenumمطلوب

    The Fatoora environment a unit joined. Only production documents are legal records; the others exist to test an integration end to end.

    • sandbox
    • simulation
    • production
  • namestring · أو null

    What staff call it; the branch's name when absent.

  • location_idstring · أو null

    The branch it serves.

  • pos_register_idstring · أو null

    The register it serves.

  • common_namestring · أو null

    Defaults to Tijara-<VAT number>.

  • organization_unitstring · أو null

    The branch (Online store by default). VAT groups: the member's 10-digit TIN.

  • locationstring · أو null

    The branch's address; defaults to the seller's address.

  • industrystring · أو null

    Defaults to Retail.

ما يُرجعه

201 The unit, waiting for its OTP.

الأخطاء

  • 403forbiddenMissing permission.
  • 409The store has 100 units in service (unit_limit), another unit serves that register or location (unit_assignment_taken), or the seller is not a ZATCA seller (seller_not_ready).
  • 422validation_failedValidation failed.