NAV
shell php javascript

Introduction

Welcome to the Robins & Day API! You can use our API to access various Robins & Day data, such as submitting leads, searching used stock, new stock.

Authentication

To authorize, use this code:

curl --request POST \
  --url https://api.robinsandday.co.uk/oauth/token \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form grant_type=password \
  --form client_id=CLIENT_ID \
  --form client_secret=CLIENT_SECRET \
  --form username=YOUR_USERNAME \
  --form 'password=YOUR_PASSWORD' \
  --form scope=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/oauth/token",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"grant_type\"\r\n\r\npassword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"client_id\"\r\n\r\nCLIENT_ID\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"client_secret\"\r\n\r\nCLIENT_SECRET\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"username\"\r\n\r\nYOUR_USERNAME\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\nYOUR_PASSWORD\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
  CURLOPT_HTTPHEADER => array(
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = new FormData();
data.append("grant_type", "password");
data.append("client_id", "CLIENT_ID");
data.append("client_secret", "CLIENT_SECRET");
data.append("username", "YOUR_USERNAME");
data.append("password", "YOUR_PASSWORD");
data.append("scope", "");

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.robinsandday.co.uk/oauth/token");

xhr.send(data);

Make sure to replace CLIENT_ID, CLIENT_SECRET, YOUR_USERNAME, YOUR_PASSWORD with your API access details.

The above command returns JSON structured like this:

{
    "token_type": "Bearer",
    "expires_in": 31622400,
    "access_token": "YOUR_ACCESS_TOKEN",
    "refresh_token": "YOUR_REFRESH_TOKEN"
}

Please email your Robins & Day contact to request access to our API.

We have a staging and a production site for the API. Credentials for the staging API will not work on the live API, and vice versa.

The staging API is:

The live API is:

Dealers

Get All Dealers

curl --request GET \
  --url https://api.robinsandday.co.uk/api/dealers \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/api/dealers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR_ACCESS_TOKEN"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.robinsandday.co.uk/api/dealers");
xhr.setRequestHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "used_id": 1,
        "dealer_images_id": 0,
        "related_ds_dealer": 0,
        "brand": "randd",
        "is_edc_dealer": "Y",
        "dealer_code": "01234",
        "salesforce_dealer_code": "01234",
        "salesforce_brand": "peugeot",
        "salesforce_active": 1,
        "codeweavers_key": "Robins & Day Example Dealer",
        "gforces_valuation_key": "",
        "live_chat_id": "",
        "cao_sms_id": null,
        "cao_chat_id": null,
        "cao_pid": null,
        "cao_rid": null,
        "old_live_chat_id": "",
        "autotrader_id": 12345,
        "autotrader_active": "Y",
        "autotrader_edc_id": null,
        "autotrader_edc_active": "N",
        "autorola_id": "",
        "name": "Robins & Day Example Dealer",
        "used_name": "Robins & Day Example Dealer",
        "used_name_short": "Example Dealer",
        "slug": "example-dealer",
        "full_slug": "assured-example-dealer",
        "email": "example-dealer@robinsandday.co.uk",
        "used_email": "example-dealer@robinsandday.co.uk",
        "regional_manager_email": null,
        "lat": "51.00000",
        "lng": "0.100000",
        "address": "Example Park, Example Road",
        "town": "Example Town",
        "postcode": "EX1 4MP",
        "mediahawk_number": 1234,
        "tel_general": "01234 567890",
        "tel_new": "01234 567890",
        "tel_used": "01234 567890",
        "tel_service": "",
        "tel_parts": "",
        "tel_fax": null,
        "tel_car_gurus": "",
        "opening_sales_mon_to_fri": "8:30 - 19:00",
        "opening_sales_sat": "9:00 - 17:30",
        "opening_sales_sun": "11:00 - 17:00",
        "opening_sales_display": "Y",
        "opening_service_mon_to_fri": "",
        "opening_service_sat": "",
        "opening_service_sun": "",
        "opening_service_display": "N",
        "opening_parts_mon_to_fri": "",
        "opening_parts_sat": "",
        "opening_parts_sun": "",
        "opening_parts_display": "N",
        "offers_new": "N",
        "offers_used": "Y",
        "offers_business": "N",
        "offers_servicing": "N",
        "offers_parts": "N",
        "offers_parts_hub": "N",
        "offers_osb": "N",
        "dealer_map_group_id": null,
        "image": null,
        "created_at": "2019-08-30 14:33:52",
        "updated_at": "2019-12-16 16:04:17",
        "closed": 0,
        "ebay_id": "",
        "facebook_url": "https:\/\/www.facebook.com\/robinsandday\/",
        "special_announcement": 0,
        "special_announcement_text": "",
        "special_announcement_link": "",
        "cw_api_key": null,
        "reserve_online_enabled": 1,
        "trustpilot_tag": "",
        "deleted_at": null,
        "aos_library_id": "",
        "aos_enabled": 1,
        "has_used_car_model_landing_page": 0,
        "landing_page_top_text": null,
        "landing_page_bottom_text": null,
        "used_seo_title": "Example Page Title",
        "used_seo_description": "Example dealer SEO description"
    },
]

This endpoint retrieves all dealers.

HTTP Request

GET https://api.robinsandday.co.uk/api/nearest-dealers?postcode=POSTCODE

Search for nearest dealers by postcode

curl --request GET \
  --url https://api.robinsandday.co.uk/api/nearest-dealers?postcode=POSTCODE \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/api/nearest-dealers?postcode=POSTCODE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR_ACCESS_TOKEN"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.robinsandday.co.uk/api/nearest-dealers?postcode=POSTCODE");
xhr.setRequestHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

[
    {
        "id": 31,
        "brand": "peugeot",
        "dealer_code": "10817",
        "name": "Robins & Day Peugeot Birmingham Central",
        "dealer_group_name": "Robins & Day Birmingham Central",
        "used_name": "Robins & Day Peugeot Birmingham Central",
        "used_name_short": "Peugeot Birmingham Central",
        "lat": "52.4699986000",
        "lng": "-1.8720879000",
        "address": "100 Small Heath Highway",
        "town": "Birmingham",
        "postcode": "B10 0BT",
        "opening_times": "{\"Sales\":{\"Mon to Fri\":\"9am - 7pm\",\"Sat\":\"9am - 5:30pm\",\"Sun\":\"11am - 5pm\"},\"Service\":{\"Mon to Fri\":\"8AM - 6PM\",\"Sat\":\"8:30AM - 12:30PM\",\"Sun\":\"Closed\"}}",
        "offers_new": "Y",
        "offers_used": "Y",
        "offers_business": "Y",
        "offers_servicing": "Y",
        "offers_parts": "N",
        "offers_parts_hub": "N",
        "distance": 6.77
    },
]

This endpoint retrieves all dealers sorted by distance, based on the postcode supplied. Currently the postcode lookup is disabled and the distance value is a random value.

HTTP Request

GET https://api.robinsandday.co.uk/api/dealers

New Vehicles

Get using Titre Code

curl --request GET \
  --url https://api.robinsandday.co.uk/api/new/titre/EXAMPLETITRE \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/api/new/titre/EXAMPLETITRE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer YOUR_ACCESS_TOKEN"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.robinsandday.co.uk/api/new/titre/EXAMPLETITRE");
xhr.setRequestHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");

xhr.send(data);

The above command returns JSON structured like this:

[
    {
        "cap_code": "CI5R16FPL5HXTA",
        "cap_id": "12345",
        "titre_code": "EXAMPLETITRE",
        "trim_active": 0,
        "manufacturer": "Citroen",
        "model": "C5 AIRCROSS",
        "long_model": "C5 AIRCROSS HATCHBACK",
        "trim": "Other",
        "version": "1.6 Plug-in Hybrid 225 Flair Plus 5dr e-EAT8",
        "bodystyle": "Hatchback",
        "type": "car",
        "doors": 5,
        "payload": 0,
        "seats": 5,
        "transmission": "SEMI-AUTO",
        "tax": "0.00",
        "insurance_scale": "",
        "euro_class": "",
        "noise_level": "",
        "emissions_co": "",
        "emissions_hc": "",
        "emissions_nox": "",
        "emissions_hc_nox": "",
        "emissions_particles": "",
        "corrosion_guarantee": 0,
        "paint_guarantee": 0,
        "warranty_mileage": "",
        "warranty_years": 0,
        "co2": "39.00",
        "mpg_combined": "0.00",
        "electric_range": "0.00",
        "speed_max": "0.00",
        "speed_0_62": "0.00",
        "engine_cylinder": "4.00",
        "engine_bhp": "225.00",
        "engine_size": "1598.00",
        "fuel_type": "Petrol\/PlugIn Elec Hybrid",
        "fuel_size": "0.00",
        "pricing_cap_basic": "0.00",
        "pricing_cap_vat": "0.00",
        "pricing_cap_total": "0.00",
        "pricing_basic_mrrp": "0.00",
        "pricing_total_mrrp": "0.00",
        "pricing_on_the_road_cost": null,
        "pricing_on_the_road": "36815.00",
        "pricing_display_price": "36815.00",
        "pricing_display_savings": "0.00",
        "retail_standard_savings": "0.00",
        "retail_standard_price": "36815.00",
        "retail_pack_savings": "0.00",
        "retail_pack_price": "0.00",
        "pack_vehicle": 0,
        "stock_clearance": 0,
        "display_retail": "Y",
        "display_business": "N",
        "display_motab": "N",
        "motab_civ_profile_code": 0,
        "motab_civ_advance_payment": "0.00",
        "motab_civ_allowance": "0.00",
        "motab_civ_display": "N",
        "motab_war_profile_code": 0,
        "motab_war_advance_payment": "0.00",
        "motab_war_allowance": "0.00",
        "motab_war_display": "N",
        "motab_highlight": 0,
        "business_profile": "",
        "business_initial_rental": "0.00",
        "business_monthly_rental": "0.00",
        "business_annual_mileage": 10000,
        "business_rfl": "0.00",
        "business_roadside_assistance": "0.00",
        "business_price_exc_vat": "0.00",
        "business_price_inc_vat": "0.00",
        "finance_display_hp": "N",
        "finance_display_hp_standard": "N",
        "price_HP": "0.00",
        "price_HPSTANDARD": "0.00",
        "price_PACK_HP": "0.00",
        "price_PCP": "36815.00",
        "price_PACK_PCP": "0.00",
        "price_JAFPCP": "0.00",
        "price_JAFPCP_TELEMATICS": "0.00",
        "price_SIMPLYDRIVE": "36815.00",
        "price_SIMPLYDRIVE_TELEMATICS": "36815.00",
        "depcon_HP": "0.00",
        "depcon_HPSTANDARD": "0.00",
        "depcon_PACK_HP": "0.00",
        "depcon_PCP": "2500.00",
        "depcon_PACK_PCP": "0.00",
        "depcon_JAFPCP": "0.00",
        "depcon_JAFPCP_TELEMATICS": "0.00",
        "depcon_SIMPLYDRIVE": "2500.00",
        "depcon_SIMPLYDRIVE_TELEMATICS": "2500.00",
        "vehicle_title": "Citroen C5 AIRCROSS Hatchback 1.6 Plug-in Hybrid 225 Flair Plus 5dr e-EAT8",
        "vehicle_link": "https:\/\/api.robinsandday.co.ukcitroen\/92375\/c5-aircross-hatchback-16-plug-in-hybrid-225-flair-plus-5dr-e-eat8",
        "gallery": {
            "photos": []
        },
        "spec": {
            "Driver Convenience": [
                "12.3\" customisable TFT instrument display",
                "6.6 kW onboard charger",
                "Air recirculation when reverse gear is engaged",
                "Anti odour and pollen filter",
                "Central 8\" capacitive touch screen",
                "Citroen connect box emergency assist system",
                "Citroen connect Nav with connect box",
                "Custom interface for instrument cluster and touchscreen",
                "Dual zone automatic climate control",
                "Exterior temperature indicator with ice warning",
                "Mirror screen with mirror link, apple carplay and andriod auto",
                "Multi function trip computer",
                "Programmable cabin pre-conditioning and deferred charging",
                "Rear centre console ventilation system",
                "Rear passenger air vents"
            ],
            "Safety & Security": [
                "2x Isofix child seat fitting on outer rear seats",
                "3x Front optimised safety headrests and rear retractable headrests with height adjustable",
                "3x Rear three point retractable seatbelts with pretensioners and force limiters in the outer rear seats",
                "Acoustic laminated front windows",
                "Acoustic laminated windscreen with rain and brightness sensors",
                "Active blind spot monitoring system",
                "Active cruise control with stop and go",
                "Active lane departure warning system",
                "Adaptive driver and front passenger airbags with passenger airbag deactivation function",
                "Alarm - perimetric and volumetric alarm with anti-lifting mechanism",
                "Anti-lock Brake System and Electronic Brakeforce Distribution",
                "Automatic door locking",
                "Automatic hazard light activation upon heavy brake application",
                "Automatic triggered rear windscreen wiper in reverse gear",
                "Automatic windscreen wipers",
                "Body coloured door mirrors",
                "Brake mode option on gear selector",
                "Coffee Break Alert",
                "Collision risk alert",
                "Dark tinted rear windows and rear windscreen",
                "Driver and front passenger side airbag",
                "Driver attention alert system",
                "Driving mode selector on central console",
                "DSC (Dynamic Stability Control) and ASR (Electronic Anti-skid System)",
                "Eco+ mode",
                "Electric child locking functionality on rear windows and doors",
                "Electric heated folding door mirrors",
                "Electric power steering",
                "Electronic code immobiliser",
                "Electronic parking brake",
                "ESP including traction control and stability programme",
                "Extended traffic sign recognition and recommendation",
                "Frameless auto dimming electrochrome rear view mirror with blue LED electric driving mode indicator",
                "Front and rear curtain airbags",
                "Front parking sensors",
                "Front three point retractable seatbelts height adjustable with pre tensioners and force limiters",
                "Front ventilated disc brakes and rear disc brakes",
                "Front windscreen wiper with magic wash cleaning system",
                "Gear efficiency indicator",
                "Heated rear windscreen with integrated antenna",
                "Highway driver assist",
                "Hill start assist",
                "Mode 3 charging cable with type 2 connectors",
                "Multi link rear suspension with Progressive Hydraulic Cushions",
                "One touch electric front\/rear windows with pinch protection",
                "Park assist function with auto parallel and bay parking",
                "Post collision safety brake",
                "Rear parking sensors",
                "Remote central locking + deadlocks",
                "Reversing camera displayed on the central screen",
                "Speed limit recognition and recommendation",
                "Two tone horn",
                "Tyre under inflation indicator"
            ],
            "Exterior Features": [
                "3D effect LED rear lights",
                "Airbump panels with colour insert on lower portion of the doors",
                "Automatic headlight activation via windscreen mounted sensors",
                "Body colour door handles",
                "Body coloured roof",
                "C5 Aircross monogram on boot rear",
                "Citroen logo and monogram on rear",
                "City camera pack - C5 Aircross",
                "Door mirror puddle lights",
                "Exterior colour pack - Blue anodized - C5 Aircross Hybrid",
                "Exterior colour pack - Red anodized - C5 Aircross",
                "Exterior colour pack - Silver anodized - C5 Aircross",
                "Exterior colour pack - White anodized - C5 Aircross",
                "Front fog lights with cornering function",
                "Gloss black finish on A and B pillar and aerodynamic trim",
                "Gloss black touch screen surround with integrated tactile buttons and chrome finisher",
                "Gloss black upper and matte black lower grille",
                "Guide me home headlight function",
                "Halogen headlights",
                "Halogen rear fog lights",
                "Halogen rear number plate lights",
                "Headlights left on audible warning",
                "High level LED centre brake light",
                "HYBRID badging to front wings and tailgate",
                "Intelligent high beam headlights (auto dipping main beams)",
                "Leather effect dashboard facia",
                "LED daytime running lights",
                "LED front indicators",
                "LED indicators in door mirrors",
                "Longitudinal roof bars",
                "Matte black lower rear skirt",
                "Matte black rear bumper facia",
                "Matte black side sill with anodised silver colour touch",
                "Matte black wheel arch extensions",
                "Painted front bumper",
                "Painted rear bumper",
                "Roof coloured rear spoiler",
                "Safety plus pack - C5 Aircross Flair\/FlairPlus",
                "Satin chrome air vent surrounds",
                "Satin chrome C signature",
                "Satin chrome window surround",
                "Soft touch matte dashboard with grey insert",
                "Solid - Polar white",
                "Solid paint",
                "Twin exhaust effect trim"
            ],
            "Interior Features": [
                "12V socket in boot",
                "12V socket in cabin",
                "2 Central illuminated cup holders",
                "2 way lumbar adjustment for driver",
                "2x Rear coat hooks",
                "3 Independent full size rear seats with adjustable recline angle",
                "3x Grab handles retractable with damping",
                "Advanced comfort seats",
                "Aluminium pedals and foot rest",
                "Central front armrest with butterfly wing opening and illuminated storage compartment",
                "Dashboard open central storage compartment",
                "Dimmable white mood lighting",
                "Electric driver seat adjustment (height, fore\/aft and backrest angle)",
                "Fixing rings 4 in load compartment",
                "Front + rear carpet mats",
                "Front and rear LED welcome\/LED rear reading lights",
                "Front door pockets store up to 1.5L bottle and A4 note pad",
                "Front seat back map pockets",
                "Height and reach adjustable leather steering wheel with 2 control zones",
                "Hinged rear parcel shelf",
                "Isofix child seat preparation for front passenger seat",
                "Leather interior door handles",
                "Leather steering wheel with satin chrome inserts",
                "Manual passenger seat adjustment (height, fore\/aft and backrest angle)",
                "Metropolitan cloth\/grained leather - Graphite\/grey with grey ambience",
                "Metropolitan cloth\/grained leather upholstery with grey ambience",
                "Multi function steering wheel",
                "Open central storage area below touch screen",
                "Open storage area next to gear selector",
                "Rear door pockets store up to 0.5L bottle",
                "Satin chrome digital instrument panel and touchscreen trim",
                "Satin chrome gear lever",
                "Satin chrome interior door handles",
                "Seatbelt not fastened audible and visual alert for front seats",
                "Seatbelt unfastened on the move audible and visual alert for front and rear seats",
                "Smooth opening flocked glove box with lighting",
                "Stainless steel front Citroen embossed sill scuff plates",
                "Storage compartment for charging cable under boot floor"
            ],
            "Entertainment": [
                "2 USB sockets",
                "Auxiliary input socket",
                "Bluetooth telephone facility",
                "DAB (Digital Audio Broadcasting), AM\/FM and MP3 compatible radio with two tweeters and four speakers",
                "Voice recognition for radio, navigation and telephony features"
            ],
            "Wheels": [
                "19\" Art two tone diamond cut alloy wheels",
                "Compressor with puncture repair kit"
            ],
            "Options": {
                "Wheels": [
                    "19\" Art black alloy wheels (£100.00)",
                    "Space saver spare wheel (£100.00)"
                ],
                "Driver Convenience": [
                    "Citroen connected CAM (£200.00)",
                    "Smartphone wireless charging plate (£100.00)"
                ],
                "Interior Features": [
                    "Hype cloth\/nappa leather - Black\/brown with brown ambience, Heated front seats, driver's seat massage (£1,770.00)",
                    "Hype cloth\/nappa leather upholstery with brown ambience, Heated front seats, driver's seat massage (£1,770.00)"
                ],
                "Exterior Features": [
                    "Metallic - Cumulus grey (£545.00)",
                    "Metallic - Perla Nera Black (£545.00)",
                    "Metallic - Platinum grey (£545.00)",
                    "Metallic - Tijuca blue (£545.00)",
                    "Metallic - Volcano Red (£545.00)",
                    "Metallic paint (£545.00)",
                    "Panoramic opening glass roof with electric blind (£990.00)",
                    "Pearl - Pearl white (£720.00)",
                    "Pearlescent paint (£720.00)",
                    "Perla nera black roof with perla nera door mirrors (£250.00)"
                ],
                "Safety & Security": [
                    "Towbar with 13 pin electrical connection and trailer stability control (£450.00)"
                ]
            }
        },
        "vat_message": false,
        "max_range": "0",
        "default_finance_parameters": {
            "key": "PCP",
            "term": 37,
            "deposit": 1630,
            "mileage": 10000
        },
        "new_vehicle_finance_restriction": []
    }
]

This endpoint retrieves a New Vehicle based on the titre code supplied

HTTP Request

GET https://api.robinsandday.co.uk/api/new/titre/{TITRE}

Get Codeweavers Finance Request

curl --request GET \
  --url https://api.robinsandday.co.uk/api/new/titre/EXAMPLETITRE/finance \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/api/new/titre/EXAMPLETITRE/finance",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer YOUR_ACCESS_TOKEN"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.robinsandday.co.uk/api/new/titre/EXAMPLETITRE/finance");
xhr.setRequestHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");

xhr.send(data);

The above command returns JSON structured like this:

{
    "HP": {
        "Credentials": {
            "ApiKey": "CODEWEAVERS_API_KEY"
        },
        "Customer": {
            "Reference": "API_REQUEST"
        },
        "Parameters": {
            "Term": 37,
            "Deposit": 1630,
            "DepositType": "Amount",
            "AnnualMileage": 10000
        },
        "VehicleRequests": [
            {
                "Id": 6339,
                "Vehicle": {
                    "CashPrice": "36815.00",
                    "RegistrationDate": "2020-02-06",
                    "IsNew": true,
                    "Identifier": "1CCESYWNKAT0A030",
                    "IdentifierType": "TitreCode",
                    "Type": "Car",
                    "ImageUrl": "",
                    "DealerVehicleUrl": "",
                    "IsVatQualifying": "true"
                },
                "Products": [
                    {
                        "Key": "HP",
                        "OverrideFinanceParameters": {
                            "DepositContributionsOverride": [
                                {
                                    "Name": "Dealer Contribution",
                                    "Value": "0.00",
                                    "Type": "Dealer",
                                    "Uncapped": true
                                }
                            ],
                            "Term": 37,
                            "Deposit": 1630,
                            "DepositType": "Amount",
                            "AnnualMileage": 10000,
                            "IsTelematics": false
                        }
                    }
                ]
            }
        ]
    },
    "HPSTANDARD": {
        "Credentials": {
            "ApiKey": "CODEWEAVERS_API_KEY"
        },
        "Customer": {
            "Reference": "API_REQUEST"
        },
        "Parameters": {
            "Term": 37,
            "Deposit": 1630,
            "DepositType": "Amount",
            "AnnualMileage": 10000
        },
        "VehicleRequests": [
            {
                "Id": 6339,
                "Vehicle": {
                    "CashPrice": "36815.00",
                    "RegistrationDate": "2020-02-06",
                    "IsNew": true,
                    "Identifier": "1CCESYWNKAT0A030",
                    "IdentifierType": "TitreCode",
                    "Type": "Car",
                    "ImageUrl": "",
                    "DealerVehicleUrl": "",
                    "IsVatQualifying": "true"
                },
                "Products": [
                    {
                        "Key": "HPSTANDARD",
                        "OverrideFinanceParameters": {
                            "DepositContributionsOverride": [
                                {
                                    "Name": "Dealer Contribution",
                                    "Value": "0.00",
                                    "Type": "Dealer",
                                    "Uncapped": true
                                }
                            ],
                            "Term": 37,
                            "Deposit": 1630,
                            "DepositType": "Amount",
                            "AnnualMileage": 10000,
                            "IsTelematics": false
                        }
                    }
                ]
            }
        ]
    },
    "PCP": {
        "Credentials": {
            "ApiKey": "CODEWEAVERS_API_KEY"
        },
        "Customer": {
            "Reference": "API_REQUEST"
        },
        "Parameters": {
            "Term": 37,
            "Deposit": 1630,
            "DepositType": "Amount",
            "AnnualMileage": 10000
        },
        "VehicleRequests": [
            {
                "Id": 6339,
                "Vehicle": {
                    "CashPrice": "36815.00",
                    "RegistrationDate": "2020-02-06",
                    "IsNew": true,
                    "Identifier": "1CCESYWNKAT0A030",
                    "IdentifierType": "TitreCode",
                    "Type": "Car",
                    "ImageUrl": "",
                    "DealerVehicleUrl": "",
                    "IsVatQualifying": "true"
                },
                "Products": [
                    {
                        "Key": "PCP",
                        "OverrideFinanceParameters": {
                            "DepositContributionsOverride": [
                                {
                                    "Name": "Dealer Contribution",
                                    "Value": "2500.00",
                                    "Type": "Dealer",
                                    "Uncapped": true
                                }
                            ],
                            "Term": 37,
                            "Deposit": 1630,
                            "DepositType": "Amount",
                            "AnnualMileage": 10000,
                            "IsTelematics": false
                        }
                    }
                ]
            }
        ]
    },
    "SIMPLYDRIVE": {
        "Credentials": {
            "ApiKey": "CODEWEAVERS_API_KEY"
        },
        "Customer": {
            "Reference": "API_REQUEST"
        },
        "Parameters": {
            "Term": 37,
            "Deposit": 1630,
            "DepositType": "Amount",
            "AnnualMileage": 10000
        },
        "VehicleRequests": [
            {
                "Id": 6339,
                "Vehicle": {
                    "CashPrice": "36815.00",
                    "RegistrationDate": "2020-02-06",
                    "IsNew": true,
                    "Identifier": "1CCESYWNKAT0A030",
                    "IdentifierType": "TitreCode",
                    "Type": "Car",
                    "ImageUrl": "",
                    "DealerVehicleUrl": "",
                    "IsVatQualifying": "true"
                },
                "Products": [
                    {
                        "Key": "SIMPLYDRIVE",
                        "OverrideFinanceParameters": {
                            "DepositContributionsOverride": [
                                {
                                    "Name": "Dealer Contribution",
                                    "Value": "2500.00",
                                    "Type": "Dealer",
                                    "Uncapped": true
                                }
                            ],
                            "Term": 37,
                            "Deposit": 1630,
                            "DepositType": "Amount",
                            "AnnualMileage": 10000,
                            "IsTelematics": false
                        }
                    }
                ]
            }
        ]
    },
    "SIMPLYDRIVE_TELEMATICS": {
        "Credentials": {
            "ApiKey": "CODEWEAVERS_API_KEY"
        },
        "Customer": {
            "Reference": "API_REQUEST"
        },
        "Parameters": {
            "Term": 37,
            "Deposit": 1630,
            "DepositType": "Amount",
            "AnnualMileage": 10000
        },
        "VehicleRequests": [
            {
                "Id": 6339,
                "Vehicle": {
                    "CashPrice": "36815.00",
                    "RegistrationDate": "2020-02-06",
                    "IsNew": true,
                    "Identifier": "1CCESYWNKAT0A030",
                    "IdentifierType": "TitreCode",
                    "Type": "Car",
                    "ImageUrl": "",
                    "DealerVehicleUrl": "",
                    "IsVatQualifying": "true"
                },
                "Products": [
                    {
                        "Key": "SIMPLYDRIVE_TELEMATICS",
                        "OverrideFinanceParameters": {
                            "DepositContributionsOverride": [
                                {
                                    "Name": "Dealer Contribution",
                                    "Value": "2500.00",
                                    "Type": "Dealer",
                                    "Uncapped": true
                                }
                            ],
                            "Term": 37,
                            "Deposit": 1630,
                            "DepositType": "Amount",
                            "AnnualMileage": 10000,
                            "IsTelematics": true
                        }
                    }
                ]
            }
        ]
    }
}

This endpoint retrieves a set of structured Codeweavers finance requests for a specific a New Vehicle based on the titre code or CAP ID or CAP Code supplied.

HTTP Request

GET https://api.robinsandday.co.uk/api/new/titre/{TITRE}/finance

GET https://api.robinsandday.co.uk/api/new/cap_id/{CAP_ID}/finance

GET https://api.robinsandday.co.uk/api/new/cap_code/{CAP_CODE}/finance

Query Parameters

Parameter Default Description
allow_not_on_sale null If this is present in the query params, vehicles not on sale will be returned too

Get Titre Code

curl --request GET \
  --url https://api.robinsandday.co.uk/api/new/cap-to-titre/car/cap-code/EXAMPLE_CAP_CODE \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/api/new/cap-to-titre/car/cap-code/EXAMPLE_CAP_CODE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer YOUR_ACCESS_TOKEN"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.robinsandday.co.uk/api/new/cap-to-titre/car/cap-code/EXAMPLE_CAP_CODE");
xhr.setRequestHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");

xhr.send(data);

The above command returns JSON structured like this:

[
    {
        "id": 23683,
        "titre_code": "1PD2A4F9W570A080",
        "effective_date": 1085443200,
        "cap_id": "27605",
        "cap_code": "PE4716 S 4SDTM",
        "manufacturer": "PEUGEOT",
        "model": "407 DIESEL SALOON (2004 - 2011)",
        "version": "1.6 HDi 110 S 4dr (2004-2011)",
        "latest_model_year": "2010.00"
    },
    {
        "id": 23684,
        "titre_code": "1PD2A4F9W570A081",
        "effective_date": 1085443200,
        "cap_id": "27605",
        "cap_code": "PE4716 S 4SDTM",
        "manufacturer": "PEUGEOT",
        "model": "407 DIESEL SALOON (2004 - 2011)",
        "version": "1.6 HDi 110 S 4dr (2004-2011)",
        "latest_model_year": "2010.00"
    },
]

This endpoint retrieves a list of titre codes for either a CAP ID or CAP code.

HTTP Request

GET https://api.robinsandday.co.uk/api/new/cap-to-titre/{CAR_OR_VAN}/cap-code/{CAP_CODE}

GET https://api.robinsandday.co.uk/api/new/cap-to-titre/{CAR_OR_VAN}/cap-id/{CAP_ID}

Get Available Models and Fuel Types

curl --request GET \
  --url https://api.robinsandday.co.uk/api/new/available-options \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/api/new/available-options",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer YOUR_ACCESS_TOKEN"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.robinsandday.co.uk/api/new/available-options");
xhr.setRequestHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");

xhr.send(data);

The above command returns JSON structured like this:

[
    {
        "short_name": "108",
        "brand": "peugeot",
        "fuel_types": [
            "Petrol"
        ]
    },
    {
        "short_name": "108 Top!",
        "brand": "peugeot",
        "fuel_types": [
            "Petrol"
        ]
    },
    {
        "short_name": "3008 SUV",
        "brand": "peugeot",
        "fuel_types": [
            "Petrol",
            "Diesel"
        ]
    },
]

This endpoint retrieves an array of new models on sale, with the associated fuel types

HTTP Request

GET https://api.robinsandday.co.uk/api/new/available-options

Used Vehicles

Get Available Manufacturer & Models

curl --request GET \
  --url https://api.robinsandday.co.uk/api/used/available-options \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/api/used/available-options",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer YOUR_ACCESS_TOKEN"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.robinsandday.co.uk/api/used/available-options");
xhr.setRequestHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");

xhr.send(data);

The above command returns JSON structured like this:

[
    {
        "manufacturer": "Citroen",
        "model": "C1",
        "count": 50
    },
    {
        "manufacturer": "Citroen",
        "model": "C3",
        "count": 96
    },
    {
        "manufacturer": "Citroen",
        "model": "C3 Aircross",
        "count": 58
    },
]

This endpoint retrieves an array of used vehicles on sale, with the associated stock count

HTTP Request

GET https://api.robinsandday.co.uk/api/used/available-options

Leads

Submit a lead

curl --request POST \
  --url https://api.robinsandday.co.uk/api/v1/lead \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'content-type: application/json' \
  --data '{
    "firstName": "Nicholas",
    "lastName": "Cage",
    "email": "nick.cage@gmail.com",
    "misc": {
        "comment": "I'\''m Nicholas Cage"
    },
    "location_id": "34",
    "customer_vehicle": {
        "make": "Peugeot",
        "model": "108"
    }
}'
<?php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.robinsandday.co.uk/api/v1/lead",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n    \"firstName\": \"Nicholas\",\n    \"lastName\": \"Cage\",\n    \"email\": \"nick.cage@gmail.com\",\n    \"misc\": {\n\t\t\"comment\": \"I'm Nicholas Cage\"\n\t},\n    \"location_id\": \"34\",\n\t\"customer_vehicle\": {\n\t\t\"make\": \"Peugeot\",\n\t\t\"model\": \"108\"\n\t}\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR_ACCESS_TOKEN",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var data = JSON.stringify({
  "firstName": "Nicholas",
  "lastName": "Cage",
  "email": "nick.cage@gmail.com",
  "misc": {
    "comment": "I'm Nicholas Cage"
  },
  "location_id": "34",
  "customer_vehicle": {
    "make": "Peugeot",
    "model": "108"
  }
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.robinsandday.co.uk/api/v1/lead");
xhr.setRequestHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "application/json");

xhr.send(data);

The above command returns the following JSON if the submission was successful:

{
    "status": "ok",
    "code": 200,
    "id": 163
}

This endpoint submits a lead to the Robins & Day API

HTTP Request

POST https://api.robinsandday.co.uk/api/v1/lead

Payload (Either as JSON or Multipart form)

Parameter Required Description Type
location_id At least one of location_id, enquirymax_id, dealerCode must be provided The Robins & Day API internal dealer ID (Can be found using the Get dealers API call) int
dealerCode At least one of location_id, enquirymax_id, dealerCode must be provided The dealer code (Can be found using the Get dealers API call) string
brand Yes One of Peugeot/Citroen/DS/Vauxhall String
activityType Yes New or Used String
leadType Yes One of Enquiry/PX Valuation/Offer Request/Register Interest/Brochure Download/Test Drive Request/Other/Finance Finisher/Order Update/Complaint/General Enquiry/Motability String
title No Customer title String
forename or firstName Yes The customer first name String
surname or lastName Yes The customer surname String
bestTimeToCall No Best time to call the customer String
preferedContactMethod No Best way to contact the customer String
contactMethod No Best way to contact the customer String
homeTelephoneNumber or phone No Home telephone String
mobileTelephoneNumber or mobile No Mobile telephone String
workTelephoneNumber No Work telephone String
emailAddress or email Yes Customer email address, must be valid String/Email
postcode No Can be just the postcode, or a full address String
lclMrktingCode No Campaign name String
cusComments No Comments from the customer String
misc No Any misc extra information, e.g. comments JSON object with depth of 1 maximum e.g. {'comment': "I'm Nicholas Cage", 'job': "Actor"}
contact_by_email No Ok to contact by email Bool (true
contact_by_sms No Ok to contact by sms Bool (true
contact_by_post No Ok to contact by post Bool (true
contact_by_phone No Ok to contact by phone Bool (true
customerVehicle.make No The make of the customer's vehicle String
customerVehicle.model No The model of the customer's vehicle String
customerVehicle.derivativeName No The version name of the customer's vehicle String
customerVehicle.fuelType No The fuel type of the customer's vehicle String
customerVehicle.bodyType No The body type of the customer's vehicle String
customerVehicle.valuation No The valuation of the customer's vehicle Float
customerVehicle.valuationValidOn No The make of the customer's vehicle Date in string format 'dd-mm-yyyy' e.g. 25-12-2020
customerVehicle.regNo No The registration of the customer's vehicle String
customerVehicle.mileage No The mileage of the customer's vehicle Integer
isUsed or is_used No Vehicle of interest - Is it a used vehicle Bool (true
price No Vehicle of interest - price Float
odometerUnit or odometer_unit or odometer.unit No Vehicle of interest - unit for the mileage e.g. 'miles' String
odometerValue or odometer_value or mileage or miles or odometer.value No Vehicle of interest - the value for the mileage Integer
make No Vehicle of interest - make String
manufacturer No Vehicle of interest - manufacturer String
range No Vehicle of interest - range String
model No Vehicle of interest - model String
derivative or version No Vehicle of interest - version String
fuelType or fuel_type or fuel No Vehicle of interest - fuel type String
vrm or VRM or reg or reg_no No Vehicle of interest - registration String
vehicleCode or vehicle_code or titreCode or titre_code No Vehicle of interest - internal vehicle identifier String
stockNumber or stock_number No Vehicle of interest - Autotrader vehicle ID String
capCode or cap_code No Vehicle of interest - CAP Code String
capId or capID or cap_id No Vehicle of interest - CAP ID String
vin or VIN No Vehicle of interest - VIN String

Errors

The Robins & Day API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your Authorization header is invalid.
403 Forbidden -- You do not have the required permissions to view the resource.
404 Not Found -- The specified resource could not be found.
405 Method Not Allowed -- You tried to access an endpoint with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
429 Too Many Requests -- You're sending too many requests in a short period of time. Please try again later
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.