Skip to main content
The Storefront API exposes every operation your customers need to browse menus, build carts, and pay for orders. All endpoints return JSON over HTTPS and authenticate with a Crave API key in the X-API-Key header.

Base URL

There is no sandbox server. Storefront applications connect directly to the production API using your API key.

Authentication

Include your API key in the X-API-Key header on every request:
Generate an API key from the Crave Dashboard Developers page. Copy the full token when it is shown, then copy the target locationId from the Location IDs section.

Location-scoped endpoints

Every storefront endpoint lives under /locations/{locationId}:
You can use either the location’s ObjectId (64a7b8c9d1e2f3a4b5c6d7e8) or its slug (downtown-pizza) as {locationId}. Both formats work interchangeably.

Resource groups

The API is organized into these groups:

Request format

Send JSON bodies with Content-Type: application/json:

Response format

Successful responses return the resource directly:
Error responses include a machine-readable code, a human-readable message, and the HTTP status:
For the full list of error codes and handling strategies, see Error Codes.

HTTP status codes

Rate limiting

The API allows 200 requests per 10 minutes per IP address. Rate limit state is returned in response headers: When you exceed the limit, the API returns 429 with a Retry-After header. Implement exponential backoff for retries.

Data types

Typical integration flow

The following example shows the standard ordering flow from session to payment:

Storefront scope

The Storefront API covers customer-facing operations only. Menu management, order fulfillment, analytics, and merchant settings are handled through the Admin API (coming soon) and the Crave Dashboard.

Next steps

Core Concepts

Understand the data model behind locations, menus, carts, and orders.

Quickstarts

Build a working storefront in minutes with Next.js, React, or vanilla JS.

Storefront SDK

Use the typed TypeScript client instead of raw HTTP.

Error Codes

Handle every error the API can return.