لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Create ZATCA unit
/ 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
productiondocuments are legal records; the others exist to test an integration end to end.- sandbox
- simulation
- production
namestring · أو nullWhat staff call it; the branch's name when absent.
location_idstring · أو nullThe branch it serves.
pos_register_idstring · أو nullThe register it serves.
common_namestring · أو nullDefaults to
Tijara-<VAT number>.organization_unitstring · أو nullThe branch (
Online storeby default). VAT groups: the member's 10-digit TIN.locationstring · أو nullThe branch's address; defaults to the seller's address.
industrystring · أو nullDefaults to
Retail.
ما يُرجعه
201 The unit, waiting for its OTP.
الأخطاء
- 403
forbiddenMissing 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). - 422
validation_failedValidation failed.