/reservations
POST /
To book your Tidybear, you need to call this URI with POST method. Datas are passed through the body request.
Expected format
user
required : Complex object that describes the customer (Object)mail
required : Mail address of the customer (String)nom
required : Last name of the customer (String)prenom
required : First name of the customer (String)telephone
optionnal : Phone number of the customer (String)
lieu
required : Complex object that describes the location of the booking (Object)adresse
required : Complete address where Tidybear will come (String)latitude
required : Geolocation latitude (String)longitude
required : Geolocation longitude (String)animaux
optional : Whether there is animal during the intervention (Boolean)codeAcces1
optional : Digital code to enter in the building (String)codeAcces2
optional : Second digital code to enter in the building (String)complementAdresse
optional : Additional information for the Tidybear (String)
dateRdv
required : Complex object that describes the booking time (Object)time
required : Timestamp of the booking time (Integer)
surface
required : The corresponding surface (Integer)nbHeures
required : The duration of the booking (Decimal)taskTemplate
required : Complex object that describes the tasks that the Tidybear will accomplish (Object)taskList
required : Array of complex object that describes the tasks that the Tidybear will accomplish (Array)title
required : Short description of the task (String)libelle
required : Long description of the task (String)duree
optionnal : Duration of the task (Decimal)
Result
Returns a JSON Object with the same properties
Status code
201
: The booking is created without error400
: Syntax error, an error message is provided500
: Unexpected error
Example
Request :
POST https://dev.tidybear.fr:8443/tidybear/reservations
Response :
{
"user":{
"mail":"tidybear@tidybear.fr",
"nom":"Tidy",
"prenom":"Bear",
"telephone":"0123456789"
},
"lieu":{
"adresse":"8 Rue de Dunkerque, Paris, France",
"codeAcces1":"5613",
"complementAdresse":"Second floor",
"animaux":false,
"latitude":"48.8797471",
"longitude":"2.3569238999999698"
},
"dateRdv":{
"time":1470153600000
},
"surface":80,
"nbHeures":2.0,
"taskTemplate":{
"taskList":[
{
"title":"Première tache",
"libelle":"Ceci est la première chose à faire"
},
{
"title":"Deuxième tache",
"libelle":"Ceci est la deuxième chose à faire"
},
{
"title":"Troisème tache",
"libelle":"Ceci est la première chose à faire"
}
]
}
}