This page contains all necessary information to work with API.
https://api.okpock.com serves 3 endpoints:
/info
- Returns VIN code and license plate only./preview
- Returns a preview of data like mark, model, registrations and accidents count./report
- Returns a full list of data fields.
To be able to access endpoints caller should set basic auth credentials and User-Agent
header provided from admin.
curl --request POST \
--url https://api.okpock.com/report \
--header 'Authorization: Basic <your credentials hash>' \
--header 'Content-Type: application/json' \
--header 'User-Agent: <your user-agent>' \
--data '{"plate": "A929YLO"}'
In case if error API returns http response with code (4xx or 5xx) and json payload.
{
"system": "OKPOCK",
"status": 404,
"message": "not_found",
"devMessage": "Given plate or VIN not found"
}
400
- Invalid json request body | Empty plate or VIN401
- Missing basic auth credentials | Invalid auth credentials403
- User agent not allowed or disabled404
- License plate or VIN not found406
- Missing required header500
- Internal server error501
- Not implemented (due to changed JSON payload)503
- Service unavailable (due to provider)504
- Gateway timeout (due to request timeout)
{
"plate": "A929YLO"
}
or
{
"VIN": "JTHBG262282011458"
}
{
"VIN": "JTHBG262282011458",
"plate": "A929YLO"
}
{
"plate": "A929YLO"
}
or
{
"VIN": "JTHBG262282011458"
}
{
"mark": "LEXUS",
"model": "IS300",
"vehicle_year": 2007,
"registration_actions_found": true,
"road_accidents_found": false
}
{
"plate": "058FUA14"
}
or
{
"VIN": "WVWZZZ31ZLE147331"
}
{
"report": {
"car_info": {
"vin": "WVWZZZ31ZLE147331",
"base_info": {
"engine_volume": 1781,
"engine_power_kwt": 66,
"empty_weight": 1160,
"plated_weight": 1700,
"manufacturer": "",
"mark": "VOLKSWAGEN",
"model": "PASSAT",
"origin_country": "Германия",
"seating_count": 5,
"vehicle_year": 1990,
"vehicle_age_category": "",
"vehicle_category": "Легковые автомобили",
"vehicle_category_wide": "",
"vehicle_type": "",
"vehicle_color": "ЦВЕТ НЕОПРЕДЕЛЕН",
"vehicle_count": 1
},
"additional_info": ""
},
"registration_history": [
{
"action": "ПОСТАНОВКА",
"address": "ПАВЛОДАРСКАЯ ОБЛАСТЬ, Г.ПАВЛОДАР",
"person_type": "ФИЗ.ЛИЦО",
"action_date": "2019-09-01T00:00:00Z"
},
{
"action": "СНЯТИЕ",
"address": "ПАВЛОДАРСКАЯ ОБЛАСТЬ, Г.ПАВЛОДАР",
"person_type": "ФИЗ.ЛИЦО",
"action_date": "2019-08-01T00:00:00Z"
},
{
"action": "ПОСТАНОВКА",
"address": "",
"person_type": "ФИЗ.ЛИЦО",
"action_date": "2013-06-20T00:00:00Z"
},
{
"action": "СНЯТИЕ",
"address": "",
"person_type": "ФИЗ.ЛИЦО",
"action_date": "2013-06-20T00:00:00Z"
},
{
"action": "СНЯТИЕ",
"address": "",
"person_type": "ФИЗ.ЛИЦО",
"action_date": "2013-06-20T00:00:00Z"
}
],
"road_accidents": [
{
"accident_date": "2019-07-23T00:00:00Z",
"description": "ПЕРЕДНЯЯ ПРААВАЯ СТОРОНА КУЗОВА"
}
]
},
"db_updated_at": ""
}