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

# Postman Collection

> Import a ready-to-use Postman collection for the Partner API — every endpoint, pre-wired authentication, and idempotent-by-default write requests.

Skip writing requests by hand: import the full Partner API into Postman in one step. It's generated directly from the same OpenAPI spec that powers the **API Reference**, so it's always in sync with what's documented here.

## Import it

<Steps>
  <Step title="Import the collection">
    In Postman, **Import → Link**, and paste:

    ```
    https://gist.githubusercontent.com/midhunspenza/81b9a55ba05001d8dd76bd9355986bc3/raw/spenza-partner-api.postman_collection.json
    ```

    Or open that URL directly and use your browser's save/download option, then **Import → File** in Postman instead.
  </Step>

  <Step title="Import the environment (optional)">
    Same method, using:

    ```
    https://gist.githubusercontent.com/midhunspenza/81b9a55ba05001d8dd76bd9355986bc3/raw/spenza-partner-api.postman_environment.json
    ```

    Pre-configures `baseUrl` and empty `apiKey`/`apiSecret`/`accessToken` slots — or just use the collection's own **Variables** tab if you'd rather not add an environment.
  </Step>

  <Step title="Set your credentials">
    Fill in `apiKey`/`apiSecret` with your partner credentials, wherever you put the variables in step 2.
  </Step>

  <Step title="Authenticate once">
    Run **Authentication → Exchange credentials for a token**. Its test script saves the returned token into the `accessToken` variable automatically — every other request inherits it via collection-level bearer auth.
  </Step>

  <Step title="Start calling endpoints">
    Every operation in the **API Reference** is here too, organized into the same folders (SIMs, Plans & Catalog, eSIM, Billing, Webhooks, and so on), with realistic example request bodies already filled in.
  </Step>
</Steps>

## What's pre-wired

* **Auth handled for you.** Collection-level bearer auth reads from the `accessToken` variable, so you only authenticate once per session (tokens last 1 hour — re-run the auth request to refresh).
* **Idempotency by default.** Every write request that accepts an `Idempotency-Key` header has it pre-filled with Postman's dynamic `{{$guid}}` variable, so each send automatically uses a fresh key — retries are safe out of the box.
* **Correct no-auth exceptions.** `POST /api/v1.1/auth/token` and `GET /api/v3/transactions/{transactionId}` are explicitly set to no-auth, matching their real behavior — no confusing 401s from a missing token where none is needed.
* **Port-in submission's role requirement.** `POST /api/v3/port-in` needs a token whose account role is `Admin`, `Super Admin`, or `Standard Admin` — a lower-privilege token gets a well-formed `403 FORBIDDEN`, not a broken request.

## Next steps

* **[Quickstart](/quickstart)** if you'd rather follow the same flow in `curl`/Node.js first.
* **[Authentication](/authentication)** for the full token-exchange contract this collection automates.
* **API Reference** (sidebar) for the field-level schema behind every request in the collection.
