API

This documentation is written by developers for developers. If you have any questions, please contact: enquiries@sellmycoach.co.uk.


Connecting to Sell My Coach is quick and easy to do, whatever your programming language. The API will enable you to upload all of your vehicles and adverts automatically, saving everybody some time!

Simply post to https://sellmycoach.co.uk with all of the required fields outlined below. Examples of what information might look like has been included. We have also included some examples of what your code may look like.

PHP

                    
                        $post = array(
                                                            "vehicle_registration" => "AK23 JKP"
                                                            "vehicle_make" => "Mercedes"
                                                            "vehicle_model" => "Tourismo"
                                                            "vehicle_pax" => "48"
                                                            "vehicle_mileage" => "10000"
                                                            "vehicle_price" => "100000"
                                                            "vehicle_type" => "New"
                                                            "vehicle_mot" => "2023-03-23"
                                                            "vehicle_owners" => "3"
                                                            "vehicle_service_history" => "Full Service History"
                                                            "advert_title" => "48 Seat Mercedes"
                                                            "advert_subtitle" => ""
                                                            "advert_description" => "This is the greatest advert ever. <br><br> Yes you can use html markup in here!"
                                                            "media" => "array("0" => "https://googleimages.com/image", "1" => "https://anotherimage.co.uk")"
                                                    );

                        $ch = curl_init('https://sellmycoach.co.uk/api');

                        curl_setopt($cl, CURLOPT_HTTPHEADER, array("Authorization: Bearer 'YOUR API TOKEN'"));
                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                        curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

                        $response = curl_exec($ch);

                        curl_close($ch);
                    
                
Required Parameters Description Expected Values
vehicle_registration Vehicle Registration. VARCHAR | Maxlength 255.
vehicle_make Vehicle make. AEC
Alexander Dennis
BMC
Bova
DAF
Dennis
Irisbus
Irizar
Iveco
King Long
Leyland
MAN
Mercedes Benz
Neoplan
Optare
Scania
Setra
VDL
Van Hool (DAF)
Van Hool (MAN)
Volvo
Yutong
vehicle_model Vehicle model. Routemaster
Enviro 200
Enviro 400
Condor
FHD 12.370
FHD 13.340
FHD 127.365
Futura
Magiq
DB250
SB3000
SB4000
Dart
Javelin
Trident
Eurorider
i6
XMQ6127
XMQ6129Y
XMQ6900
Olympian
Royal Tiger
14.290
19.290
19.360
26.480
A67 14.290
TGL 10.180
Atego
Sprinter 0.515d
Tourismo
Vario 0.813
Vario 0.814d
Vario 0.816
Vario 0.818d
Sprinter
Sprinter 0.413CDi
Sprinter 0.515CDi
Sprinter 0.516CDi
Tourismo M
Touro
Vario 0.815
N316
N516
N3316 SHD
P11
P20
P21
P22
Solo
K114 EB 4x2
K114 EB 6x2
K114IB 4x2
K124
K230
K340
K340 6x2
K340 EB 4x2
K340 EB 6x2
K360 6x2
K400EB
N94UB
S315 GT-HD
S415 GT-HD
S415 HD
S416 GT-HD
FHD2 129.365
FHD2 129.440
FHD2 131.440
SB180
SB200
SB4000
SB4000PF
SBR4000XF
Synergy 141DD
Integral
T915 Alicron
T917 Altano
T917 Astron
TD921 Altano
TD927 Astromega
TDX21 Altano
TDX27 Astromega
TX15 Alicron
TX16 Alicron
TX16 Astron
TX17 Acron
TX17 Altano
TX17 Astron
T915 Alicron
T916 Astron
TX16 Alicron
TX16 Astron
TX17 Astron
TX17 Astronef
B7R
B7TL
B8R
B9R
B10M
B11R
B12B
B12BT
B12M
B13R
B13RT
TC9
TC12
vehicle_pax Vehicle PAX (seats). INT
vehicle_mileage Vehicle Mileage (approx) DECIMAL (13, 2)
vehicle_price Vehicle Price. DECIMAL (8,2)
vehicle_type Vehicle Type. New
Used
vehicle_mot Vehicle MOT. DATE (YYYY-MM-DD)
vehicle_owners Vehicle Owners. INT
vehicle_service_history Vehicle Service History. Full Service History
Part Service History
No Service History
advert_title Advert Title. VARCHAR | Maxlength 255
advert_subtitle Advert subtitle. VARCHAR | Maxlength 255
advert_description Advert Description. Longtext (HTML is allowed but script will be removed!)
media Images of the vehicle array() with the index of "filename"