{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/leads","auth":"required","examples":{"codes":[{"language":"curl","code":""}]},"method":"post","params":[{"name":"agencyUid","type":"string","default":"","desc":"The unique id of the parent agency","required":true,"in":"body","ref":"","_id":"56e7a2c61e071c22001a04a5"},{"name":"propertyUid","type":"string","default":"","desc":"Unique id of the property","required":true,"in":"body","ref":"","_id":"56e7447c7d693632001d5cba"},{"name":"checkInDate","type":"yyyy-mm-dd","default":"","desc":"Check-in date with format YYYY-MM-DD","required":true,"in":"body","ref":"","_id":"56e7447c7d693632001d5cbd"},{"name":"checkOutDate","type":"yyyy-mm-dd","default":"","desc":"Check-out date with format YYYY-MM-DD","required":true,"in":"body","ref":"","_id":"56e7447c7d693632001d5cbc"},{"name":"email","type":"string","default":"","desc":"The email address of the guest","required":true,"in":"body","ref":"","_id":"56e7447c7d693632001d5cbb"},{"name":"status","type":"string","default":"NEW","desc":"Possible status of a lead: NEW | BOOKED | PAID_IN_FULL | BLOCKED","required":true,"in":"body","ref":"","_id":"56e7a33715f96b2200878e5c"},{"name":"firstName","type":"string","default":"","desc":"First name of the guest","required":false,"in":"body","ref":"","_id":"56e7447c7d693632001d5cb8"},{"name":"lastName","type":"string","default":"","desc":"Last name of the guest","required":false,"in":"body","ref":"","_id":"56e7447c7d693632001d5cb7"},{"name":"adultCount","type":"int","default":"1","desc":"Number of adults","required":false,"in":"body","ref":"","_id":"56e7447c7d693632001d5cb6"},{"name":"childrenCount","type":"int","default":"0","desc":"Number of children","required":false,"in":"body","ref":"","_id":"56e7447c7d693632001d5cb5"},{"name":"petCount","type":"int","default":"0","desc":"Number of pets","required":false,"in":"body","ref":"","_id":"56e7a3161e071c22001a04a6"},{"name":"externalBookingID","type":"string","default":"","desc":"If you have a booking ID in your system, use it here","required":false,"in":"body","ref":"","_id":"56e7a4f6a39f7317003bc22f"},{"name":"referrer","type":"string","default":"","desc":"String will appear in the dashboard as the originating source for this lead","required":false,"in":"body","ref":"","_id":"56e7a4f6a39f7317003bc22e"},{"name":"notes","type":"string","default":"","desc":"Notes associated with this lead","required":false,"in":"body","ref":"","_id":"56e7a4f6a39f7317003bc22d"},{"name":"extraNotes","type":"string","default":"","desc":"Extra Notes associated with this lead.","required":false,"in":"body","ref":"","_id":"5b6533ac5c435a000311cb72"},{"name":"phoneNumber","type":"string","default":"","desc":"The phone number associated with this lead","required":false,"in":"body","ref":"","_id":"56e7a4f6a39f7317003bc22c"},{"name":"cellphoneNumber","type":"string","default":"","desc":"The Cell Phone Number associated with this lead","required":false,"in":"body","ref":"","_id":"5b6533ac5c435a000311cb71"},{"name":"address1","type":"string","default":"","desc":"The guest's mailing address","required":false,"in":"body","ref":"","_id":"56e7a4f6a39f7317003bc22b"},{"name":"address2","type":"string","default":"","desc":"The  guest's mailing address (2nd line)","required":false,"in":"body","ref":"","_id":"56e7a4f6a39f7317003bc22a"},{"name":"postalCode","type":"string","default":"","desc":"The  guest's postal / zip code","required":false,"in":"body","ref":"","_id":"56e7a4f6a39f7317003bc229"},{"name":"city","type":"string","default":"","desc":"City corresponding to this lead.","required":false,"in":"body","ref":"","_id":"5b6533ac5c435a000311cb70"},{"name":"state","type":"string","default":"","desc":"State corresponding to this lead.","required":false,"in":"body","ref":"","_id":"5b6533ac5c435a000311cb6f"},{"name":"countryCode","type":"string","default":"","desc":"Use ISO_3166-1_alpha-2","required":false,"in":"body","ref":"","_id":"56e7a4f6a39f7317003bc228"},{"name":"arrivalTime","type":"string","default":"","desc":"arrival time with format HH:mm","required":false,"in":"body","ref":"","_id":"595d0b7d3d48460033328749"},{"name":"departureTime","type":"string","default":"","desc":"departure time with format HH:mm","required":false,"in":"body","ref":"","_id":"595d0b7d3d48460033328748"},{"name":"quoteAmount","type":"double","default":"auto","desc":"Value of the booking. if not given, the API wil automatically calculate the amount","required":false,"in":"body","ref":"","_id":"56e7a53d911296190096de77"},{"name":"securityDepositAmount","type":"double","default":"","desc":"Security deposit amount","required":false,"in":"body","ref":"","_id":"5a0af53e6ef038001aa5a74e"},{"name":"flightNumber","type":"string","default":"","desc":"Flight Number associated with this lead.","required":false,"in":"body","ref":"","_id":"5b6533ac5c435a000311cb6e"},{"name":"reasonForTrip","type":"string","default":"","desc":"Leads Reason for the Trip","required":false,"in":"body","ref":"","_id":"5b6533ac5c435a000311cb6d"},{"name":"preferredCurrency","type":"string","default":"","desc":"Preferred Currency of this lead.","required":false,"in":"body","ref":"","_id":"5b6533ac5c435a000311cb6c"}],"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  \"source\": \"ORBIRENTAL_FORM\",\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  \"stayDetails\": {\n       \"departureDate\": \"2017-02-25 11:00:00.0\",\n       \"arrivalDate\": \"2017-02-24 15:00:00.0\",\n       \"extraNotes\": \"Some notes\"\n  },\n  \"notes\": \"\",\n  \"phoneNumber\": \"415-322-2422\",\n  \"cellphoneNumber\": \"415-888-6658\",\n  \"firstName\": \"Cedric\",\n  \"flightNumber\": \"XTF1PNS\",\n  \"reasonForTrip\": \"Business\",\n  \"preferredCurrency\": \"USD\",\n  \"petCount\": 1,\n  \"quoteAmount\": 200,\n  \"city\": \"Irvine\",\n  \"state\": \"California\",\n   \"secondaryEmail\": \"mike:::at:::guest.airbnb.com\"\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":""},"next":{"description":"","pages":[]},"title":"/leads","type":"endpoint","slug":"leads","excerpt":"Create a new lead","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)","updates":[],"order":33,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5de85dbbb0b885003ddf333b","editedParams":true,"editedParams2":true,"githubsync":"","parentDoc":null,"__v":12,"project":"56e3719a591f620e00bf5095","user":"56e371538b32a10e00f79750","createdAt":"2016-03-14T23:08:44.255Z","version":{"version":"1.5","version_clean":"1.5.0","codename":"Domain","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5de85dbbb0b885003ddf3334","56e7b24ad365390e007baeab","5de85dbbb0b885003ddf3335","5de85dbbb0b885003ddf3336","5de85dbbb0b885003ddf3337","5de85dbbb0b885003ddf3338"],"_id":"5de85dbbb0b885003ddf339f","__v":0,"project":"56e3719a591f620e00bf5095","forked_from":"56e3719a591f620e00bf5098","createdAt":"2016-03-12T01:32:10.751Z","releaseDate":"2016-03-12T01:32:10.751Z"},"category":{"sync":{"isSync":false,"url":""},"pages":["5de85dbbb0b885003ddf3339","5de85dbbb0b885003ddf333a","5de85dbbb0b885003ddf333b","5de85dbbb0b885003ddf333c","5de85dbbb0b885003ddf333d","5de85dbbb0b885003ddf333e","5de85dbbb0b885003ddf333f","5de85dbbb0b885003ddf3340","5de85dbbb0b885003ddf3341","5de85dbbb0b885003ddf3342","5de85dbbb0b885003ddf3343","56e77e22911296190096de13","5de85dbbb0b885003ddf3344","5de85dbbb0b885003ddf3345","5de85dbbb0b885003ddf3346","5de85dbbb0b885003ddf3347","5de85dbbb0b885003ddf3348","5de85dbbb0b885003ddf3349","5de85dbbb0b885003ddf334a"],"title":"Documentation","slug":"documentation","order":0,"from_sync":false,"reference":false,"_id":"5de85dbbb0b885003ddf3334","project":"56e3719a591f620e00bf5095","__v":19,"createdAt":"2016-03-12T01:32:11.359Z","version":"5de85dbbb0b885003ddf339f"}}

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
extraNotes:
string
Extra Notes associated with this lead.
phoneNumber:
string
The phone number associated with this lead
cellphoneNumber:
string
The Cell 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
city:
string
City corresponding to this lead.
state:
string
State corresponding to this lead.
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
securityDepositAmount:
double
Security deposit amount
flightNumber:
string
Flight Number associated with this lead.
reasonForTrip:
string
Leads Reason for the Trip
preferredCurrency:
string
Preferred Currency of this lead.

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 }}