---
title: "Exchange Cart"
method: POST
path: "/carts/exchange"
tags: ["Carts"]
---

# Exchange Cart

`POST /carts/exchange`

## Request

- Base URL: `https://dummyHandle.shoplineapp.com/storefront-api/v1`
- URL: `https://dummyHandle.shoplineapp.com/storefront-api/v1/carts/exchange`
- Auth: one of:
  - API key in header `X-Storefront-Token`
  - API key in header `X-Storefront-Token` and API key in header `X-Customer-Token`

Exchange Cart Id

## Request body

- object
  - `shop_session_id` string: If `owner_type` is empty, this should be a third party id, such as facebook psid or sc user id`. `shop_session_id` and `owner_id` cannot be provided at the same time.
  - `owner_type` string: Cart owner type. Must be either `'User'` or `'Guest'` if `owner_id` is provided. Must be empty if `shop_session_id` is provided.
  - `owner_id` string: If `owner_type` is `'User'`, this should be the `user_id`. If `owner_type` is `'Guest'`, this can be any unique value, such as a UUID. and `shop_session_id` cannot be provided at the same time.

## Response `200`

OK

- object
  - `data` object
    - `merchant_id` string: Merchant identifier
    - `id` string: Cart identifier
  - `trace_id` string

---

[API](https://skmtc.dev/shoplineapp/apis/shopline-storefront-api.md) - [All operations](https://skmtc.dev/shoplineapp/apis/shopline-storefront-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shoplineapp/apis/shopline-storefront-api/revisions/8c9cd5ce664d?raw)
