⚠️ DRAFT: some endpoints might not be implemented yet or are experimental
The following endpoints describe the use case of helmet boxes attached to vehicles.
Check Helmet
This endpoint provides information about whether a vehicle has a helmet box. Each vehicle has a hasHelmet
flag. If set to true
this vehicle has a helmet box available.
HTTP Request
GET https://platform.tier-services.io/v2/helmet/check/{vehicleId}
Header Parameters
Field | Required | Description | Type |
---|---|---|---|
x-api-key | true | API key for authentication | string |
external-customer-id | false | UUID of the partner’s user | string |
Path Parameters
Field | Required | Description | Type |
---|---|---|---|
vehicleId | true | UUID of the vehicle that should be checked | string |
curl "https://platform.tier-services.io/v2/helmet/check/1c8ff91d-491a-40cd-adb9-425dab6f2cc3"
-H "x-api-key: TIER API KEY"
Click to expand JSON data response
{
"data": [
{
"id": "",
"type": "HelmetCheck",
"attributes": {
"hasHelmet": true,
"hasHelmetBox": true
}
}
]
},
Helmet state
This endpoint provides information about the rental and the helmet state. You can check if the rental has ended and the helmet box contains the helmet at the start or at the end of the rental. It is mandatory to provide an external-customer-id
as a header parameter.
HTTP Request
GET https://platform.tier-services.io/v2/helmet/ride/state/{rentalId}
Header Parameters
Field | Required | Description | Type |
---|---|---|---|
x-api-key | true | API key for authentication | string |
external-customer-id | true | UUID of the partner’s user | string |
Path Parameters
Field | Required | Description | Type |
---|---|---|---|
rentalId | true | UUID of the rental that state should be checked | string |
curl "https://platform.tier-services.io/v2/helmet/ride/state/d78b6a9d-b461-4407-9c35-b2b9834b27e7"
-H '{
"x-api-key: "TIER API KEY"",
"external-customer-id": "EXTERNAL_CUSTOMER_ID"
}'
Click to expand JSON data response
{
"data": [
{
"id": "13c7ddbe-0b88-4b62-97da-8f6accb8d9e3",
"type": "ENDED",
"attributes": {
"hasHelmetAtStart" : True,
"hasHelmetAtEnd" : True,
"vehicleId" : "13c7ddbe-0b88-4b62-97da-8f6accb8d9e3",
"rentalId" : d78b6a9d-b461-4407-9c35-b2b9834b27e7
}
}
]
},
Helmet action
When starting a rental, you might also want to open or close a helmet box. It is mandatory to provide an external-customer-id
as a header parameter.
HTTP Request
PUT https://platform.tier-services.io/v2/helmet/action/{vehicleId}/{action}
Header Parameters
Field | Required | Description | Type |
---|---|---|---|
x-api-key | true | API key for authentication | string |
external-customer-id | true | UUID of the partner’s user | string |
Path Parameters
Field | Required | Description | Type |
---|---|---|---|
vehicleId | true | UUID of the vehicle | string |
action | true | Action which should be performed on the helmet box. Valid action names: helmet-unlock or helmet-lock | enum |
Payload
{
"data": {
"type": "ActionBody",
"attributes": {
"rentalId": "d78b6a9d-b461-4407-9c35-b2b9834b27e7"
}
}
}
Properties
Field | Required | Description | Type |
---|---|---|---|
rentalId | true | UUID of the rental | string |
customerId | false | UUID of the customer | string |
curl "https://platform.tier-services.io/v2/helmet/action/1c8ff91d-491a-40cd-adb9-425dab6f2cc3/helmet-unlock"
-X PUT
-H '{
"x-api-key: TIER API KEY",
external-customer-id: EXTERNAL_CUSTOMER_ID
}'
-d '{
"data": {
"type": "ActionBody",
"attributes": {
"rentalId": "d78b6a9d-b461-4407-9c35-b2b9834b27e7"
}
}
}'
Click to expand JSON data response
{
"data": [
{
"id": "",
"type": "HelmetAction",
"attributes": {
"msg": 'success',
"status": 200
}
}
]
},