> ## 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.

# Update Dealer

> Update a dealership's inventory type filter.

`PATCH /v1/dealers/{dealership_id}`

<Note>
  **v1.0 schema lock.** The response shape on this page is the locked v1.0 contract. We will never remove a documented field, never rename a field, and never change a field's type without bumping to v2 (see [Versioning](/get-started/versioning)). New fields may be added additively; your client must tolerate unknown keys.
</Note>

Update a dealership's configuration. Currently supports changing the inventory type filter.

## Parameters

| Name            | Type   | In   | Required | Description                                          |
| --------------- | ------ | ---- | -------- | ---------------------------------------------------- |
| `dealership_id` | string | path | Yes      | The dealership's public ID (e.g. `dlr_8cfc0b00a98b`) |

## Request Body

| Field            | Type   | Required | Description                                                      |
| ---------------- | ------ | -------- | ---------------------------------------------------------------- |
| `api_key`        | string | Yes      | Your API key                                                     |
| `inventory_type` | string | No       | Filter which vehicles are imported. One of: `new`, `used`, `all` |

### Inventory Type Values

| Value  | Description                       |
| ------ | --------------------------------- |
| `all`  | Import both new and used vehicles |
| `new`  | Import new vehicles only          |
| `used` | Import used vehicles only         |

## Example

```bash theme={null}
curl -X PATCH "https://api.autosnap.com/v1/dealers/dlr_8cfc0b00a98b" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY",
    "inventory_type": "all"
  }'
```

## Response

```json theme={null}
{
  "success": true,
  "dealership_id": "dlr_8cfc0b00a98b",
  "updated": [
    "inventory_type=all"
  ]
}
```

## Errors

| Status | Description                                                     |
| ------ | --------------------------------------------------------------- |
| 400    | Invalid `inventory_type` value, or no updatable fields provided |
| 404    | Dealership not found or not subscribed under your account       |


## OpenAPI

````yaml PATCH /v1/dealers/{dealership_id}
openapi: 3.0.3
info:
  title: AutosnapAI Origin API
  description: Dealer resolution, inventory management, and webhook APIs
  version: 1.0.0
servers:
  - url: https://api.autosnap.com
    description: Production
security: []
paths:
  /v1/dealers/{dealership_id}:
    patch:
      tags:
        - origin
      summary: Update Dealer
      description: Update a dealership's inventory type or import schedule.
      operationId: update_dealer_v1_dealers__dealership_id__patch
      parameters:
        - name: dealership_id
          in: path
          required: true
          schema:
            type: string
            title: Dealership Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerPatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DealerPatchRequest:
      properties:
        api_key:
          type: string
          title: Api Key
        inventory_type:
          type: string
          nullable: true
          title: Inventory Type
      type: object
      required:
        - api_key
      title: DealerPatchRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````