Skip to content

Latest commit

 

History

History
385 lines (274 loc) · 9.44 KB

BookingsApi.md

File metadata and controls

385 lines (274 loc) · 9.44 KB

BookingsApi

All URIs are relative to https://api.openmove.com

Method HTTP request Description
agenciesGet GET /agencies Returns agencies enabled info
routesAgencyIdGet GET /routes/{agencyId} Returns routes info
routesWithFaresAgencyIdGet GET /routes-with-fares/{agencyId} Returns routes info
stopsAgencyIdRouteIdGet GET /stops/{agencyId}/{routeId} Returns stops info
tripsGet GET /trips Returns trips list
tripsReserveConfirmPost POST /trips/reserve/confirm Confirm reservation
tripsReserveDelete DELETE /trips/reserve Delete reservation
tripsReservePost POST /trips/reserve Register reservation (not confirmed), waiting for the confirmation
tripsReservePut PUT /trips/reserve Update reservation with user info

agenciesGet

agenciesGet()

Returns agencies enabled info

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
try {
    apiInstance.agenciesGet();
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#agenciesGet");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

routesAgencyIdGet

routesAgencyIdGet(agencyId)

Returns routes info

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
String agencyId = "agencyId_example"; // String | agency id
try {
    apiInstance.routesAgencyIdGet(agencyId);
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#routesAgencyIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

routesWithFaresAgencyIdGet

routesWithFaresAgencyIdGet(agencyId)

Returns routes info

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
String agencyId = "agencyId_example"; // String | agency id
try {
    apiInstance.routesWithFaresAgencyIdGet(agencyId);
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#routesWithFaresAgencyIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

stopsAgencyIdRouteIdGet

stopsAgencyIdRouteIdGet(agencyId, routeId)

Returns stops info

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
String agencyId = "agencyId_example"; // String | agency id
String routeId = "routeId_example"; // String | route id
try {
    apiInstance.stopsAgencyIdRouteIdGet(agencyId, routeId);
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#stopsAgencyIdRouteIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id
routeId String route id

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

tripsGet

tripsGet(agencyId, routeId, stopIdFrom, stopIdTo, date, quantity)

Returns trips list

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
String agencyId = "agencyId_example"; // String | agency id
String routeId = "routeId_example"; // String | route id
String stopIdFrom = "stopIdFrom_example"; // String | from stop id
String stopIdTo = "stopIdTo_example"; // String | to stop id
String date = "date_example"; // String | start date
BigDecimal quantity = new BigDecimal(); // BigDecimal | number of passengers
try {
    apiInstance.tripsGet(agencyId, routeId, stopIdFrom, stopIdTo, date, quantity);
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#tripsGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id
routeId String route id
stopIdFrom String from stop id
stopIdTo String to stop id
date String start date
quantity BigDecimal number of passengers [optional]

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

tripsReserveConfirmPost

tripsReserveConfirmPost(reserveConfirm)

Confirm reservation

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
ReserveConfirm1 reserveConfirm = new ReserveConfirm1(); // ReserveConfirm1 | trips reserve confirmation
try {
    apiInstance.tripsReserveConfirmPost(reserveConfirm);
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#tripsReserveConfirmPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
reserveConfirm ReserveConfirm1 trips reserve confirmation

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

tripsReserveDelete

tripsReserveDelete(reserveDelete)

Delete reservation

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
ReserveDelete reserveDelete = new ReserveDelete(); // ReserveDelete | trips reserve delete
try {
    apiInstance.tripsReserveDelete(reserveDelete);
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#tripsReserveDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
reserveDelete ReserveDelete trips reserve delete

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

tripsReservePost

tripsReservePost(reserveRequest)

Register reservation (not confirmed), waiting for the confirmation

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
ReserveRequest reserveRequest = new ReserveRequest(); // ReserveRequest | trips reserve data
try {
    apiInstance.tripsReservePost(reserveRequest);
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#tripsReservePost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
reserveRequest ReserveRequest trips reserve data

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

tripsReservePut

tripsReservePut(reserveConfirm)

Update reservation with user info

Example

// Import classes:
//import com.openmove.api.BookingsApi;

BookingsApi apiInstance = new BookingsApi();
ReserveConfirm reserveConfirm = new ReserveConfirm(); // ReserveConfirm | trips reserve user info
try {
    apiInstance.tripsReservePut(reserveConfirm);
} catch (ApiException e) {
    System.err.println("Exception when calling BookingsApi#tripsReservePut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
reserveConfirm ReserveConfirm trips reserve user info

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined