TourAction API-Requests of type "review"
Understanding the 'timings' Array Structure
When working with the Tour-Actions endpoint for reviews, it's crucial to understand the expected structure of the timings
array. Incorrect formatting can lead to validation errors and HTTP 400 responses.
Common Issue
A common mistake is passing a flat array of numbers instead of the required array of tuples. The timings
field should be structured as an array of tuples, where each tuple represents a pair of numbers.
Correct Structure
{ "type": "review", "timings": [ [1754374003, 1754402803], [1754460403, 1754489203] ] }
Each inner array represents [arrival_time, departure_time]
for a stop. Ensure that the number of tuples matches the number of stops in the tour.
Troubleshooting
Ensure the
timings
array is an array of tuples.Verify that the number of tuples corresponds to the number of stops.
Check that the
type
field is correctly set toreview
.
Following these guidelines will help prevent validation errors and ensure your requests are processed correctly.