# Viator

> Search Viator experiences and read product, destination, attraction, availability and review data.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/viator

## Actions

### Check availability

Check availability.

**Inputs**

- Product code (`product_code`, text, required): Product code.
- Product option code (`product_option_code`, text): Product option code.
- Start time (`start_time`, time): Start time.
- Travel date (`travel_date`, date, required): Travel date.
- Currency (`currency`, text, required): Currency.
- Pax mix (`pax_mix`, list, required): Pax mix.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "bookableItems": [
      {
        "available": true,
        "capacity": {},
        "extraChargesSummary": {},
        "lineItems": [
          {}
        ],
        "productOptionCode": "example",
        "startTime": "example",
        "totalPrice": {},
        "translationInfo": {},
        "unavailableReason": "example"
      }
    ],
    "currency": "example",
    "productCode": "example",
    "tax": {
      "breakdown": [
        {}
      ],
      "isExempt": true,
      "isTaxable": true,
      "jurisdiction": {
        "city": "example",
        "country": "example",
        "county": "example",
        "postcode": "example",
        "state": "example",
        "street": "example"
      }
    },
    "travelDate": "example"
  }
}
```

### Get attraction

Get attraction.

**Inputs**

- Attraction ID (`attraction_id`, number, required): Attraction ID.
- Campaign value (`campaign_value`, text): Campaign value.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "address": {
      "city": "example",
      "postcode": "example",
      "state": "example",
      "street": "example"
    },
    "attractionId": 1,
    "attractionUrl": "example",
    "center": {
      "latitude": 1,
      "longitude": 1
    },
    "destinations": [
      {
        "id": 1,
        "primary": true
      }
    ],
    "freeAttraction": true,
    "images": [
      {
        "height": 1,
        "url": "example",
        "width": 1
      }
    ],
    "name": "example",
    "openingHours": "example",
    "productCodes": [
      "example"
    ],
    "productCount": 1,
    "reviews": {
      "combinedAverageRating": 1,
      "reviewCountTotals": [
        {}
      ],
      "sources": [
        {}
      ],
      "totalReviews": 1
    },
    "translationInfo": {
      "containsMachineTranslatedText": true,
      "translationAttribution": "example",
      "translationSource": "example"
    },
    "viatorUniqueContent": {
      "introduction": "example",
      "overview": {
        "sections": [
          {}
        ]
      }
    }
  }
}
```

### Get availability schedule

Get availability schedule.

**Inputs**

- Product code (`product_code`, text, required): Product code.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "bookableItems": [
      {
        "productOptionCode": "example",
        "seasons": [
          {}
        ]
      }
    ],
    "currency": "example",
    "extraChargesSummary": {
      "extraCharges": 1,
      "fromPrice": 1,
      "fromPriceBeforeDiscount": 1
    },
    "productCode": "example",
    "summary": {
      "fromPrice": 1,
      "fromPriceBeforeDiscount": 1
    },
    "tax": {
      "breakdown": [
        {}
      ],
      "isExempt": true,
      "isTaxable": true,
      "jurisdiction": {
        "city": "example",
        "country": "example",
        "county": "example",
        "postcode": "example",
        "state": "example",
        "street": "example"
      }
    }
  }
}
```

### Get availability schedules

Get availability schedules.

**Inputs**

- Product codes (`product_codes`, list, required): Product codes.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "availabilitySchedules": [
      {
        "bookableItems": [
          {}
        ],
        "currency": "example",
        "extraChargesSummary": {},
        "productCode": "example",
        "summary": {},
        "tax": {}
      }
    ]
  }
}
```

### Get booking questions

Get booking questions.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "bookingQuestions": [
      {
        "allowedAnswers": [
          "example"
        ],
        "group": "example",
        "hint": "example",
        "id": "example",
        "label": "example",
        "legacyBookingQuestionId": 1,
        "maxLength": 1,
        "required": "example",
        "type": "example",
        "units": [
          "example"
        ]
      }
    ]
  }
}
```

### Get exchange rates

Get exchange rates.

**Inputs**

- Source currencies (`source_currencies`, list): Source currencies.
- Target currencies (`target_currencies`, list): Target currencies.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "rates": [
      {
        "expiry": "example",
        "lastUpdated": "example",
        "rate": 1,
        "sourceCurrency": "example",
        "targetCurrency": "example"
      }
    ]
  }
}
```

### Get locations

Get locations.

**Inputs**

- Locations (`locations`, list, required): Locations.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "locations": [
      {
        "provider": "example",
        "reference": "example"
      }
    ]
  }
}
```

### Get product

Get product.

**Inputs**

- Campaign value (`campaign_value`, text): Campaign value.
- Target lander (`target_lander`, text): Target lander.
- Product code (`product_code`, text, required): Product code.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "createdAt": "example",
    "language": "example",
    "lastUpdatedAt": "example",
    "productCode": "example",
    "status": "example"
  }
}
```

### Get products

Get products.

**Inputs**

- Campaign value (`campaign_value`, text): Campaign value.
- Target lander (`target_lander`, text): Target lander.
- Product codes (`product_codes`, list, required): Product codes.

**Outputs**

- `data` (list): The response from Viator.

**Example output**

```json
{
  "data": [
    {
      "createdAt": "example",
      "language": "example",
      "lastUpdatedAt": "example",
      "productCode": "example",
      "status": "example"
    }
  ]
}
```

### List cancellation reasons

List cancellation reasons.

**Inputs**

- Type (`type`, text): Type.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "reasons": [
      {
        "cancellationReasonCode": "example",
        "cancellationReasonText": "example"
      }
    ]
  }
}
```

### List changed availability

List changed availability.

**Inputs**

- Cursor (`cursor`, text): Cursor.
- Count (`count`, number): Count. From 1 to 500.
- Modified since (`modified_since`, date and time): Modified since.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "availabilitySchedules": [
      {
        "bookableItems": [
          {}
        ],
        "currency": "example",
        "extraChargesSummary": {},
        "productCode": "example",
        "summary": {},
        "tax": {}
      }
    ],
    "nextCursor": "example"
  }
}
```

### List changed products

List changed products.

**Inputs**

- Cursor (`cursor`, text): Cursor.
- Count (`count`, number, required): Count. From 1 to 500.
- Campaign value (`campaign_value`, text): Campaign value.
- Target lander (`target_lander`, text): Target lander.
- Modified since (`modified_since`, date and time): Modified since.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "nextCursor": "example",
    "products": [
      {
        "createdAt": "example",
        "language": "example",
        "lastUpdatedAt": "example",
        "productCode": "example",
        "status": "example"
      }
    ]
  }
}
```

### List destinations

List destinations.

**Inputs**

- Campaign value (`campaign_value`, text): Campaign value.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "destinations": [
      {
        "center": {},
        "countryCallingCode": "example",
        "defaultCurrencyCode": "example",
        "destinationId": 1,
        "destinationUrl": "example",
        "iataCodes": [
          "example"
        ],
        "languages": [
          "example"
        ],
        "lookupId": "example",
        "name": "example",
        "parentDestinationId": 1,
        "timeZone": "example",
        "type": "example"
      }
    ],
    "totalCount": 1
  }
}
```

### List product reviews

List product reviews.

**Inputs**

- Product code (`product_code`, text, required): Product code.
- Count (`count`, number, required): Count.
- Start (`start`, number, required): Start.
- Provider (`provider`, text, required): Provider.
- Sort by (`sort_by`, text): Sort by.
- Reviews for non primary locale (`reviews_for_non_primary_locale`, true/false): Reviews for non primary locale.
- Show machine translated (`show_machine_translated`, true/false): Show machine translated.
- Ratings (`ratings`, list): Ratings.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "filteredReviewsSummary": {
      "sources": [
        {}
      ],
      "totalReviews": 1
    },
    "reviews": [
      {
        "activityDate": "example",
        "avatarUrl": "example",
        "helpfulVotes": 1,
        "language": "example",
        "machineTranslated": true,
        "ownerResponse": {},
        "photosInfo": [
          {}
        ],
        "provider": "example",
        "publishedDate": "example",
        "rating": 1,
        "reviewReference": "example",
        "text": "example",
        "title": "example",
        "userName": "example"
      }
    ],
    "totalReviewsSummary": {
      "reviewCountTotals": [
        {}
      ],
      "sources": [
        {}
      ],
      "totalReviews": 1
    }
  }
}
```

### List product tags

List product tags.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "tags": [
      {
        "allNamesByLocale": {},
        "parentTagIds": [
          1
        ],
        "tagId": 1
      }
    ]
  }
}
```

### List supplier products

List supplier products.

**Inputs**

- Product codes (`product_codes`, list, required): Product codes.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "suppliers": [
      {
        "contact": {},
        "logo": "example",
        "name": "example",
        "productCode": "example",
        "reference": "example",
        "registeredBusinessNumber": "example",
        "registrationCountry": "example",
        "supplierAgreedToLegalCompliance": true,
        "supplierInfoVerified": true,
        "tradeRegisterName": "example",
        "type": "example"
      }
    ]
  }
}
```

### Search attractions

Search attractions.

**Inputs**

- Campaign value (`campaign_value`, text): Campaign value.
- Destination ID (`destination_id`, number, required): Destination id.
- Sorting (`sorting`, object): Sorting.
- Pagination (`pagination`, object): Pagination.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "attractions": [
      {
        "address": {},
        "attractionId": 1,
        "attractionUrl": "example",
        "center": {},
        "destinations": [
          {}
        ],
        "freeAttraction": true,
        "images": [
          {}
        ],
        "name": "example",
        "openingHours": "example",
        "productCodes": [
          "example"
        ],
        "productCount": 1,
        "reviews": {},
        "translationInfo": {},
        "viatorUniqueContent": {}
      }
    ],
    "totalCount": 1
  }
}
```

### Search free text

Search free text.

**Inputs**

- Campaign value (`campaign_value`, text): Campaign value.
- Target lander (`target_lander`, text): Target lander.
- Search term (`search_term`, text, required): Search term.
- Product filtering (`product_filtering`, object): Product filtering.
- Product sorting (`product_sorting`, object): Product sorting.
- Search types (`search_types`, list, required): Search types.
- Currency (`currency`, text, required): Currency.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "attractions": {
      "results": [
        {}
      ],
      "totalCount": 1
    },
    "destinations": {
      "results": [
        {}
      ],
      "totalCount": 1
    },
    "products": {
      "results": [
        {}
      ],
      "totalCount": 1
    }
  }
}
```

### Search products

Search products.

**Inputs**

- Campaign value (`campaign_value`, text): Campaign value.
- Target lander (`target_lander`, text): Target lander.
- Filtering (`filtering`, object, required): Filtering.
- Sorting (`sorting`, object): Sorting.
- Pagination (`pagination`, object): Pagination.
- Currency (`currency`, text, required): Currency.

**Outputs**

- `data` (object): The response from Viator.

**Example output**

```json
{
  "data": {
    "products": [
      {
        "confirmationType": "example",
        "description": "example",
        "destinations": [
          {}
        ],
        "duration": {},
        "flags": [
          "example"
        ],
        "images": [
          {}
        ],
        "itineraryType": "example",
        "pricing": {},
        "productCode": "example",
        "productUrl": "example",
        "reviews": {},
        "tags": [
          1
        ],
        "tax": {},
        "title": "example",
        "translationInfo": {},
        "videos": [
          {}
        ]
      }
    ],
    "totalCount": 1
  }
}
```
