Get current cart of user
GET
/users/{userId}/cartId
const url = 'https://myshop.com/shopgate/v1/users/example/cartId';const options = {method: 'GET', 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 GET \ --url https://myshop.com/shopgate/v1/users/example/cartId \ --header 'Authorization: Bearer <token>'Returns the given user’s cart ID.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
cartId
string
Examplegenerated
{ "cartId": "example"}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"}
