You are on page 1of 6

Mountain Drop-offs

Booking data import API

1. Method
2. Data Set

1 Method
1.1 Data Interchange Language
JSON will be used for clients to transfer data to the MD server
JSON is a universal language that is simple for developers to export data for upload.

1.2 Invocation
1.2.1 Location
http://import.mountaindropoffs.com/client/{client_id}/json/
Only POST and not GET is allowed. The supported code is UTF-8.
{client_id} is replaced by your client id

You are able to test your requests at


http://import.mountaindropoffs.com/client/test/json/

1.2.2 Named Parameters


When the parameters are named, they do not have to be in the order specified in the API.
Syntax:
{"method": "Method Name", "params": {"Argument Name 1": "Argument Value 1", "Argument Name N":
"Argument Value N"}, "version": "1.1", "id": "id"}
Example:
{"method": "addBooking", "params": {firstname": "Mark", "surname": "Smith"}, "version":"1.1"}

1.2.3 Un-named Parameters


UNNAMED PARAMETERS ARE NOT AVAILABLE IN VERSION 1.1
With unnamed parameters the order determine which parameter is which.
Syntax:
{"method": "Method Name", "params": ["Argument Value 1", "Argument Value N"], "version": "1.1", "id":
"id"}
Example:
{"method": "addBooking", "params": ["mark", "smith"], "version": "1.1"}

1.2.4 Batched Requests


With batched requests it is possible to invoked multiple methods with the same call. Batched request are
used to improve performance. Batched requests are done as in JSON-RPC 2.0. The batched requests
can be made with both named and un-named parameters.
Syntax:
[Request1,RequestN]
Example:
[{"method": "addBooking", "params": {firstname": "Mark", "surname": "Smith"}, "version":
"1.1"},{"method": "addBooking", "params": {firstname": "David", "surname": "Jones"}, "version":
"1.1"}]

1.3 Responses
1.3.1 Single Response
The order of the returned properties is arbitrary.
Successful bookings will return OK:true
All successful bookings have been verified by the system and added to the bookings log, to be processed
by mountain dropoffs

Syntax:
[Response]
Example:
{"RESULT": {OK:true,"COST": 40, "CURRENCY": "euro", BOOKING_ID:MD-
23784, ERROR:NULL, MESSAGE:The upload completed OK}, "VERSION": "1.1"}
4.2.3 Batched Requests Responses
Syntax:
[Response,Response 2]
Example:
[{"RESULT": {OK:true,"COST": 40, "CURRENCY": "euro", BOOKING_ID:MD-
237848, ERROR:NULL, MESSAGE:The upload completed OK}, "VERSION": "1.1"} { "RESULT":
{"COST": 300, "CURRENCY": "euro", BOOKING_ID:MD-234534, error:NULL, MESSAGE:The
upload completed OK}, "VERSION": "1.1"}]
4.2.4 Errors
If the booking causes an error then the
Syntax:
[Response]
Example:
{"RESULT": {"COST":NULL, "CURRENCY":
NULL, BOOKING_ID:NULL ERROR:{"passengers_1":"That number of passengers is not
valid"}, MESSAGE:There was an error with the upload}, "VERSION": "1.1"}

2 Data Set

DataType Description Specification Example Required

date_1 The date and time Timestamp 2012-06-13 14:23 YES


of the flight arrival/
departure for the first
journey

date_2 The date and time of Timestamp 2012-06-16 15:56 NO (Only for Return
the arrival/departure for Bookings)
the return journey
from The pickup. Please see Text Geneva Airport YES
the glossary for a list of
destinations

to The destination. Text Chamonix YES


Please see the
glossary for a list of
destinations

flight_1 The arrival/departure Text BA 290 NO (Desired)


flight number from the
first journey

flight_2 The arrival/departure Text EZY 345 NO (Desired)


flight number from the
first journey

passengers_1 Number of passengers int 2 YES


for the first journey

passengers_2 Number of passengers int 3 NO


for the return
journey. If unspecified
it will default to
pessengers_1

name Lead passenger name Text Mark Smith YES

journey_type_1 Journey Type for first Text Private NO (Desired)


journey. Please see
the Glossary for a
list of destinations. If
unspecified, resolves
to the cheapest option.

journey_type_2 Journey Type for return Text VIP NO (Desired for Return
journey. Please see Journeys)
the Glossary for a
list of destinations. If
unspecified, resolves
to the cheapest option.

pick_name The name of the Text SARL Mountain Drop- NO


destination. Offs

pick_address The address of the Text 58, allee Louis NO


destination. Lachenal
74400 Chamonix
France

pick_tel Contact number of the Text +442432345234 NO


destination

drop_name Text NO

drop_address Text NO

drop_tel Text NO

email Contact email for the Text example@example.co YES


lead passenger m

tel Contact Number of the Text +442432345234 YES


lead passenger
baby_a Rear facing baby seat, int 1 NO
baby up to 12 kg/0-12
months

baby_b rear facing, 9-18 kgs/9 int 1 NO


mths 4y

baby_c front facing upright, 9- int 1 NO


18 kgs/4-6 y

baby_d booster seat, 22-36 int 1 NO


kgs/4-10y

notes Other requirements / Text 2 snowboards and a NO


Booking Notes set of skis

Glossary
Journey Types
Used for data types journey_type_1 and journey_type_2
Data [String] Description

Super Saver The cheapest option. Not available for all journeys

Flexi Saver Shared transfer

Private We meet you from your flight. No waiting around.

VIP The most luxurious option

Resorts
Used for data types from and to

DATA [STRING]

Aime Train Station


Albertville
Alpe D'Huez
Aoste
Avoriaz
Bellegarde-Sur-Valserine
Bienne
Bonneville
Bourg-Saint-Maurice Train Station
Brides les Bains
Chambery Airport
Chamonix
Chamonix (Argentiere)
Chamonix (Le Buet)
Chamonix (Le Tour)
Chamonix (Les Bossons)
Chamonix (Les Houches)
Chamonix (Les Praz)
Chamonix (Les Tines)
Chamonix (Vallorcine)
Chamonix (Vaudagne)
Champagny en Vanoise
Champex, Suisse
Cluses
Col de Forclaz (Suisse)
Combloux
Courchevel
Courmayeur ITALY
Flaine
Gaillards
Geneva Airport
Geneva Airport (French Sector)
Geneva Centre
Giron - Jura
Grenoble Airport
La Clusaz
La Plagne
La Rosiere
La Tania
Lac Emosson
Lausanne
Lavachey, Italy
Le Fayet
Les Arcs
Les Bottieres
Les Carroz
Les Coches
Les Contamines
Les Deux Alpes
Les Gets
Les Menuires
Lyon Airport
Megeve
Meribel
Meribel Mottaret
Morillon
Morzine
Mouthe
Moutiers Train Station
Nendaz
Peisey-Vallandry
Pont (Italy)
Saas-Grund,Sussie
Saint-Jean-d'Aulps
Samoens
Servoz (Train Station Only)
Sion
St Foy
St. Gervais (Centre)
St. Gervais - Le Bettex
St. Gervais - St. Nicolas
Thonon
Tignes
Tre le Champ
Trient ( Suisse)
Val d'Isere
Val Thorens
Valmorel
Verbier
Zermatt(Tasch)SUI

You might also like