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

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

Save notification template

PUT/admin/v1/stores/{store_id}/notifications/messages/{message}/templates/{channel}/{locale}
  • notifications:manage

Save the store's version of a template (one channel, one language). It must render with the message's sample data; syntax and rendering errors come back per field with their line.

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

  • store_idstringمطلوب

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

  • messagestringمطلوب

    Message key

  • channelstringمطلوب

    email, sms or whatsapp

  • localestringمطلوب

    en or ar

الترويسات

  • shop-api-versionYYYY-MM

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

الجسم

  • subjectstring · أو null
  • bodystring · أو null
  • textstring · أو null
  • templatestring · أو null

    The approved WhatsApp template's name.

  • languagestring · أو null

    The WhatsApp template's language code.

  • parametersarray of strings · أو null

    The WhatsApp body variables {{1}}, {{2}}… in order.

  • button_parameterstring · أو null

    The variable of a WhatsApp URL or copy-code button.

ما يُرجعه

200 The saved template.

الأخطاء

  • 403forbiddenMissing notifications:manage.
  • 404not_foundNo such message, or not on this channel.
  • 422validation_failedMissing fields or a template that does not render.