---
title: "Bulk Publish/Unpublish Product in Online Store"
method: PUT
path: "/products/status/bulk"
tags: ["Products"]
---

# Bulk Publish/Unpublish Product in Online Store

`PUT /products/status/bulk`

To bulk publish/unpublish products in Online Store.<br> 在網店批量上架/下架商品。

## Request body

- object
  - `products` object[]
    - `id` string — The id of the product that will be published/unpublished.<br> Max delete 100 products at a time.<br> 需要上架/下架的商品id，每次最多只能上架/下架100個商品。
    - `status` 'active' | 'draft' — The status that will be applied on the products to the online store.<br> 更新商品狀態至網店。

## Response `200`

OK

- object
  - `updated_product_ids` string[] — The successfully published/unpublished product ids<br>成功上架/下架的商品id
  - `errors` object[]
    - `message` string — The failed message<br>失敗上架/下架的信息
    - `id` string — The failed delete product ids<br>失敗上架/下架的商品id

## Other responses

- `422` — Unprocessable entity

---

[API](https://skmtc.dev/shoplineapp/apis/shopline-open-api.md) · [All operations](https://skmtc.dev/shoplineapp/apis/shopline-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/shoplineapp/shopline-open-api/revisions/1675ac12cde7/schema)
