# PTV OptiFlow Vehicle API

The Vehicle API provides endpoints for managing vehicles used in planning operations.


Version: 1.0.1

## Servers

Vehicle API Production
```
https://api.conundra.eu/vehicle/v1
```

## Security

### clientCredentials

This API uses OAuth2 with the Client Credentials flow for M2M communication. Client ID ans secret should be provided as a HTTP Basic Auth header.


Type: oauth2

## Download OpenAPI description

[PTV OptiFlow Vehicle API](https://developer.conundra.eu/_bundle/apis/vehicles/vehicle-api.yaml)

## Health check

Miscellaneous endpoints for general API functionality

### Health check

 - [GET /ping](https://developer.conundra.eu/apis/vehicles/vehicle-api/health/ping.md): The ping-endpoint can be used for validating a connection with the application. It will authenticate the caller and respond pong if everything is set-up correctly.

## Vehicle

Endpoints for managing vehicles.


### Get cursor-based vehicle

 - [GET /vehicles](https://developer.conundra.eu/apis/vehicles/vehicle-api/vehicle/getpagedvehicles.md): Retrieve vehicle in bulk using cursor-based paging (see the Cursor-based pagination documentation on the PTV Developer Portal).

### Upsert Vehicle

 - [PUT /vehicles/{id}](https://developer.conundra.eu/apis/vehicles/vehicle-api/vehicle/upsertvehicle.md): Create or update a Vehicle. A unique ID is required to identify the Vehicle. 
Calling this endpoint with an existing id will update the Vehicle.

Modifying (or retrieving) a Vehicle will provide the caller with a version number for this Vehicle. 
This version can be passed to the _upsert_ endpoint as a _weak ETag_ in the If-Match header. 
This allows the caller to ensure that the Vehicle has not been modified since the last time it was retrieved.

### Get Vehicle

 - [GET /vehicles/{id}](https://developer.conundra.eu/apis/vehicles/vehicle-api/vehicle/getvehicle.md): Get an existing Vehicle, defined by their id.

### Delete Vehicle

 - [DELETE /vehicles/{id}](https://developer.conundra.eu/apis/vehicles/vehicle-api/vehicle/deletevehicle.md): Delete a Vehicle, defined by their id.

