application/json

Body

  • trip_id string
  • voucher_code string

Responses

  • 200 application/json

    Booked trip

    Hide response attributes Show response attributes object
    • id integer
    • trip_id string(uuid)
    • status string

      Values are booked, canceled, or paid.

POST /books
curl \
 --request POST 'http://api.mycompany.com/v1/trips/books' \
 --header "Content-Type: application/json" \
 --data '{"trip_id":"string","voucher_code":"string"}'
Request examples
{
  "trip_id": "string",
  "voucher_code": "string"
}
Response examples (200)
{
  "id": 42,
  "trip_id": "string",
  "status": "booked"
}