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

# Postman Setup

> Import the official LMN Open API collection and make your first call in 2 minutes.

## Overview

We publish **two official Postman collections** — one for sandbox, one for production. Each is pre-wired with endpoints, variables, descriptions, and example payloads. Import it once and you can click **Send** on any request without writing code.

| Collection | File                      | Base URL                          | Key prefix  |
| ---------- | ------------------------- | --------------------------------- | ----------- |
| Sandbox    | `postman-sandbox.json`    | `https://sandbox-api.lmnauto.com` | `lmn_stg_*` |
| Production | `postman-production.json` | `https://api.lmnauto.com`         | `lmn_prd_*` |

Both collections share the same shape (same folders, same requests, same variable names). Only the default `base_url` and `api_key` differ. Most partners import both and keep them side by side — you work in sandbox during development and flip to production once certified.

The collections ship with these variables baked in:

| Variable     | Purpose                                           |
| ------------ | ------------------------------------------------- |
| `base_url`   | API host (pre-set per collection — do not change) |
| `api_key`    | Your API key                                      |
| `vehicle_id` | Sample ID for detail/order requests               |
| `order_id`   | Sample ID for order detail/cancel requests        |

<Note>
  Variable names use **snake\_case** (`base_url`, `api_key`). A common mistake is defining them as `baseUrl` or `x-api-key` — these will resolve to empty strings and produce 404 or missing-key errors.
</Note>

<Warning>
  **Production collection places real orders.** Orders created via `postman-production.json` are binding bid commitments against live auction vehicles and will incur real charges. Always verify the collection name in Postman (look for "(Production)" vs "(Sandbox)" in the title) before clicking Send on any `POST /v1/orders` request.
</Warning>

## Step 1 — Download the collections

Grab the collections here:

<CardGroup cols={2}>
  <Card title="Sandbox Collection" icon="flask" href="/postman/sandbox.json">
    Open `postman/sandbox.json` — safe to experiment, read endpoints return current inventory; orders are non-binding
  </Card>

  <Card title="Production Collection" icon="rocket" href="/postman/production.json">
    Open `postman/production.json` — **live inventory and real orders**
  </Card>
</CardGroup>

<Note>
  Some browsers open `.json` files in a new tab instead of downloading them. That is OK: in Postman, choose **Import → Link** and paste the JSON URL, or use the direct download links below.
</Note>

<a href="/postman/sandbox.json" download="lmn-open-api-sandbox.postman_collection.json">Download Sandbox collection</a>

<br />

<a href="/postman/production.json" download="lmn-open-api-production.postman_collection.json">Download Production collection</a>

If you have questions during setup, contact [integrations@lmnauto.com](mailto:integrations@lmnauto.com?subject=Postman%20Collection%20Help).

## Step 2 — Import into Postman

1. Open Postman → **File → Import** (or drag the JSON file onto the sidebar).
2. Start with `postman-sandbox.json`. Confirm the import dialog — Postman creates a collection named **LMN Open API (Sandbox)**.
3. Repeat for `postman-production.json` when you're ready. It imports as a separate collection named **LMN Open API (Production)**.
4. Expand either collection in the left sidebar. You should see folders for `0. Health`, `1. Browse`, `2. Order`, and `3. Track & Fulfill`.

<Note>
  The two collections are independent — editing one does not affect the other. Production has distinct `api_key` and `base_url` defaults so an accidentally copied request can't hit the wrong environment.
</Note>

## Step 3 — Set your API key

Each collection ships with a placeholder key. Replace it with your real key **per collection**.

<Steps>
  <Step title="Open the sandbox collection variables">
    Click the **LMN Open API (Sandbox)** collection in the sidebar → select the **Variables** tab.
  </Step>

  <Step title="Update the Current value column">
    Locate the `api_key` row. Paste your sandbox key into the **Current value** column (not Initial value — Postman sends Current).

    ```
    Variable:      api_key
    Current value: lmn_stg_abc123...your_sandbox_key...
    ```
  </Step>

  <Step title="Save">
    Press `Cmd+S` (macOS) or `Ctrl+S` (Windows). The variables persist locally.
  </Step>

  <Step title="Repeat for production (when ready)">
    Open **LMN Open API (Production)** → Variables → paste your `lmn_prd_*` key into `api_key` Current value → Save.
  </Step>
</Steps>

<Warning>
  **Initial value vs Current value.** Postman has two columns. Only **Current value** is used when sending requests. If you paste into Initial value, your requests will still send the placeholder and return `401 invalid_api_key`.
</Warning>

## Step 4 — Send your first request

1. In the sidebar, open `Health → GET /v1/health`.
2. Click **Send**.
3. Expected response:

```json theme={null}
{
  "status": "ok",
  "version": "1.0.0",
  "environment": "sandbox"
}
```

If you see this, authentication is not required for `/v1/health` but your `base_url` is correct. Now try `Vehicles → GET /v1/vehicles` — this uses the `api_key` variable.

## Sandbox lifecycle QA

The sandbox collection includes runnable tests in `3. Track & Fulfill` for the order lifecycle simulator:

| Request                                                     | Test assertion                                                                                      |
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `POST /v1/orders/{id}/sandbox-status — simulate secured`    | Order becomes `secured`, webhook enqueue is reported, all 10 lifecycle statuses are advertised.     |
| `POST /v1/orders/{id}/sandbox-status — simulate in_transit` | Order becomes `in_transit` (Bill of Lading + vessel departure), webhook enqueue is reported.        |
| `POST /v1/orders/{id}/status — in_transit (expected 403)`   | Normal `/status` rejects LMN-owned lifecycle statuses (`details.reason: "partner_not_authorized"`). |
| `POST /v1/orders/{id}/status — customs`                     | Partner-owned destination-side transition succeeds after `in_transit`.                              |
| `POST /v1/orders/{id}/status — delivered`                   | Final partner delivery transition succeeds.                                                         |

## Switching to production

Once your integration passes sandbox testing, open the **LMN Open API (Production)** collection (imported in Step 2). Its `base_url` is already set to `https://api.lmnauto.com` — the only thing you need to set is `api_key` (your `lmn_prd_*` key), as described in Step 3.

<Warning>
  We deliberately ship two separate collections instead of one with a toggle. This prevents the most common integration accident: flipping an env var while testing and unknowingly placing a real order against live inventory. Keep sandbox and production in separate collections; name them clearly in the Postman sidebar.
</Warning>

## Troubleshooting

| Symptom                                           | Cause                                                        | Fix                                                                                                               |
| ------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| `404 Site Not Found` (HTML page with Roboto font) | `base_url` is empty or points to a misspelled Firebase host  | Confirm `base_url = https://sandbox-api.lmnauto.com` — no trailing slash, no spaces                               |
| `401 missing_api_key`                             | `x-api-key` header not attached to the request               | Official collection attaches it via the **Authorization** tab (type: API Key) — don't remove it                   |
| `401 invalid_api_key`                             | Key/environment mismatch (stg key on prod URL or vice versa) | Check prefix: `lmn_stg_*` must go to `sandbox-api.lmnauto.com`                                                    |
| Empty response / connection reset                 | Custom domain SSL still provisioning                         | Takes up to 24 hours after DNS setup — retry later                                                                |
| Variable `{{baseUrl}}` shows as literal text      | Variable name typo (camelCase vs snake\_case)                | Official collection uses `{{base_url}}`. If you see `{{baseUrl}}`, the request was modified — re-import or rename |

### Verifying with curl

If Postman behaves strangely, sanity-check with curl:

```bash theme={null}
curl -i https://sandbox-api.lmnauto.com/v1/health
# Expect: HTTP/2 200 + {"status":"ok"...}

curl -i -H "x-api-key: lmn_stg_YOUR_KEY" \
  https://sandbox-api.lmnauto.com/v1/vehicles?limit=1
# Expect: HTTP/2 200 + {"data":[...]}
```

If curl works but Postman doesn't, the issue is in your Postman configuration, not the API.

### Browsing live auction data in sandbox

Sandbox can be used to browse current auction inventory. Use the same read endpoints as production with a sandbox key:

```bash theme={null}
curl -i -H "x-api-key: lmn_stg_YOUR_KEY" \
  "https://sandbox-api.lmnauto.com/v1/vehicles?source=lotte&auction_date_from=2026-04-27&sort=auction_date_asc&limit=50"
```

Use `limit` and `cursor` for pagination. Do not use `page`/`perPage`; those parameters are ignored.

### Opening the Postman Console

For deep debugging, enable the Postman Console (`View → Show Postman Console` or `Cmd+Alt+C`). Every Send prints the exact URL, headers, and body. Compare against the variable values to find substitution errors.

## Next steps

* Full endpoint reference: [Endpoints → Vehicles](/endpoints/vehicles)
* Error code matrix: [Errors](/errors)
* Webhook setup: [Webhooks Overview](/webhooks/overview)
