Skip to content

Record a property visit

POST
/api/public/{managingEntityIdentifier}/inventory/visit
curl --request POST \
--url 'https://api.wink.travel/api/public/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/inventory/visit?customizationIdentifier=2c5b9e3a-7f1d-4a8c-b6e2-0d4f1a9b3c72' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Wink-Version: 2.0' \
--data '{ "propertyId": "example", "urlName": "example" }'

Record one visit to a property’s booking page. Call it once per landing view, not on every change of dates or currency: every call is recorded. Identify the property with propertyId or urlName (exactly one of the two; giving neither or both is a 400). A property is recorded only when it is available and the managing entity in the path has an active sales channel for it; otherwise the answer is a 404, identical to an unknown property. customizationIdentifier, when given, must be a customization of that managing entity, else the answer is a 404. How the guest arrived is read from the X-Wink-Source and X-Wink-Link request headers; an unverifiable claim is recorded as DIRECT. Recording is best effort and never changes the answer: a 204 means the request was valid, not that the visit was stored.

managingEntityIdentifier
required
string

Managing entity identifier

Example

d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69
customizationIdentifier
string
0 <= 64 characters

Booking engine customization identifier, which must belong to the managing entity; when omitted the managing entity’s default configuration is used

Example

2c5b9e3a-7f1d-4a8c-b6e2-0d4f1a9b3c72
X-Wink-Source
string

How the guest reached the page (for example a WinkLink, Book Now or an embed); validated server-side, and anything unverifiable is recorded as DIRECT

X-Wink-Link
string

Identifier of the link the guest arrived through; used together with X-Wink-Source

Wink-Version
string
default: 2.0.0
Allowed values: 2.0

The property the guest landed on

Media typeapplication/json

The property a guest landed on. Give exactly one of propertyId and urlName.

object
propertyId

Property identifier; give this or urlName, not both. A blank value counts as not given.

string
0 <= 64 characters
urlName

Property url-friendly name; give this or propertyId, not both. A blank value counts as not given.

string
0 <= 200 characters

Example generated

{
"propertyId": "example",
"urlName": "example"
}

The request was valid. No body.

Bad Request — missing or invalid request parameter or body

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Unauthorized — authentication is required or the session has expired

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Forbidden — authenticated but lacking the required permission or scope

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Not Found — the requested resource does not exist

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Method Not Allowed — the HTTP verb is not supported on this endpoint

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Conflict — the resource was modified by someone else since you read it; re-read it and retry with the new version

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Unsupported Media Type — use application/json

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Internal Server Error — an unexpected failure occurred on the server

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Service Unavailable — a downstream dependency is unreachable

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}