All calls to the API need to start with the appropriate base URL:
Live
https://api.comparethemanandvan.co.uk
Sandbox
https://api.beta.comparethemanandvan.co.uk
Our sandbox domain returns dummy data and won't send emails or text messages. You can use it to test all functions of the API safely.
To access our API you'll need to send your key in the header of every request.
cmv-api-key: {{key}}
GET /move-enquiries/
Parameter | Default | Format / Options | Description |
---|---|---|---|
date-type | submitted* | submitted, move-date | |
from | YYYY-MM-DD HH:MM | ||
to | YYYY-MM-DD HH:MM |
* submitted is a datetime that's updated every time the move enquiry is updated.
GET /move-enquiry/[move-id]
POST /create-move-enquiry/
Parameter | Default | Format / Options | Description |
---|---|---|---|
collection_postcode Required |
|||
collection_street_address_1 Required |
|||
collection_city Required |
|||
collection_stairs |
0 |
0 = no stairs s1 = 1 flight s2 = 2 flights s3 = 3 flights s4 = 4 flights s5 = 5 flights s6 = 6 flights s7 = 7 flights s8+ = 8 or more flights l1 = lift |
|
delivery_postcode Required |
|||
delivery_street_address_1 Required |
|||
delivery_city Required |
|||
delivery_stairs |
0 |
0 = no stairs s1 = 1 flight s2 = 2 flights s3 = 3 flights s4 = 4 flights s5 = 5 flights s6 = 6 flights s7 = 7 flights s8+ = 8 or more flights l1 = lift |
|
move_date_time Required |
YYYY-MM-DD HH:MM | ||
van_size |
xlwb_van | small_van, medium_van, xlwb_van, luton_van | |
van_time | 2 | 0.5 - 12 | |
helpers_required | 0 | 0 - 3 | |
marketing_consent | 0 |
0 = No 1 = Yes |
|
customer_name Required |
|||
customer_email Required |
|||
customer_phone Required |
|||
payg_item_description | A brief description of the items being moved and any additional contact numbers. | ||
enquiry_notes | Notes seen by CMV staff only |
POST /update-move-enquiry/
Parameter | Default | Format / Options | Description |
---|---|---|---|
id | The ID of the move enquiry you'd like to update | ||
Pass any of the parameters from the create move enquiry endpoint to update the enquiry |
GET /quotes/[move-id]
GET /generate-quotes/[move-id]
Generate quotes for the move enquiry. Returns all quotes.
POST /create-quote/
Parameter | Default | Format / Options | Description |
---|---|---|---|
move_id Required |
|||
driver_id Required |
|||
calculated_distance |
If not specificed will be calculated from the move enquiry details | The total driving instance in meters | |
driving_time |
If not specificed will be calculated from the move enquiry details | Estimated driving time in seconds | |
driver_hourly_charge |
If not specified will be calculated from the drivers pricing | How much the driver charges per hour | |
calculated_hourly_charge |
If not specified will be calculated from the drivers pricing |
|
The driver's hourly charge multiplied by the amount of time the customer requires the van for |
pay_to_driver | If not specified will be calculated from the drivers pricing | The amount the driver earns from the job | |
quote_total |
If not specified will be calculated from the drivers pricing | ||
quote_depsoit |
If not specified will be calculated from the drivers pricing |
POST /update-quote/
Parameter | Default | Format / Options | Description |
---|---|---|---|
id | The ID or UID of the quote you'd like to update | ||
Pass any of the parameters from the create quote endpoint to update the enquiry |
POST /book-quote/
Parameter | Default | Format / Options | Description |
---|---|---|---|
quote_uid Required |
The ID or UID of the quote you'd like to book | ||
payment_gateway Required |
|||
transaction_id Required |
As provided by the payment gateway | ||
amount_paid Required |
Float (pounds and pence) | ||
card_type Required |
|||
notes_public | Visible to the driver and customer | ||
notes_private | Visible only to CMV staff and via the API |
GET /bookings/
Parameter | Default | Format / Options | Description |
---|---|---|---|
date-type | move-date | move-date, booking-date, last-updated |
Search bookings either by the date they were made, the date the move is taking place, or when they were last updated. |
from | The beginning of CMV | YYYY-MM-DD HH:MM | |
to | Today's date | YYYY-MM-DD HH:MM |
GET /booking/[booking-id]
POST /create-booking/
Will create a move enquiry and a quote, then book it.
Parameter | Default | Format / Options | Description |
---|---|---|---|
collection_postcode Required |
|||
collection_street_address_1 Required |
|||
collection_city Required |
|||
collection_stairs |
0 |
0 = no stairs s1 = 1 flight s2 = 2 flights s3 = 3 flights s4 = 4 flights s5 = 5 flights s6 = 6 flights s7 = 7 flights s8+ = 8 or more flights l1 = lift |
|
delivery_postcode Required |
|||
delivery_street_address_1 Required |
|||
delivery_city Required |
|||
delivery_stairs |
0 |
0 = no stairs s1 = 1 flight s2 = 2 flights s3 = 3 flights s4 = 4 flights s5 = 5 flights s6 = 6 flights s7 = 7 flights s8+ = 8 or more flights l1 = lift |
|
move_date_time Required |
YYYY-MM-DD HH:MM | ||
van_size |
xlwb_van | small_van, medium_van, xlwb_van, luton_van | |
van_time | 2 | 0.5 - 12 | |
helpers_required | 0 | 0 - 3 | |
marketing_consent | 0 |
0 = No 1 = Yes |
|
customer_name Required |
|||
customer_email Required |
|||
customer_phone Required |
|||
payg_item_description | A brief description of the items being moved and any additional contact numbers. | ||
enquiry_notes | Notes seen by CMV staff only | ||
driver_id Required |
|||
calculated_distance |
If not specificed will be calculated from the move enquiry details | The total driving instance in meters | |
driving_time |
If not specificed will be calculated from the move enquiry details | Estimated driving time in seconds | |
driver_hourly_charge |
If not specified will be calculated from the drivers pricing | How much the driver charges per hour | |
calculated_hourly_charge |
If not specified will be calculated from the drivers pricing |
|
The driver's hourly charge multiplied by the amount of time the customer requires the van for |
pay_to_driver | If not specified will be calculated from the drivers pricing | The amount the driver earns from the job | |
quote_total |
If not specified will be calculated from the drivers pricing | ||
quote_depsoit |
If not specified will be calculated from the drivers pricing | ||
payment_gateway Required |
|||
transaction_id Required |
As provided by the payment gateway | ||
amount_paid Required |
Float (pounds and pence) | ||
card_type Required |
|||
notes_public | Visible to the driver and customer | ||
notes_private | Visible only to CMV staff and via the API |
POST /update-booking/
If you change the 'driver_id' the site will email the customer to tell them their driver has been changed.
Parameter | Default | Format / Options | Description |
---|---|---|---|
id Required |
The ID of the booking to update | ||
Pass any of the parameters from the create move enquiry, create quote or book quote endpoints to update the booking |
POST /reject-booking/
When a driver can't attend a booking it is reallocated. The job is automatically emailed out to all active drivers of equal badge level (bronze, silver, gold) and our booking cover drivers.
Parameter | Default | Format / Options | Description |
---|---|---|---|
id Required |
The ID of the booking | ||
reason Required |
The reason the driver can't attend the booking |
GET /delete-booking/[booking-id]
The booking is deleted from our system as if it were never made.
GET /cancel-booking/[booking-id]
The booking won't be attended by a driver, but the job remains in our system.
GET /drivers/
Lists all active or booking cover drivers.
GET /driver/[driver-id]