Create a mileage check-in.
POST/api/vehicles/checkin/mileage
Create a mileage check-in. A mileage check-in requires an odometer reading and clear photos of the license plate and odometer. Photos need to be uploaded to the Ownli cloud via the Photo upload api.
Request
Header Parameters
Partner Id
Client Id
Client Secret
- application/json
Body
required
Array [
]
Array [
]
Vehicle Id of the vehicle.
License plate number of the vehicle.
2 Letter State Code (eg. AL, CA, CO etc.
Possible values: >= 1
Current Mileage of vehicle. If this is not the first check-in the mileage will be validated against other check-ins and needs to equal or exceed those.
licensePhotos
object[]
required
Photos of the license plate. At this time only photo is supported
Url of the photo. The photo needs to be uploaded via the Photo Upload API.
odometerPhotos
object[]
required
Photos of the odometer. At this time only photo is supported
Url of the photo. The photo needs to be uploaded via the Photo Upload API.
Responses
- 200
- 401
- 403
- 404
- 409
- 500
The created mileage check-in object.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Array [
]
Id of the checkin
License plate number
Admin generated note. Usually used for on-hold or declined check-ins
Check-in date
Possible values: [Confirmed
, Declined
, OnHold
, Pending
]
Status of the check-in
Mileage at time of check-in
A indicative time for the next check-in. If the check-ins are allowed at a specific cadence this value will carry the next recommended check-in date. When more complex rules are allowed this field should not be used.
Last updated on
licensePhotos
object[]
The photo of the license plate
URL of the photo
Latitude at which photo was taken
Longitude at which photo was taken
odometerPhotos
object[]
The photo of the odometer
URL of the photo
Latitude at which photo was taken
Longitude at which photo was taken
{
"id": "string",
"license": "string",
"adminNote": "string",
"checkedInAt": "string",
"checkInStatus": "Confirmed",
"mileage": 0,
"nextCheckInDate": "string",
"updated": "string",
"licensePhotos": [
{
"photoUrl": "string",
"latitude": 0,
"longitude": 0
}
],
"odometerPhotos": [
{
"photoUrl": "string",
"latitude": 0,
"longitude": 0
}
]
}
Authorization error e.g. due to an invalid or missing API keys.
The caller does not have access to the vehicle or the vehicle is in a deactivated state. Possible error codes
-
ERROR_NO_PERMISSIONS_TO_RESOURCE
-
ERROR_VEHICLE_IS_NOT_ACTIVE_ON_POLICY
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Vehicle not found or owning User not found. Possible error codes
-
ERROR_USER_NOT_FOUND
-
ERROR_VEHICLE_NOT_FOUND
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Vehicle with same license plate exists. Possible error codes
-
ERROR_VEHICLE_ALREADY_EXISTS
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Possible error codes:
-
ERROR_LICENSE_PHOTO_REQUIRED
-
ERROR_ODOMETER_PHOTO_REQUIRED
-
ERROR_MILEAGE_CHECKIN_SUPPORTS_ONLY_ONE_PHOTO
-
ERROR_LICENSE_PLATE_MISMATCH
-
ERROR_PHOTO_NOT_OWNED_BY_USER
-
ERROR_CHECKIN_IS_LOCKED
-
ERROR_MILEAGE
-
INTERNAL_SERVER_ERROR
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}