{"_id":"56e7447c7d693632001d5cb4","editedParams":true,"editedParams2":true,"parentDoc":null,"__v":6,"project":"56e3719a591f620e00bf5095","user":"56e371538b32a10e00f79750","version":{"_id":"56e3719a591f620e00bf5098","hasReference":true,"hasDoc":true,"__v":2,"project":"56e3719a591f620e00bf5095","createdAt":"2016-03-12T01:32:10.751Z","releaseDate":"2016-03-12T01:32:10.751Z","categories":["56e3719b591f620e00bf5099","56e7b24ad365390e007baeab"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"category":{"_id":"56e3719b591f620e00bf5099","pages":["56e3719c591f620e00bf509b","56e74226555c030e00a52a90","56e7447c7d693632001d5cb4","56e752bd56d59a0e00d5660e","56e755b98aa2c00e00494cd9","56e7584d911296190096dd80","56e759339b25270e001d11a0","56e7593e1b41040e009d10cf","56e7594e911296190096dd88","56e7595e8aa2c00e00494ce3","56e75d7f5669091700c5b2b4","56e77e22911296190096de13","56e77f259b25270e001d1232","56e7b2c737afb90e00e0eb9d","56ec4daf611730190000f23f","56ec4fde26db830e00afa083","56ec8f7204e8940e00966567","56f184cc9791b22d0077b9d9","56f18a2c3af4942b00bb3c47"],"project":"56e3719a591f620e00bf5095","__v":19,"version":"56e3719a591f620e00bf5098","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-12T01:32:11.359Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-14T23:08:44.255Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"","language":"curl"}]},"method":"post","results":{"codes":[{"code":"{\n  \"uid\": \"72852a55-5be3-496c-904c-fc3fd261f0a4\",\n  \"childrenCount\": 0,\n  \"lastName\": \"Raudin\",\n  \"checkInDate\": \"2016-03-08\",\n  \"checkOutDate\": \"2016-03-12\",\n  \"status\": \"BOOKED\",\n  \"adultCount\": 1,\n  \"agency\": {\n    \"uid\": \"4f6a3a32-6d57-450d-8b46-12547854\",\n    \"name\": \"Responseev\"\n  },\n  \"stayDetails\": {\n    \"arrivalTime\": \"15:00\",\n    \"departureTime\": \"11:00\"\n  },\n  \"property\": {\n    \"uid\": \"4f6a3a32-6d57-450d-8b46-44abb3b01994\",\n    \"isActive\": true,\n\t\t\"description\": \"This Point Reyes House is located on a quiet rural lane, 2 mns from the village of Point Reyes Station, just one hour north of downtown San Francisco.\",\n    \"baseGuests\": 4,\n    \"cleaningFeeAmount\": 160,\n    \"baseDailyRate\": 220,\n    \"acceptInstantBook\": false,\n    \"bathrooms\": \"2\",\n    \"maximumGuests\": 6,\n    \"state\": \"California\",\n    \"countryCode\": \"US\",\n    \"securityDepositAmount\": 500,\n    \"address1\": \"159 Campolindo Road\",\n    \"webLink\": \"http://point-reyes-vacation-rental.com/\",\n    \"address2\": \"\",\n    \"externalID\": \"\",\n    \"bedrooms\": 2,\n    \"type\": \"HOUSE\",\n    \"city\": \"Point Reyes Station\",\n    \"picture\": \"https://www.orbirental.com/img/uploader/livingroom4_1.jpg\",\n    \"postalCode\": \"94956\",\n    \"name\": \"The Quail's Nest Cottage\",\n    \"minimumStay\": 1,\n    \"availabilityCalendarUrl\" : \"https://www.orbirental.com/calendar/232.ics\",\n    \"photos\": [\n      {\n        \"url\": \"https://www.orbirental.com/img/uploader/view_0.jpg\",\n        \"description\" : \"my house\"\n      }\n    ],\n    \"floor\": 2,\n\t\t\"areaSize\": 30,\n\t\t\"areaSizeUnit\": \"SQUARE_METERS\",\n    \"extraGuestFee\": 50,\n    \"taxationRate\": 12.5,\n    \"longitude\" : 48.1914945,\n    \"latitude\" : 19.1914945,\n    \"currency\": \"USD\"\n  },\n  \"notes\": \"\",\n  \"firstName\": \"Cedric\",\n  \"petCount\": 1,\n  \"quoteAmount\": 200\n}","language":"json","status":200,"name":""},{"name":"","code":"Orbirental API - Bad request.","language":"text","status":400},{"code":"Orbirental API - Agency not found.","language":"text","status":409}]},"settings":"","auth":"required","params":[{"_id":"56e7a2c61e071c22001a04a5","ref":"","in":"body","required":true,"desc":"The unique id of the parent agency","default":"","type":"string","name":"agencyUid"},{"_id":"56e7447c7d693632001d5cba","ref":"","in":"body","required":true,"desc":"Unique id of the property","default":"","type":"string","name":"propertyUid"},{"_id":"56e7447c7d693632001d5cbd","ref":"","in":"body","required":true,"desc":"Check-in date with format YYYY-MM-DD","default":"","type":"yyyy-mm-dd","name":"checkInDate"},{"_id":"56e7447c7d693632001d5cbc","ref":"","in":"body","required":true,"desc":"Check-out date with format YYYY-MM-DD","default":"","type":"yyyy-mm-dd","name":"checkOutDate"},{"_id":"56e7447c7d693632001d5cbb","ref":"","in":"body","required":true,"desc":"The email address of the guest","default":"","type":"string","name":"email"},{"_id":"56e7a33715f96b2200878e5c","ref":"","in":"body","required":true,"desc":"Possible status of a lead: NEW | BOOKED | PAID_IN_FULL | BLOCKED","default":"NEW","type":"string","name":"status"},{"_id":"56e7447c7d693632001d5cb8","ref":"","in":"body","required":false,"desc":"First name of the guest","default":"","type":"string","name":"firstName"},{"_id":"56e7447c7d693632001d5cb7","ref":"","in":"body","required":false,"desc":"Last name of the guest","default":"","type":"string","name":"lastName"},{"_id":"56e7447c7d693632001d5cb6","ref":"","in":"body","required":false,"desc":"Number of adults","default":"1","type":"int","name":"adultCount"},{"_id":"56e7447c7d693632001d5cb5","ref":"","in":"body","required":false,"desc":"Number of children","default":"0","type":"int","name":"childrenCount"},{"_id":"56e7a3161e071c22001a04a6","ref":"","in":"body","required":false,"desc":"Number of pets","default":"0","type":"int","name":"petCount"},{"_id":"56e7a4f6a39f7317003bc22f","ref":"","in":"body","required":false,"desc":"If you have a booking ID in your system, use it here","default":"","type":"string","name":"externalBookingID"},{"_id":"56e7a4f6a39f7317003bc22e","ref":"","in":"body","required":false,"desc":"String will appear in the dashboard as the originating source for this lead","default":"","type":"string","name":"referrer"},{"_id":"56e7a4f6a39f7317003bc22d","ref":"","in":"body","required":false,"desc":"Notes associated with this lead","default":"","type":"string","name":"notes"},{"_id":"56e7a4f6a39f7317003bc22c","ref":"","in":"body","required":false,"desc":"The phone number associated with this lead","default":"","type":"string","name":"phoneNumber"},{"_id":"56e7a4f6a39f7317003bc22b","ref":"","in":"body","required":false,"desc":"The guest's mailing address","default":"","type":"string","name":"address1"},{"_id":"56e7a4f6a39f7317003bc22a","ref":"","in":"body","required":false,"desc":"The  guest's mailing address (2nd line)","default":"","type":"string","name":"address2"},{"_id":"56e7a4f6a39f7317003bc229","ref":"","in":"body","required":false,"desc":"The  guest's postal / zip code","default":"","type":"string","name":"postalCode"},{"_id":"56e7a4f6a39f7317003bc228","ref":"","in":"body","required":false,"desc":"Use ISO_3166-1_alpha-2","default":"","type":"string","name":"countryCode"},{"_id":"595d0b7d3d48460033328749","ref":"","in":"body","required":false,"desc":"arrival time with format HH:mm","default":"","type":"string","name":"arrivalTime"},{"_id":"595d0b7d3d48460033328748","ref":"","in":"body","required":false,"desc":"departure time with format HH:mm","default":"","type":"string","name":"departureTime"},{"_id":"56e7a53d911296190096de77","ref":"","in":"body","required":false,"desc":"Value of the booking. if not given, the API wil automatically calculate the amount","default":"auto","type":"double","name":"quoteAmount"}],"url":"/leads"},"isReference":false,"order":20,"body":"Create a new lead associated with an agency and a property.\n\n**Note on lead statuses**\nNote that leads in the Orbirental sphere can have multiple statuses (from *NEW* to *ARCHIVED*). A booking is essentially a converted lead with a status starting by *BOOKED_*. Many of those statuses are used by the system and are not settable when creating new lead, nor editable. When creating a lead, developers can only set statuses as one of the following options:\n  *  NEW: this status typically represents a booking inquiry\n  * BLOCKED: this status represent a range of time at which the property is not available for booking\n  * BOOKED: this status represents a booking\n  * PAID_IN_FULL: this status represents a booking that has already been fully paid (typically used when adding a booking where payment is made on another platform, like for AirBnB)","excerpt":"Create a new lead","slug":"leads","type":"endpoint","title":"/leads"}

post/leads

Create a new lead

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

agencyUid:
required
string
The unique id of the parent agency
propertyUid:
required
string
Unique id of the property
checkInDate:
required
yyyy-mm-dd
Check-in date with format YYYY-MM-DD
checkOutDate:
required
yyyy-mm-dd
Check-out date with format YYYY-MM-DD
email:
required
string
The email address of the guest
status:
required
stringNEW
Possible status of a lead: NEW | BOOKED | PAID_IN_FULL | BLOCKED
firstName:
string
First name of the guest
lastName:
string
Last name of the guest
adultCount:
integer1
Number of adults
childrenCount:
integer0
Number of children
petCount:
integer0
Number of pets
externalBookingID:
string
If you have a booking ID in your system, use it here
referrer:
string
String will appear in the dashboard as the originating source for this lead
notes:
string
Notes associated with this lead
phoneNumber:
string
The phone number associated with this lead
address1:
string
The guest's mailing address
address2:
string
The guest's mailing address (2nd line)
postalCode:
string
The guest's postal / zip code
countryCode:
string
Use ISO_3166-1_alpha-2
arrivalTime:
string
arrival time with format HH:mm
departureTime:
string
departure time with format HH:mm
quoteAmount:
doubleauto
Value of the booking. if not given, the API wil automatically calculate the amount

Result Format


Documentation

Create a new lead associated with an agency and a property. **Note on lead statuses** Note that leads in the Orbirental sphere can have multiple statuses (from *NEW* to *ARCHIVED*). A booking is essentially a converted lead with a status starting by *BOOKED_*. Many of those statuses are used by the system and are not settable when creating new lead, nor editable. When creating a lead, developers can only set statuses as one of the following options: * NEW: this status typically represents a booking inquiry * BLOCKED: this status represent a range of time at which the property is not available for booking * BOOKED: this status represents a booking * PAID_IN_FULL: this status represents a booking that has already been fully paid (typically used when adding a booking where payment is made on another platform, like for AirBnB)

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}