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

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

Update collection

PATCH/admin/v1/stores/{store_id}/collections/{collection_id}
  • products:write

Partially update a collection. Send If-Match: "v{version}" to avoid overwriting someone else's changes.

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

  • store_idstringمطلوب

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

  • collection_idstringمطلوب

    معرّف من نوع col، مثل col_01k8qs5s….

الترويسات

  • If-Matchstring · أو null

    ETag from the last read, e.g. "v3"

  • shop-api-versionYYYY-MM

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

الجسم

  • titlestring · أو null
  • handlestring · أو null
  • description_htmlstring · أو null
  • rulesobject · أو null

    Smart collections only; replaces the whole rule set.

  • sort_orderenum · أو null

    The order products appear in within a collection.

    • manual
    • title_asc
    • title_desc
    • price_asc
    • price_desc
    • created_desc
    • created_asc
  • image_media_idstring · أو null

    TypeID with the med prefix.

  • seoobject · أو null

    SEO fields of a PATCH: absent keeps, null clears.

  • template_suffixstring · أو null

    The theme template its page uses; null goes back to the default.

  • publishedboolean · أو null

ما يُرجعه

200 Updated collection.

الأخطاء

  • 404not_foundNo such collection.
  • 409Handle already used.
  • 412precondition_failedThe collection changed since it was read.
  • 422validation_failedValidation failed.