> ## 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 every Developer API endpoint — status and auth, the OAuth flows, locations and connections, menu read/publish, the full order loop, and webhooks. It ships with helper scripts so you can run a flow end to end without copy-pasting ids between requests.

## Download

<CardGroup cols={3}>
  <Card title="Collection" icon="download" href="/developer-api/postman/maple-developer-api.postman_collection.json">
    All endpoints, example bodies, and scripts.
  </Card>

  <Card title="Staging environment" icon="flask" href="/developer-api/postman/maple-developer-api.staging.postman_environment.json">
    Points at `api.staging.maple.inc`; use your `mpk_test_…` key.
  </Card>

  <Card title="Production environment" icon="rocket" href="/developer-api/postman/maple-developer-api.production.postman_environment.json">
    Points at `api.maple.inc`; use your `mpk_live_…` key.
  </Card>
</CardGroup>

## Get set up

<Steps>
  <Step title="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.
  </Step>

  <Step title="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.
    </Note>
  </Step>

  <Step title="Confirm the credential">
    Run **Status & Auth → Current app (/me)**. A `200` with your app name, environment, and scopes means you're ready.
  </Step>

  <Step title="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`.
  </Step>
</Steps>

## 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** — list requests save the first returned id (`locationId`, `orderId`, `subscriptionId`, `eventId`) to the environment for the requests that need it.
* **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. 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](/developer-api/api-reference) and [The menu model](/developer-api/concepts/the-menu-model).
</Tip>
