Download OpenAPI specification:
The MAAS (Mobility as a Service) API enables third party access to Urban Sharing mobility functionality. The API provides access to the following services:
The Urban Sharing Maas API does not provide the following features. These features need to be managed by the client:
If these are features you require you may be interested in the Urban Sharing Fleet management product. Please contact Urban Sharing for more information.
To receive events you can implement a number of webhooks.
Date | Version | Notes |
---|---|---|
Fri Mar 28 2025 | 1.5.1 | Add additional documentation in Getting Started |
Mon Jun 10 2024 | 1.5.0 | Add dockGroupName to locations |
Wed Feb 14 2024 | 1.4.0 | Add vehicles/:id endpoint Add lastTripId to vehicle Implement TripStateTransitionReason |
Mon Jan 22 2024 | 1.3.0 | Add "productId" to create reservation endpoints Remove "maas/" prefix from all webhooks Rename "vehicle QR" code and "GBFS ID" endpoints Improve descriptions in documentation |
Mon Oct 30 2023 | 1.2.0 | Add "productId" to create trip endpoints |
Mon Oct 16 2023 | 1.1.0 | Add "products" endpoint |
Thu Aug 10 2023 | 1.0.1 | Move vehicles/:vehicleId/damagereports/types results to row property |
Tue Aug 08 2023 | 1.0.0 | Initial release |
To use this API you must first obtain API credentials from Urban Sharing. These API credentials can then be used to generate a JWT token which must be passed in the Authentication header when accessing resources in this API.
For more information, please refer to the Urban Sharing Auth API
Urban Sharing generates webhook signatures using a hash-based message authentication code (HMAC) with SHA-256. You can validate the signature of the request body as follows:
validateWebhookSignature(
clientSecret: string,
signature: string,
data: unknown,
maxAgeMs = 5000,
): boolean {
const [timestampPair, ...signatures] = signature.split(',');
const timestamp = +timestampPair.split('=')[1];
// Check that the timestamp is not too old
if (maxAgeMs > 0) {
const latestTimestamp = new Date().getTime() - maxAgeMs;
if (timestamp < latestTimestamp) {
return false;
}
}
// Convert signatures into an object
const signatureObject: any = signatures.reduce((acc, curr) => {
const [key, value] = curr.split('=');
acc[key] = value;
return acc;
}, {});
// Build the signed payload
const signed_payload = `${timestamp}.${JSON.stringify(data)}`;
// Validate the v0 signature
if (signatureObject.v0) {
const expectedSignature = crypto
.createHmac('sha256', clientSecret)
.update(signed_payload)
.digest('hex');
return signatureObject.v0 === expectedSignature;
}
return false;
}
Urban Sharing APIs refer to docks, dock groups and vehicles as our platform is designed to support multiple modes of transport. In the case of bike share systems, docks are locks, dock groups are stations and vehicles are bikes.
Vehicles can be retrieved via the GET /vehicles/{vehicleId}
endpoint. The
endpoint will return the vehicle details.
Vehicles can be retrieved via the GET /vehicles/qr/{qrCode}
endpoint. The
endpoint will return the vehicle details.
Vehicles can be retrieved via the GET /vehicles/gbfs/{gbfsId}
endpoint. The
endpoint will return the vehicle details.
Trips are started via the POST /dockgroups/{dockGroupId}/trips
POST /vehicles/{vehicleId}/trips
endpoints.
GET /vehicles/qrcodes/{qrCode}
to look up the vehicle ID.
Trips can be found via the GET /trips/{tripId}
endpoint. The endpoint will return
the current state of the trip.
All ongoing trips report their status via the Maas Webhook. See the Maas Webhook API documentation for more information.
The trip state can be updated via the PATCH /trips/{tripId}
endpoint. Not all
states are available for all Vehicle types. If an action is not supported, an
error will be returned.
Each vehicle type has a unique set of damages that can be reported. To obtain
the list of damages use GET /vehicles/{vehicleId}/damagereports/types
. Vehicle
damage can be reported via the POST /vehicles/{vehicleId}/damagereports
endpoint.
Vehicle reservations can be created via the POST /vehicles/{vehicleId}/reservations
endpoint. The reservation will be valid for a set period of time. The reservation
can be canceled via the DELETE /vehicles/{vehicleId}/reservations
endpoint.
Product details can be retrieved via the GET /products/{productId}
endpoint.
Penalties can be managed via the GET /users/{userId}/penalties
endpoint. The
endpoint will return a list of penalties for the user. Penalties can be added
via the POST /users/{userId}/penalties
endpoint. Penalties can be resolved via
the PATCH /users/{userId}/penalties/{penaltyId}
endpoint.
The following is an example flow for starting a trip using a QR code:
When starting a trip you must provide a unique user ID. This is the ID used to identify the user in your system. Urbansharing uses their own user ID linked to your user ID. If a user with the ID you provide does not exist in the Urban Sharing system, it will be created. Urban Sharing will never expose their internal user IDs, only the IDs provided by the client. Urban Sharing complies with GDPR and will not store any PII data about your users. The only information stored is the user ID and the user position if provided. The user position is only used for validation during trip state changes.
Returns vehicle data based on its QR code.
qrCode required | string |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "id": 12345,
- "name": "Bike 1",
- "number": "42",
- "vehicleCategory": "ebike",
- "status": "available",
- "unavailableReason": "dock_broken",
- "batteryCharge": 70,
- "batteryRange": 4000,
- "lastTripId": 324344
}
Returns vehicle data based on the its GBFS ID.
gbfsId required | string |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "id": 12345,
- "name": "Bike 1",
- "number": "42",
- "vehicleCategory": "ebike",
- "status": "available",
- "unavailableReason": "dock_broken",
- "batteryCharge": 70,
- "batteryRange": 4000,
- "lastTripId": 324344
}
Returns vehicle data based on the its ID.
id required | string |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "id": 12345,
- "name": "Bike 1",
- "number": "42",
- "vehicleCategory": "ebike",
- "status": "available",
- "unavailableReason": "dock_broken",
- "batteryCharge": 70,
- "batteryRange": 4000,
- "lastTripId": 324344
}
Starts a dock group trip.
dockGroupId required | number |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
userId required | string The ID of the user starting the trip. This is your unique user ID. If the user does not exist in the Urban Sharing system, it will be created. Urban Sharing will never expose their internal user IDs, only the IDs provided by the client. | ||||||||||
productId | number The optional ID of the product being used for the trip. If the product ID is valid, product validations will be performed before starting the trip (i.e. valid product, penalty points etc.). At the end of the trip, the product ID will be used to calculate the price and a summary will be sent to the users/invoices webhook. If no product ID is provided, it is the responsibility of the caller to manage pricing and penalties. | ||||||||||
object User position | |||||||||||
| |||||||||||
vehicleCategory required | string Enum: "bike" "ebike" "scooter" "ebike_with_childseat" The type of vehicle required for the trip. |
{- "userId": "User12345",
- "productId": 1,
- "userPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "accuracyRadiusMeters": 12
}, - "vehicleCategory": "bike"
}
{- "id": 12345,
- "clientId": "Client12345",
- "userId": "User12345",
- "state": "cancelled",
- "stateTransitionReason": "cancelled_by_administrator",
- "stateTransitionComment": "string",
- "startedAtLocation": {
- "timestamp": "2019-08-24T14:15:22Z",
- "geoPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "streetAddress": "Karl Johans gate 1"
}, - "dock": {
- "dockGroupId": 2232,
- "dockGroupName": "Station 1",
- "dockNumber": 21
}
}, - "vehicle": {
- "id": 12345,
- "name": "Bike 1",
- "number": "42",
- "vehicleCategory": "ebike",
- "status": "available",
- "unavailableReason": "dock_broken",
- "batteryCharge": 70,
- "batteryRange": 4000
}, - "endedAtLocation": {
- "timestamp": "2019-08-24T14:15:22Z",
- "geoPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "streetAddress": "Karl Johans gate 1"
}, - "dock": {
- "dockGroupId": 2232,
- "dockGroupName": "Station 1",
- "dockNumber": 21
}
}, - "totalDistance": 12.55,
- "updatedAt": "2019-08-24T14:15:22Z"
}
Starts a vehicle trip.
vehicleId required | number |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
userId required | string The ID of the user starting the trip. This is your unique user ID. If the user does not exist in the Urban Sharing system, it will be created. Urban Sharing will never expose their internal user IDs, only the IDs provided by the client. | ||||||||||
productId | number The optional ID of the product being used for the trip. If the product ID is valid, product validations will be performed before starting the trip (i.e. valid product, penalty points etc.). At the end of the trip, the product ID will be used to calculate the price and a summary will be sent to the users/invoices webhook. If no product ID is provided, it is the responsibility of the caller to manage pricing and penalties. | ||||||||||
object User position | |||||||||||
|
{- "userId": "User12345",
- "productId": 1,
- "userPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "accuracyRadiusMeters": 12
}
}
{- "id": 12345,
- "clientId": "Client12345",
- "userId": "User12345",
- "state": "cancelled",
- "stateTransitionReason": "cancelled_by_administrator",
- "stateTransitionComment": "string",
- "startedAtLocation": {
- "timestamp": "2019-08-24T14:15:22Z",
- "geoPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "streetAddress": "Karl Johans gate 1"
}, - "dock": {
- "dockGroupId": 2232,
- "dockGroupName": "Station 1",
- "dockNumber": 21
}
}, - "vehicle": {
- "id": 12345,
- "name": "Bike 1",
- "number": "42",
- "vehicleCategory": "ebike",
- "status": "available",
- "unavailableReason": "dock_broken",
- "batteryCharge": 70,
- "batteryRange": 4000
}, - "endedAtLocation": {
- "timestamp": "2019-08-24T14:15:22Z",
- "geoPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "streetAddress": "Karl Johans gate 1"
}, - "dock": {
- "dockGroupId": 2232,
- "dockGroupName": "Station 1",
- "dockNumber": 21
}
}, - "totalDistance": 12.55,
- "updatedAt": "2019-08-24T14:15:22Z"
}
Reserves a specific vehicle
vehicleId required | number |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
userId required | string The ID of the user who is reserving the vehicle |
productId | number The optional ID of the product being used for the reservation. If the product ID is valid, product validations will be performed before starting the reservation. e.g. valid product, penalty points etc. At the end of the reservation/trip, the product ID will be used to calculate the price and a summary will be sent to the users/invoices webhook. If no product ID is provided, it is the responsibility of the caller to manage pricing and penalties. |
{- "userId": "435432",
- "productId": 1
}
{- "id": 2,
- "vehicleId": 2,
- "dockGroupId": 2,
- "userId": "435432",
- "clientId": "Client12345",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z"
}
Returns a reservation based on the id
reservationId required | string |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "id": 2,
- "vehicleId": 2,
- "dockGroupId": 2,
- "userId": "435432",
- "clientId": "Client12345",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z"
}
Cancels an existing vehicle reservation
reservationId required | string |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "id": 2,
- "vehicleId": 2,
- "dockGroupId": 2,
- "userId": "435432",
- "clientId": "Client12345",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z"
}
Gets the damage types for a vehicle.
vehicleId required | number |
locale required | string |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "rows": [
- {
- "id": 1,
- "localizedName": "Broken wheel"
}
]
}
Creates a damage report for a vehicle.
vehicleId required | number |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
userId required | string The ID of the user that is creating the report |
damageTypeIds required | Array of arrays List of IDs that correspond to the damage types being reported |
comment | string An optional comment related to the damage |
{- "userId": "2334235",
- "damageTypeIds": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "comment": "The rear wheel is broken"
}
Updates a trip.
tripId required | number |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
update required | string Enum: "pause" "resume" "cancel" "end" Set a new trip state. Note that not all states are supported by all vehicle types. | ||||||||||
object User position | |||||||||||
| |||||||||||
stateTransitionReason | string Enum: "cancelled_by_administrator" "time_limit_exceeded" "vehicle_communication_timeout" "station_communication_timeout" "user_interaction_timeout" "vehicle_taken_by_administrator" "vehicle_moved_to_operation_location" "vehicle_decommissioned" "illegal_parking" The reason why the state transistioned to the current state. | ||||||||||
stateTransitionComment | string Text describing the reason why the transition occurred |
{- "update": "end",
- "userPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "accuracyRadiusMeters": 12
}, - "stateTransitionReason": "cancelled_by_administrator",
- "stateTransitionComment": "string"
}
{- "code": "invalid_location",
- "message": "An error occured"
}
Returns a trip based on ID
tripId required | number |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "id": 12345,
- "clientId": "Client12345",
- "userId": "User12345",
- "state": "cancelled",
- "stateTransitionReason": "cancelled_by_administrator",
- "stateTransitionComment": "string",
- "startedAtLocation": {
- "timestamp": "2019-08-24T14:15:22Z",
- "geoPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "streetAddress": "Karl Johans gate 1"
}, - "dock": {
- "dockGroupId": 2232,
- "dockGroupName": "Station 1",
- "dockNumber": 21
}
}, - "vehicle": {
- "id": 12345,
- "name": "Bike 1",
- "number": "42",
- "vehicleCategory": "ebike",
- "status": "available",
- "unavailableReason": "dock_broken",
- "batteryCharge": 70,
- "batteryRange": 4000
}, - "endedAtLocation": {
- "timestamp": "2019-08-24T14:15:22Z",
- "geoPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "streetAddress": "Karl Johans gate 1"
}, - "dock": {
- "dockGroupId": 2232,
- "dockGroupName": "Station 1",
- "dockNumber": 21
}
}, - "totalDistance": 12.55,
- "updatedAt": "2019-08-24T14:15:22Z"
}
Returns all products available
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "data": [
- {
- "id": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "name": "Premium",
- "enabled": true,
- "price": 10.99,
- "durationMethod": "absolute",
- "durationMins": 60,
- "vatRate": 0.21,
- "purchasableFrom": "2019-08-24T14:15:22Z",
- "purchasableTo": "2019-08-24T14:15:22Z",
- "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "purchasable": true,
- "sortIndex": 1,
- "freeMinutesPerDay": 60,
- "freeFloatingDockingFeeAmount": 1,
- "priceMatrices": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "vehicleCategory": "bike",
- "type": "trip",
- "priceMatrix": {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "title": "Standard Pricing",
- "lastStepInfinite": false,
- "penalty": {
- "points": 2,
- "penaltyAfterMinutes": 60
}, - "priceMatrixItems": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "type": "period",
- "price": 42.42,
- "quantity": 10,
- "minutes": 60,
- "index": 1
}
]
}
}
]
}
]
}
Returns the active penalties accrued by a user
userId required | string |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "data": [
- {
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "resolvedAt": "2019-08-24T14:15:22Z",
- "value": 1,
- "comment": "string"
}
]
}
Adds a new penalty value to a user
userId required | string |
required | object (MaasCreatePenalty) |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "data": [
- {
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "resolvedAt": "2019-08-24T14:15:22Z",
- "value": 1,
- "comment": "string"
}
]
}
Resolves a user penalty
userId required | string |
penaltyId required | number |
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
{- "data": [
- {
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "resolvedAt": "2019-08-24T14:15:22Z",
- "value": 1,
- "comment": "string"
}
]
}
Receive trip events from the MAAS API.
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
Urbansharing-Signature required | string Used to verify the authenticity of the webhook request. For information about how to validate the signature, see here. |
id required | number Trip ID | ||||||||||||||||||||
clientId required | string The API client ID used to start the trip | ||||||||||||||||||||
userId required | string The ID of the user that started the trip | ||||||||||||||||||||
state required | string Enum: "starting" "in_progress" "on_hold" "completed" "cancelled" The current state of the trip | ||||||||||||||||||||
stateTransitionReason | string Enum: "cancelled_by_administrator" "time_limit_exceeded" "vehicle_communication_timeout" "station_communication_timeout" "user_interaction_timeout" "vehicle_taken_by_administrator" "vehicle_moved_to_operation_location" "vehicle_decommissioned" "illegal_parking" The reason why the state transistioned to the current state. Only present when an external event caused the state transition. | ||||||||||||||||||||
stateTransitionComment | string Text describing the reason why the transition occurred | ||||||||||||||||||||
required | object The location at which the trip was started | ||||||||||||||||||||
| |||||||||||||||||||||
object The vehicle being used for the trip | |||||||||||||||||||||
| |||||||||||||||||||||
object The location at which the trip ended | |||||||||||||||||||||
| |||||||||||||||||||||
totalDistance | number The total distance travelled during the trip in meters | ||||||||||||||||||||
updatedAt required | string <date-time> The date when the trip was last updated |
{- "id": 12345,
- "clientId": "Client12345",
- "userId": "User12345",
- "state": "cancelled",
- "stateTransitionReason": "cancelled_by_administrator",
- "stateTransitionComment": "string",
- "startedAtLocation": {
- "timestamp": "2019-08-24T14:15:22Z",
- "geoPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "streetAddress": "Karl Johans gate 1"
}, - "dock": {
- "dockGroupId": 2232,
- "dockGroupName": "Station 1",
- "dockNumber": 21
}
}, - "vehicle": {
- "id": 12345,
- "name": "Bike 1",
- "number": "42",
- "vehicleCategory": "ebike",
- "status": "available",
- "unavailableReason": "dock_broken",
- "batteryCharge": 70,
- "batteryRange": 4000
}, - "endedAtLocation": {
- "timestamp": "2019-08-24T14:15:22Z",
- "geoPosition": {
- "geometry": {
- "type": "Point",
- "coordinates": [
- 10.752245,
- 59.913868
]
}, - "streetAddress": "Karl Johans gate 1"
}, - "dock": {
- "dockGroupId": 2232,
- "dockGroupName": "Station 1",
- "dockNumber": 21
}
}, - "totalDistance": 12.55,
- "updatedAt": "2019-08-24T14:15:22Z"
}
Receive reservation events from the MAAS API.
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
Urbansharing-Signature required | string Used to verify the authenticity of the webhook request. For information about how to validate the signature, see here. |
id required | number The ID of the reservation |
vehicleId | number The ID of the vehicle to be reserved. Required if dockGroupId is not provided. If both are provided, dockGroupId will be ignored |
dockGroupId | number The ID of the dock group from which to reserve the vehicle. Required if vehicleId is not provided |
userId required | string The ID of the user who is reserving the vehicle |
clientId required | string The API client ID used to create the reservation |
createdAt required | string <date-time> The date and time the reservation was created |
updatedAt | string <date-time> The date and time the reservation was last updated |
expiresAt required | string <date-time> The date and time the reservation expires |
completedAt | string <date-time> The date and time the reservation was completed |
cancelledAt | string <date-time> The date and time the reservation was cancelled |
{- "id": 2,
- "vehicleId": 2,
- "dockGroupId": 2,
- "userId": "435432",
- "clientId": "Client12345",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z"
}
Receive user invoice events from the MAAS API. Only applicable for trips that were started using a productId
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
Urbansharing-Signature required | string Used to verify the authenticity of the webhook request. For information about how to validate the signature, see here. |
userId required | string The ID of the user to be invoiced | ||||||
productId required | number The ID of the product related to the invoice | ||||||
tripId | number The ID of the trip related to the invoice | ||||||
reservationId | number The ID of the reservation related to the invoice | ||||||
currency required | string The currency used for the trip charges | ||||||
required | Array of objects (MaasUserInvoiceOrderLine) A breakdown of the costs incurred during the trip | ||||||
Array
|
{- "userId": "user00002",
- "productId": 24,
- "tripId": 43424,
- "reservationId": 34312,
- "currency": "USD",
- "orderLines": [
- {
- "cost": 1,
- "defaultDescription": "Unlock fee of 1.00 USD",
- "type": "trip"
}
]
}
Receive user penalty events from the MAAS API. Only applicable for trips that were started using a productId
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
Urbansharing-Signature required | string Used to verify the authenticity of the webhook request. For information about how to validate the signature, see here. |
penaltyId required | number The ID of the penalty |
userId required | string The ID of the user |
penaltyType required | string Value: "trip_duration" The type of penalty |
penaltyPoints required | number The total number of penalty points incurred during this period of the trip |
{- "penaltyId": 214,
- "userId": "47372",
- "penaltyType": "trip_duration",
- "penaltyPoints": 1
}
Receive user messages from the MAAS API.
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
Urbansharing-Signature required | string Used to verify the authenticity of the webhook request. For information about how to validate the signature, see here. |
userId required | number The ID of the user | ||||
defaultMessage required | string The message in the default language | ||||
messageType required | string Enum: "trip_time_warning" "trip_cancelled" "vehicle_incorrectly_parked" "reservation_cancelled" "illegal_parking" The type of user message | ||||
Array of objects (UserMessageParameter) Parameter values for the message | |||||
Array
|
{- "userId": 94,
- "defaultMessage": "Your bike was parked incorrectly at station - Central Station",
- "messageType": "reservation_cancelled",
- "parameters": [
- {
- "key": "penalty_points",
- "value": "1"
}
]
}
Receive lost vehicle updates. This event is fired when a vehicle whose last trip was with this client enters or leaves the lost state.
uowid | string A globally unique unit of work ID generated by the client which allows Urban Sharing to track requests through our systems. If no header is provided it will be generated automatically at the time of arrival. The header and ID will be returned in the response. |
Urbansharing-Signature required | string Used to verify the authenticity of the webhook request. For information about how to validate the signature, see here. |
clientId required | string The API client ID used to create the reservation |
vehicleId required | number The ID of the vehicle |
lost required | boolean Whether or not the vehicle is considred lost |
{- "clientId": "Client12345",
- "vehicleId": 94,
- "lost": true
}