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

# Get started with Appstle Bundles API

> Create an API key, read bundle rules, and inspect build-a-box storefront endpoints.

This guide walks through the fastest path to make your first Appstle Bundles API call.

## Prerequisites

* An active Appstle Bundles installation on your Shopify store
* Access to the Appstle admin panel
* An API key for server-side Admin API calls

## Step 1 — Get your API key

<Steps>
  <Step title="Open API Key Management">
    In your Appstle admin panel, go to **Settings → API Key Management**.
  </Step>

  <Step title="Create a key">
    Click **Create New Key** and name it something clear, such as `Bundles quickstart`.
  </Step>

  <Step title="Export the key locally">
    Store the key as an environment variable:

    ```bash theme={null}
    export APPSTLE_API_KEY="apst_your-api-key-here"
    export SHOP="your-store.myshopify.com"
    ```
  </Step>
</Steps>

## Step 2 — Read bundle rules

Call `GET /api/external/bundle-rules` to retrieve configured bundle rules.

<CodeGroup>
  ```bash curl theme={null}
  curl -X GET   "https://bundles-admin.appstle.com/api/external/bundle-rules?shop=${SHOP}"   -H "X-API-Key: ${APPSTLE_API_KEY}"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    `https://bundles-admin.appstle.com/api/external/bundle-rules?shop=${process.env.SHOP}`,
    { headers: { 'X-API-Key': process.env.APPSTLE_API_KEY } }
  );
  const rules = await response.json();
  console.log(rules);
  ```

  ```python Python theme={null}
  import os
  import httpx

  response = httpx.get(
      'https://bundles-admin.appstle.com/api/external/bundle-rules',
      params={'shop': os.environ['SHOP']},
      headers={'X-API-Key': os.environ['APPSTLE_API_KEY']},
  )
  print(response.json())
  ```
</CodeGroup>

## Step 3 — Explore discount and build-a-box rules

Use the related Admin API endpoints when you need more specific rule types:

| Endpoint                                  | Use it for               |
| ----------------------------------------- | ------------------------ |
| `GET /api/external/bundle-rules`          | All bundle rules         |
| `GET /api/external/bundle-rules/discount` | Bundle discount rules    |
| `GET /api/external/bundle-rules/bab`      | Build-a-box bundle rules |

## Step 4 — Review storefront endpoints

For customer-facing build-a-box flows, use the **Storefront API** section in the sidebar. It includes endpoints for fetching build-a-box configuration and generating bundle discounts by token.

<Note>
  Storefront API calls depend on Appstle's storefront flow and tokenized build-a-box URLs. Use the generated API reference for exact parameters and response schemas.
</Note>

## What to build next

<Columns cols={2}>
  <Card title="Full integration guide" icon="plug" href="/bundles/integration-guide">
    Review Admin and Storefront endpoint categories for production integrations.
  </Card>

  <Card title="API reference" icon="book-open">
    Use the Bundles tab sidebar to inspect every endpoint, parameter, and response schema.
  </Card>
</Columns>
