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

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

Create an article

POST/admin/v1/stores/{store_id}/articles
  • يدعم Idempotency-Key

Create an article; its HTML is sanitized. A future published_at schedules it.

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

  • store_idstringمطلوب

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

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • blog_idstringمطلوب

    TypeID with the blog prefix.

  • titlestringمطلوب
  • publishedbooleanمطلوب

    Visible on storefronts from published_at (now when absent).

  • handlestring

    Derived from the title when empty on create; kept when empty on update. A live article's new handle redirects its old path.

  • authorstring
  • body_htmlstring

    HTML; sanitized on save.

  • excerptstring
  • image_idstring · أو null

    A ready image of the file library.

ما يُرجعه

201 Created.

الأخطاء

  • 403forbiddenMissing permission.
  • 409Handle taken in the blog (handle_taken), or the article limit reached.
  • 422validation_failedValidation failed, an unknown blog or an image that isn't one of the store's.