Merge cart with user cart.
POST
/users/{userId}/mergeCart/{cartId}
const url = 'https://myshop.com/shopgate/v1/users/example/mergeCart/example';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://myshop.com/shopgate/v1/users/example/mergeCart/example \ --header 'Authorization: Bearer <token>'Merges a cart with the current user cart. The relation of user and user cart is held within the shop system. The non user-related cart and the cart attached by the user are merged.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
cartId
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
Examplegenerated
{}Media typeapplication/json
object
message
string
name
string
Example
{ "message": "Invalid token: access token is invalid", "name": "invalid_token"}Media typeapplication/json
object
message
string
Example
{ "message": "Not found"}
