Public API
1.0

This is the public API documentation, used by our iOS, Android and web apps.

This is the documentation for version 1.0 of the API. Last update on Jan 10, 2023.

Base URL
http://api.mycompany.com/v1

Book a trip

POST /books

Book a trip.

Body

Responses

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

Body

Responses

POST /payments
curl \
 -X POST http://api.mycompany.com/v1/payments \
 -H "Content-Type: application/json" \
 -d '{"book_id":"string","payment_token":"string","cents":"string"}'
Request example
{
  "book_id": "string",
  "payment_token": "string",
  "cents": "string"
}
Response example (200)
{
  "id": "string",
  "book_id": "string",
  "cents": "string",
  "status": "string",
  "": "string"
}