-
Notifications
You must be signed in to change notification settings - Fork 0
feat(viator): Add comprehensive Viator Partner API integration #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "productCode": product_code, | ||
| "productOptionCode": product_option_code, | ||
| "travelDate": travel_date, | ||
| "currency": currency, | ||
| "travelers": traveler_details, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map booking traveler fields to Viator camelCase payload
The booking request forwards traveler_details and booker_details to the Viator API without converting the snake_case fields defined in the action schema (e.g., first_name, age_band) to the camelCase keys the Viator endpoints expect (firstName, ageBand, etc.). As a result, any create_booking call built from the provided schema will send mismatched field names and the API will reject the request for missing required traveler data, preventing bookings from succeeding.
Useful? React with 👍 / 👎.
viator/config.json
Outdated
| "help_text": "Your Viator Partner API Key. You can obtain this from the Viator Partner API portal at https://www.viator.com/partner" | ||
| } | ||
| }, | ||
| "required": ["api_key"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed required as SDK errors on all calls when you put required fields in the custom auth definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed it, thanks
viator/requirements.txt
Outdated
| @@ -0,0 +1 @@ | |||
| autohive-integrations-sdk | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix to v1.0.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it to 1.0.2
- Document Viator integration in README - Implement config loading, API key management, and sandbox URL - Migrate action handlers to return ActionResult - Enhance product search transformation (duration, image, rating) - Update tests with real API key and import fix
4ecdf95 to
d9b99bd
Compare
- Remove 'required' field from custom auth definition to prevent SDK errors - Pin autohive-integrations-sdk to version 1.0.2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…I/integrations-autohive into sj/viator-integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to our recent discussion/decision, we want to change this to ~= - see https://raygun.slack.com/archives/C08KMNRAX8R/p1765943429616509 for more info. Sorry for the extra hassle.
|
I believe this PR is also waiting on the Merchant API access to ensure we are accessing relevant data requested by Joe's client. I'm taking care of the registration for this |
Description 📝
Type of change
Updates
👉 Added complete Viator integration with custom authentication and 9 comprehensive actions (search products, get product details, check availability, calculate price, create/get/cancel bookings, get destinations, get product reviews)
👉 Implemented robust API client with proper error handling, data transformation, and support for both production and sandbox environments
👉 Created comprehensive test suite with real API integration tests and detailed documentation including setup instructions and use cases
Screenshots 📷
{Image here of before and after - if applicable}
Test plan 🧪
The integration includes a comprehensive test suite in
viator/tests/test_viator.pythat covers all 9 actions. Tests can be run with real API credentials to verify functionality. Key test scenarios include:Author(s) to check 👓