Skip to main content

Base URL

http://localhost:8080/kinconecta/api/tours/trip-booking

Get All Trip Bookings

GET /kinconecta/api/tours/trip-booking
endpoint
Retrieve a list of all trip bookings in the platform.

Response

bookings
array
Array of trip booking objects

Example

curl -X GET http://localhost:8080/kinconecta/api/tours/trip-booking

Get Trip Booking by ID

GET /kinconecta/api/tours/trip-booking/{tripId}
endpoint
Retrieve details of a specific trip booking by its ID.

Path Parameters

tripId
long
required
The unique identifier of the trip booking

Response

Returns a single trip booking object with the same structure as described in Get All Trip Bookings.

Example

curl -X GET http://localhost:8080/kinconecta/api/tours/trip-booking/1

Create Trip Booking

POST /kinconecta/api/tours/trip-booking
endpoint
Create a new trip booking in the system.

Request Body

startDatetime
date
required
Start date and time of the trip
endDatetime
date
required
End date and time of the trip
status
enum
required
Trip status (e.g., PENDING, CONFIRMED, CANCELLED, COMPLETED)
cancelReason
string
Reason for cancellation (optional, used when status is CANCELLED)
notes
text
Additional notes or comments about the trip
favorites
boolean
Whether this trip should be marked as favorite

Response

Returns the created trip booking object including the generated tripId and timestamps.

Example

curl -X POST http://localhost:8080/kinconecta/api/tours/trip-booking \
  -H "Content-Type: application/json" \
  -d '{
    "startDatetime": "2024-06-01T08:00:00",
    "endDatetime": "2024-06-07T20:00:00",
    "status": "PENDING",
    "notes": "Summer vacation trip",
    "favorites": true
  }'

Update Trip Booking

PUT /kinconecta/api/tours/trip-booking/{tripId}
endpoint
Update an existing trip booking by its ID.

Path Parameters

tripId
long
required
The unique identifier of the trip booking to update

Request Body

Accepts the same fields as Create Trip Booking. All fields are optional - only include fields you want to update.
startDatetime
date
Start date and time of the trip
endDatetime
date
End date and time of the trip
status
enum
Trip status
cancelReason
string
Reason for cancellation
notes
text
Additional notes or comments
favorites
boolean
Whether this trip is marked as favorite

Response

Returns the updated trip booking object.

Example

curl -X PUT http://localhost:8080/kinconecta/api/tours/trip-booking/1 \
  -H "Content-Type: application/json" \
  -d '{
    "status": "CONFIRMED",
    "notes": "Hotel and flights confirmed. Ready to go!"
  }'

Delete Trip Booking

DELETE /kinconecta/api/tours/trip-booking/{tripId}
endpoint
Delete a trip booking by its ID.

Path Parameters

tripId
long
required
The unique identifier of the trip booking to delete

Response

Returns the deleted trip booking object.

Example

curl -X DELETE http://localhost:8080/kinconecta/api/tours/trip-booking/1

Build docs developers (and LLMs) love