Available Trips

This method involves sending a POST request to retrieve available trips provided by Klikoo's B2B.



A. Request Header

FieldFormatMandatoryLengthExample
Content-TypestringYapplication/json
Open-Api-Timestampyyyy-mm-dd'T'hh:mm:ss+07:00Y2024-02-07T10:28:35.000+07:0
Open-Api-SignatureDigital SignatureY88vNMoAmiDRV+paVyD5FaidgI5k
Ry2pCo8oEoQN/GBpIPuO3eicY
63b7xY0WDffScvkOZsZ1442ewa
bI7Wzd22pw==

B. Request Body

FieldTypeDescriptionRequiredExample
product_codestringUnique identifier for the producttrue"BUS"
source_idintThe ID of the source locationtrue113
source_typestringThe type of the source locationtrue"CITY"
destination_idintThe ID of the destination locationtrue132
destination_typestringThe type of the destination locationtrue"CITY"
total_seatintThe total number of seats availabletrue1
datestringThe date of the trip
paginationobjectAn object containing pagination information
limitintThe maximum number of items to return per pagefalse100
pageintThe current page numberfalse1
sortobjectAn object containing sorting options
fieldstringThe field by which to sort the results
(Get from response)
true""
valuestringThe sorting order for the results (ascending or descending)
(Get from response)
true""
searcharray of objectsAn array search parameters
fieldstringThe field to search within the dataset
(Get from response)
true“”
valuestringThe value to search for within the specified search field
(Get from response)
true“”

C. Sample Request

{
    "product_code": "BUS",
    "source_id": 132,
    "source_type": "CITY",
    "destination_id": 436,
    "destination_type": "CITY",
    "total_seat": 2,
    "date": "2024-04-10",
    "pagination": {
        "limit": 100,
        "page": 1,
        "sort": {
          "field": "boarding_time",
          "value": "asc"
        },
        "search": [
          {
            "field": "boarding_time",
            "value": "1"
          },
          {
            "field": "travel_name",
            "value": "Daytrans"
          }
        ]
    }
}

D. Response Body

FieldTypeDescriptionExample
response_codestringContains the OpenAPI response code“200052000”
response_messagestringContains the value of OpenAPI response message“Sukses”
meta objectContains the metadata related to transaction list’s pagination
total_dataintThe total number of data entries in data set178
total_pageintThe total number of pages in the paginated data set2
current_pageintThe current page number in the paginated data set1
per_pageintThe number of items per page in the paginated data set100
next_pageintThe number of the next page in the paginated data set2
dataobjectThe object containing trips info
tripsarray of objectsThe list of objects containing trips data
idintThe ID of the terminal266782
available_seatintThe number of available seats on the trip6
source_namestringThe name of the source or departure location“Pringsewu”
boarding_point_namestringThe name of boarding point“Gading Rejo”
boarding_point_addressstringThe address of boarding point"Kec. Gading Rejo, Kabupaten Pringsewu, Lampung, Indonesia"
destination_namestringThe name of the trip's destination“Jakarta”
dropping_point_namestringThe name of dropping point"Penjaringan"
dropping_point_addressstringThe address of dropping point"Kec. Penjaringan, Jkt Utara, Daerah Khusus Ibukota Jakarta, Indonesia"
travel_namestringThe name of the travel service“Antar Trans”
vehicle_typestringThe type of vehicle used for the trip“BUS”
bus_typestringThe type of bus“Shuttle”
depart_timestringThe departure time of the trip"2024-12-24T14:30:00+07:00"
arrival_timestringThe arrival time of the trip"2024-12-24T23:35:00+07:00"
lower_priceintThe lowest price for the trip400400
high_priceintThe highest price for the trip400400
trip_durationstringThe duration of the trip"09j 09m"
facilitiesarray of objectsAn array of facilities available on the trip"AC",
"Non-Smoking Room"
filtersarray of objectsAn array of objects representing filters
grouping_namestringThe group name of the filter"Jam berangkat"
titlestringThe tittle for the filter"00:00 - 06:00"
keystringThe key to identify the filter category"boarding_time"
valuestringThe value representing the selected filter"1"
sortsarray of objectsAn array of objects representing sort options
titlestringThe tittle of the sorting option"Durasi tersingkat"
keystringThe key for the sorting category"trip_duration"
valuestringThe value for the sorting option"asc"

E. Sample Response

{
    "response_code": "200052000",
    "response_message": "Sukses",
    "meta": {
        "total_data": 178,
        "total_page": 2,
        "current_page": 1,
        "per_page": 100,
        "next_page": 2
    },
    "data": {
        "trips": [
            {
                "id": 266782,
                "available_seat": 6,
                "source_name": "Pringsewu",
                "boarding_point_name": "Gading Rejo",
                "boarding_point_address": "Kec. Gading Rejo, Kabupaten Pringsewu, Lampung, Indonesia",
                "destination_name": "Jakarta",
                "drop_point_name": "Penjaringan",
                "drop_point_address": "Kec. Penjaringan, Jkt Utara, Daerah Khusus Ibukota Jakarta, Indonesia",
                "travel_name": "Antar Trans",
                "vehicle_type": "BUS",
                "bus_type": "Shuttle",
                "depart_time": "2024-12-24T14:30:00+07:00",
                "arrival_time": "2024-12-24T23:35:00+07:00",
                "lower_price": 400400,
                "high_price": 400400,
                "trip_duration": "09j 09m",
                "facilities": [
                    "AC",
                    "Non-Smoking Room"
                ]
            },
        ],
        "filters": [
            {
                "grouping_name": "Jam berangkat",
                "title": "00:00 - 06:00",
                "key": "boarding_time",
                "value": "1"
            },
            {
                "grouping_name": "Jam berangkat",
                "title": "06:00 - 12:00",
                "key": "boarding_time",
                "value": "2"
            }
        ],
        "sorts": [
            {
                "title": "Durasi tersingkat",
                "key": "trip_duration",
                "value": "asc"
            },
            {
                "title": "Harga terendah",
                "key": "lower_price",
                "value": "asc"
            }
        ]
    }
}

Try It Here (Form)

To try the following endpoint, enter the example request data you want to use in the following form


Body Params
string
string
string
string
string
string
string
pagination
object
sort
object
search
array of objects
Headers
date-time
string
Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json