Skip to content

Create lead (supplier-initiated)

POST
/api/lead
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.

Wink-Version
string
default: 2.0.0
Allowed values: 2.0
Media type application/json
object
placeId
required
string
>= 1 characters
name
required
string
>= 1 characters
messageFromUser
string
Example generated
{
"placeId": "example",
"name": "example",
"messageFromUser": "example"
}

Lead successfully created and returned.

Media type application/json
object
id

Document UUID

string format: uuid
""
createdDate

Datetime this record was first created

string format: date-time
""
lastUpdate

Datetime this record was last updated

string format: date-time
""
version

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.

integer format: int64
""
user
required

The user who initiated the creation of this lead. Contains userId as value and username as label.

object
value
required

The value that should be persisted.

string
"" >= 1 characters
label
required

English readable text of the value.

string
"" >= 1 characters
owner

Usually the company or affiliate account ID that owns this lead. Contains account ID as value and account name as label.

object
value
required

The value that should be persisted.

string
"" >= 1 characters
label
required

English readable text of the value.

string
"" >= 1 characters
status
required

Current status of the lead (CREATED, INVITED, IN_PROGRESS, CLAIMED, COMPLETED)

string
""
Allowed values: CREATED IN_PROGRESS INVITED CLAIMED REJECTED INACTIVE
placeId
required

Google Place ID uniquely identifying the location

string
"" >= 1 characters
nameInEnglish
required

Property name in English as provided by Google Places

string
"" >= 1 characters
nameInLocalLanguage

Property name in local language as provided by Google Places

string
""
googleMapsUrl
required

Google Maps URL linking to the location

string
"" >= 1 characters
phone

International contact phone number

string
""
address

Street address components in English

object
address1

Address line 1

string
""
address2

Address line 2

string
""
state

State

string
""
postalCode

Postal / zip code

string
""
county

County

string
""
city

City name

string
""
countryCode

Country

string
""
country

Country

string
""
fullAddress

Address 1, Address 2, City, State, Postal / Zip code, Country

string
""
addressLocal

Street address components in local language if available

object
address1

Address line 1

string
""
address2

Address line 2

string
""
state

State

string
""
postalCode

Postal / zip code

string
""
county

County

string
""
city

City name

string
""
countryCode

Country

string
""
country

Country

string
""
fullAddress

Address 1, Address 2, City, State, Postal / Zip code, Country

string
""
formattedAddress

Complete formatted address string in English

string
""
formattedAddressLocal

Complete formatted address string in local language if available

string
""
htmlAddress

HTML-formatted address components in English from Google Places

string
""
htmlAddressLocal

HTML-formatted address components in local language if available from Google Places

string
""
location
required

Geographic location as GeoJSON point (longitude, latitude)

object
x
number format: double
y
number format: double
type
string
coordinates
Array<number>
photos

Property photos with URLs and metadata from Google Places

Array<object>
""

Multimedia that contains less information than Multimedia object

object
multimediaIdentifier
required

Document identifier

string format: uuid
"" >= 1 characters
identifier
required

Use this identifier to communicate with Cloudinary.

string
"" >= 1 characters
type
required

Whether Cloudinary media is a VIDEO or IMAGE.

string
""
Allowed values: IMAGE VIDEO AUDIO RAW
source
required

Currently ONLY using Cloudinary to store all image / video assets.

string
default: CLOUDINARY
Allowed values: YOUTUBE CLOUDINARY
sort
required

Sort allows you to control how you want to sort this record in a list of media records.

integer format: int32
default: 999
angle

Media angle

string
""
width
required

Media width in pixels.

integer format: int32
"" >= 1
height
required

Media height in pixels.

integer format: int32
"" >= 1
published

Instead of deleting the media, choose to un-publish it instead for later re-use. Could be you keep seasonal images of the property.

boolean
category

Supported OTA specification PIC code. See OTA geoname data

string
""
descriptions

Localized media captions to give user some context about where this media was taken.

Array<object>
""
object
name
required

Use as title or short text description

string
""
description
required

Longer text description

string
"" >= 1 characters <= 2147483647 characters
language
required

Indicate which language this description is written in.

string
default: en >= 2 characters <= 2 characters
creator

Whether it was user or system generated.

string
default: USER
Allowed values: SYSTEM USER
md5ContentHash

The md5 hash of the name, description and language.

string
""
hashMismatch
boolean
lifestyleType

Associate this media with a specific lifestyle type. A user searching and filtering inventory based on lifestyles can be shown relevant media first.

string
""
Allowed values: LIFESTYLE_HEALTH_FITNESS LIFESTYLE_RELAX LIFESTYLE_ADULT_ONLY LIFESTYLE_ADVENTURE LIFESTYLE_BUSINESS LIFESTYLE_LGBT LIFESTYLE_SINGLE_PARENT LIFESTYLE_SOLO_FEMALE LIFESTYLE_BEAUTY LIFESTYLE_FOODIE LIFESTYLE_FAMILY LIFESTYLE_ROMANCE LIFESTYLE_COUPLE LIFESTYLE_SOLO LIFESTYLE_BACKPACKER LIFESTYLE_SHOPPING LIFESTYLE_SPORTS LIFESTYLE_MOUNTAIN LIFESTYLE_BEACH LIFESTYLE_CITY LIFESTYLE_COUNTRY LIFESTYLE_CULTURE LIFESTYLE_ECO
attribution

Whether image has attribution properties

Array<object>
""
object
url

URL to contributor

string
""
name
required

Name of contributor

string
"" >= 1 characters
isLandscape

True if media width is greater or equal to height

boolean
rating

Google Places rating score from 0 to 5

number format: float
""
userRatingTotal

Total number of user ratings from Google Places

integer format: int32
""
utcOffsetMinutes
required

UTC timezone offset in minutes (e.g., 420 for UTC+7)

integer format: int32
""
website

Official property website URL

string
""
messageFromUser

Personalized message from the affiliate inviting the supplier to claim the lead

string
""
cityOptions
Array<object>

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
geoNameId

GeoName identifier

string
""
type

GeoNameLightweight type

string
""
Allowed values: CITY ISLAND OTHER
name

Name of city

string
""
urlName

Url name

string
""
asciiName

Ascii name of city

string
""
location

Coordinate points of the city

object
x
number format: double
y
number format: double
type
string
coordinates
Array<number>
featureCode
string
countryCode
string
timezone

Timezone

string
""
country

Country

object
iso

ISO code

string
""
name

Country name

string
""
capital

Country capital

string
""
continent

Continent code

string
""
currencyCode

Currency code

string
""
currencyName

Currency name

string
""
geoNameId

Country GeoNames identifier

string
""
subCountry

Country sub division

object
name

Sub-country name

string
""
asciiName

Sub-country ascii name

string
""
geoNameId

Sub-country GeoNames identifier

string
""
subSubCountry

Country sub sub division

object
name
string
asciiName
string
geoNameId
string
descriptions
Array<object>

Leverages AI to pre-populate the description.

object
name
required

Use as title or short text description

string
""
description
required

Longer text description

string
"" >= 1 characters <= 2147483647 characters
language
required

Indicate which language this description is written in.

string
default: en >= 2 characters <= 2 characters
creator

Whether it was user or system generated.

string
default: USER
Allowed values: SYSTEM USER
md5ContentHash

The md5 hash of the name, description and language.

string
""
hashMismatch
boolean
key
additional properties
""
Example

Invalid Google Places request or property not found in Google Places API.

object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
}
}

Unauthorized: authentication required.

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties

Forbidden

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties

Google Places ID not found or invalid.

Media type application/json
object
id

Document UUID

string format: uuid
""
createdDate

Datetime this record was first created

string format: date-time
""
lastUpdate

Datetime this record was last updated

string format: date-time
""
version

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.

integer format: int64
""
user
required

The user who initiated the creation of this lead. Contains userId as value and username as label.

object
value
required

The value that should be persisted.

string
"" >= 1 characters
label
required

English readable text of the value.

string
"" >= 1 characters
owner

Usually the company or affiliate account ID that owns this lead. Contains account ID as value and account name as label.

object
value
required

The value that should be persisted.

string
"" >= 1 characters
label
required

English readable text of the value.

string
"" >= 1 characters
status
required

Current status of the lead (CREATED, INVITED, IN_PROGRESS, CLAIMED, COMPLETED)

string
""
Allowed values: CREATED IN_PROGRESS INVITED CLAIMED REJECTED INACTIVE
placeId
required

Google Place ID uniquely identifying the location

string
"" >= 1 characters
nameInEnglish
required

Property name in English as provided by Google Places

string
"" >= 1 characters
nameInLocalLanguage

Property name in local language as provided by Google Places

string
""
googleMapsUrl
required

Google Maps URL linking to the location

string
"" >= 1 characters
phone

International contact phone number

string
""
address

Street address components in English

object
address1

Address line 1

string
""
address2

Address line 2

string
""
state

State

string
""
postalCode

Postal / zip code

string
""
county

County

string
""
city

City name

string
""
countryCode

Country

string
""
country

Country

string
""
fullAddress

Address 1, Address 2, City, State, Postal / Zip code, Country

string
""
addressLocal

Street address components in local language if available

object
address1

Address line 1

string
""
address2

Address line 2

string
""
state

State

string
""
postalCode

Postal / zip code

string
""
county

County

string
""
city

City name

string
""
countryCode

Country

string
""
country

Country

string
""
fullAddress

Address 1, Address 2, City, State, Postal / Zip code, Country

string
""
formattedAddress

Complete formatted address string in English

string
""
formattedAddressLocal

Complete formatted address string in local language if available

string
""
htmlAddress

HTML-formatted address components in English from Google Places

string
""
htmlAddressLocal

HTML-formatted address components in local language if available from Google Places

string
""
location
required

Geographic location as GeoJSON point (longitude, latitude)

object
x
number format: double
y
number format: double
type
string
coordinates
Array<number>
photos

Property photos with URLs and metadata from Google Places

Array<object>
""

Multimedia that contains less information than Multimedia object

object
multimediaIdentifier
required

Document identifier

string format: uuid
"" >= 1 characters
identifier
required

Use this identifier to communicate with Cloudinary.

string
"" >= 1 characters
type
required

Whether Cloudinary media is a VIDEO or IMAGE.

string
""
Allowed values: IMAGE VIDEO AUDIO RAW
source
required

Currently ONLY using Cloudinary to store all image / video assets.

string
default: CLOUDINARY
Allowed values: YOUTUBE CLOUDINARY
sort
required

Sort allows you to control how you want to sort this record in a list of media records.

integer format: int32
default: 999
angle

Media angle

string
""
width
required

Media width in pixels.

integer format: int32
"" >= 1
height
required

Media height in pixels.

integer format: int32
"" >= 1
published

Instead of deleting the media, choose to un-publish it instead for later re-use. Could be you keep seasonal images of the property.

boolean
category

Supported OTA specification PIC code. See OTA geoname data

string
""
descriptions

Localized media captions to give user some context about where this media was taken.

Array<object>
""
object
name
required

Use as title or short text description

string
""
description
required

Longer text description

string
"" >= 1 characters <= 2147483647 characters
language
required

Indicate which language this description is written in.

string
default: en >= 2 characters <= 2 characters
creator

Whether it was user or system generated.

string
default: USER
Allowed values: SYSTEM USER
md5ContentHash

The md5 hash of the name, description and language.

string
""
hashMismatch
boolean
lifestyleType

Associate this media with a specific lifestyle type. A user searching and filtering inventory based on lifestyles can be shown relevant media first.

string
""
Allowed values: LIFESTYLE_HEALTH_FITNESS LIFESTYLE_RELAX LIFESTYLE_ADULT_ONLY LIFESTYLE_ADVENTURE LIFESTYLE_BUSINESS LIFESTYLE_LGBT LIFESTYLE_SINGLE_PARENT LIFESTYLE_SOLO_FEMALE LIFESTYLE_BEAUTY LIFESTYLE_FOODIE LIFESTYLE_FAMILY LIFESTYLE_ROMANCE LIFESTYLE_COUPLE LIFESTYLE_SOLO LIFESTYLE_BACKPACKER LIFESTYLE_SHOPPING LIFESTYLE_SPORTS LIFESTYLE_MOUNTAIN LIFESTYLE_BEACH LIFESTYLE_CITY LIFESTYLE_COUNTRY LIFESTYLE_CULTURE LIFESTYLE_ECO
attribution

Whether image has attribution properties

Array<object>
""
object
url

URL to contributor

string
""
name
required

Name of contributor

string
"" >= 1 characters
isLandscape

True if media width is greater or equal to height

boolean
rating

Google Places rating score from 0 to 5

number format: float
""
userRatingTotal

Total number of user ratings from Google Places

integer format: int32
""
utcOffsetMinutes
required

UTC timezone offset in minutes (e.g., 420 for UTC+7)

integer format: int32
""
website

Official property website URL

string
""
messageFromUser

Personalized message from the affiliate inviting the supplier to claim the lead

string
""
cityOptions
Array<object>

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
geoNameId

GeoName identifier

string
""
type

GeoNameLightweight type

string
""
Allowed values: CITY ISLAND OTHER
name

Name of city

string
""
urlName

Url name

string
""
asciiName

Ascii name of city

string
""
location

Coordinate points of the city

object
x
number format: double
y
number format: double
type
string
coordinates
Array<number>
featureCode
string
countryCode
string
timezone

Timezone

string
""
country

Country

object
iso

ISO code

string
""
name

Country name

string
""
capital

Country capital

string
""
continent

Continent code

string
""
currencyCode

Currency code

string
""
currencyName

Currency name

string
""
geoNameId

Country GeoNames identifier

string
""
subCountry

Country sub division

object
name

Sub-country name

string
""
asciiName

Sub-country ascii name

string
""
geoNameId

Sub-country GeoNames identifier

string
""
subSubCountry

Country sub sub division

object
name
string
asciiName
string
geoNameId
string
descriptions
Array<object>

Leverages AI to pre-populate the description.

object
name
required

Use as title or short text description

string
""
description
required

Longer text description

string
"" >= 1 characters <= 2147483647 characters
language
required

Indicate which language this description is written in.

string
default: en >= 2 characters <= 2 characters
creator

Whether it was user or system generated.

string
default: USER
Allowed values: SYSTEM USER
md5ContentHash

The md5 hash of the name, description and language.

string
""
hashMismatch
boolean
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
{}