Get booking id
[ POST ] order/bookingID
Look up the booking_id for a car. Use this when you have a VIN, car id, registration number or Navision booking number and need the booking that car belongs to.
The returned number is the same booking_id you get from POST order and use with GET booking.
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
ID |
string or int | Yes | Value to look up. Must match the column in fields.type. |
"WAUZZZ8K9DA123456" |
fields.type |
string | Yes | Column on the car to match against ID. One of id, car_number, navision_booking_number, reg_no. |
"car_number" |
Example request
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'YOUR-BASEURL/order/bookingID',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"ID": "WAUZZZ8K9DA123456",
"fields": {
"type": "car_number"
}
}',
CURLOPT_HTTPHEADER => [
'X-Api-Key: YOUR-API-KEY',
'Content-Type: application/json'
],
]);
$response = curl_exec($ch);
curl_close($ch);
const axios = require('axios');
const postData = {
ID: 'WAUZZZ8K9DA123456',
fields: {
type: 'car_number'
}
};
axios.post('YOUR-BASEURL/order/bookingID', postData, {
headers: {
'X-Api-Key': 'YOUR-API-KEY'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});