Skip to content

Create a product

POST/admin/v1/stores/{store_id}/products
  • products:write
  • Idempotency-Key supported

Creates a product with its variants. Without variants you get one per option combination, priced at zero, so send prices whenever you know them.

Path parameters

  • store_idstringrequired

    The store, as store_01k9w2…. Apps get it from the install.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • titlestringrequired

    The name customers see.

  • handlestring · or null

    Its address, /products/{handle}. Made from the title when omitted.

  • statusenum · or null

    Defaults to draft, which storefronts never show.

    • draft
    • active
    • archived
  • description_htmlstring · or null

    Formatted text. Unsafe markup is removed on save.

  • variantsarray of objects · or null

    Prices are Money in minor units: { "amount": 45000, "currency": "EGP" } is EGP 450.

  • optionsarray of objects · or null

    What varies, like weight or size, with its values.

  • media_idsarray of strings · or null

    The gallery in order, from files you uploaded.

  • launch_attimestamp · or null

    When a draft goes live, within a year. Needs status draft.

Returns

201 with the product object. The ETag header carries its version, for If-Match on later updates.

Errors

  • 403forbiddenThe key or app lacks products:write.
  • 409handle_takenAnother product in this store already uses the handle.
  • 409sku_takenAnother product in this store already uses one of the SKUs.
  • 422validation_failedField errors are listed in errors[], each with its field.