---
title: "Bulk Add Items to Cart"
method: POST
path: "/carts/{id}/items"
tags: ["Carts"]
---

# Bulk Add Items to Cart

`POST /carts/{id}/items`

Bulk add items to cart.<br> 購物車加入商品

## Path parameters

- `id` string, required

## Request body

- object
  - `items` object[]
    - `product_id` string — Product ID<br> 商品 ID
    - `type` string — The Type of Item<br> 購物車物品類型
    - `created_by` string — The Source of Item<br> 購物車物品加入的來源
    - `quantity` number — Quantity<br> 數量
    - `variation_id` string — Product Variation ID<br> 商品規格 ID
    - `item_price` object — Custom Price（Use this field when type is custom discount）<br> 自訂折扣/商品價格（當類型是自訂折扣/商品，請在此欄位填寫價格）
      - `dollars` number, required
      - `currency_iso` string, required
    - `item_data` object — Data of the cart item<br> 購物車物品類型資料
      - `name` string
      - `ref_id` string
      - `discount_type` string
      - `selected_child_products` object[]
        - `child_product_id` string
        - `child_variation_id` string
        - `quantity` number

## Response `201`

Created.

- object
  - `code` string
  - `message` string
  - `data` object
  - `trace_id` string

## Other responses

- `422` — fail

---

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