hiyacar API
Welcome to the hiyacar API
Changes
| Date | Version | Author | Change summary |
|---|---|---|---|
| 2021-08-10 | 1.4.0 | Marc Roberts | Insurance statements for SDH markets |
| 2021-07-07 | 1.3.1 | Marc Roberts | New Consent endpoint, consent in user api, new booking data, booking is_checked end point, dynamic pricing on vehicles |
| 2021-01-29 | 1.3.0 | Marc Roberts | Stripe PaymentIntents for booking payments |
| 2020-12-01 | 1.2.3 | Marc Roberts | Backend will automatically assign a new selfie image as profile picture (if not already present) for any prior API version |
| 2020-10-28 | 1.2.2 | Marc Roberts | Driver Intent, vehicle reviews and extra fields, deprecated endpoints |
| 2020-09-01 | 1.2.2 | Marc Roberts | New bookings index filters and breaking changes to user verifications object |
| 2020-07-24 | 1.2.1 | Marc Roberts | Refactor extras objects |
| 2020-07-08 | 1.2.0 | Marc Roberts | Prices added to search results search results only show vehicle primary image |
| 2020-06-23 | 1.1.1 | Marc Roberts | Instant Book updates |
| 2020-06-10 | 1.1.0 | Marc Roberts | Import Apiary docs |
URL
Unless stated all requests have a base URL of:
https://www.hiyacar.co.uk/api/v1
Rate limiting
The API is subject to rate limits, unless specified differently the limit is 180 requests per minute per IP (anonymous requests) or User (authenticated requests).
All requests will include the following headers in their responses indicated how close you are to your limit
X-RateLimit-Limit: 180
X-RateLimit-Remaining: 179
If you exceed this rate requests will return an HTTP 429 error response until the rate limit resets.
Content types
All requests expect and return JSON data (unless otherwise stated). Requests must include appropriate Accept and Content-type headers.
Unless otherwise noted a successful request will return its data as an object or array within the result field in the following structure
{
"success":true,
"result": ....,
"query": {
...
}
}
An unsuccessful request will return the following structure
{
"success":false,
"error":"Description of the error message",
"details": "A string, array or object of more information for that specific error message"
}
Dates & times
The API returns and expects dates and times to be an ISO8601 formatted string. The timezone is optional, if not supplied it will default to parsing using the Europe/London timezone.
Auth ¶
Unless stated all requests require an OAuth access token supplied in the HTTP header:
Authorization: Bearer xxxxxxxx
OAuth ¶
These API endpoints have a base URL of https://www.hiyacar.co.uk/
AuthorizeGET/oauth/authorize{?client_id,redirect_uri,response_type,scope}
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Request authorization for this client
Example URI
- client_id
string(required) Example: 12345The oauth client request auth for
- redirect_uri
string(required) Example: https://external-service.comWhere to redirect to after auth, must begin with the URL we have for the client
- response_type
string(required) Example: codeType of response required, code or token (implicit grant)
- scope
string(required) Example: *Scope requested, no specific scopes are in use currently so use
*
302TokenPOST/oauth/token
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Retrieve an access token for a user.
Requires either an authorization code from a request to the Authorize end point, or the usename/password and client secret.
This API end point is returned exactly as it is, without the success / result wrapper specified above.
Example URI
Code GrantBody
{
"grant_type": "authorization_token",
"client_id": "1",
"client_secret": "JHrwKbCQCSUXb8slHGb0h5ndR0YJbKFsik9BCfLS",
"redirect_uri": "http://xxxxxxx",
"code": "xxxxxxx"
}Password GrantBody
{
"grant_type": "password",
"client_id": "1",
"client_secret": "JHrwKbCQCSUXb8slHGb0h5ndR0YJbKFsik9BCfLS",
"username": "chuck@hiyacar.co.uk",
"password": "password",
"scope": "*"
}200Headers
Content-Type: application/jsonBody
{
"token_type": "Bearer",
"expires_in": 31536000,
"access_token": "eYJ0........",
"refresh_token": "Gm69........"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"token_type": {
"type": "string"
},
"expires_in": {
"type": "number"
},
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
}
}
}401Headers
Content-Type: application/jsonBody
{
"error": "invalid_credentials",
"message": "The user credentials were incorrect."
}User ¶
Creation ¶
Check Email availabilityPOST/api/v1/user/availability
Check the availability of an email address
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Example URI
Body
{
"email": "bob@hiyacar.co.uk"
}200Headers
Content-Type: application/jsonBody
{
"available": true
}Resend Email verificationPOST/api/v1/user/emailVerification
Resend the email varification email
Example URI
200Headers
Content-Type: application/jsonBody
{
"available": true
}Create an accountPOST/api/v1/user
Create a user account
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Request data:
-
email - The User’s email address, required
-
password - The User’s password
-
first_name - The User’s first name, required
-
last_name - The User’s last name, required
-
profile_image - Base64 encoded profile image data, optional
-
client_id - The client ID to return an OAuth token for, optional
Example URI
Body
{
"email": "user@hiyacar.co.uk",
"password": "password123",
"first_name": "Chuck",
"last_name": "Norris",
"profile_image": "xxxx"
}200Headers
Content-Type: application/jsonBody
{
"success": true
}422Headers
Content-Type: application/jsonBody
{
"error": "Invalid parameters",
"details": {
"first_name": [
"The first name field is required."
]
}
}with client_idBody
{
"client_id": 1,
"email": "user@hiyacar.co.uk",
"password": "password123",
"first_name": "Chuck",
"last_name": "Norris",
"profile_image": "xxxx"
}200Headers
Content-Type: application/jsonBody
{
"success": true,
"result": {
"access_token": "eyJ0eXAiOiJKV...cZGkvC1dCpCLhh-dY0J9KY",
"token_type": "bearer",
"expires_in": "31536000"
}
}Details ¶
Retrieve own account detailsGET/api/v1/user
Retrieve user account details for the user associated with the access token provided.
Example URI
200Headers
Content-Type: application/jsonBody
{
"id": 21094,
"first_name": "Bob",
"last_name": "Bobby",
"dob": "1990",
"email": "bob@hiyacar.co.uk",
"email_verified": true,
"bio": "I love driving cars ...",
"phone_number": "+447770123456",
"join_date": "2016-10-08",
"primary_location": {
"line1": "17 Church Street",
"line2": "Boughton Monchelsea",
"city": "Maidstone",
"county": "Kent",
"postcode": "ME17 4HW",
"lat": 51.23188,
"lng": 0.53302
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"payment_info": {
"source": "card",
"name": "Mr Bob Robertson",
"brand": "Visa",
"last4": "0000",
"expiry_month": 12,
"expiry_year": 2018
},
"bank_details": {
"type": "uk-bacs",
"bank_name": "'Natwest'",
"account_name": "Mr Bob Smith",
"account_number": 76587651,
"account_sort_code": "12-34-56"
},
"profile_complete": true,
"referral_code": "HDHDSG",
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
],
"licence_details": {
"licence_type": "eu",
"licence_number": "ROBER786812MD1LL",
"licence_issue_date": "2001-01-01",
"licence_expiry_date": "2010-01-01",
"eu_licence_for": 40,
"eu_convictions": true,
"eu_claims": true
},
"notifications": {
"messages": 0,
"booking": 0
},
"intercom": {
"ios_hash": "xxxx",
"android_hash": "xxxx"
},
"verification": {
"verification_status": "REFER",
"licence_check_result": "PASS",
"face_rec_result": "PASS",
"passed_all": false,
"drivercheck_consent": true,
"error_codes": {},
"error": {},
"errors": []
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"dob": {
"type": "string",
"description": "01-01 (string)"
},
"email": {
"type": "string"
},
"email_verified": {
"type": "boolean"
},
"bio": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"city": {
"type": "string"
},
"county": {
"type": "string"
},
"postcode": {
"type": "string"
},
"lat": {
"type": "number"
},
"lng": {
"type": "number"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"payment_info": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"card",
"invoice",
"none"
]
},
"name": {
"type": "string",
"description": "Card source only"
},
"brand": {
"type": "string",
"description": "Card source only"
},
"last4": {
"type": "string",
"description": "Card source only"
},
"expiry_month": {
"type": "number",
"description": "Card source only"
},
"expiry_year": {
"type": "number",
"description": "Card source only"
}
}
},
"bank_details": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of bank payment (currently only `uk-bacs`)"
},
"bank_name": {
"type": "string",
"description": "The Bank name to pay"
},
"account_name": {
"type": "string",
"description": "Name of the account holder"
},
"account_number": {
"type": "number",
"description": "Account number to pay"
},
"account_sort_code": {
"type": "string",
"description": "Bank sort code to pay"
}
}
},
"profile_complete": {
"type": "boolean"
},
"referral_code": {
"type": "string"
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
},
"licence_details": {
"type": "object",
"properties": {
"licence_type": {
"type": "string",
"enum": [
"uk",
"eu",
"other"
]
},
"licence_number": {
"type": "string"
},
"licence_issue_date": {
"type": "string"
},
"licence_expiry_date": {
"type": "string"
},
"eu_licence_for": {
"type": "number",
"description": "Number of months an EU licence has been held for"
},
"eu_convictions": {
"type": "boolean"
},
"eu_claims": {
"type": "boolean"
}
}
},
"notifications": {
"type": "object",
"properties": {
"messages": {
"type": "number"
},
"booking": {
"type": "number"
}
}
},
"intercom": {
"type": "object",
"properties": {
"ios_hash": {
"type": "string",
"description": "The Intercom user hash for iOS"
},
"android_hash": {
"type": "string",
"description": "The Intercom user hash for Android"
}
}
},
"verification": {
"type": "object",
"properties": {
"verification_status": {
"type": "string"
},
"licence_check_result": {
"type": "string"
},
"face_rec_result": {
"type": "string"
},
"passed_all": {
"type": "boolean"
},
"drivercheck_consent": {
"type": "boolean",
"description": "Has the member given us consent to use DriverCheck"
},
"error_codes": {
"type": "object",
"properties": {},
"description": "Removed from API version 1.2.2"
},
"error": {
"type": "object",
"properties": {},
"description": "Removed from API version 1.2.2"
},
"errors": {
"type": "array",
"description": "List of verficiation errors\nFrom version 1.2.2"
}
}
}
}
}Retrieve a user's detailsGET/api/v1/user/{user_id}
Retrieve user account details for the user associated with the access token provided.
Example URI
- user_id
number(required) Example: 12345The user’s ID to retrieve details for
200Headers
Content-Type: application/jsonBody
{
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}Retrieve identity documentsGET/api/v1/user/documents
Show the identity documents this user has stored
Example URI
200Headers
Content-Type: application/jsonBody
[
{
"type": "licence",
"image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Updates ¶
Update you user accountPUT/api/v1/user
Update the account associate with the supplied auth token
Request data:
-
first_name - optional
-
last_name - optional
-
email - optional
-
phone_number - optional
-
dob - Date of birth (YYYY-mm-dd format), optional
-
licence_number - optional
-
licence_issue_date - (YYYY-mm-dd format), optional
-
licence_type - (‘eu’, ‘uk’, ‘other’), optional
-
eu_licence_for - number of months they have lived in the UK, optional (Yes, it’s confusing, sorry)
-
eu_convictions - any convictions recently, boolean, optional
-
eu_claims - and claims recently, boolean, optional
-
dvla_check_code - optional
-
profile_image - base64 encoded image for profile picture
-
primary_address - array of address fields, optional
-
secondary_address - array of address fields, optional
-
voucher - A valid voucher to add to a user’s account, string, optional
-
referral - How the user heard about us, string, optional
Referral can only be set once, after that the value will not be overwritten.
Voucher code will be stored against the user if it exists and used on their next booking if it is valid and they are eligible at the time
Example URI
Body
{
"first_name": "Bob",
"last_name": "Ericsson",
"licence_type": "uk",
"licence_number": "ERICS808132MD9GL",
"licence_issue_date": "2002-01-01",
"dvla_check_code": "gx kT j8 s5",
"phone_number": "07777 123456",
"profile_image": "nbjxbcjx....",
"primary_address": {
"line1": "Flat 4",
"line2": "1 something road",
"city": "Lewisham",
"county": "London",
"postcode": "E14 1AA",
"lat": 50.822652,
"lng": -0.1785738
},
"referral": "Social media",
"voucher": "PUMP1"
}200Headers
Content-Type: application/jsonBody
{
"id": 21094,
"first_name": "Bob",
"last_name": "Bobby",
"dob": "1990",
"email": "bob@hiyacar.co.uk",
"email_verified": true,
"bio": "I love driving cars ...",
"phone_number": "+447770123456",
"join_date": "2016-10-08",
"primary_location": {
"line1": "17 Church Street",
"line2": "Boughton Monchelsea",
"city": "Maidstone",
"county": "Kent",
"postcode": "ME17 4HW",
"lat": 51.23188,
"lng": 0.53302
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"payment_info": {
"source": "card",
"name": "Mr Bob Robertson",
"brand": "Visa",
"last4": "0000",
"expiry_month": 12,
"expiry_year": 2018
},
"bank_details": {
"type": "uk-bacs",
"bank_name": "'Natwest'",
"account_name": "Mr Bob Smith",
"account_number": 76587651,
"account_sort_code": "12-34-56"
},
"profile_complete": true,
"referral_code": "HDHDSG",
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
],
"licence_details": {
"licence_type": "eu",
"licence_number": "ROBER786812MD1LL",
"licence_issue_date": "2001-01-01",
"licence_expiry_date": "2010-01-01",
"eu_licence_for": 40,
"eu_convictions": true,
"eu_claims": true
},
"notifications": {
"messages": 0,
"booking": 0
},
"intercom": {
"ios_hash": "xxxx",
"android_hash": "xxxx"
},
"verification": {
"verification_status": "REFER",
"licence_check_result": "PASS",
"face_rec_result": "PASS",
"passed_all": false,
"drivercheck_consent": true,
"error_codes": {},
"error": {},
"errors": []
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"dob": {
"type": "string",
"description": "01-01 (string)"
},
"email": {
"type": "string"
},
"email_verified": {
"type": "boolean"
},
"bio": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"city": {
"type": "string"
},
"county": {
"type": "string"
},
"postcode": {
"type": "string"
},
"lat": {
"type": "number"
},
"lng": {
"type": "number"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"payment_info": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"card",
"invoice",
"none"
]
},
"name": {
"type": "string",
"description": "Card source only"
},
"brand": {
"type": "string",
"description": "Card source only"
},
"last4": {
"type": "string",
"description": "Card source only"
},
"expiry_month": {
"type": "number",
"description": "Card source only"
},
"expiry_year": {
"type": "number",
"description": "Card source only"
}
}
},
"bank_details": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of bank payment (currently only `uk-bacs`)"
},
"bank_name": {
"type": "string",
"description": "The Bank name to pay"
},
"account_name": {
"type": "string",
"description": "Name of the account holder"
},
"account_number": {
"type": "number",
"description": "Account number to pay"
},
"account_sort_code": {
"type": "string",
"description": "Bank sort code to pay"
}
}
},
"profile_complete": {
"type": "boolean"
},
"referral_code": {
"type": "string"
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
},
"licence_details": {
"type": "object",
"properties": {
"licence_type": {
"type": "string",
"enum": [
"uk",
"eu",
"other"
]
},
"licence_number": {
"type": "string"
},
"licence_issue_date": {
"type": "string"
},
"licence_expiry_date": {
"type": "string"
},
"eu_licence_for": {
"type": "number",
"description": "Number of months an EU licence has been held for"
},
"eu_convictions": {
"type": "boolean"
},
"eu_claims": {
"type": "boolean"
}
}
},
"notifications": {
"type": "object",
"properties": {
"messages": {
"type": "number"
},
"booking": {
"type": "number"
}
}
},
"intercom": {
"type": "object",
"properties": {
"ios_hash": {
"type": "string",
"description": "The Intercom user hash for iOS"
},
"android_hash": {
"type": "string",
"description": "The Intercom user hash for Android"
}
}
},
"verification": {
"type": "object",
"properties": {
"verification_status": {
"type": "string"
},
"licence_check_result": {
"type": "string"
},
"face_rec_result": {
"type": "string"
},
"passed_all": {
"type": "boolean"
},
"drivercheck_consent": {
"type": "boolean",
"description": "Has the member given us consent to use DriverCheck"
},
"error_codes": {
"type": "object",
"properties": {},
"description": "Removed from API version 1.2.2"
},
"error": {
"type": "object",
"properties": {},
"description": "Removed from API version 1.2.2"
},
"errors": {
"type": "array",
"description": "List of verficiation errors\nFrom version 1.2.2"
}
}
}
}
}Update identity documentsPOST/api/v1/user/documents
Update one or more identity images
JSON body contains an array of images to store/replace
Example URI
Body
{
"documents": [
{
"type": "licence-front",
"image": "dfynkeynxx..."
}
]
}200Headers
Content-Type: application/jsonBody
[
{
"type": "licence",
"image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Other ¶
Request a password resetPOST/api/v1/user/password
Request a password reset email for a given email address
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Example URI
Body
{
"email": "bob@hiyacar.co.uk"
}200Headers
Content-Type: application/jsonRetrieve users vehicleGET/api/v1/user/{userId}/vehicles
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Example URI
- userId
number(required) Example: 22995The user ID of the user to retrieve vehicles for
200Headers
Content-Type: application/jsonBody
[
{
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Retrieve users reviewsGET/api/v1/user/{userId}/reviews
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
This is also available as /api/v1/user/{userId}/ratings however use of this endpoint is deprecated.
Example URI
- userId
number(required) Example: 22995The user ID of the user to retrieve vehicles for
200Headers
Content-Type: application/jsonBody
[
{
"id": "514",
"for": "driver",
"ratings": 5,
"review": "They were great",
"created_at": "2017-01-0T15:30:00",
"from": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Notificatons ¶
Retrieve notification preferencesGET/api/v1/notifications
Get a list of notification preferences
Example URI
200Headers
Content-Type: application/jsonBody
{
"marketing": {
"description": "blah",
"enabled": true,
"required": false,
"type": "toggle",
"channels": {
"email": true,
"sms": true,
"push": true
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"marketing": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"required": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"toggle",
"multi"
]
},
"channels": {
"type": "object",
"properties": {
"email": {
"type": "boolean"
},
"sms": {
"type": "boolean"
},
"push": {
"type": "boolean"
}
}
}
}
}
}
}Save a user intentPOST/api/v1/user/intent
Create a new user intent
Request data:
-
for - the key for this intent
-
value - the value
Example URI
Body
{
"for": "search",
"value": "asap"
}200Headers
Content-Type: application/jsonBody
{
success: true
}Save a user's consentPOST/api/v1/user/consent
Create a new user consent
Request data:
- for - what are they giving consent for
Example URI
Body
{
"for": "drivercheck",
}200Headers
Content-Type: application/jsonBody
{
success: true
}Update notification preferencesPOST/api/v1/notifications
Update user notification preferences
Example URI
Body
{
"marketing": {
"email": true,
"sms": false,
"push": true
}
}200Headers
Content-Type: application/jsonBody
{
"marketing": {
"description": "blah",
"enabled": true,
"required": false,
"type": "toggle",
"channels": {
"email": true,
"sms": true,
"push": true
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"marketing": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"required": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"toggle",
"multi"
]
},
"channels": {
"type": "object",
"properties": {
"email": {
"type": "boolean"
},
"sms": {
"type": "boolean"
},
"push": {
"type": "boolean"
}
}
}
}
}
}
}Vehicles ¶
Vehicle end points
Vehicles ¶
Value vehicleGET/api/v1/vehicles/value{?identifier}
Get a valuation of a vehicle.
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Example URI
- identifier
string(required) Example: NV55GGGVehicle registration number
200Headers
Content-Type: application/jsonBody
{
"make": "Ford",
"model": "Mustang Ecoboost",
"year": 2016,
"insurance_group": 43,
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"year": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
}
}
}406Headers
Content-Type: application/jsonBody
{
error: "Vehicle ineligible: too old"
}406Headers
Content-Type: application/jsonBody
{
error: "Vehicle ineligible: insurance group too high"
}406Headers
Content-Type: application/jsonBody
{
error: "Could not fetch car data"
}List vehicle featuresGET/api/v1/vehicles/features
Return all the available vehicle features
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
These values change very very rarely, please cache these with an expiry of at least a week.
system_feature options are options that cannot be chosen by the owner, but can be used for filtering by drivers
Example URI
200Headers
Content-Type: application/jsonBody
[
{
"id": 11,
"title": "Bike Rack",
"system_feature": false,
"type": "OTHER"
},
{
"id": 12,
"title": "Delivery Available",
"system_feature": false,
"type": "POPULAR"
},
{
"id": 13,
"title": "Convertible",
"system_feature": false,
"type": "POPULAR"
},
{
"id": 14,
"title": "No congestion charge (Auto pay)",
"system_feature": false,
"type": "POPULAR"
},
{
"id": 15,
"title": "ULEZ Compliant",
"system_feature": true,
"type": "POPULAR"
}
]List vehicle typesGET/api/v1/vehicles/types
Return all the available vehicle types
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
These values change very very rarely, please cache these with an expiry of at least a week.
Example URI
200Headers
Content-Type: application/jsonBody
[
{
"id": 1,
"title": "Executive / Saloon"
},
{
"id": 2,
"title": "Sports / Convertible"
},
{
"id": 3,
"title": "Estate"
},
{
"id": 4,
"title": "City / Hatchback"
},
{
"id": 5,
"title": "4x4"
},
{
"id": 6,
"title": "FAmily / MPV"
}
]Add vehiclePOST/api/v1/vehicles
Add a vehicle to your account
Recommended prices will be used if prices are not supplied
Request data:
-
identifier - the VRM of the vehicle, required
-
description - Description for this vehicle, optional, 1000 chars max
-
miles_per_day - The daily mileage limit of this vehicle, optional
-
price_hourly - The hourly price for this vehicle, optional
-
price_daily - The daily price for this vehicle, optional
-
price_weekly - The weekly price for this vehicle, optional
-
qs_requested - true/false if the owner was interested in QS, optional
-
start_instructions - Instructions for starting this car, optional
-
keys_instructions - Details on where (if needed) to find the keys, optional
-
parking_instructions - Details of how to find the car, optional
-
dropoff_instructions - Details of how to return the car, optional
Example URI
Body
{
"identifier": "NV55GGG",
"description": "Some descrption of the car",
"miles_per_day": 300,
"qs_requested": true
}200Headers
Content-Type: application/jsonBody
{
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
}406Headers
Content-Type: application/jsonBody
{
error: "Vehicle ineligible"
details: "too old, group too high, etc"
}Update vehicle detailsPUT/api/v1/vehicles/{id}
Update vehicle details
Request data (JSON body) all optional:
-
price_hourly - (integer) The hourly rental price
-
price_daily - (integer) The daily rental price
-
price_weekly - (integer) The weekly rental price
-
description - (string) The description
-
miles_per_day - (integer) Daily mileage cap
-
mileage - (integer) Most recent odometer reading
-
notice_period - (integer) notice required by the owner (in seconds)
-
min_duration - (integer) minimum duration of booking to allow (in seconds)
-
max_duration - (integer) maximum duration of booking to allow (in seconds)
-
features - (integer array) list of feature IDs for this vehicle
-
instant_book - (boolean) request instant book, or if approved enabled/disable it
-
start_instructions - Instructions for starting this car, optional
-
keys_instructions - Details on where (if needed) to find the keys, optional
-
parking_instructions - Details of how to find the car, optional
-
dropoff_instructions - Details of how to return the car, optional
-
dynamic_pricing - (boolean) Is dynamic pricing enabled on this car, optional
-
dynamic_pricing_percent - (integer) What percentage discount to apply to offpeak bookings
Example URI
- id
string(required)The vehicle id
Body
{
"price_hourly": 25,
"price_daily": 150,
"price_weekly": 500,
"description": "Some descrption of the car",
"miles_per_day": 300,
"features": [
1,
2,
3
]
}200Headers
Content-Type: application/jsonBody
{
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
}List vehiclesGET/api/v1/vehicles
List all vehicles in account
Example URI
200Headers
Content-Type: application/jsonBody
[
{
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Retrieve details of a vehicleGET/api/v1/vehicles/{id}
Retrieve the details of a vehicle
Example URI
- id
string(required)the vehicle id
200Headers
Content-Type: application/jsonBody
{
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
}Publish vehiclePOST/api/v1/vehicles/{id}/onboard
Onboard a vehicle
ADMIN access requires to perform this
Example URI
- id
string(required)The vehicle id
200Headers
Content-Type: application/jsonBody
{
success: true
}Publish vehiclePOST/api/v1/vehicles/{id}/publish
Publish a vehicle
Example URI
- id
string(required)The vehicle id
200Headers
Content-Type: application/jsonBody
{
success: true
}406Headers
Content-Type: application/jsonBody
{
"success": false,
"error": "Could not publish vehicle",
"details": ""
}Unpublish vehicleDELETE/api/v1/vehicles/{id}/publish
Unpublish a vehicle
Example URI
- id
string(required)The vehicle id
200Headers
Content-Type: application/jsonBody
{
success: true
}406Headers
Content-Type: application/jsonBody
{
"success": false,
"error": "Could not publish vehicle",
"details": ""
}Fetch vehicle availabiltyGET/api/v1/vehicles/{id}/availability
Get the availability of this vehicle
Example URI
- id
number(required) Example: 1419The Vehicle ID
200Headers
Content-Type: application/jsonBody
[
{
"location_id": 56,
"hours": {
"MO": [
1
],
"TU": [
1
],
"WE": [
1
],
"TH": [
1
],
"FR": [
1
],
"SA": [
1
],
"SU": [
1
]
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Update vehicle availabiltyPUT/api/v1/vehicles/{id}/availability
Update the availability of this vehicle
Example URI
- id
number(required) Example: 1419The Vehicle ID
Body
{
"location_id": 67,
"hours": {
"MO": [
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"TU": [
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"WE": [
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"TH": [
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"FR": [
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"SA": [],
"SU": []
}
}200Headers
Content-Type: application/jsonBody
{
success: true
}Fetch vehicle calendar dataGET/api/v1/vehicles/{id}/calendar
Get the latest vehicle calendar data
Example URI
- id
number(required) Example: 353The vehicle ID
200Headers
Content-Type: application/jsonBody
[
{
"starts_at": "2018-12-07T12:00:00Z",
"ends_at": "2018-12-08T12:00:00Z",
"type": "user"
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Update vehicle calendarPOST/api/v1/vehicles/{id}/calendar
Add/Remove blocked periods in the calendar
Example URI
- id
number(required) Example: 353The vehicle ID
Blocking a day and clearing a dayBody
{
"block": [
{
"starts_at": "2018-12-01T00:00:00Z",
"ends_at": "2018-12-02T00:00:00Z",
}
],
"clear": [
{
"starts_at": "2018-12-02T00:00:00Z",
"ends_at": "2018-12-03T00:00:00Z",
}
]
}200Headers
Content-Type: application/jsonBody
[
{
"starts_at": "2018-12-07T12:00:00Z",
"ends_at": "2018-12-08T12:00:00Z",
"type": "user"
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Blocking days onlyBody
{
"block": [
{
"starts_at": "2018-12-01T00:00:00Z",
"ends_at": "2018-12-02T00:00:00Z",
},
{
"starts_at": "2018-12-02T00:00:00Z",
"ends_at": "2018-12-03T00:00:00Z",
}
],
"clear": []
}200Headers
Content-Type: application/jsonBody
[
{
"starts_at": "2018-12-07T12:00:00Z",
"ends_at": "2018-12-08T12:00:00Z",
"type": "user"
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Clearing days onlyBody
{
"block": [],
"clear": [
{
"starts_at": "2018-12-01T00:00:00Z",
"ends_at": "2018-12-02T00:00:00Z",
},
{
"starts_at": "2018-12-02T00:00:00Z",
"ends_at": "2018-12-03T00:00:00Z",
}
]
}200Headers
Content-Type: application/jsonBody
[
{
"starts_at": "2018-12-07T12:00:00Z",
"ends_at": "2018-12-08T12:00:00Z",
"type": "user"
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Remove vehicleDELETE/api/v1/vehicles/{id}
Remove a vehicle from account
Example URI
- id
number(required) Example: 1419The vehicle ID
200Headers
Content-Type: application/jsonBody
{
success: true
}406Headers
Content-Type: application/jsonBody
{
"success": false,
"error": "Unable to delete vehicle",
"details": "There are active bookings upcoming"
}Vehicle Images ¶
Vehicle Images
Add images to a vehiclePOST/api/v1/vehicles/{vehicleId}/images
Upload an images to a vehicle
JSON body parameters:
images - Array of images base64 encoded, required
Example URI
- vehicleId
number(required) Example: 276
Body
{
"images": [
"uybtuvsdtuvy",
"adfnsftjrtj"
]
}200Headers
Content-Type: application/jsonBody
[
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Retrieve the images for a vehicleGET/api/v1/vehicles/{vehicleId}/images
Retrieve the images for a vehicle.
Example URI
- vehicleId
number(required) Example: 276The ID of the vehicle
200Headers
Content-Type: application/jsonBody
[
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Remove all images from a vehicleDELETE/api/v1/vehicles/{vehicleId}/images
Remove an image from a vehicle.
Example URI
- vehicleId
number(required) Example: 276The ID of the vehicle
200Headers
Content-Type: application/jsonBody
[
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Remove an images from a vehicleDELETE/api/v1/vehicles/{vehicleId}/images/{imageId}
Remove an image from a vehicle.
Example URI
- vehicleId
number(required) Example: 276The ID of the vehicle
- imageId
number(required) Example: 1685The ID of the image to remove
200Headers
Content-Type: application/jsonBody
[
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Make an vehicle image primaryPOST/api/v1/vehicles/{vehicleId}/images/{imageId}/primary
Make the given image the primary vehicle for the image
Example URI
- vehicleId
number(required) Example: 276The ID of the vehicle
- imageId
number(required) Example: 1546The ID of the vehicle image
200Headers
Content-Type: application/jsonBody
[
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Retrieve vehicle reviewsGET/api/v1/vehicles/{vehicleId}/reviews
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Example URI
- vehicleId
number(required) Example: 1125The vehicle ID of the vehicle to retrieve reviews for
200Headers
Content-Type: application/jsonBody
[
{
"id": "514",
"for": "driver",
"ratings": 5,
"review": "They were great",
"created_at": "2017-01-0T15:30:00",
"from": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Search ¶
Search ¶
Search availabilityGET/api/v1/search{?q,location,page,start_at,end_at,distance,fuel,seats,min_seats,max_seats,max_price,miles_per_day,transmission,features,type,owner_id,filter,sort,ib,qs,car_club,nhs_offer}
Search for availability of vehicles
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
At least one of the q and location parameters must be supplied. If both are supplied the location values will be used
Example URI
- q
string(optional) Example: SE19 2PZAddress/postcode query (required if location not supplied)
- location
string(optional) Example: (51.51904, -0.11772)Lat,Lon to search around (required if q not supplied)
- page
number(optional) Example: 2Which page of results to fetch, default to 1
- start_at
datetime(optional) Example: 2016-10-01T10:00:00Start date/time of booking
- end_at
datetime(optional) Example: 2016-10-02T10:00:00End date/time of booking
- distance
number(optional) Example: 3Distance in miles to limit search to, defaults to 3, max of 10
- fuel
string(optional) Example: petrolFuel type to filter by
Choices:
petroldieselhybridelectriclpg- seats
number(optional) Example: 7The number of seats to filter by, exactly
- min_seats
number(optional) Example: 5The number of seats to filter by, at least
- max_seats
number(optional) Example: 2The maximum number of seats
- max_price
number(optional) Example: 50The maximum daily price of the car
- miles_per_day
number(optional) Example: 300The minimum miles per day of the car
- transmission
string(optional) Example: manualTransmission type to filter by
Choices:
manualautomaticsemiauto- features
string(optional) Example: 1,2Comma separates list of ids of features to require, see ‘List vehicle features’
- type
string(optional) Example: 2The vehicle type to filter by, see ‘List vehicle types’
- ib
string(optional) Example: YFilter instant book car
Choices:
YN- qs
string(optional) Example: YFilter QuickStart cars
Choices:
YN- car_club
string(optional) Example: YFilter Car club cars
Choices:
YN- nhs_offer
string(optional) Example: YFilter cars eligible for NHS Offer
Choices:
YN- owner_id
number(optional) Example: 21094The owner ID to filter results by
- filter
string(optional) Example: popularThe filter to apply to this search
Choices:
fast-respondershire-againpopularnew- sort
string(optional) Example: price_highThe field to sort the results by
Choices:
relevancypriceprice_highdistance
200Headers
Content-Type: application/jsonBody
[
{
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"location": {
"id": "873",
"city": "London",
"lat": 51.52811,
"lng": -0.17444,
"postcode_prefix": "NW8"
},
"price": {
"type": "full",
"price": 31.57
},
"distance": {
"miles": 1.67
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Bookings ¶
Bookings ¶
Booking QuotePOST/api/v1/bookings/quote
Get a Quote for a booking
This end point DOES NOT require authentication, however it IS still subject to rate limiting.
Request data:
-
vehicle_id - The vehicle, required
-
location_id - The location, required
-
start_at - The starting date/time of the booking, ISO 8601 date format, required
-
end_at - The ending date/time of the booking, ISO 8601 date format, required
-
voucher - The voucher code to apply to this booking quote, only valid if logged in, optional
Example URI
200Headers
Content-Type: application/jsonBody
{
"rental": 150,
"fee": 3,
"insurance": 20.57,
"total": 153.57,
"is_insurance_estimate": true,
"estimate_reason": "Profile is incomplete",
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"optional_extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"insurance_statements": [
"I have no previous convictions"
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"rental": {
"type": "number"
},
"fee": {
"type": "number"
},
"insurance": {
"type": "number"
},
"total": {
"type": "number"
},
"is_insurance_estimate": {
"type": "boolean",
"description": "Is this insurance cost an estimate, true if we don't have a completed \nprofile yet for this user to take their age/driving history in to account.\nThe insurance will never be lower, it can only ever increase."
},
"estimate_reason": {
"type": "string",
"description": "If the quote is an estimate, this is the reason for it being so"
},
"extras_cost": {
"type": "number"
},
"extras": {
"type": "array"
},
"optional_extras": {
"type": "array"
},
"insurance_statements": {
"type": "array"
}
}
}Create a booking requestPOST/api/v1/bookings
Request a booking
Request data:
-
vehicle_id - The vehicle, required
-
location_id - The location, required
-
start_at - The starting date/time of the booking, ISO 8601 date format, required
-
end_at - The ending date/time of the booking, ISO 8601 date format, required
-
stripe_token - The stripe token to update payment to update payment details with, optional
-
cardholder_name - The card holder name, if updating the card details, optional
-
voucher - The voucher code to apply to this booking quote, optional
-
message - Message to send the owner when the request is placed
Example URI
200Headers
Content-Type: application/jsonBody
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The booking reference"
},
"state": {
"type": "number",
"description": "The state of the booking, as a number"
},
"state_string": {
"type": "string",
"description": "The state of the booking, as a user friendly string"
},
"rental_cost": {
"type": "number",
"description": "The cost of the rental"
},
"fees": {
"type": "number",
"description": "The fees"
},
"insurance_cost": {
"type": "number",
"description": "The cost of the insurance"
},
"extras_cost": {
"type": "number",
"description": "The cost of any extras: vouchers, credit, charges etc"
},
"extras": {
"type": "array"
},
"owner_earnings": {
"type": "number",
"description": "The amount the owner will be paid for this booking"
},
"starts_at": {
"type": "string",
"description": "The start of the booking, ISO 8601 date format"
},
"ends_at": {
"type": "string",
"description": "The end of the booking, ISO 8601 date format"
},
"vehicle": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
},
"virtual_key": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"reviewed_by_driver": {
"type": "boolean",
"description": "Has this booking been reviewed by the driver"
},
"reviewed_by_owner": {
"type": "boolean",
"description": "Has this booking been reviewed by the owner"
},
"reviewable": {
"type": "boolean",
"description": "Can this booking be reviewed"
},
"accurate_location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
},
"lng": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
}
}
},
"payment": {
"type": "object",
"properties": {
"pending": {
"type": "boolean",
"description": "Is the payment for this booking still pending"
},
"intent": {
"type": "string",
"description": "The Stripe PaymentIntent needed to complete the payment, null if not applicable"
}
}
},
"pickup_fuel_manual": {
"type": "number"
},
"pickup_fuel_tracker": {
"type": "number"
},
"pickup_miles_manual": {
"type": "number"
},
"pickup_miles_tracker": {
"type": "number"
},
"picked_up": {
"type": "boolean"
},
"picked_up_at": {
"type": "string"
},
"pickup_fuel_present": {
"type": "boolean"
},
"pickup_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
},
"returned": {
"type": "boolean"
},
"returned_at": {
"type": "string"
},
"return_fuel_manual": {
"type": "number"
},
"return_fuel_tracker": {
"type": "number"
},
"return_miles_manual": {
"type": "number"
},
"return_miles_tracker": {
"type": "number"
},
"miles_driven_manual": {
"type": "number"
},
"miles_driven_tracker": {
"type": "number"
},
"return_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
}
}
}Booking paymentPOST/api/v1/bookings/{ref}/payment
Accept a booking
Request data:
- payment_intent - The payment intent that has been approved via Stripe
Example URI
- ref
string(required) Example: PF23-GX99-QD22
From DriverBody
{
"payment_intent": "pi_xxxxx_secret_xxxxxx"
}200Headers
Content-Type: application/jsonBody
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The booking reference"
},
"state": {
"type": "number",
"description": "The state of the booking, as a number"
},
"state_string": {
"type": "string",
"description": "The state of the booking, as a user friendly string"
},
"rental_cost": {
"type": "number",
"description": "The cost of the rental"
},
"fees": {
"type": "number",
"description": "The fees"
},
"insurance_cost": {
"type": "number",
"description": "The cost of the insurance"
},
"extras_cost": {
"type": "number",
"description": "The cost of any extras: vouchers, credit, charges etc"
},
"extras": {
"type": "array"
},
"owner_earnings": {
"type": "number",
"description": "The amount the owner will be paid for this booking"
},
"starts_at": {
"type": "string",
"description": "The start of the booking, ISO 8601 date format"
},
"ends_at": {
"type": "string",
"description": "The end of the booking, ISO 8601 date format"
},
"vehicle": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
},
"virtual_key": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"reviewed_by_driver": {
"type": "boolean",
"description": "Has this booking been reviewed by the driver"
},
"reviewed_by_owner": {
"type": "boolean",
"description": "Has this booking been reviewed by the owner"
},
"reviewable": {
"type": "boolean",
"description": "Can this booking be reviewed"
},
"accurate_location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
},
"lng": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
}
}
},
"payment": {
"type": "object",
"properties": {
"pending": {
"type": "boolean",
"description": "Is the payment for this booking still pending"
},
"intent": {
"type": "string",
"description": "The Stripe PaymentIntent needed to complete the payment, null if not applicable"
}
}
},
"pickup_fuel_manual": {
"type": "number"
},
"pickup_fuel_tracker": {
"type": "number"
},
"pickup_miles_manual": {
"type": "number"
},
"pickup_miles_tracker": {
"type": "number"
},
"picked_up": {
"type": "boolean"
},
"picked_up_at": {
"type": "string"
},
"pickup_fuel_present": {
"type": "boolean"
},
"pickup_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
},
"returned": {
"type": "boolean"
},
"returned_at": {
"type": "string"
},
"return_fuel_manual": {
"type": "number"
},
"return_fuel_tracker": {
"type": "number"
},
"return_miles_manual": {
"type": "number"
},
"return_miles_tracker": {
"type": "number"
},
"miles_driven_manual": {
"type": "number"
},
"miles_driven_tracker": {
"type": "number"
},
"return_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
}
}
}Retrieve list of bookingsGET/api/v1/bookings{?filter,state}
Get the list of booking for this user
Example URI
- filter
string(optional) Example: ownerWhich type of bookings to filter by, default to driver if not specified
Choices:
ownerdriver- state
string(optional) Example: completedWhat state bookings to show
Choices:
upcominghistorycompletedexpiredcancelleddeclined
200Headers
Content-Type: application/jsonBody
[
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Retrieve a bookingGET/api/v1/bookings/
Get a booking for this user
Example URI
200Headers
Content-Type: application/jsonBody
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The booking reference"
},
"state": {
"type": "number",
"description": "The state of the booking, as a number"
},
"state_string": {
"type": "string",
"description": "The state of the booking, as a user friendly string"
},
"rental_cost": {
"type": "number",
"description": "The cost of the rental"
},
"fees": {
"type": "number",
"description": "The fees"
},
"insurance_cost": {
"type": "number",
"description": "The cost of the insurance"
},
"extras_cost": {
"type": "number",
"description": "The cost of any extras: vouchers, credit, charges etc"
},
"extras": {
"type": "array"
},
"owner_earnings": {
"type": "number",
"description": "The amount the owner will be paid for this booking"
},
"starts_at": {
"type": "string",
"description": "The start of the booking, ISO 8601 date format"
},
"ends_at": {
"type": "string",
"description": "The end of the booking, ISO 8601 date format"
},
"vehicle": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
},
"virtual_key": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"reviewed_by_driver": {
"type": "boolean",
"description": "Has this booking been reviewed by the driver"
},
"reviewed_by_owner": {
"type": "boolean",
"description": "Has this booking been reviewed by the owner"
},
"reviewable": {
"type": "boolean",
"description": "Can this booking be reviewed"
},
"accurate_location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
},
"lng": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
}
}
},
"payment": {
"type": "object",
"properties": {
"pending": {
"type": "boolean",
"description": "Is the payment for this booking still pending"
},
"intent": {
"type": "string",
"description": "The Stripe PaymentIntent needed to complete the payment, null if not applicable"
}
}
},
"pickup_fuel_manual": {
"type": "number"
},
"pickup_fuel_tracker": {
"type": "number"
},
"pickup_miles_manual": {
"type": "number"
},
"pickup_miles_tracker": {
"type": "number"
},
"picked_up": {
"type": "boolean"
},
"picked_up_at": {
"type": "string"
},
"pickup_fuel_present": {
"type": "boolean"
},
"pickup_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
},
"returned": {
"type": "boolean"
},
"returned_at": {
"type": "string"
},
"return_fuel_manual": {
"type": "number"
},
"return_fuel_tracker": {
"type": "number"
},
"return_miles_manual": {
"type": "number"
},
"return_miles_tracker": {
"type": "number"
},
"miles_driven_manual": {
"type": "number"
},
"miles_driven_tracker": {
"type": "number"
},
"return_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
}
}
}Booking Actions ¶
Retrieve a bookingPUT/api/v1/bookings/
Update attributes of this booking
Request data:
- is_checked - (boolean) Has this booking been checked, optional
Example URI
200Headers
Content-Type: application/jsonBody
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The booking reference"
},
"state": {
"type": "number",
"description": "The state of the booking, as a number"
},
"state_string": {
"type": "string",
"description": "The state of the booking, as a user friendly string"
},
"rental_cost": {
"type": "number",
"description": "The cost of the rental"
},
"fees": {
"type": "number",
"description": "The fees"
},
"insurance_cost": {
"type": "number",
"description": "The cost of the insurance"
},
"extras_cost": {
"type": "number",
"description": "The cost of any extras: vouchers, credit, charges etc"
},
"extras": {
"type": "array"
},
"owner_earnings": {
"type": "number",
"description": "The amount the owner will be paid for this booking"
},
"starts_at": {
"type": "string",
"description": "The start of the booking, ISO 8601 date format"
},
"ends_at": {
"type": "string",
"description": "The end of the booking, ISO 8601 date format"
},
"vehicle": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
},
"virtual_key": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"reviewed_by_driver": {
"type": "boolean",
"description": "Has this booking been reviewed by the driver"
},
"reviewed_by_owner": {
"type": "boolean",
"description": "Has this booking been reviewed by the owner"
},
"reviewable": {
"type": "boolean",
"description": "Can this booking be reviewed"
},
"accurate_location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
},
"lng": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
}
}
},
"payment": {
"type": "object",
"properties": {
"pending": {
"type": "boolean",
"description": "Is the payment for this booking still pending"
},
"intent": {
"type": "string",
"description": "The Stripe PaymentIntent needed to complete the payment, null if not applicable"
}
}
},
"pickup_fuel_manual": {
"type": "number"
},
"pickup_fuel_tracker": {
"type": "number"
},
"pickup_miles_manual": {
"type": "number"
},
"pickup_miles_tracker": {
"type": "number"
},
"picked_up": {
"type": "boolean"
},
"picked_up_at": {
"type": "string"
},
"pickup_fuel_present": {
"type": "boolean"
},
"pickup_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
},
"returned": {
"type": "boolean"
},
"returned_at": {
"type": "string"
},
"return_fuel_manual": {
"type": "number"
},
"return_fuel_tracker": {
"type": "number"
},
"return_miles_manual": {
"type": "number"
},
"return_miles_tracker": {
"type": "number"
},
"miles_driven_manual": {
"type": "number"
},
"miles_driven_tracker": {
"type": "number"
},
"return_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
}
}
}Accept a bookingPOST/api/v1/bookings/{ref}/accept
Accept a booking
Example URI
- ref
string(required) Example: PF23-GX99-QD22
200Headers
Content-Type: application/jsonBody
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The booking reference"
},
"state": {
"type": "number",
"description": "The state of the booking, as a number"
},
"state_string": {
"type": "string",
"description": "The state of the booking, as a user friendly string"
},
"rental_cost": {
"type": "number",
"description": "The cost of the rental"
},
"fees": {
"type": "number",
"description": "The fees"
},
"insurance_cost": {
"type": "number",
"description": "The cost of the insurance"
},
"extras_cost": {
"type": "number",
"description": "The cost of any extras: vouchers, credit, charges etc"
},
"extras": {
"type": "array"
},
"owner_earnings": {
"type": "number",
"description": "The amount the owner will be paid for this booking"
},
"starts_at": {
"type": "string",
"description": "The start of the booking, ISO 8601 date format"
},
"ends_at": {
"type": "string",
"description": "The end of the booking, ISO 8601 date format"
},
"vehicle": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
},
"virtual_key": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"reviewed_by_driver": {
"type": "boolean",
"description": "Has this booking been reviewed by the driver"
},
"reviewed_by_owner": {
"type": "boolean",
"description": "Has this booking been reviewed by the owner"
},
"reviewable": {
"type": "boolean",
"description": "Can this booking be reviewed"
},
"accurate_location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
},
"lng": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
}
}
},
"payment": {
"type": "object",
"properties": {
"pending": {
"type": "boolean",
"description": "Is the payment for this booking still pending"
},
"intent": {
"type": "string",
"description": "The Stripe PaymentIntent needed to complete the payment, null if not applicable"
}
}
},
"pickup_fuel_manual": {
"type": "number"
},
"pickup_fuel_tracker": {
"type": "number"
},
"pickup_miles_manual": {
"type": "number"
},
"pickup_miles_tracker": {
"type": "number"
},
"picked_up": {
"type": "boolean"
},
"picked_up_at": {
"type": "string"
},
"pickup_fuel_present": {
"type": "boolean"
},
"pickup_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
},
"returned": {
"type": "boolean"
},
"returned_at": {
"type": "string"
},
"return_fuel_manual": {
"type": "number"
},
"return_fuel_tracker": {
"type": "number"
},
"return_miles_manual": {
"type": "number"
},
"return_miles_tracker": {
"type": "number"
},
"miles_driven_manual": {
"type": "number"
},
"miles_driven_tracker": {
"type": "number"
},
"return_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
}
}
}Decline a bookingPOST/api/v1/bookings/{ref}/decline
Decline a booking
Example URI
- ref
string(required) Example: PF23-GX99-QD22
200Headers
Content-Type: application/jsonBody
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The booking reference"
},
"state": {
"type": "number",
"description": "The state of the booking, as a number"
},
"state_string": {
"type": "string",
"description": "The state of the booking, as a user friendly string"
},
"rental_cost": {
"type": "number",
"description": "The cost of the rental"
},
"fees": {
"type": "number",
"description": "The fees"
},
"insurance_cost": {
"type": "number",
"description": "The cost of the insurance"
},
"extras_cost": {
"type": "number",
"description": "The cost of any extras: vouchers, credit, charges etc"
},
"extras": {
"type": "array"
},
"owner_earnings": {
"type": "number",
"description": "The amount the owner will be paid for this booking"
},
"starts_at": {
"type": "string",
"description": "The start of the booking, ISO 8601 date format"
},
"ends_at": {
"type": "string",
"description": "The end of the booking, ISO 8601 date format"
},
"vehicle": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
},
"virtual_key": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"reviewed_by_driver": {
"type": "boolean",
"description": "Has this booking been reviewed by the driver"
},
"reviewed_by_owner": {
"type": "boolean",
"description": "Has this booking been reviewed by the owner"
},
"reviewable": {
"type": "boolean",
"description": "Can this booking be reviewed"
},
"accurate_location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
},
"lng": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
}
}
},
"payment": {
"type": "object",
"properties": {
"pending": {
"type": "boolean",
"description": "Is the payment for this booking still pending"
},
"intent": {
"type": "string",
"description": "The Stripe PaymentIntent needed to complete the payment, null if not applicable"
}
}
},
"pickup_fuel_manual": {
"type": "number"
},
"pickup_fuel_tracker": {
"type": "number"
},
"pickup_miles_manual": {
"type": "number"
},
"pickup_miles_tracker": {
"type": "number"
},
"picked_up": {
"type": "boolean"
},
"picked_up_at": {
"type": "string"
},
"pickup_fuel_present": {
"type": "boolean"
},
"pickup_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
},
"returned": {
"type": "boolean"
},
"returned_at": {
"type": "string"
},
"return_fuel_manual": {
"type": "number"
},
"return_fuel_tracker": {
"type": "number"
},
"return_miles_manual": {
"type": "number"
},
"return_miles_tracker": {
"type": "number"
},
"miles_driven_manual": {
"type": "number"
},
"miles_driven_tracker": {
"type": "number"
},
"return_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
}
}
}Cancel a bookingPOST/api/v1/bookings/{ref}/cancel
Cancel a booking
Example URI
- ref
string(required) Example: PF23-GX99-QD22
200Headers
Content-Type: application/jsonBody
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The booking reference"
},
"state": {
"type": "number",
"description": "The state of the booking, as a number"
},
"state_string": {
"type": "string",
"description": "The state of the booking, as a user friendly string"
},
"rental_cost": {
"type": "number",
"description": "The cost of the rental"
},
"fees": {
"type": "number",
"description": "The fees"
},
"insurance_cost": {
"type": "number",
"description": "The cost of the insurance"
},
"extras_cost": {
"type": "number",
"description": "The cost of any extras: vouchers, credit, charges etc"
},
"extras": {
"type": "array"
},
"owner_earnings": {
"type": "number",
"description": "The amount the owner will be paid for this booking"
},
"starts_at": {
"type": "string",
"description": "The start of the booking, ISO 8601 date format"
},
"ends_at": {
"type": "string",
"description": "The end of the booking, ISO 8601 date format"
},
"vehicle": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
},
"virtual_key": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"reviewed_by_driver": {
"type": "boolean",
"description": "Has this booking been reviewed by the driver"
},
"reviewed_by_owner": {
"type": "boolean",
"description": "Has this booking been reviewed by the owner"
},
"reviewable": {
"type": "boolean",
"description": "Can this booking be reviewed"
},
"accurate_location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
},
"lng": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
}
}
},
"payment": {
"type": "object",
"properties": {
"pending": {
"type": "boolean",
"description": "Is the payment for this booking still pending"
},
"intent": {
"type": "string",
"description": "The Stripe PaymentIntent needed to complete the payment, null if not applicable"
}
}
},
"pickup_fuel_manual": {
"type": "number"
},
"pickup_fuel_tracker": {
"type": "number"
},
"pickup_miles_manual": {
"type": "number"
},
"pickup_miles_tracker": {
"type": "number"
},
"picked_up": {
"type": "boolean"
},
"picked_up_at": {
"type": "string"
},
"pickup_fuel_present": {
"type": "boolean"
},
"pickup_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
},
"returned": {
"type": "boolean"
},
"returned_at": {
"type": "string"
},
"return_fuel_manual": {
"type": "number"
},
"return_fuel_tracker": {
"type": "number"
},
"return_miles_manual": {
"type": "number"
},
"return_miles_tracker": {
"type": "number"
},
"miles_driven_manual": {
"type": "number"
},
"miles_driven_tracker": {
"type": "number"
},
"return_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
}
}
}Price an extension for a bookingGET/api/v1/bookings/extend?{new_end}
Price an extension
Example URI
- new_end
string(required) Example: 2018-10-01T12:00:00ZThe new end time, in ISO8601 format
200Headers
Content-Type: application/jsonBody
{
"rental": 150,
"fee": 3,
"insurance": 20.57,
"total": 153.57,
"is_insurance_estimate": true,
"estimate_reason": "Profile is incomplete",
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"optional_extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"insurance_statements": [
"I have no previous convictions"
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"rental": {
"type": "number"
},
"fee": {
"type": "number"
},
"insurance": {
"type": "number"
},
"total": {
"type": "number"
},
"is_insurance_estimate": {
"type": "boolean",
"description": "Is this insurance cost an estimate, true if we don't have a completed \nprofile yet for this user to take their age/driving history in to account.\nThe insurance will never be lower, it can only ever increase."
},
"estimate_reason": {
"type": "string",
"description": "If the quote is an estimate, this is the reason for it being so"
},
"extras_cost": {
"type": "number"
},
"extras": {
"type": "array"
},
"optional_extras": {
"type": "array"
},
"insurance_statements": {
"type": "array"
}
}
}400Headers
Content-Type: application/jsonBody
{
"success": false,
"error": "Booking cannot be extended"
}Request an extension for a bookingPOST/api/v1/bookings/extend?{new_end}
Request an extension
If the vehicle is instant book the extension will be instantly accepted
Example URI
- new_end
string(required) Example: 2018-10-01T12:00:00ZThe new end time, in ISO8601 format
200Headers
Content-Type: application/jsonBody
{
"ref": "WL62-LC46-TY42",
"state": 64,
"state_string": "Cancelled",
"rental_cost": 130,
"fees": 3,
"insurance_cost": 19.348,
"extras_cost": -20,
"extras": [
{
"key": "driver_discount",
"amount": -20,
"description": "Voucher (TRACKER)"
}
],
"owner_earnings": 9.6,
"starts_at": "2017-06-01T12:00:00+00:00",
"ends_at": "2017-06-02T12:00:00+00:00",
"picked_up": true,
"picked_up_at": "2021-06-01T12:00:00+00:00",
"returned": true,
"returned_at": "2021-06-01T12:00:00+00:00",
"vehicle": {
"id": 12346,
"published": true,
"year": 2014,
"make": "Audi",
"model": "A4 Avant TDI",
"title": "Audi A4 Avant TDI",
"colour": "red",
"seats": 4,
"miles_per_day": 300,
"insurance_group": 39,
"engine_cc": 1984,
"rating": 4.7,
"rating_count": 3,
"instant_book": true,
"instant_book_status": "none",
"fuel": "Petrol",
"type": "Executive / Saloon",
"transmission": "Manual",
"description": "Economic but quick, you will love this car",
"vrm": "GC10AAA",
"prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"suggested_prices": {
"hourly": 8,
"daily": 29,
"weekly": 110
},
"images": [
{
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
}
],
"owner": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
},
"virtual_key": {
"present": true,
"type": "ota",
"id": 130111
},
"reviewed_by_driver": false,
"reviewed_by_owner": false,
"reviewable": true,
"accurate_location": {
"lat": 51.50093,
"lng": 0.078742
},
"payment": {
"pending": false,
"intent": "pi_xxxxxx"
},
"pickup_fuel_manual": 50,
"pickup_fuel_tracker": 50,
"pickup_miles_manual": 8965,
"pickup_miles_tracker": 8965,
"pickup_fuel_present": true,
"pickup_location": {
"lat": 51.5,
"ln": 0.078
},
"return_fuel_manual": 50,
"return_fuel_tracker": 50,
"return_miles_manual": 8965,
"return_miles_tracker": 8965,
"miles_driven_manual": 165,
"miles_driven_tracker": 165,
"return_location": {
"lat": 51.5,
"ln": 0.078
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The booking reference"
},
"state": {
"type": "number",
"description": "The state of the booking, as a number"
},
"state_string": {
"type": "string",
"description": "The state of the booking, as a user friendly string"
},
"rental_cost": {
"type": "number",
"description": "The cost of the rental"
},
"fees": {
"type": "number",
"description": "The fees"
},
"insurance_cost": {
"type": "number",
"description": "The cost of the insurance"
},
"extras_cost": {
"type": "number",
"description": "The cost of any extras: vouchers, credit, charges etc"
},
"extras": {
"type": "array"
},
"owner_earnings": {
"type": "number",
"description": "The amount the owner will be paid for this booking"
},
"starts_at": {
"type": "string",
"description": "The start of the booking, ISO 8601 date format"
},
"ends_at": {
"type": "string",
"description": "The end of the booking, ISO 8601 date format"
},
"vehicle": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"published": {
"type": "boolean",
"description": "Only visible on your own vehicles"
},
"year": {
"type": "number"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"title": {
"type": "string"
},
"colour": {
"type": "string"
},
"seats": {
"type": "number"
},
"miles_per_day": {
"type": "number"
},
"insurance_group": {
"type": "number"
},
"engine_cc": {
"type": "number"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"instant_book": {
"type": "boolean"
},
"instant_book_status": {
"type": "string",
"enum": [
"none",
"requested",
"active",
"inactive"
]
},
"fuel": {
"type": "string",
"enum": [
"Petrol",
"Diesel",
"Lpg",
"Electric",
"Hybrid"
]
},
"type": {
"type": "string"
},
"transmission": {
"type": "string",
"enum": [
"Manual",
"Automatic",
"Semiauto"
]
},
"description": {
"type": "string",
"description": "Owner's description"
},
"vrm": {
"type": "string"
},
"prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"suggested_prices": {
"type": "object",
"properties": {
"hourly": {
"type": "number"
},
"daily": {
"type": "number"
},
"weekly": {
"type": "number"
}
}
},
"images": {
"type": "array",
"description": "In search results this may only contain the vehicles primary image"
},
"owner": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
},
"virtual_key": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
},
"reviewed_by_driver": {
"type": "boolean",
"description": "Has this booking been reviewed by the driver"
},
"reviewed_by_owner": {
"type": "boolean",
"description": "Has this booking been reviewed by the owner"
},
"reviewable": {
"type": "boolean",
"description": "Can this booking be reviewed"
},
"accurate_location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
},
"lng": {
"type": "number",
"description": "'null' if driver shouldn't be able to see the location right now"
}
}
},
"payment": {
"type": "object",
"properties": {
"pending": {
"type": "boolean",
"description": "Is the payment for this booking still pending"
},
"intent": {
"type": "string",
"description": "The Stripe PaymentIntent needed to complete the payment, null if not applicable"
}
}
},
"pickup_fuel_manual": {
"type": "number"
},
"pickup_fuel_tracker": {
"type": "number"
},
"pickup_miles_manual": {
"type": "number"
},
"pickup_miles_tracker": {
"type": "number"
},
"picked_up": {
"type": "boolean"
},
"picked_up_at": {
"type": "string"
},
"pickup_fuel_present": {
"type": "boolean"
},
"pickup_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
},
"returned": {
"type": "boolean"
},
"returned_at": {
"type": "string"
},
"return_fuel_manual": {
"type": "number"
},
"return_fuel_tracker": {
"type": "number"
},
"return_miles_manual": {
"type": "number"
},
"return_miles_tracker": {
"type": "number"
},
"miles_driven_manual": {
"type": "number"
},
"miles_driven_tracker": {
"type": "number"
},
"return_location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"ln": {
"type": "number"
}
}
}
}
}Review a bookingPOST/api/v1/bookings/{ref}/review
Submit a review for a booking
Reqeust data:
-
vehicle - The ratings for the vehicle, 1-5, required for driver
-
owner - The ratings for the owner, 1-5, required for driver
-
driver - The ratings for the driver, 1-5, required for owner
-
hiyacar - The ratings for HiyaCar, 1-5, required
-
review - The text review, 1,000 characters max, optional
-
private_review - Private feedback for hiyacar only, optional
Example URI
- ref
string(required) Example: `PF23-GX99-QD22` {string}
From DriverBody
{
"vehicle": 5,
"owner": 5,
"hiyacar": 5,
"review": "The experience was great".
"private_review": "The app worked great"
}From OwnerBody
{
"driver": 5,
"hiyacar": 5,
"review": "The experience was great",
"private_review": "The app worked great"
}200Headers
Content-Type: application/jsonBody
{
success: true
}Booking Agreement ¶
Retrive latest condition imagesGET/api/v1/bookings/{ref}/agreement/images
Return the latest condition images for this vehicle
Example URI
- ref
string(required) Example: `PF23-GX99-QD22` {string}
200Headers
Content-Type: application/jsonBody
[
{
"id": 1,
"type": "front",
"created_at": "2017-06-01T12:00:00+00:00",
"urls": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg"
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Add a new condition imagePOST/api/v1/bookings/{ref}/agreement/images
Upload a new vehicle condition image
Multipart form fields:
-
image - The image, required
-
type - one of
front,left,right,rear,interior,odometer,fuel, ordetail), required
Example URI
- ref
string(required) Example: `AB12-CD34-EF45` {string,required}
Headers
Content-Type: multipart/form-data
Content-Length: $requestlenBody
--AaB03x
content-disposition: form-data; name="type"
odometer
--AaB03x
content-disposition: form-data; name="image"; filename="$filename"
Content-Type: $mimetype
Content-Transfer-Encoding: binary
$binarydata
--AaB03x--200Headers
Content-Type: application/jsonBody
{
success: true
result: {
id: 66
}
}Complete pickup of this vehiclePOST/api/v1/bookings/{ref}/agreement/pickup
Submit the condition of this vehicle and complete the pickup process
Request data:
-
miles - the odometer reading at pickup, required
-
condition - free-form text field describing any other detail, optional
-
images - array of condition images, each object must either contain and
idfield, or atype(one offront,left,right,rear,interior,odometer,fuel, ordetail) anddata(base64 encoded image data) field, required
Example URI
- ref
string(required) Example: `PF23-GX99-QD22` {string}
Body
{
"miles": 17656,
"condition": "small scratch on bonnet above number plate",
"images": [
{
"id": 57
},
{
"type": "front",
"data": "xjhdbgtjksdtg"
}
]
}200Headers
Content-Type: application/jsonBody
{
success: true
}Complete dropoff of this vehiclePOST/api/v1/bookings/{ref}/agreement/dropoff
Submit the condition of this vehicle and complete the dropoff process
Request data:
-
miles - the odometer reading at pickup, required
-
condition - free-form text field describing any other detail, optional
-
images - array of condition images, each object must either contain and
idfield, or atype(one offront,left,right,rear,interior,odometer,fuel, ordetail) anddata(base64 encoded image data) field, required
Example URI
- ref
string(required) Example: `PF23-GX99-QD22` {string}
Body
{
"miles": 17656,
"condition": "small scratch on bonnet above number plate",
"images": [
{
"id": 57
},
{
"type": "front",
"data": "xjhdbgtjksdtg"
}
]
}200Headers
Content-Type: application/jsonBody
{
success: true
}Download signed hiya agreementGET/api/v1/bookings/agreement/pdf
Download the signed hiya agreement.
Will only download a signed agreement. A 404 will be thrown if the agreement isn’t signed
Example URI
404Headers
Content-Type: application/jsonBody
{
"success": false,
"error": "Not Found",
"details": "No signed agreement available"
}200Headers
Content-Type: application/pdfMessaging ¶
Messaging
Message Threads ¶
Get list of message threadsGET/api/v1/message_threads{?archived}
Get list of message threads
Example URI
- archived
string(required) Example: trueWhether to include archived messages in the response, defaults to false, optional
200Headers
Content-Type: application/jsonBody
[
{
"id": 771,
"created_at": "2017-06-01T12:00:00+00:00",
"last_message_at": "2017-06-01T12:00:00+00:00",
"last_message": "truncated content of last message",
"is_unread": true,
"members": [
{
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
]
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Get a thread of messagesGET/api/v1/message_threads/{id}{?since}
Get the thread
Example URI
- id
number(required) Example: 777- since
number(required) Example: 1400The Message ID to begin to show messages from
200Headers
Content-Type: application/jsonBody
[
{
"id": 1425,
"thread_id": 383,
"body": "the message text here",
"created_at": "2017-06-01T12:00:00+00:00",
"sender": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Archive a message threadDELETE/api/v1/message_threads/{id}
Archive the thread
Example URI
- id
number(required) Example: 777
403200Headers
Content-Type: application/jsonBody
{
success: true
}Get a single messageGET/api/v1/messages/{id}
Get a single message
Example URI
- id
number(required) Example: 1499
200Headers
Content-Type: application/jsonBody
{
"id": 1425,
"thread_id": 383,
"body": "the message text here",
"created_at": "2017-06-01T12:00:00+00:00",
"sender": {
"id": 21094,
"first_name": "Bob",
"last_name": "A",
"bio": "I love driving cars ...",
"rating": 4.7,
"rating_count": 2,
"join_date": "2016-10-08",
"primary_location": {
"id": "873",
"city": "London",
"postcode_prefix": "NW8"
},
"profile_image": {
"300": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"600": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"1200": "https://images.hiyacar.co.uk/xxxxx/xxxxx.jpg",
"id": 1264,
"primary": false
},
"live_cars_count": 1,
"hiyas": 22,
"owner_response_time": 5006,
"badges": [
{
"name": "top_owner",
"detail": "some detail"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"thread_id": {
"type": "number"
},
"body": {
"type": "string"
},
"created_at": {
"type": "string",
"description": "Created date/time of this message, ISO 8601 date format"
},
"sender": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string",
"description": "Only shows first character for users other than yourself"
},
"bio": {
"type": "string"
},
"rating": {
"type": "number"
},
"rating_count": {
"type": "number"
},
"join_date": {
"type": "string"
},
"primary_location": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"postcode_prefix": {
"type": "string"
}
}
},
"profile_image": {
"type": "object",
"properties": {
"300": {
"type": "string"
},
"600": {
"type": "string"
},
"1200": {
"type": "string"
},
"id": {
"type": "number"
},
"primary": {
"type": "boolean"
}
}
},
"live_cars_count": {
"type": "number"
},
"hiyas": {
"type": "number"
},
"owner_response_time": {
"type": "number",
"description": "Average reponse time in seconds"
},
"badges": {
"type": "array"
}
}
}
}
}Post a message to a threadPOST/api/v1/messages
Post a message to a thread
thread_id - The thread to post a message to, optional, required without booking_ref or user_id booking_ref - The booking ref to create a message from from, required without thread_id or user_id user_id - The user id to create a message from from, required without thread_id or booking_ref body parameter is required in the JSON body
Example URI
from bookingBody
{
"booking_ref": "UU76-RD54-PC34",
"body": "The message text here"
}from threadBody
{
"thread_id": 775,
"body": "The message text here"
}for userBody
{
"user_id": 22222,
"body": "The message text here"
}200Headers
Content-Type: application/jsonBody
{
"success": true
}Push Notification Tokens ¶
Register a device token ¶
Register a device tokenPOST/api/v1/push/token
Register a push notification device token against this user
Request data:
-
device_token - The device token. String, required
-
device_type - What kind of device is this. String (‘ios’ or ‘android’), required
Example URI
Body
{
"device_token": "kajegnviuehmvinhsdrkgunysdkrkjhgkjgkjhgkjgkgykjjbuymsrkbdyruybnjsdrbdrurysdfhdfj",
"device_type": "android"
}200Headers
Content-Type: application/jsonBody
{
"success": true
}Remove a push token ¶
Remove a push tokenDELETE/api/v1/push/token
Delete a push token
Request data:
-
device_token - The device token. String, required
-
device_type - What kind of device is this. String (‘ios’ or ‘android’), required
Example URI
Body
{
"device_token": "kajegnviuehmvinhsdrkgunysdkrkjhgkjgkjhgkjgkgykjjbuymsrkbdyruybnjsdrbdrurysdfhdfj",
"device_type": "android"
}200Headers
Content-Type: application/jsonBody
{
"success": true
}Misc ¶
Quickstart
All things QuickStart
Acquire a device access token ¶
Acquire a device access tokenPOST/api/v1/quickstart/token
Convert a KC1 deviceToken in to a device accessToken
Request data:
- access_device_token - The mobile device token, required
Example URI
Body
{
"access_device_token": "xxxx"
}200Headers
Content-Type: application/jsonBody
{
"device_token": "xxx"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"device_token": {
"type": "string"
}
}
}Open a new session ¶
Open a new sessionPOST/api/v1/quickstart/session
Open a new device session with KC2
Request data:
- session_request_token - The session request token, required
Example URI
Headers
Content-Type: application/jsonBody
{
"session_request_token": "xxx"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"session_request_token": {
"type": "string"
}
}
}200Headers
Content-Type: application/jsonBody
{
"session_request_token": "xxx"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"session_request_token": {
"type": "string"
}
}
}Fetch key for this booking ¶
Fetch key for this bookingPOST/api/v1/bookings/virtualKey
Fetch a key for this booking
Example URI
Body
{
"access_device_token": "xxxxxxxx"
}200Headers
Content-Type: application/jsonBody
{
"present": true,
"type": "ota",
"id": 130111
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"type": {
"type": "string"
},
"id": {
"type": "number"
}
}
}Face Recognition ¶
Check a face image ¶
Check a face imagePOST/api/v1/faces/recognition
Check a face image against licence/profile
Request data:
-
booking_ref - The booking reference. String, optional
-
action - The action that triggered this recognition. String, required
-
image - Base64 encoded profile image data. String required
Example URI
Body
{
"booking_ref": "AA11-BB22-CC33",
"action": "pickup",
"image": "/...."
}200Headers
Content-Type: application/jsonBody
{
"success": true,
"result": {
"faces_id": 4,
"scores": {
"licence": "pass",
"profile": "pass"
},
"override": false
}
}200Headers
Content-Type: application/jsonBody
{
"success": true,
"result": {
"faces_id": 4,
"scores": {
"licence": "fail",
"profile": "fail"
},
"override": true
}
}