Record a property visit
const url = 'https://api.wink.travel/api/public/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/inventory/visit?customizationIdentifier=2c5b9e3a-7f1d-4a8c-b6e2-0d4f1a9b3c72';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"propertyId":"example","urlName":"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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Managing entity identifier
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Query Parameters
Section titled “Query Parameters”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-0d4f1a9b3c72Header Parameters
Section titled “Header Parameters”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
Identifier of the link the guest arrived through; used together with X-Wink-Source
Request Bodyrequired
Section titled “Request Bodyrequired”The property the guest landed on
The property a guest landed on. Give exactly one of propertyId and urlName.
object
Property identifier; give this or urlName, not both. A blank value counts as not given.
Property url-friendly name; give this or propertyId, not both. A blank value counts as not given.
Example generated
{ "propertyId": "example", "urlName": "example"}Responses
Section titled “Responses”The request was valid. No body.
Bad Request — missing or invalid request parameter or body
object
object
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
object
object
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
object
object
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
object
object
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
object
object
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
object
object
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
object
object
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
object
object
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
object
object
Example generated
{ "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }, "status": 1, "title": "example", "type": "https://example.com"}