Skip to content

Parking Service APIs

You can find below the APIs, the exposed functionality by the parking service.

getQuoteForParking

The getQuoteForParking returns the quote for the parking place with the given id in the time interval between the given start time and end time.

The parkingId parameter represents the id of the parking place for which the price info should be returned.

The parkingTime parameter represents an object containing the start time and end time of the parking together with the timezone.

It returns the Quote for the requested parking place.

1
2
3
4
suspend fun getQuoteForParking(
    parkingId: String,
    parkingTime: ParkingTime
): CommerceResponse<Quote>

reserveParking

The reserveParking method makes a parking reservation for the parking place with the given parking id (that was previously selected).

The parkingId represents the id of the parking place for which the reservation should be done.

The parkingTime parameter is an object containing the start time and end time of the parking together with the timezone.

The quoteReference represents the quote reference id retrieved from the getQuoteForParking call.

The paymentRequest parameter is an object containing the payment method.

It returns a String object holding the payment response in a json format.

1
2
3
4
suspend fun reserveParking(
    parkingId: String, parkingTime: ParkingTime, quoteReference: String,
    paymentRequest: PaymentRequest
): CommerceResponse<String>

getLastParkingReservation

The ParkingOrderInformation method returns the information about the last parking reservation.

1
suspend fun getLastParkingReservation(): CommerceResponse<ParkingOrderInformation>

getParkingHistory

The getParkingHistory method returns all the parking orders satisfying the given conditions.

The sorting parameter represent the way the results should be sorted; The values are in Sorting.

The default value is descending Sorting.DESCENDING.

It returns a list of ParkingOrderInformation reservations of the provided user.

1
2
3
suspend fun getParkingHistory(
    sorting: String = Sorting.DESCENDING.name
): CommerceResponse<List<ParkingOrderInformation>>

cancelParkingReservationById

The cancelParkingReservationById method cancels the parking reservation with the given order id.

The orderId represents the id of the parking reservation that is canceled.

It returns the status of the cancel operation.

1
2
3
suspend fun cancelParkingReservationById(
    orderId: String
): CommerceResponse<Status>