/build-links
Build various types of links.
Endpoint URL
https://partners.api.vio.com/v1/build-links
HTTP Method
POST
Headers
Name | Required | Description |
---|---|---|
X-Partner-Key | Yes | Partner's profile key |
Content-Type | Yes | application/json |
Accept-Encoding | No | gzip, deflate, br |
Request body
Name | Required | Type | Description |
---|---|---|---|
homePageLinkParams | No | HomePageLinkParams | Parameters for building home page link. |
searchPageLinkParams | No | SearchPageLinkParams | Parameters for building search page links. |
HomePageLinkParams
Name | Required | Type | Description |
---|---|---|---|
label | No | string | Arbitrary string for tracking and reporting. |
SearchPageLinkParams
Name | Required | Type | Description |
---|---|---|---|
label | No | string | Arbitrary string for tracking and reporting. |
urls | No | string[] | The list of hotel or place URLs from Vio.com. |
Dynamic Click Tracking
Click tracking is available using Dynamic Click Tracking
Examples
Build home page link
This example builds a link to the Vio.com homepage with label "test" and extra partner's parameters.
- Bash
curl --request POST 'https://partners.api.vio.com/v1/build-links' \
--header 'X-Partner-Key: partner-profile-key' \
--header 'Content-Type: application/json' \
--data-raw '{
"homePageLinkParams": {
"label": "test"
}
}'
Build search page links
This example builds two links to the Vio.com search results page with label "test" and extra partner's parameters.
- Bash
curl --request POST 'https://partners.api.vio.com/v1/build-links' \
--header 'X-Partner-Key: partner-profile-key' \
--header 'Content-Type: application/json' \
--data-raw '{
"searchPageLinkParams": {
"label": "test",
"urls": [
"https://www.vio.com/Hotel/Search?hotelId=1103101&checkIn=2023-10-08&checkOut=2023-10-09&rooms=2&userSearch=1&homeSearch=1",
"https://www.vio.com/Hotel/Search?placeId=24399&checkIn=2023-08-24&checkOut=2023-08-25&rooms=2&userSearch=1&homeSearch=1"
]
}
}'
Response
The response payload has the following fields:
Field | Type | Description |
---|---|---|
homePageLink | string | Home page link if homePageLinkParams were provided. |
searchPageLinks | string[] | The list of search page links if searchPageLinkParams were provided. The order is the same as in the searchPageLinkParams.urls . |