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

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

Create a redirect

POST/admin/v1/stores/{store_id}/redirects
  • content:write
  • يدعم Idempotency-Key

Create a redirect. The path is normalized (decoded, lowercase, no trailing slash); a path redirecting to itself (redirect_loop) or a redirect into or out of another one (redirect_chain) is refused.

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

  • store_idstringمطلوب

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

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • pathstringمطلوب

    The old path; a full URL of another site counts by its path and query.

  • targetstringمطلوب

    A path on the store or an http(s) URL.

ما يُرجعه

201 Created.

الأخطاء

  • 403forbiddenMissing permission.
  • 409The path already redirects (path_taken), or the store has 100,000 redirects.
  • 422validation_failedValidation failed, a loop or a chain.