Book a trip

POST /books

Book a trip.

application/json

Body

Responses

  • 200

    Booked trip

    Hide response attributes Show response attributes object
POST /books
curl \
 -X POST http://api.mycompany.com/v1/trips/books \
 -H "Content-Type: application/json" \
 -d '{"trip_id":"string","voucher_code":"string"}'
Request example
{
  "trip_id": "string",
  "voucher_code": "string"
}
Request examples
{
  "trip_id": "string",
  "voucher_code": "string"
}
Response examples (200)
{
  "id": 42,
  "trip_id": "string",
  "status": "booked"
}
Response examples (200)
{
  "id": 42,
  "trip_id": "string",
  "status": "booked"
}