Link Search Menu Expand Document

The /v1/rental endpoint provides the ability to start and stop a rental for an available vehicle, given that you have the vehicle Id (UUID) of the vehicle you want to start a rental for.

A rental can have one of the following states:

  • RUNNING
  • PAUSED
  • ENDED

Creating a customer before creating a rental is optional; If you provide an externalCustomerId when creating a rental, a customer will be created on the fly for you, if it does not exist yet. If you want us to perform the invoicing and sending emails to the customer, using the /customer endpoint is mandatory to provide email and optionally first and last name.

Start rentals

When starting a rental, you must also provide a unique customer id, which will be used to identify for which of your customers you have started a rental and the pricing_id which is the ID of the pricing shown to the customer.

Furthermore, when you can provide a string, externalRentalId, which can be used to ease the billing process at the end of the month. It allows for marking the rentals in the TIER-Systems with a unique id that is provided by the partner.

Starting a rental with vehicle type e-moped is only possible if the user has a valid driver’s license. You need to provide that info via a Boolean in the customerInfo.

HTTP Request

POST https://platform.tier-services.io/v1/rental/start

Post Data

Field Content Note Column  
vehicle {“vehicleId”: UUID} Required. The vehicle that shall be rented    
customerStartLocation { “lat”: 52, “lng”: 13 } Optional. The location of the customer as reported by their mobile phone    
customerInfo {“externalCustomerId”: “your unique customer id”, “hasValidDriverLicence”: true false} Your id of the customer on whose behalf the rental is started  
pricing {“id”: pricingId} Required. The assumed pricing to start this rental with. If the pricing has changed, the rental start will be rejected new  
customerStartLocation { “lat”: 52.1, “lng”: 13.1 } Optional.    
externalRentalId string Optional. Your unique internal rental id of the rental that should be started    
beginnerModeConfig {“completedRideCount”: 10,”userSettings”: “unset”} Optional. Contains the number of rentals the user has taken so far (not including this one) and a future user-setting value (not used yet).    

❗ After having started a rental, its state could be updated without your knowledge on the server-side, for example when customer support ends a rental.

To get updates on the rental, please use a polling interval of 10 to 30 seconds on the GET /rental/<id> endpoint to fetch up-to-date rental information of your running rentals.

We will notify you once a webhook for instant updates is available.

Deep Dive: Beginner Mode for Integration Partners

curl "https://platform.tier-services.io/v1/rental/start"
  -X POST
  -H "x-api-key: TIER API KEY"
  -d '{
      "data": {
        "vehicle": {
            "vehicleId": "6399a26d-5c16-419a-8ce0-d0ec68164a54",
        },
        "customerStartLocation": {
            "lat": 52,
            "lng": 13,
        },
        "customerInfo": {
	        "externalCustomerId": "your unique customer id",
		"hasValidDriverLicence": true
        },
        "externalRentalId": "your unique rental id",
        "beginnerModeConfig": {
              "completedRideCount": 10,
              "userSettings": "unset"
        },
	"pricing": {
		"id": "the id of the pricing shown to the u"
	},
        }
      }'

Click to expand JSON data response
    {
      "data": {
        "id": "4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b",
        "type": "rental",
        "attributes": {
          "rideDurationMin": null,
          "pauseDurationMin": null,
          "cost": null,
          "state": "RUNNING",
          "createdAt": "2019-03-01T14:06:41.000000Z",
          "startedAt": "2019-03-01T14:06:41.939949Z",
          "endedAt": null,
          "customerStartLocation": {
            "lat": 52,
            "lng": 13
          },
          "customerEndLocation": null,
          "vehicleStartLocation": {
            "lat": 52,
            "lng": 13
          },
          "vehicleEndLocation": null,
          "vehicle": {
            "vehicleId": "6399a26d-5c16-419a-8ce0-d0ec68164a54",
            "vehicleCode": 999998
          },
          "stateHistory": [
            {
              "createdAt": "2019-03-01T14:06:41.939949Z",
              "state": "RUNNING"
            }
          ],
          "externalRentalId": "your unique rental id",
          "dontInvoice": false,
        }
      }
    }

Pause Rentals

This endpoint can be used to pause an active rental.

HTTP Request

PUT https://platform.tier-services.io/v1/rental/<rental-id>/pause

curl "https://platform.tier-services.io/v1/rental/d78b6a9d-b461-4407-9c35-b2b9834b27e7/pause"
  -X PUT
  -H "x-api-key: TIER API KEY"

Click to expand JSON data response
    {
        "data": {
            "type": "rental",
            "id": "d78b6a9d-b461-4407-9c35-b2b9834b27e7",
            "attributes": {
                "rideDurationMin": null,
                "pauseDurationMin": null,
                "cost": {
                    "unlock": {
                        "amount": "1.00",
                        "currency": "EUR"
                    },
                    "ride": {
                        "amount": "0.19",
                        "currency": "EUR"
                    },
                    "pause": {
                        "amount": "0.19",
                        "currency": "EUR"
                    },
                    "total": {
                        "amount": "0.00",
                        "currency": "EUR"
                    }
                },
                "state": "PAUSED",
                "endedReason": null,
                "createdAt": "2020-04-06T11:53:34Z",
                "startedAt": "2020-04-06T11:53:39Z",
                "endedAt": null,
                "customerStartLocation": null,
                "customerEndLocation": null,
                "vehicleStartLocation": {
                    "lat": 52.52158,
                    "lng": 13.350245
                },
                "vehicleEndLocation": null,
                "vehicle": {
                    "vehicleId": "39734e2c-ae4f-42d1-9e66-de65612e71d5",
                    "vehicleCode": 221006
                },
                "stateHistory": [
                    {
                        "createdAt": "2020-04-06T11:53:39.092565Z",
                        "state": "RUNNING"
                    }
                ],
                "externalRentalId": null,
                "dontInvoice": false
            }
        }
    }

This endpoint can be used to resume a paused rental.

HTTP Request

PUT https://platform.tier-services.io/v1/rental/<rental-id>/resume

curl "https://platform.tier-services.io/v1/rental/d78b6a9d-b461-4407-9c35-b2b9834b27e7/resume"
  -X PUT
  -H "x-api-key: TIER API KEY"

Click to expand JSON data response
    {
        "data": {
            "type": "rental",
            "id": "d78b6a9d-b461-4407-9c35-b2b9834b27e7",
            "attributes": {
                "rideDurationMin": null,
                "pauseDurationMin": null,
                "cost": {
                    "unlock": {
                        "amount": "1.00",
                        "currency": "EUR"
                    },
                    "ride": {
                        "amount": "0.19",
                        "currency": "EUR"
                    },
                    "pause": {
                        "amount": "0.19",
                        "currency": "EUR"
                    },
                    "total": {
                        "amount": "0.00",
                        "currency": "EUR"
                    }
                },
                "state": "RUNNING",
                "endedReason": null,
                "createdAt": "2020-04-06T11:53:34Z",
                "startedAt": "2020-04-06T11:53:39Z",
                "endedAt": null,
                "customerStartLocation": null,
                "customerEndLocation": null,
                "vehicleStartLocation": {
                    "lat": 52.52158,
                    "lng": 13.350245
                },
                "vehicleEndLocation": null,
                "vehicle": {
                    "vehicleId": "39734e2c-ae4f-42d1-9e66-de65612e71d5",
                    "vehicleCode": 221006
                },
                "stateHistory": [
                    {
                        "createdAt": "2020-04-06T11:53:39.092565Z",
                        "state": "RUNNING"
                    }
                ],
                "externalRentalId": null,
                "dontInvoice": false
            }
        }
    }

Pausing & Resuming 9BotBicycles

How Pausing & Resuming is linked to locking & unlocking 9BotBicycles

Get rentals

This endpoint can be used to retrieve an active or past rental by the rental id (UUID). Please note that the price of a rental is not updated on the fly. Users will only see the total amount at the end of a rental. The price reported during the rental will be the one that the user would need to pay before any price reductions are calculated in. Only after a rental has finished, the endpoint will report the correct final price.

You need to use the id of the rental which is returned starting the rental initially.

HTTP Request

GET https://platform.tier-services.io/v1/rental/<rental-id>

curl "https://platform.tier-services.io/v1/rental/4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b"
  -H "x-api-key: TIER API KEY"

Click to expand JSON data response
    {
        "data": {
            "type": "rental",
            "id": "4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b",
            "attributes": {
                "rideDurationMin": 83,
                "pauseDurationMin": 0,
                "cost": {
                    "unlock": {
                        "amount": "1.00",
                        "currency": "EUR"
                    },
                    "ride": {
                        "amount": "12.45",
                        "currency": "EUR"
                    },
                    "pause": {
                        "amount": "0.00",
                        "currency": "EUR"
                    },
                    "total": {
                        "amount": "13.45",
                        "currency": "EUR"
                    }
                },
                "state": "ENDED",
                "endedReason": "USER_REQUEST",
                "createdAt": "2019-03-01T14:06:41Z",
                "startedAt": "2019-08-10T15:57:39Z",
                "endedAt": "2019-08-10T17:20:08Z",
                "customerStartLocation": null,
                "customerEndLocation": null,
                "vehicleStartLocation": {
                    "lat": 52.513656,
                    "lng": 13.296032
                },
                "vehicleEndLocation": {
                    "lat": 52.51571,
                    "lng": 13.299757
                },
                "vehicle": {
                    "vehicleId": "8c0b2bd6-889a-49f3-8464-3f597ac387f2",
                    "vehicleCode": 119970
                },
                "stateHistory": [
                    {
                        "createdAt": "2019-08-10T15:57:39.680734Z",
                        "state": "RUNNING"
                    },
                    {
                        "createdAt": "2019-08-10T17:20:08.193607Z",
                        "state": "ENDED"
                    }
                ],
                "externalRentalId": "your unique rental id",
                "dontInvoice": false,
            },
            "relationships": {
                "invoice": {
                    "type": "invoice",
                    "id": "68f4515a-d98c-47c2-b35a-9c2066d2f869"
                }
            }
        }
    }

List rentals

This endpoint can be used to list all rentals. If you are a partner, all the rentals belonging to users associated with you will be listed. If you are a JWT authenticated user, you can list your own rentals.

HTTP Request

GET https://platform.tier-services.io/v1/rental

Query Parameters

Parameter Type Description
filter[externalRentalId] String Filter rentals by external rental id (only for API key authenticated users)

Example: https://platform.tier-services.io/v1/rental?filter[externalRentalId]=<externalRentalId>

curl "https://platform.tier-services.io/v1/rental"
  -H "x-api-key: TIER API KEY"

Click to expand JSON data response
    {
        "data": [
          {
            "type": "rental",
            "id": "4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b",
            "attributes": {
                "rideDurationMin": 83,
                "pauseDurationMin": 0,
                "cost": {
                    "unlock": {
                        "amount": "1.00",
                        "currency": "EUR"
                    },
                    "ride": {
                        "amount": "12.45",
                        "currency": "EUR"
                    },
                    "pause": {
                        "amount": "0.00",
                        "currency": "EUR"
                    },
                    "total": {
                        "amount": "13.45",
                        "currency": "EUR"
                    }
                },
                "state": "ENDED",
                "endedReason": "USER_REQUEST",
                "createdAt": "2019-03-01T14:06:41Z",
                "startedAt": "2019-08-10T15:57:39Z",
                "endedAt": "2019-08-10T17:20:08Z",
                "customerStartLocation": null,
                "customerEndLocation": null,
                "vehicleStartLocation": {
                    "lat": 52.513656,
                    "lng": 13.296032
                },
                "vehicleEndLocation": {
                    "lat": 52.51571,
                    "lng": 13.299757
                },
                "vehicle": {
                    "vehicleId": "8c0b2bd6-889a-49f3-8464-3f597ac387f2",
                    "vehicleCode": 119970
                },
                "stateHistory": [
                    {
                        "createdAt": "2019-08-10T15:57:39.680734Z",
                        "state": "RUNNING"
                    },
                    {
                        "createdAt": "2019-08-10T17:20:08.193607Z",
                        "state": "ENDED"
                    }
                ],
                "externalRentalId": "your unique rental id",
                "dontInvoice": false,
            },
            "relationships": {
                "invoice": {
                    "type": "invoice",
                    "id": "68f4515a-d98c-47c2-b35a-9c2066d2f869"
                }
            }
        }
        ]
    }

End rentals

The endedReason of a rental currently can have the following values:

USER_REQUEST when a user has requested the rental to be ended and PROBLEM_STARTING_RIDE when a rental was too short to be a successful rental

Note that more endedReasons might be added at any time.

Sending the customerEndLocation is not mandatory, but highly recommended. Oftentimes the GPS signal of the customer handset is much more accurate than the GPS location of the vehicle. Sending the customerEndLocation, therefore, helps a lot for ending rides inside small zones, such as at the edge of the business area or in mandatory parking zones.

HTTP Request

POST https://platform.tier-services.io/v1/rental/<rental-id>/end

Required Post Data

Field Content Note
customerEndLocation { “lat”: 52, “lng”: 13 } Optional. The location of the customer as reported by their mobile phone
state ENDED  
force true Optional
cpsEndLocation { “location”: { “lat”: 52, “lng”: 13 }} Optional. The location from Fantasmo. If provided, it will take the priority to verify customer location

The force switch can be used to override ending the rental, even when the vehicle is outside the business area or cannot be reached. This should only be used for integration in a customer support tool and not be allowed for the user

ℹ Note: If the total amount for an ended ride is 0, there will be no invoice generated on TIER side.

For partners which support helmet boxes: At end ride we have to include external-customer-id parameter in the headers.

For cities with Mandatory parking, we use the following logic to end rides:

  1. If CPS (Fantasmo) is provided, then the buffer is 2m, phone GPS and IoT GPS are ignored.
  2. If Phone GPS is provided, the buffer is 35m (see exceptions below), IoT GPS is ignored

Please note:

  • Buffers are applied to the border of the polygon, not to the center of the MPZ.
  • The Phone GPS is only being used when the customer is closer to the vehicle than 100m.

Zone Buffers

Due to the potential problems with the GPS, some buffers are applied to parking zones. By default this is 35 meters, below the exceptional cases for different cities (root-zones) are listed:

Parking Zone Buffers (in meters)

City (Root Zone) Buffer (meters)
Default 35
BERGEN 15
LONDON 15
MUELHEIM-RUHR 5
YORK 5
SKI 5

The values are lower for the cities where Camera Positioning System (CPS or also known as one implementation Fantasmo). Also these values are set by city managers.

curl "https://platform.tier-services.io/v1/rental/4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b/end"
  -X POST
  -H "x-api-key: TIER API KEY"
  -d '{
    "data": {
      "customerEndLocation": {
        "lat": 52,
        "lng": 13,
      },
      "state": "ENDED"
    }
  }'

Click to expand JSON data response
    {
      "data": {
        "id": "4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b",
        "type": "rental",
        "attributes": {
          "rideDurationMin": 14,
          "pauseDurationMin": 0,
          "cost": {
            "total": {
              "amount": "3.10",
              "currency": "EUR"
            },
            "unlock": {
              "amount": "1.00",
              "currency": "EUR"
            },
            "ride": {
              "amount": "2.10",
              "currency": "EUR"
            },
            "pause": {
              "amount": "0.00",
              "currency": "EUR"
            }
          },
          "state": "ENDED",
          "startedAt": "2019-03-01T14:06:41.939949Z",
          "endedAt": "2019-03-01T14:20:17.413018Z",
          "endedReason": "USER_REQUEST",
          "customerStartLocation": {
            "lat": 52,
            "lng": 13
          },
          "customerEndLocation": {
            "lat": 52.1,
            "lng": 13.1
          },
          "vehicleStartLocation": {
            "lat": 52,
            "lng": 13
          },
          "vehicleEndLocation": {
            "lat": 52.1,
            "lng": 13.1
          },
          "vehicle": {
            "vehicleId": "d62ee238-6fe3-4a9a-9db7-7f235e39e1fc",
            "vehicleCode": 15779
          },
          "stateHistory": [
            {
              "createdAt": "2019-03-01T14:06:41.939949Z",
              "state": "RUNNING"
            },
            {
              "createdAt": "2019-03-01T14:20:17.413018Z",
              "state": "ENDED"
            }
          ],
          "externalRentalId": "your unique rental id",
          "dontInvoice": false,
        },
        "relationships": {
          "invoice": {
            "type": "invoice",
            "id": "a0c8f23f-7032-4daa-8b8c-9bd2ef9632d9"
          }
        }
      }
    }

Rental-specific error codes

The Tier API can respond with the following vehicle specific error codes when getting the current rental of a customer:

Error Codes

Error Code Meaning Code
404 Customer not found CustomerNotFound
404 No running rental found RentalNotFound

Please find the specific responses in the shell.

The Tier API can respond with the following vehicle specific error codes when starting a rental:

HTTP Response Code Code Meaning
400 Cannot start rental, partner association not correctly configured The TIER team needs to set up your partner association
403 CustomerBlocked Customer is blocked
404 CustomerNotFound Customer not found
404 VehicleNotFound Vehicle not found
409 AlreadyRunningRentalExists User already has a running rental
409 PaymentMethodNotProvided Customer has not provided a payment method
409 PaymentMethodNotWorking Validation of the payment method failed
409 VehicleNotAvailable Vehicle is not available
409 VehicleNotReachable Vehicle is not reachable
409 OutdatedPricingError The used pricing is outdated
409 DriverLicenseNotVerified A Driving Licence is required to start a ride for this combination of Vehicle and Location, and the users driving licence could not be verified (either invalid documents or the verification service is down)
409 AlreadyStartingRental Tier internal error (May currently happen due to concurrent requests/another operation still in progress)

The error states are meant to show different error messages to the user in the case that a vehicle cannot be rented.

VehicleNotAvailable is returned when the vehicle is not marked as rentable or if it is already used in another rental. The user should use another vehicle in this case.

VehicleNotReachableis returned when there is a communication error with the vehicle. The user might want to retry at a later point in time or choose another vehicle

VehicleNotFound means that the user tried to rent a vehicle that does not exist (e.g. the user used a wrong id to rent the vehicle. Depending on the frontend implementation this error is never visible to the user)

VehicleNotActive means that the vehicle currently is not marked as rentable for a multitude of reasons. It could be marked for being picked up for maintenance or there might for example be an unrecoverable IoT error.

Please find the specific responses in the shell.

The Tier API can respond with the following vehicle specific error codes when ending a rental:

Error Codes

Error Code Meaning Code
409 Vehicle is located outside of the business zone VehicleOutOfBusinessZone
409 Vehicle is located inside of a no parking zone VehicleInNoParkingZone
409 Vehicle is located outside of a mandatory parking zone VehicleOutOfMandatoryParkingZone
409 Vehicle (eMoped only) is not locked VehicleNotLocked
409 Vehicle is located in a parking zone which is at full capacity VehicleInFullCapacityMandatoryParking
409 The physical lock on the Ninebot bicycle has not been applied NineBotBikeNotLocked
412 Tier internal error (May currently happen due to concurrent requests/another operation still in progress) StillProcessingAction

Please find the specific responses in the shell.

The Tier API can respond with the following vehicle specific error codes when pausing a rental:

Error Code

Error Code Meaning Code
404 No running rental found RentalNotFound
404 Vehicle not found VehicleNotFound
409 Vehicle is located inside of a no parking zone VehicleInNoParkingZone
409 Vehicle is located outside of a mandatory parking zone VehicleOutOfMandatoryParkingZone
409 The physical lock on the Ninebot bicycle has not been applied NineBotBikeNotLocked
412 Tier internal error (May currently happen due to concurrent requests/another operation still in progress) StillProcessingAction

Please find the specific responses in the shell.

The Tier API can respond with the following vehicle specific error codes when resuming a rental:

Error Codes

Error Code Meaning Code
404 No running rental found RentalNotFound
404 Vehicle not found VehicleNotFound
412 Tier internal error (May currently happen due to concurrent requests/another operation still in progress) StillProcessingAction

Please find the specific responses in the shell.

The command to get a rental

curl "https://platform.tier-services.io/v1/customer/abcdefg123456/current-rental"
  -H "x-api-key: TIER API KEY"

  • returns a JSON structured like this if the customer was not found. Click ▶ button
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "CustomerNotFound",
          "title": "Customer not found",
          "status": "404"
        }
      ]
    }
  • returns a JSON structured like this if no running rental was found.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "RentalNotFound",
          "title": "No running rental found",
          "status": "404"
        }
      ]
    }

The command to start a rental

curl "https://platform.tier-services.io/v1/rental/start"
  -X POST
  -H "x-api-key: TIER API KEY"
  -d '{
        "data": {
          "vehicle": {
            "vehicleId": UUID,
          },
          "customerStartLocation": {
            "lat": 52,
            "lng": 13,
          },
          "customerInfo": {
            "externalCustomerId": "your unique customer id" 
          }
        }
      }'

  • returns a JSON structured like this if the partner association is not correctly configured. Click ▶ button
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "invalid",
          "title": "Cannot start rental, partner association not correctly configured",
          "status": "400"
        }
      ]
    }
  • returns a JSON structured like this if the customer is blocked.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "CustomerBlocked",
          "title": "Customer is blocked",
          "status": "403"
        }
      ]
    }
  • returns a JSON structured like this if the customer was not found.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "CustomerNotFound",
          "title": "Customer not found",
          "status": "404"
        }
      ]
    }
  • returns a JSON structured like this if the vehicle was not found.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "VehicleNotFound",
          "title": "Vehicle not found",
          "status": "404"
        }
      ]
    }
  • returns a JSON structured like this if the user already has a running rental.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "AlreadyRunningRentalExists",
          "title": "User has already a running rental",
          "status": "409"
        }
      ]
    }
  • returns a JSON structured like this if the customer has not provided a payment method.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "PaymentMethodNotProvided",
          "title": "Customer has not provided a payment method",
          "status": "409"
        }
      ]
    }
  • returns a JSON structured like this if the validation of the payment method failed.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "PaymentMethodNotWorking",
          "title": "Validation of the payment method failed",
          "status": "409"
        }
      ]
    }
  • returns a JSON structured like this if the vehicle is not available.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "VehicleNotAvailable",
          "title": "Vehicle is not available",
          "status": "409"
        }
      ]
    }
  • returns a JSON structured like this if the vehicle is not reachable.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "VehicleNotReachable",
          "title": "Vehicle is not reachable",
          "status": "409"
        }
      ]
    }
  • returns a JSON structured like this if the optional pricing id is not up-to-date.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "OutdatedPricingError",
          "title": "The used pricing is outdated",
          "status": "409"
        }
      ]
    }

The POST call to end a rental

curl "https://platform.tier-services.io/v1/rental/4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b/end"
  -X POST
  -H "x-api-key: TIER API KEY"
  -d '{
      "data": {
        "customerEndLocation": {
          "lat": 52,
          "lng": 13,
        },
        "state": "ENDED"
      }
    }'

  • returns a JSON structured like this if the vehicle is outside of the business area.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "VehicleOutOfBusinessZone",
          "title": "Outside of business zone",
          "status": "409"
        }
      ]
    }
  • returns a returns JSON structured like this if the vehicle is inside a no parking zone.
Click to expand JSON data response
    {
      "errors": [
        {
          "code": "VehicleInNoParkingZone",
          "title": "Inside of no parking zone",
          "status": "409"
        }
      ]
    }

When sending the optional pricing ID on rental start, the API returns a JSON structured like this. To resolve this error, the pricing has to be refetched for the current zone of the vehicle to start a rental:

Click to expand JSON data response
{
  "errors": [
    {
      "code": "OutdatedPricingError",
      "title": "The used pricing is outdated",
      "status": "409"
    }
  ]
}

Some cities require mandatory parking zones. In these cities scooters can only be parked in certain areas. When trying to end a rental with the scooter being outside a mandatory parking zone, an error is returned:

Click to expand JSON data response
{
  "errors": [
    {
      "code": "VehicleOutOfMandatoryParkingZone",
      "status": "409"
    }
  ]
}

The PUT call to pause a rental

curl "https://platform.tier-services.io/v1/rental/d78b6a9d-b461-4407-9c35-b2b9834b27e7/pause"
  -X PUT
  -H "x-api-key: TIER API KEY"

returns a JSON structured like this if no running rental was found:

Click to expand JSON data response
{
  "errors": [
    {
      "code": "RentalNotFound",
      "title": "No running rental found",
      "status": "404"
    }
  ]
}

returns a returns JSON structured like this if the vehicle is inside a no parking zone:

Click to expand JSON data response
{
  "errors": [
    {
      "code": "VehicleInNoParkingZone",
      "title": "Inside of no parking zone",
      "status": "409"
    }
  ]
}

returns a JSON structured like this if the vehicle was not found:

Click to expand JSON data response
{
  "errors": [
    {
      "code": "VehicleNotFound",
      "title": "Vehicle not found",
      "status": "404"
    }
  ]
}

Some cities require mandatory parking zones. In these cities, vehicles can only be parked in certain areas. When trying to pause a rental with the vehicle being outside a mandatory parking zone, an error is returned:

Click to expand JSON data response
{
  "errors": [
    {
      "code": "VehicleOutOfMandatoryParkingZone",
      "status": "409"
    }
  ]
}

The PUT call to resume a rental

curl "https://platform.tier-services.io/v1/rental/d78b6a9d-b461-4407-9c35-b2b9834b27e7/resume"
  -X PUT
  -H "x-api-key: TIER API KEY"

returns a JSON structured like this if no running rental was found:

Click to expand JSON data response
{
  "errors": [
    {
      "code": "RentalNotFound",
      "title": "No running rental found",
      "status": "404"
    }
  ]
}

returns a JSON structured like this if the vehicle was not found:

Click to expand JSON data response
{
  "errors": [
    {
      "code": "VehicleNotFound",
      "title": "Vehicle not found",
      "status": "404"
    }
  ]
}