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

# Get Feed Import History

> View import history for an IMS feed configuration.

`GET /v1/ims/feeds/{feed_id}/history`

Returns the import history log for a feed configuration. Each entry represents one file import cycle with counts of new, updated, and removed vehicles.

## Parameters

| Name      | Type    | In    | Required | Default | Description                                   |
| --------- | ------- | ----- | -------- | ------- | --------------------------------------------- |
| `api_key` | string  | query | Yes      | --      | Your API key                                  |
| `feed_id` | integer | path  | Yes      | --      | Feed config ID                                |
| `limit`   | integer | query | No       | `20`    | Number of history entries to return (max 100) |

## Example

```bash theme={null}
curl "https://api.autosnap.com/v1/ims/feeds/1/history?api_key=YOUR_API_KEY&limit=5"
```

## Response

```json theme={null}
{
  "history": [
    {
      "id": 12,
      "batch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "file_name": "MP14015.csv",
      "file_hash": "28b38105889bb43866daedf9fa310461",
      "file_size_bytes": 1415016,
      "vehicle_count": 381,
      "new_count": 3,
      "updated_count": 378,
      "removed_count": 2,
      "error_count": 0,
      "started_at": "2026-04-14T06:15:00+00:00",
      "completed_at": "2026-04-14T06:15:12+00:00",
      "status": "success"
    }
  ]
}
```

## Response Fields

| Field             | Type    | Description                                                        |
| ----------------- | ------- | ------------------------------------------------------------------ |
| `batch_id`        | string  | UUID grouping all vehicles from this import                        |
| `file_name`       | string  | CSV filename that was imported                                     |
| `file_hash`       | string  | MD5 hash of the file at import time                                |
| `file_size_bytes` | integer | File size in bytes                                                 |
| `vehicle_count`   | integer | Total vehicles parsed from the file                                |
| `new_count`       | integer | Vehicles added (not previously in inventory)                       |
| `updated_count`   | integer | Vehicles updated (already existed, data changed)                   |
| `removed_count`   | integer | Vehicles removed (were in previous import but not in current file) |
| `error_count`     | integer | Number of rows that failed to parse                                |
| `status`          | string  | `success`, `partial` (some errors), or `failed`                    |

## Errors

| Status | Detail                  | Cause                              |
| ------ | ----------------------- | ---------------------------------- |
| `403`  | `Not authorized`        | Feed belongs to a different client |
| `404`  | `Feed config not found` | No feed with this ID exists        |


## OpenAPI

````yaml GET /v1/ims/feeds/{feed_id}/history
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/ims/feeds/{feed_id}/history:
    get:
      tags:
        - ims
      summary: Get Feed Import History
      description: View import history log for a feed configuration.
      operationId: get_ims_feed_history
      parameters:
        - name: feed_id
          in: path
          required: true
          schema:
            type: integer
            title: Feed Id
        - name: api_key
          in: query
          required: true
          schema:
            type: string
            title: Api Key
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            title: Limit
          description: Max 100
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '403':
          description: Not authorized
        '404':
          description: Feed config not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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

````