Create an empty guest cart; sets httpOnly cart-token cookie
POST
/store/v1/carts
const url = 'https://your-store.example.com/store/v1/carts';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"currency":"example"}'};
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://your-store.example.com/store/v1/carts \ --header 'Content-Type: application/json' \ --data '{ "currency": "example" }'Request Body required
Section titled “Request Body required ” Media type application/json
object
currency
string
Example generated
{ "currency": "example"}