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

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

Issue gift card

POST/admin/v1/stores/{store_id}/gift-cards
  • customers:write
  • يدعم Idempotency-Key

Issues a gift card and, with notify, emails the recipient its code. The response is the only time the code is shown.

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

  • store_idstringمطلوب

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

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • valueintegerمطلوب

    Minor units of the store currency.

  • expires_ondate · أو null

    YYYY-MM-DD: the last day it can be used.

  • customer_idstring · أو null

    TypeID with the cus prefix.

  • recipient_emailstring · أو null
  • recipient_namestring · أو null
  • messagestring · أو null

    Shown in the email.

  • sender_namestring · أو null

    Who gives it, shown with the message ("From Faisal").

  • notestring · أو null

    For staff only.

  • notifyboolean

    Email the recipient the code.

ما يُرجعه

201 Issued, with its code.

الأخطاء

  • 422validation_failedInvalid value, date or recipient.