> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maple.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Postman collection

> A ready-to-run Postman collection for the whole Developer API, with auth and request chaining wired up.

The Postman collection covers the Developer API — status and auth, locations and connections, menu read/publish, delivery zones, the full order loop, webhooks, bookings, the waitlist, and feedback. It ships with helper scripts so you can run a flow end to end without copy-pasting ids between requests.

## Download

- [Collection](https://docs.maple.inc/developer-api/postman/maple-developer-api.postman_collection.json): All endpoints, example bodies, and scripts.
- [Staging environment](https://docs.maple.inc/developer-api/postman/maple-developer-api.staging.postman_environment.json): Points at api.staging.maple.inc; use your mpk\_test\_… key.
- [Production environment](https://docs.maple.inc/developer-api/postman/maple-developer-api.production.postman_environment.json): Points at api.maple.inc; use your mpk\_live\_… key.

## Get set up

1. ### Import the collection and an environment

   In Postman, **Import** the collection file, then import the **Staging** (or **Production**) environment file. Select that environment in the top-right environment selector.

2. ### Add your API key

   Open the environment and paste your key into `apiKey` — `mpk_test_…` for staging, `mpk_live_…` for production. That’s the only value you need to set for API-key auth.

   > [!NOTE]
   >
   > Requests send `Authorization: Bearer {{bearerToken}}`. When `bearerToken` is empty it automatically falls back to your `apiKey`, so setting `apiKey` is enough.

3. ### Confirm the credential

   Run **Status & Auth → Current app (/me)**. A `200` with your app name, environment, and scopes means you’re ready.

4. ### Run a flow

   Run **Locations & Connections → List locations**, then **Get location** / **Create connection** below it — the list request saves the first `locationId` into the environment, so the requests under it just work. The same chaining captures `orderId`, `subscriptionId`, and `eventId`.

## What the scripts do

- **Auth fallback** — a collection pre-request uses your `apiKey` as the bearer token unless an explicit `bearerToken` is set.
- **Id chaining** — requests save the ids that later requests need (`locationId`, `orderId`, `subscriptionId`, `eventId`, `zoneId`, `holdId`, `bookingId`, `waitlistEntryId`, and so on) to the environment.
- **Webhook secret capture** — *Create webhook subscription* stores the one-time `signing_secret` into `signingSecret` (store it securely; it’s shown only once).
- **OAuth (optional)** — the **OAuth** folder exchanges client credentials for an access token and switches `bearerToken` to it automatically. It also includes a PKCE generator and the authorization-code exchange. OAuth is not part of the generally available API yet (see [Authentication](https://docs.maple.inc/developer-api/concepts/authentication.md#oauth)), so use your API key unless Maple has enabled OAuth for your app. Clear `bearerToken` to switch back to your API key.

> [!TIP]
>
> Money fields are integer minor units (cents). The publish-menu request includes a complete example document you can adapt. For field-by-field detail, see the [API reference](https://docs.maple.inc/developer-api/api-reference.md) and [The menu model](https://docs.maple.inc/developer-api/concepts/the-menu-model.md).
