Overview
Creates a new stop for a trip. A stop represents a point of interest (POI) that is part of a trip itinerary, including arrival and departure times and the order in which it appears in the trip.Endpoint
Request Body
The request body must be a JSON object containing the following fields:The ID of the trip this stop belongs to. Must reference an existing trip in the system.
The ID of the point of interest from the POI catalog. Must reference an existing POI in the catalog.
The order of this stop in the trip itinerary. Determines the sequence in which stops are visited.
The scheduled arrival time at this stop. Should be in a valid timestamp format.
The scheduled departure time from this stop. Should be in a valid timestamp format and must be after the arrival time.
Response
Success Response
Status Code:200 OK
Error Response
Status Code:500 Internal Server Error
Example Request
Example Response
Notes
- All fields in the request body are required
- The
trip_idmust reference an existing trip - The
poi_catalog_idmust reference an existing POI in the catalog - The
stop_ordershould be unique within the trip or follow your business logic for ordering stops - The
departure_timeshould logically come after thearrival_time - If any database constraint is violated (foreign key, data type, etc.), a 500 error will be returned with details