Get Bookings History

This is an endpoint that provides the API user access to real-time information of all the bookings initiated via their authorization/account.

BODY PAYLOAD

This is a GET request that does not expect a body, simply authorize appropriately and send.

ENDPOINT URL

REQUEST TYPE: GET

LIVE URL: https://api.travu.africa/api/v1/bookings

TEST URL: https://api.travu.africa/test/api/v1/bookings

Remember to Pass your Authorization Token for this request to go through, read about Authorization here.

RESPONSE

The Response for this request should bring the BOOKING DETAILS in the below format;

{
    "status": 200,
    "error": false,
    "message": "Data fetched successfully",
    "data": [
        {
            "id": 16,
            "user_id": "7",
            "provider": "GUO",
            "amount": "14000",
            "charged_amount": "13440",
            "status": "confirmed",
            "booking_number": "fe564148",
            "details": "{\"passengers\":[{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Adult\",\"sex\":\"M\",\"name\":\"Abijah Johnnie\",\"email\":\"abijahjohnnie@gmail.com\",\"phone\":\"07057568594\",\"next_of_kin\":\"Benjamin Johnnie\",\"next_of_kin_phone\":\"09000000000\",\"seat_number\":\"4\"},{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Child\",\"sex\":\"M\",\"name\":\"Barnabas Johnnie\",\"email\":\"bamanjab@gmail.com\",\"phone\":\"09057568594\",\"next_of_kin\":\"Miracle Johnnie\",\"next_of_kin_phone\":\"03000000000\",\"seat_number\":\"5\"}],\"narration\":\"UMUAHIA TO LAGOS - AJAH\",\"vehicle_no\":\"1st Bus (15)\",\"order_ticket_date\":\"2021-07-09\"}",
            "created_at": "2021-07-09T09:33:44.000000Z",
            "updated_at": "2021-07-09T09:33:44.000000Z"
        },
        {
            "id": 17,
            "user_id": "7",
            "provider": "GUO",
            "amount": "14000",
            "charged_amount": "13440",
            "status": "confirmed",
            "booking_number": "fe564148",
            "details": "{\"passengers\":[{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Adult\",\"sex\":\"M\",\"name\":\"Abijah Johnnie\",\"email\":\"abijahjohnnie@gmail.com\",\"phone\":\"07057568594\",\"next_of_kin\":\"Benjamin Johnnie\",\"next_of_kin_phone\":\"09000000000\",\"seat_number\":\"4\"},{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Child\",\"sex\":\"M\",\"name\":\"Barnabas Johnnie\",\"email\":\"bamanjab@gmail.com\",\"phone\":\"09057568594\",\"next_of_kin\":\"Miracle Johnnie\",\"next_of_kin_phone\":\"03000000000\",\"seat_number\":\"5\"}],\"narration\":\"UMUAHIA TO LAGOS - AJAH\",\"vehicle_no\":\"1st Bus (15)\",\"order_ticket_date\":\"2021-07-09\"}",
            "created_at": "2021-07-09T09:34:03.000000Z",
            "updated_at": "2021-07-09T09:34:03.000000Z"
        },
        {
            "id": 18,
            "user_id": "7",
            "provider": "GUO",
            "amount": "14000",
            "charged_amount": "13440",
            "status": "confirmed",
            "booking_number": "fe564148",
            "details": "{\"passengers\":[{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Adult\",\"sex\":\"M\",\"name\":\"Abijah Johnnie\",\"email\":\"abijahjohnnie@gmail.com\",\"phone\":\"07057568594\",\"next_of_kin\":\"Benjamin Johnnie\",\"next_of_kin_phone\":\"09000000000\",\"seat_number\":\"4\"},{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Child\",\"sex\":\"M\",\"name\":\"Barnabas Johnnie\",\"email\":\"bamanjab@gmail.com\",\"phone\":\"09057568594\",\"next_of_kin\":\"Miracle Johnnie\",\"next_of_kin_phone\":\"03000000000\",\"seat_number\":\"5\"}],\"narration\":\"UMUAHIA TO LAGOS - AJAH\",\"vehicle_no\":\"1st Bus (15)\",\"order_ticket_date\":\"2021-07-09\"}",
            "created_at": "2021-07-09T09:43:23.000000Z",
            "updated_at": "2021-07-09T09:43:23.000000Z"
        },
        {
            "id": 19,
            "user_id": "7",
            "provider": "GUO",
            "amount": "14000",
            "charged_amount": "13440",
            "status": "confirmed",
            "booking_number": "fe564148",
            "details": "{\"passengers\":[{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Adult\",\"sex\":\"M\",\"name\":\"Abijah Johnnie\",\"email\":\"abijahjohnnie@gmail.com\",\"phone\":\"07057568594\",\"next_of_kin\":\"Benjamin Johnnie\",\"next_of_kin_phone\":\"09000000000\",\"seat_number\":\"4\"},{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Child\",\"sex\":\"M\",\"name\":\"Barnabas Johnnie\",\"email\":\"bamanjab@gmail.com\",\"phone\":\"09057568594\",\"next_of_kin\":\"Miracle Johnnie\",\"next_of_kin_phone\":\"03000000000\",\"seat_number\":\"5\"}],\"narration\":\"UMUAHIA TO LAGOS - AJAH\",\"vehicle_no\":\"1st Bus (15)\",\"order_ticket_date\":\"2021-07-09\"}",
            "created_at": "2021-07-09T09:44:00.000000Z",
            "updated_at": "2021-07-09T09:44:00.000000Z"
        },
        {
            "id": 20,
            "user_id": "7",
            "provider": "GUO",
            "amount": "14000",
            "charged_amount": "13440",
            "status": "confirmed",
            "booking_number": "fe564148",
            "details": "{\"passengers\":[{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Adult\",\"sex\":\"M\",\"name\":\"Abijah Johnnie\",\"email\":\"abijahjohnnie@gmail.com\",\"phone\":\"07057568594\",\"next_of_kin\":\"Benjamin Johnnie\",\"next_of_kin_phone\":\"09000000000\",\"seat_number\":\"4\"},{\"fare\":\"6500.00\",\"title\":\"Mr\",\"age\":\"Child\",\"sex\":\"M\",\"name\":\"Barnabhas Johnnie\",\"email\":\"bamanjab@gmail.com\",\"phone\":\"09057568594\",\"next_of_kin\":\"Miracle Johnnie\",\"next_of_kin_phone\":\"03000000000\",\"seat_number\":\"14\"}],\"narration\":\"UMUAHIA TO LAGOS - AJAH\",\"vehicle_no\":\"1st Bus (15)\",\"order_ticket_date\":\"2021-07-09\"}",
            "created_at": "2021-07-09T10:00:29.000000Z",
            "updated_at": "2021-07-09T10:00:29.000000Z"
        }
    ]
}

The "status" of a transaction could be confirmed, failed or canceled.

Reference to Authentication for possible authentication errors that might occur during this request.

Last updated