Create lead (supplier-initiated)
const url = 'https://api.wink.travel/api/lead';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"placeId":"example","name":"example","messageFromUser":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wink.travel/api/lead \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "placeId": "example", "name": "example", "messageFromUser": "example" }'Creates a supplier lead by querying Google Places for property details. The authenticated user must provide the Google Places ID, and Wink will hydrate the lead with official property metadata. The lead is attributed to the user and can later be converted to a full property via the property registration endpoint.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”object
Example generated
{ "placeId": "example", "name": "example", "messageFromUser": "example"}Responses
Section titled “ Responses ”Lead successfully created and returned.
object
Document UUID
Datetime this record was first created
Datetime this record was last updated
Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.
The user who initiated the creation of this lead. Contains userId as value and username as label.
object
The value that should be persisted.
English readable text of the value.
Usually the company or affiliate account ID that owns this lead. Contains account ID as value and account name as label.
object
The value that should be persisted.
English readable text of the value.
Current status of the lead (CREATED, INVITED, IN_PROGRESS, CLAIMED, COMPLETED)
Google Place ID uniquely identifying the location
Property name in English as provided by Google Places
Property name in local language as provided by Google Places
Google Maps URL linking to the location
International contact phone number
Street address components in English
object
Address line 1
Address line 2
State
Postal / zip code
County
City name
Country
Country
Address 1, Address 2, City, State, Postal / Zip code, Country
Street address components in local language if available
object
Address line 1
Address line 2
State
Postal / zip code
County
City name
Country
Country
Address 1, Address 2, City, State, Postal / Zip code, Country
Complete formatted address string in English
Complete formatted address string in local language if available
HTML-formatted address components in English from Google Places
HTML-formatted address components in local language if available from Google Places
Geographic location as GeoJSON point (longitude, latitude)
object
Property photos with URLs and metadata from Google Places
Multimedia that contains less information than Multimedia object
object
Document identifier
Use this identifier to communicate with Cloudinary.
Whether Cloudinary media is a VIDEO or IMAGE.
Currently ONLY using Cloudinary to store all image / video assets.
Sort allows you to control how you want to sort this record in a list of media records.
Media angle
Media width in pixels.
Media height in pixels.
Instead of deleting the media, choose to un-publish it instead for later re-use. Could be you keep seasonal images of the property.
Supported OTA specification PIC code. See OTA geoname data
Localized media captions to give user some context about where this media was taken.
object
Use as title or short text description
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Associate this media with a specific lifestyle type. A user searching and filtering inventory based on lifestyles can be shown relevant media first.
Whether image has attribution properties
object
URL to contributor
Name of contributor
True if media width is greater or equal to height
Google Places rating score from 0 to 5
Total number of user ratings from Google Places
UTC timezone offset in minutes (e.g., 420 for UTC+7)
Official property website URL
Personalized message from the affiliate inviting the supplier to claim the lead
Sometimes there is more than one hit when trying to find the GeoNameLightweight for the Google Place city. In this case we save all of them and let the user decide.
object
GeoName identifier
GeoNameLightweight type
Name of city
Url name
Ascii name of city
Coordinate points of the city
object
Timezone
Country
object
ISO code
Country name
Country capital
Continent code
Currency code
Currency name
Country GeoNames identifier
Country sub division
object
Sub-country name
Sub-country ascii name
Sub-country GeoNames identifier
Country sub sub division
object
Leverages AI to pre-populate the description.
object
Use as title or short text description
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Example
Invalid Google Places request or property not found in Google Places API.
object
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}object
object
object
object
object
object
object
object
Unauthorized: authentication required.
object
object
Forbidden
object
object
Google Places ID not found or invalid.
object
Document UUID
Datetime this record was first created
Datetime this record was last updated
Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.
The user who initiated the creation of this lead. Contains userId as value and username as label.
object
The value that should be persisted.
English readable text of the value.
Usually the company or affiliate account ID that owns this lead. Contains account ID as value and account name as label.
object
The value that should be persisted.
English readable text of the value.
Current status of the lead (CREATED, INVITED, IN_PROGRESS, CLAIMED, COMPLETED)
Google Place ID uniquely identifying the location
Property name in English as provided by Google Places
Property name in local language as provided by Google Places
Google Maps URL linking to the location
International contact phone number
Street address components in English
object
Address line 1
Address line 2
State
Postal / zip code
County
City name
Country
Country
Address 1, Address 2, City, State, Postal / Zip code, Country
Street address components in local language if available
object
Address line 1
Address line 2
State
Postal / zip code
County
City name
Country
Country
Address 1, Address 2, City, State, Postal / Zip code, Country
Complete formatted address string in English
Complete formatted address string in local language if available
HTML-formatted address components in English from Google Places
HTML-formatted address components in local language if available from Google Places
Geographic location as GeoJSON point (longitude, latitude)
object
Property photos with URLs and metadata from Google Places
Multimedia that contains less information than Multimedia object
object
Document identifier
Use this identifier to communicate with Cloudinary.
Whether Cloudinary media is a VIDEO or IMAGE.
Currently ONLY using Cloudinary to store all image / video assets.
Sort allows you to control how you want to sort this record in a list of media records.
Media angle
Media width in pixels.
Media height in pixels.
Instead of deleting the media, choose to un-publish it instead for later re-use. Could be you keep seasonal images of the property.
Supported OTA specification PIC code. See OTA geoname data
Localized media captions to give user some context about where this media was taken.
object
Use as title or short text description
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Associate this media with a specific lifestyle type. A user searching and filtering inventory based on lifestyles can be shown relevant media first.
Whether image has attribution properties
object
URL to contributor
Name of contributor
True if media width is greater or equal to height
Google Places rating score from 0 to 5
Total number of user ratings from Google Places
UTC timezone offset in minutes (e.g., 420 for UTC+7)
Official property website URL
Personalized message from the affiliate inviting the supplier to claim the lead
Sometimes there is more than one hit when trying to find the GeoNameLightweight for the Google Place city. In this case we save all of them and let the user decide.
object
GeoName identifier
GeoNameLightweight type
Name of city
Url name
Ascii name of city
Coordinate points of the city
object
Timezone
Country
object
ISO code
Country name
Country capital
Continent code
Currency code
Currency name
Country GeoNames identifier
Country sub division
object
Sub-country name
Sub-country ascii name
Sub-country GeoNames identifier
Country sub sub division
object
Leverages AI to pre-populate the description.
object
Use as title or short text description
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Example
{ "id": "", "createdDate": "", "lastUpdate": "", "version": "", "user": "", "owner": "", "status": "CREATED", "placeId": "", "nameInEnglish": "", "nameInLocalLanguage": "", "googleMapsUrl": "", "phone": "", "address": null, "addressLocal": null, "formattedAddress": "", "formattedAddressLocal": "", "htmlAddress": "", "htmlAddressLocal": "", "location": "", "photos": "", "rating": "", "userRatingTotal": "", "utcOffsetMinutes": "", "website": "", "messageFromUser": "", "cityOptions": [ null ], "descriptions": [ "" ]}Internal Server Error
object
Example generated
{}