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

# Quickstart

> Get your first dealer resolved and inventory fetched in five minutes

This guide walks you through signing up, creating an API key, and making your first authenticated request.

## 1. Create an account

<Steps>
  <Step title="Sign up">
    Go to [ai.autosnap.com](https://ai.autosnap.com) and create an account. A personal workspace is created automatically.
  </Step>

  <Step title="Generate an API key">
    Open the dashboard and go to **API Keys**. Click **Create key** and give it a name (e.g. `local-dev`). Copy the key immediately — for security, we only show it once.
  </Step>

  <Step title="Store the key as an environment variable">
    ```bash theme={null}
    export AUTOSNAP_API_KEY="as_live_..."
    ```
  </Step>
</Steps>

## 2. Resolve a dealership

Look up a dealership by its website URL to get dealer info and check if it's supported.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.autosnap.com/v1/dealers/resolve" \
    -H "Content-Type: application/json" \
    -d '{
      "api_key": "'$AUTOSNAP_API_KEY'",
      "dealership_url": "https://www.carlblackroswell.com"
    }'
  ```

  ```python Python theme={null}
  import os, requests

  r = requests.post(
      "https://api.autosnap.com/v1/dealers/resolve",
      json={
          "api_key": os.environ["AUTOSNAP_API_KEY"],
          "dealership_url": "https://www.carlblackroswell.com"
      },
  )
  r.raise_for_status()
  print(r.json())
  ```
</CodeGroup>

```json Response theme={null}
{
  "success": true,
  "website_url": "carlblackroswell.com",
  "dealership": {
    "name": "Carl Black Buick Gmc",
    "website": "carlblackroswell.com",
    "street": "11225 Alpharetta Highway",
    "city": "Roswell",
    "state": "Georgia",
    "phone": "678-317-2740"
  },
  "supported": true,
  "setup_required": false,
  "resolution": {
    "method": "url",
    "confidence": 1.0
  }
}
```

## 3. Fetch inventory

Pull vehicle inventory for any active dealership. Supports pagination and condition filtering.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.autosnap.com/v1/inventory/fetch" \
    -H "Content-Type: application/json" \
    -d '{
      "api_key": "'$AUTOSNAP_API_KEY'",
      "dealership_url": "carlblackroswell.com",
      "condition": "new",
      "page": 1,
      "per_page": 5
    }'
  ```

  ```python Python theme={null}
  r = requests.post(
      "https://api.autosnap.com/v1/inventory/fetch",
      json={
          "api_key": os.environ["AUTOSNAP_API_KEY"],
          "dealership_url": "carlblackroswell.com",
          "condition": "new",
          "page": 1,
          "per_page": 5
      },
  )
  print(r.json())
  ```
</CodeGroup>

```json Response theme={null}
{
  "success": true,
  "dealership": {
    "name": "Carl Black Buick Gmc",
    "website": "carlblackroswell.com",
    "street": "11225 Alpharetta Highway",
    "city": "Roswell",
    "state": "Georgia",
    "phone": "678-317-2740"
  },
  "website_url": "carlblackroswell.com",
  "count": 528,
  "page": 1,
  "per_page": 5,
  "total_pages": 106,
  "vehicles": [
    {
      "id": "d8a1c0e2-7b42-4f9a-b0e1-5a1f0c2d9b73",
      "vin": "5GAEVBKSXTJ122446",
      "year": 2026,
      "make": "Buick",
      "model": "Enclave",
      "heading": "2026 Buick Enclave Sport Touring",
      "condition": "New",
      "price": 42479,
      "msrp": 56495,
      "final_price": 42479
      // ... key fields shown — see Concepts: Vehicles for the full schema
    }
  ]
}
```

<Note>
  The `vehicles[]` example above is **truncated** for readability. The actual response includes \~35 fields per vehicle (VIN, year, make, model, trim, full pricing breakdown, photos, features, dates, lifecycle flags, and more). See [Concepts: Vehicles](/concepts/vehicles) for the complete object shape.
</Note>

## 4. Set up a new dealer

If `setup_required` is `true` in the resolve response, onboard the dealer with the setup endpoint. Setup is asynchronous: the POST returns **HTTP 202** with a `setup_id` immediately, and detection runs in the background (typically about a minute).

```bash theme={null}
curl -X POST "https://api.autosnap.com/v1/dealers/setup" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "'$AUTOSNAP_API_KEY'",
    "dealership_url": "https://www.friendshipford.com"
  }'
```

```json Response (HTTP 202) theme={null}
{
  "success": true,
  "setup_id": "setup_6420ad759b71",
  "status": "pending",
  "message": "Setup job created. Poll GET /v1/dealers/setup/{setup_id} for status, or wait for the setup.complete webhook.",
  "poll_url": "/v1/dealers/setup/setup_6420ad759b71"
}
```

Poll for completion (every 5 seconds) until `status` is `"completed"` or `"failed"`:

```bash theme={null}
curl "https://api.autosnap.com/v1/dealers/setup/setup_6420ad759b71?api_key=$AUTOSNAP_API_KEY"
```

```json Response (completed) theme={null}
{
  "success": true,
  "setup_id": "setup_6420ad759b71",
  "status": "completed",
  "inventory_status": "importing",
  "dealership_url": "friendshipford.com",
  "created_at": "2026-04-16T14:00:00+00:00",
  "started_at": "2026-04-16T14:00:01+00:00",
  "completed_at": "2026-04-16T14:01:12+00:00",
  "provider": "DealerOn",
  "provider_confidence": 0.95,
  "dealership_id": "dlr_3be153b6c13e",
  "configuration_id": 9,
  "subscription_id": 221,
  "config": {"base_url": "https://www.friendshipford.com", "inventory_type": "all"},
  "vehicle_counts": {"new": 183, "used": 84, "total": 267}
}
```

See [Get Setup Status](/api-reference/endpoints/get-setup-status) for every status value. After setup completes, the first inventory scrape is triggered automatically — wait for `inventory_status: "available"` before fetching inventory.

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/get-started/authentication">
    How API keys work and how to secure them.
  </Card>

  <Card title="Concepts: Vehicles" icon="car" href="/concepts/vehicles">
    The full shape of the vehicle object.
  </Card>

  <Card title="Webhooks" icon="bell" href="/concepts/webhooks">
    Get notified when inventory changes in real time.
  </Card>

  <Card title="Full API Reference" icon="code" href="/api-reference/introduction">
    Every endpoint with request and response examples.
  </Card>
</CardGroup>
