---
title: "Get Cart Id"
method: GET
path: "/carts/find"
tags: ["Carts"]
---

# Get Cart Id

`GET /carts/find`

To retrieve or generate a cart_id using cart identifiers.<br> The cart_id remains valid until checkout is completed. If a cart is not found, a new one will be created.<br> 使用購物車識別欄位搜索或生成購物車 ID，購物車 ID在結帳完成前有效，若找不到對應的購物車，將自動創建新購物車

## Query parameters

- `owner_id` string, required
- `owner_type` 'User' | 'Guest', required
- `shop_session_id` string
- `page_id` string
- `product_id` string
- `channel_id` string
- `created_by` string

## Response `200`

OK

- object
  - `code` string
  - `message` string
  - `data` object
    - `id` number
    - `cart_id` string
  - `trace_id` string

---

[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)
