Skip to main content
POST
/
locations
/
{locationId}
/
ordering-sessions
Start an ordering session
curl --request POST \
  --url https://api.craveup.com/api/v1/locations/{locationId}/ordering-sessions \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "fulfillmentMethod": "pickup",
  "marketplaceId": "web",
  "metadata": {
    "channel": "qr"
  }
}'
{
  "cartId": "cart_123",
  "errorMessage": ""
}

Authorizations

X-API-Key
string
header
required

API Key required to authenticate requests

Path Parameters

locationId
string
required

Body

application/json
fulfillmentMethod
string
required

Fulfillment method requested by the shopper (for example pickup, delivery).

Example:

"pickup"

marketplaceId
string | null

Optional identifier describing the sales channel initiating the session.

Example:

"web"

existingCartId
string | null

Resume an existing cart when provided. If not found, a new cart is created.

Example:

"cart_123"

metadata
object | null

Arbitrary metadata to persist on the cart. Keys must be strings.

Example:
{ "referrer": "homepage" }
returnUrl
string | null

URL to redirect the shopper after a hosted checkout flow finishes.

Example:

"https://yourapp.com/checkout/success"

Response

Ordering session created.

cartId
string | null

ID of the active cart. Null when ordering is unavailable.

Example:

"cart_123"

errorMessage
string

Message describing why ordering is unavailable. Empty string on success.

Example:

""

I