Skip to main content
POST
/
api
/
v1
/
locations
/
{locationId}
/
carts
Create a Cart
curl --request POST \
  --url https://api.cravejs.com/api/v1/locations/{locationId}/carts \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "marketplaceId": "<string>",
  "currentCartId": "<string>"
}'
{
  "cartId": "68760ae04a6a9526112170f6"
}

Path Parameters

locationId
string
required
The unique identifier for the restaurant location

Request Body

marketplaceId
string
required
The marketplace identifier (typically the same as locationId)
currentCartId
string
required
The current cart identifier (can be empty string for new carts)
{
  "cartId": "68760ae04a6a9526112170f6"
}
The API returns just the cartId. Use the Get Cart endpoint to retrieve the full cart details.

Authorizations

X-API-Key
string
header
required

Path Parameters

locationId
string
required

The unique identifier for the restaurant location

Body

application/json
marketplaceId
string
required

The marketplace identifier (typically the same as locationId)

currentCartId
string

The current cart identifier (can be empty string for new carts)

Response

Cart created successfully.

cartId
string
required

The unique identifier of the newly created cart