Email API for integration with mtvan

We’ve developed an API that allows really easy integration between your other courier software and mtvan which will save you having to repeatedly book the same jobs onto the different systems you use.

You need to let us know that you want to use the email API and you’ll have to supply us with the address you’ll be sending from, but if you want to start working on your implimentation here’s a specification of what we need from you:

  • Subject line: Should be: ‘memberId/New Booking’, for example it might be ’5874/New Booking’
  • Route Points: An array of between 2 and 10 route points. A route point is made up of an address (not required), postcode/town name (required), country code (iso2 standard, required), time window type (required, possible values: ASAP or Ready Now, At, Before, Between), time (required depending on time window type, MySQL date time format, UTC/GMT timezone), and time to¬†(required depending on time window type, MySQL date time format, UTC/GMT timezone).
  • Vehicle Type: A suggested vehicle type (Possible Values: Motorbike, Car, Estate Car, SWB Transit, MWB Transit, LWB Transit, XLWB Transit, Transit High Top, Sprinter, Luton, Luton Oversize Box, Luton Tail Lift, Flat Bed, Small Lorry (7.5 tonne), HGV/Articulated Lorry, Luton Curtainsider).
  • Comments.
  • Job Type: Value can be ‘Sameday Urgent’ or ‘Sameday Non-Urgent’.

We think the easiest way to send this is as JSON encoded data in a plain text email. Here’s an example of what the body might look like:

{"route":[{"address":"Address Line 1","postcode":"MK1","countryCode":"GB","timeWindowType":
"At","time":"2013-04-20 09:00:00","timeTo":false},{"address":false,"postcode":"Birmingham",
"countryCode":"GB","timeWindowType":"Between","time":"2013-04-20 11:00:00","timeTo":
"2013-04-20 12:00:00"},{"address":false,"postcode":"Leeds","countryCode":"GB",
"timeWindowType":"ASAP","time":false,"timeTo":false}],"vehicleType":"Small Van",
"comments":"Fragile so please be careful!","jobType":"Sameday Urgent"}

Want to integrate your courier software with mtvan using another method? We’re really good at building API’s in lots of different formats so send us a message and we’ll see what we can do for you (yes for free).

Update: 31/05/2013: Job Type value should now be ‘Sameday Urgent’ or ‘Sameday Non-Urgent’. This replaces ‘Hotshot’ and ‘Backload’. We retain legacy support for the terms ‘Hotshot’ and ‘Backload’ so don’t panic if you’re still sending the old values!

Leave a Reply