Skip to main content
GET
/
journeys
Retrieve a list of journeys.
curl --request GET \
  --url https://b2b-api.markoub.dev/journeys \
  --header 'Authorization: Bearer <token>'
{
  "searchId": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "expiresInMinutes": 123,
  "journeys": [
    {
      "inventory": "markoub",
      "id": 123,
      "name": "<string>",
      "bus": {
        "id": 123,
        "name": "<string>",
        "slug": "<string>",
        "image": "<string>"
      },
      "company": {
        "id": 123,
        "name": "<string>",
        "logo": "<string>"
      },
      "isInRoute": true,
      "roadType": "auto-route",
      "chargesForService": true,
      "departureDate": "2023-12-25",
      "arrivalDate": "2023-12-25",
      "from": {
        "id": 123,
        "time": "<string>",
        "cityId": 123,
        "cityName": "<string>",
        "stationId": 123,
        "stationName": "<string>",
        "stationAddress": "<string>",
        "date": "2023-12-25",
        "latitude": "<string>",
        "longitude": "<string>",
        "daysElapsed": 123,
        "ghazalaCode": "<string>",
        "satCode": "<string>",
        "supratoursCode": "<string>",
        "order": 123
      },
      "to": {
        "id": 123,
        "time": "<string>",
        "cityId": 123,
        "cityName": "<string>",
        "stationId": 123,
        "stationName": "<string>",
        "stationAddress": "<string>",
        "date": "2023-12-25",
        "latitude": "<string>",
        "longitude": "<string>",
        "daysElapsed": 123,
        "ghazalaCode": "<string>",
        "satCode": "<string>",
        "supratoursCode": "<string>",
        "order": 123
      },
      "price": {
        "single": 123,
        "total": 123,
        "serviceFees": 123
      },
      "promotion": {
        "id": 123,
        "name": "<string>",
        "amount": 123,
        "amountType": "percentage",
        "markoubAmount": 123,
        "companyAmount": 123,
        "firstTime": true,
        "reason": "<string>",
        "sponsoredBy": "markoub"
      },
      "stops": [],
      "stations": [],
      "equipments": [],
      "isCancellable": true,
      "isChangeable": true,
      "isRefundable": true,
      "duration": "<string>",
      "timeLeft": "<string>",
      "closureTime": "<string>",
      "seatsLeft": 123,
      "isAfterMidnight": true,
      "tags": [],
      "extra": "<unknown>",
      "isMKhyer": true,
      "isReklam": true,
      "isPartOfStudentProgram": true,
      "showSeatMap": true,
      "busDepartureDate": "2023-12-25"
    }
  ]
}
It would be best if you could provide the search ID from the previous search if the user has already conducted a search. This will enable us to delete the old search before it expires, thereby saving resources on the platform.

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

nbrOfPassengers
string
default:1

Number of passengers

departureCityId
string
required

Departure city id

arrivalCityId
string
required

Arrival city id

searchId
string | null

Previous search ID to delete, when a new search is made

date
string
required

Date of the search

Example:

"2024-12-11"

Response

A list of journeys and their associated data + search ID

searchId
string
required
expiresAt
string<date-time>
required
expiresInMinutes
number
required
journeys
object[]
required