Create cart
POST
/carts
const url = 'https://myshop.com/shopgate/v1/carts';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/carts \ --header 'Authorization: Bearer <token>'Creates a new cart within the shop system and returns its ID. This ID is used for both anonymous cart and user cart.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Media typeapplication/json
object
cartId
string
Example
{ "cartId": "6e57b3a0-9714-11e8-9eb6-529269fb1459"}Media typeapplication/json
object
message
string
name
string
Example
{ "message": "Invalid token: access token is invalid", "name": "invalid_token"}
