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

# Vehicles history

> Retrieves historic vehicles the company owned or was a user of

Returns a list of vehicles that company has been an owner or user of. History up to about 3 years in time. Vehicles are returned
in the order of when the last owner change from the company occured. The intention of the endpoint is to quickly get an overview of any vehicles
that may have been sold or transferred to other parties for example prior to a bankruptcy event.

Therfore only maximum 1000 history owned or used vehicles are returned in the response.

## EventStartDate and EventEndDate

The fields EventStartDate and EventEndDate represents that last duration when the company was the owner or user of the vehicle. This means
for example with the following json response:

```json Example response theme={null}
{
[
    {
        "vehicleId": 1,
        "licencePlate": "XXX000",
        "vehicleType": "SLÄP",
        "vehicleName": "ABC",
        "tradeName": null,
        "modelYear": 2008,
        "vehicleYear": 2008,
        "colorSwedish": "VIT",
        "vin": "123",
        "currentOwnerCompanyId": 123,
        "currentOwnerCompanyRegistrationNumber": "This is the current company registered as owner",
        "currentOwnerCompanyLegalName": "XXX",
        "currentUserCompanyId": 123,
        "currentUserCompanyRegistrationNumber": null,
        "currentUserCompanyLegalName": "This is the company currentley using the vehicle",
        "eventStartDate": "2023-08-02T00:00:00",
        "eventEndDate": "2025-01-22T00:00:00"
    },
```

This means that the company you are requesting date for was an owner or user of the vehicle between 2023-08-02, e.g eventStartDate,
and 2025-01-22, e.g eventEndDate.


## OpenAPI

````yaml get /datasets/companies/{companyId}/se/vehicles-history-owner
openapi: 3.0.4
info:
  title: TIC API
  description: ''
  version: v1
servers:
  - url: https://api.tic.io/
security:
  - ApiKey: []
tags:
  - name: BolagsverketStatistics
  - name: Companies
  - name: Companies_SE_
  - name: DocumentDelivery
  - name: EuropeanCommission
  - name: FinancialDocuments
  - name: Finansinspektionen
  - name: Free
  - name: ICA
  - name: ICAStatistics
  - name: Lists
  - name: Media
  - name: Persons
  - name: Persons_SE_
  - name: Properties_SE_
  - name: PTSPortings
  - name: Reseller
  - name: SearchBankruptciesReports
  - name: SearchCompanies
  - name: SearchCompaniesReports
  - name: SearchCompanyWorkplaces
  - name: SearchPerson
  - name: SearchProperties_SE_
  - name: SearchVehicles
  - name: TeamDocumentOrders
  - name: Teams
  - name: User
  - name: Vehicles_SE_
  - name: WatchLists
paths:
  /datasets/companies/{companyId}/se/vehicles-history-owner:
    get:
      tags:
        - Companies_SE_
      summary: Vehicles history
      description: Retrieves historic vehicles the company owned or was a user of
      operationId: CompanyVehiclesHistory
      parameters:
        - name: companyId
          in: path
          description: The company id
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/Ormeo_Library_Dtos_VehicleHistoryOwner_Dto
        '404':
          description: Not Found
components:
  schemas:
    Ormeo_Library_Dtos_VehicleHistoryOwner_Dto:
      type: object
      properties:
        vehicleId:
          type: integer
          format: int32
        licencePlate:
          type: string
          nullable: true
        vehicleType:
          type: string
          nullable: true
        vehicleName:
          type: string
          nullable: true
        tradeName:
          type: string
          nullable: true
        modelYear:
          type: integer
          format: int32
          nullable: true
        vehicleYear:
          type: integer
          format: int32
          nullable: true
        colorSwedish:
          type: string
          nullable: true
        vin:
          type: string
          nullable: true
        currentOwnerCompanyId:
          type: integer
          format: int32
          nullable: true
        currentOwnerCompanyRegistrationNumber:
          type: string
          nullable: true
        currentOwnerCompanyLegalName:
          type: string
          nullable: true
        currentUserCompanyId:
          type: integer
          format: int32
          nullable: true
        currentUserCompanyRegistrationNumber:
          type: string
          nullable: true
        currentUserCompanyLegalName:
          type: string
          nullable: true
        eventStartDate:
          type: string
          format: date-time
          nullable: true
        eventEndDate:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      name: x-api-key
      in: header

````