Skip to main content
POST
This endpoint merges items from one cart (typically a guest cart) into another cart (typically the logged-in customer’s cart). Useful when customers add items before logging in.

Authentication

This endpoint requires a valid API key with carts:write permissions.

Path Parameters

string
required
The target cart ID (cart to merge INTO)

Request Body

string
required
The source cart ID (cart to merge FROM)
string
default:"combine"
How to handle duplicate items: “combine” (add quantities), “keep_source”, “keep_target”
boolean
default:"true"
Whether to preserve metadata from source cart items
boolean
default:"true"
Whether to delete the source cart after merge

Response

Returns the merged cart object.