Automile ResourceOwnerVehicleV2 API
The ResourceOwnerVehicleV2 API from Automile — 3 operation(s) for resourceownervehiclev2.
The ResourceOwnerVehicleV2 API from Automile — 3 operation(s) for resourceownervehiclev2.
swagger: '2.0'
info:
title: Automile ClientApi ResourceOwnerVehicleV2 API
version: v1
tags:
- name: ResourceOwnerVehicleV2
paths:
/v1/resourceowner/vehicles:
get:
tags:
- ResourceOwnerVehicleV2
summary: Get all vehicles that the user has access to
description: Only returns vehicles that the user have access to
operationId: GetResourceOwnerVehicles
produces:
- text/plain
- application/json
- text/json
responses:
'200':
description: The vehicles are returned
schema:
type: array
items:
$ref: '#/definitions/VehicleModel'
'500':
description: Internal server error
security:
- oauth2: []
post:
tags:
- ResourceOwnerVehicleV2
summary: Creates a new vehicle
description: This will create a new vehicle and make the association you set.
operationId: CreateResourceOwnerVehicle
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: body
name: body
description: The vehicle model
schema:
$ref: '#/definitions/VehicleCreateModel'
responses:
'200':
description: A link in the header is returned to the newly created vehicle
'400':
description: Bad request, could occur for a number of cases, see returned message
'403':
description: Request is forbidden, meaning you don't have access to this vehicle
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/vehicles/{vehicleId}:
get:
tags:
- ResourceOwnerVehicleV2
summary: Get the details about the vehicle
description: Only vehicles that the user has relationships with are allowed.
operationId: GetResourceOwnerVehicle
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: vehicleId
description: The vehicle id
required: true
type: integer
format: int32
responses:
'200':
description: The vehicle details are returned
schema:
$ref: '#/definitions/VehicleDetailModel'
'403':
description: Request is forbidden, meaning you don't have access to this vehicle
'500':
description: Internal server error
security:
- oauth2: []
put:
tags:
- ResourceOwnerVehicleV2
summary: Updates the given vehicle with new model
description: This will update the given vehicle id with a new model.
operationId: EditResourceOwnerVehicle
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: path
name: vehicleId
description: The vehicle id
required: true
type: integer
format: int32
- in: body
name: body
description: The new vehicle model
schema:
$ref: '#/definitions/VehicleEditModel'
responses:
'200':
description: The vehicle was saved
'500':
description: Internal server error
'400':
description: Bad request, could occur for a number of cases, see returned message
'403':
description: Request is forbidden, meaning you don't have access to this vehicle
'404':
description: Not found, the vehicle you tried to update can't be found
security:
- oauth2: []
delete:
tags:
- ResourceOwnerVehicleV2
summary: Removes the given vehicle
description: Removes the given vehicle. If the vehicle is assoicated with a device, first move the device to another vehicle
operationId: DeleteResourceOwnerVehicle
parameters:
- in: path
name: vehicleId
description: The vehicle id
required: true
type: integer
format: int32
responses:
'200':
description: The vehicle has been deleted
'500':
description: Internal server error
'403':
description: Request is forbidden, meaning you don't have access to this vehicle
'404':
description: Not found, the vehicle you tried to update can't be found
security:
- oauth2: []
/v1/resourceowner/vehicles/status:
get:
tags:
- ResourceOwnerVehicleV2
summary: Get position and status of all vehicles that the user has access to
description: Only returns vehicles that the user have access to. LastKnownFormattedAddress, LastKnownStreetAddress, LastKnownCity is only returned if vehicle is parked.
operationId: GetResourceOwnerVehiclesStatus
produces:
- text/plain
- application/json
- text/json
responses:
'200':
description: The vehicle details are returned
schema:
type: array
items:
$ref: '#/definitions/VehicleStatusModel'
'500':
description: Internal server error
security:
- oauth2: []
definitions:
TimeSpan:
type: object
properties:
Ticks:
format: int64
type: integer
Days:
format: int32
type: integer
readOnly: true
Hours:
format: int32
type: integer
readOnly: true
Milliseconds:
format: int32
type: integer
readOnly: true
Microseconds:
format: int32
type: integer
readOnly: true
Nanoseconds:
format: int32
type: integer
readOnly: true
Minutes:
format: int32
type: integer
readOnly: true
Seconds:
format: int32
type: integer
readOnly: true
TotalDays:
format: double
type: number
readOnly: true
TotalHours:
format: double
type: number
readOnly: true
TotalMilliseconds:
format: double
type: number
readOnly: true
TotalMicroseconds:
format: double
type: number
readOnly: true
TotalNanoseconds:
format: double
type: number
readOnly: true
TotalMinutes:
format: double
type: number
readOnly: true
TotalSeconds:
format: double
type: number
readOnly: true
additionalProperties: false
VehicleStatusModel:
type: object
properties:
VehicleId:
format: int32
type: integer
LastPositionUtc:
format: date-time
type: string
LastKnownLatitude:
format: double
type: number
LastKnownLongitude:
format: double
type: number
IsDriving:
type: boolean
MakeImageUrl:
type: string
ParkedForNumberOfSeconds:
format: int32
type: integer
DrivingForNumberOfSeconds:
format: int32
type: integer
LastKnownFormattedAddress:
type: string
LastKnownStreetAddress:
type: string
LastKnownCity:
type: string
LastTripId:
format: int32
type: integer
LastLocationType:
format: int32
enum:
- 0
- 1
- 2
type: integer
CategoryColor:
format: int32
type: integer
Heading:
format: int32
type: integer
additionalProperties: false
VehicleDetailModel:
type: object
properties:
VehicleIdentificationNumber:
type: string
NumberPlate:
type: string
Make:
type: string
Model:
type: string
ModelYear:
format: int32
type: integer
BodyStyle:
type: string
BodyType:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
type: integer
OwnerContactId:
format: int32
type: integer
OwnerCompanyId:
format: int32
type: integer
OwnedByName:
type: string
NumberOfTrips:
format: int32
type: integer
DistanceTravelledThisYear:
format: double
type: number
DistanceTravelledLastYear:
format: double
type: number
LastKnownLatitude:
format: double
type: number
LastKnownLongitude:
format: double
type: number
LastKnownGeoTimeStamp:
format: date-time
type: string
LastKnownFormattedAddress:
type: string
LastKnownCustomAddress:
type: string
LastKnownSpeed:
format: double
type: number
LastKnownTemperature:
format: double
type: number
LastKnownTemperatureTimeStamp:
format: date-time
type: string
LastTripEndLatitude:
format: double
type: number
LastTripEndLongitude:
format: double
type: number
LastTripEndGeoTimeStamp:
format: date-time
type: string
ParkedForNumberOfSeconds:
format: int32
type: integer
OngoingTripId:
format: int32
type: integer
MakeImageUrl:
type: string
CurrentOdometerInKilometers:
format: double
type: number
VehicleType:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 255
type: integer
DeleteTripDetailsAfter:
$ref: '#/definitions/TimeSpan'
DeleteTripsAfter:
$ref: '#/definitions/TimeSpan'
additionalProperties: false
VehicleCreateModel:
required:
- CreateRelationshipToId
- VehicleRelationshipType
type: object
properties:
NumberPlate:
type: string
Make:
type: string
Model:
type: string
ModelYear:
format: int32
type: integer
BodyStyle:
type: string
BodyType:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
type: integer
OwnerContactId:
format: int32
type: integer
OwnerCompanyId:
format: int32
type: integer
CreateRelationshipToId:
format: int32
type: integer
VehicleRelationshipType:
format: int32
enum:
- 0
- 1
type: integer
DeleteTripDetailsAfter:
$ref: '#/definitions/TimeSpan'
DeleteTripsAfter:
$ref: '#/definitions/TimeSpan'
additionalProperties: false
VehicleModel:
type: object
properties:
VehicleId:
format: int32
type: integer
VehicleIdentificationNumber:
type: string
NumberPlate:
type: string
Make:
type: string
Model:
type: string
OwnerContactId:
format: int32
type: integer
OwnerCompanyId:
format: int32
type: integer
CurrentOdometerInKilometers:
format: double
type: number
VehicleType:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 255
type: integer
DeleteTripDetailsAfter:
$ref: '#/definitions/TimeSpan'
DeleteTripsAfter:
$ref: '#/definitions/TimeSpan'
additionalProperties: false
VehicleEditModel:
type: object
properties:
NumberPlate:
type: string
Make:
type: string
Model:
type: string
ModelYear:
format: int32
type: integer
BodyStyle:
type: string
BodyType:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
type: integer
OwnerContactId:
format: int32
type: integer
OwnerCompanyId:
format: int32
type: integer
DeleteTripDetailsAfter:
$ref: '#/definitions/TimeSpan'
DeleteTripsAfter:
$ref: '#/definitions/TimeSpan'
additionalProperties: false
securityDefinitions:
oauth2:
type: oauth2
flow: implicit
authorizationUrl: https://api.automile.com/login/
scopes:
read: Read access to protected resources
write: Write access to protected resources
description: OAuth2 Implicit Grant