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

# Quickstart

> Create credentials, choose scopes, and call the v2 API.

# Quickstart

Create a developer application, choose narrow scopes, and make a working API call.

<Steps titleSize="h3">
  <Step title="Create a developer application" icon="square-plus">
    Create an application in the [Vantr developer portal](https://api.vantr.ai/developer) and copy the client ID and client secret when they are shown.

    <Warning>
      Store the client secret in a server-side secret manager. Do not put it in browsers, mobile apps, logs, or query strings.
    </Warning>
  </Step>

  <Step title="Choose starter scopes" icon="list-checks">
    Use read scopes for the first integration smoke test.

    ```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
    products.read categories.read vendors.read locations.read
    ```

    Add write scopes such as `products.write`, `categories.write`, or `vendors.write` only when your integration needs to create or change records.
  </Step>

  <Step title="Set local environment variables" icon="square-terminal">
    Keep credentials outside source control and load them through your normal secret manager or shell.

    ```bash .env.example theme={"theme":{"light":"github-light","dark":"github-dark"}}
    VANTR_BASE_URL=https://api.vantr.ai
    VANTR_CLIENT_ID=ie_client_123
    VANTR_CLIENT_SECRET=ie_secret_123
    ```
  </Step>

  <Step title="Call the locations endpoint" icon="map-pin">
    Locations are a good first call because they prove authentication, tenant binding, and JSON response handling without changing data.

    <CodeGroup>
      ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
      curl -u "$VANTR_CLIENT_ID:$VANTR_CLIENT_SECRET" \
        "$VANTR_BASE_URL/v2/locations?limit=25"
      ```

      ```javascript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
      const baseUrl = process.env.VANTR_BASE_URL ?? 'https://api.vantr.ai';
      const credentials = Buffer
        .from(`${process.env.VANTR_CLIENT_ID}:${process.env.VANTR_CLIENT_SECRET}`)
        .toString('base64');

      const response = await fetch(`${baseUrl}/v2/locations?limit=25`, {
        headers: {
          Authorization: `Basic ${credentials}`,
        },
      });

      if (!response.ok) {
        const body = await response.text();
        throw new Error(`Vantr request failed: ${response.status} ${body}`);
      }

      const { locations } = await response.json();
      console.log(locations.map((location) => location.name));
      ```

      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
      import os
      import requests

      base_url = os.getenv("VANTR_BASE_URL", "https://api.vantr.ai")

      response = requests.get(
          f"{base_url}/v2/locations",
          params={"limit": 25},
          auth=(os.environ["VANTR_CLIENT_ID"], os.environ["VANTR_CLIENT_SECRET"]),
          timeout=20,
      )
      response.raise_for_status()

      locations = response.json()["locations"]
      print([location["name"] for location in locations])
      ```
    </CodeGroup>
  </Step>
</Steps>

## Expected response

Your exact location data depends on the tenant, but the response shape should look like this.

```json Response theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "success": true,
  "locations": [
    {
      "id": "c0fd7d72-1327-49d4-8e37-7d6b8f905d0c",
      "name": "Downtown Store",
      "location_type": "physical",
      "timezone": "America/Phoenix",
      "address": {
        "line1": "24 E Main St",
        "city": "Phoenix",
        "state": "AZ",
        "postal_code": "85004",
        "country": "US"
      },
      "phone": "+16025550124",
      "created_at": "2026-06-01T18:20:00.000Z",
      "updated_at": "2026-06-01T18:20:00.000Z"
    }
  ],
  "pagination": {
    "limit": 25,
    "offset": 0,
    "total": 1
  }
}
```

<Check>
  When you can list locations, your credentials, allowed scopes, tenant binding, and network path are working.
</Check>

## Move to the resource you need

<Columns cols={3}>
  <Card title="Products" icon="package" href="/api-reference/products/list-products">
    Read or manage product and variation records.
  </Card>

  <Card title="Categories" icon="folder-tree" href="/api-reference/categories/list-categories">
    Read category lists and hierarchy.
  </Card>

  <Card title="Vendors" icon="building-2" href="/api-reference/vendors/list-vendors">
    Read or manage vendor profiles.
  </Card>
</Columns>

## Generate a client

Use the spec served from this docs site.

<CodeGroup>
  ```bash TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  npx @openapitools/openapi-generator-cli generate \
    -i "$DOCS_URL/openapi/v2.json" \
    -g typescript-fetch \
    -o vantr-client
  ```

  ```bash Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  npx @openapitools/openapi-generator-cli generate \
    -i "$DOCS_URL/openapi/v2.json" \
    -g python \
    -o vantr_client
  ```

  ```bash Go theme={"theme":{"light":"github-light","dark":"github-dark"}}
  npx @openapitools/openapi-generator-cli generate \
    -i "$DOCS_URL/openapi/v2.json" \
    -g go \
    -o vantr-go
  ```
</CodeGroup>

<Tip>
  Keep generated clients in your own repository and regenerate them when the OpenAPI spec changes.
</Tip>
