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

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

Preview notification

POST/admin/v1/stores/{store_id}/notifications/messages/{message}/preview
  • notifications:manage
  • يدعم Idempotency-Key

Render a message with its sample data: the saved template, or unsaved edits (draft) for a live preview. Nothing is sent.

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

  • store_idstringمطلوب

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

  • messagestringمطلوب

    Message key

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • channelenumمطلوب

    How a message reaches its recipient.

    • email
    • sms
    • whatsapp
  • localeenumمطلوب

    The languages notification templates come in. Recipients in other languages get English.

    • en
    • ar
  • draftobject · أو null

    Unsaved edits to render; the saved template when absent.

ما يُرجعه

200 The rendered message.

الأخطاء

  • 403forbiddenMissing notifications:manage.
  • 404not_foundNo such message, or not on this channel.
  • 409No WhatsApp template chosen yet.
  • 422validation_failedThe draft does not render.