Session
Service to keep track of parking and renting sessions.
Endpoints
GET/session/v1/device-sessions
deprecated
Get parking sessions
GET
/session/v1/device-sessions/{session_id}
deprecated
Get target device session
GET
/session/v1/devices/{device_id}/sessions
deprecated
Get parking session by target device ID
GET
/session/v2/sessions
Get sessions
GET
/session/v2/users/{user_id}/sessions/{session_id}
Get target session
/session/v1/device-sessions
Get parking sessions
Deprecated: Use GET v2/sessions instead. Active sessions are queried by their start time, ended sessions are queried by their end time.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
location_id |
string | No | filter by location ID |
page |
string | No | pagination page, defaults to 1 |
page_size |
string | No | pagination page size, defaults to 100 |
from |
string | No | query from date (YYYY-MM-DD) |
active |
string | No | true to return only active sessions, false to return only ended sessions (defaults to false) |
to |
string | No | query to date (YYYY-MM-DD) |
Responses
200 response
data
[object]
access_key_id
string
Null, if no access key
start_time
string
Marks the start of the parking session, when the device was locked
user_id
string
fee
object
currency
string
value
string
end_time
string
Marks the end of the parking session, when the device was unlocked
rating
object
Null, if no rating
rating
string
comment
string
location
object
id
string
uri
string
payment
object
status
string
PENDING
PAID
NEEDS_APPROVAL
APPROVED
CANCELED
PAYMENT_FAILED
REFUNDED
REFUND_FAILED
NOT_CHARGED
id
string
uri
string
device
object
id
string
uri
string
events
[object]
name
string
bookstartend
timestamp
string
RFC3339
uri
string
{
"data": [
{
"access_key_id": "00000000-0000-0000-0000-000000000000",
"start_time": "string",
"user_id": "00000000-0000-0000-0000-000000000000",
"fee": {
"currency": "string",
"value": "string"
},
"end_time": "string",
"rating": {
"rating": "string",
"comment": "string"
},
"location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"payment": {
"status": "PENDING"
},
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource",
"device": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"events": [
{
"name": "book",
"timestamp": "2025-01-15T12:00:00Z"
}
]
}
],
"uri": "https://example.com/resource"
}
400 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
500 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
Example Request
curl \
"https://services.bikeep.com/session/v1/device-sessions" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
/session/v1/device-sessions/{session_id}
Get target device session
Deprecated: Use GET v2/users/{user_id}/sessions/{session_id} instead.
Path Parameters
| Name | Type | Description |
|---|---|---|
session_id |
string | Target session ID required |
Responses
200 response
access_key_id
string
Null, if no access key
start_time
string
Marks the start of the parking session, when the device was locked
user_id
string
fee
object
currency
string
value
string
end_time
string
Marks the end of the parking session, when the device was unlocked
rating
object
Null, if no rating
rating
string
comment
string
location
object
id
string
uri
string
payment
object
status
string
PENDING
PAID
NEEDS_APPROVAL
APPROVED
CANCELED
PAYMENT_FAILED
REFUNDED
REFUND_FAILED
NOT_CHARGED
id
string
uri
string
device
object
id
string
uri
string
events
[object]
name
string
bookstartend
timestamp
string
RFC3339
{
"access_key_id": "00000000-0000-0000-0000-000000000000",
"start_time": "string",
"user_id": "00000000-0000-0000-0000-000000000000",
"fee": {
"currency": "string",
"value": "string"
},
"end_time": "string",
"rating": {
"rating": "string",
"comment": "string"
},
"location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"payment": {
"status": "PENDING"
},
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource",
"device": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"events": [
{
"name": "book",
"timestamp": "2025-01-15T12:00:00Z"
}
]
}
400 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
500 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
Example Request
curl \
"https://services.bikeep.com/session/v1/device-sessions/{SESSION_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
/session/v1/devices/{device_id}/sessions
Get parking session by target device ID
Deprecated: Use GET v2/sessions by location_id instead.
Path Parameters
| Name | Type | Description |
|---|---|---|
device_id |
string | Target device ID required |
Responses
200 response
access_key_id
string
Null, if no access key
start_time
string
Marks the start of the parking session, when the device was locked
user_id
string
fee
object
currency
string
value
string
end_time
string
Marks the end of the parking session, when the device was unlocked
rating
object
Null, if no rating
rating
string
comment
string
location
object
id
string
uri
string
payment
object
status
string
PENDING
PAID
NEEDS_APPROVAL
APPROVED
CANCELED
PAYMENT_FAILED
REFUNDED
REFUND_FAILED
NOT_CHARGED
id
string
uri
string
device
object
id
string
uri
string
events
[object]
name
string
bookstartend
timestamp
string
RFC3339
{
"access_key_id": "00000000-0000-0000-0000-000000000000",
"start_time": "string",
"user_id": "00000000-0000-0000-0000-000000000000",
"fee": {
"currency": "string",
"value": "string"
},
"end_time": "string",
"rating": {
"rating": "string",
"comment": "string"
},
"location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"payment": {
"status": "PENDING"
},
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource",
"device": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"events": [
{
"name": "book",
"timestamp": "2025-01-15T12:00:00Z"
}
]
}
400 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
500 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
Example Request
curl \
"https://services.bikeep.com/session/v1/devices/{DEVICE_ID}/sessions" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
/session/v2/sessions
Get sessions
Query sessions by user or location with filtering and cursor pagination. Active sessions are queried by their start time, ended sessions are queried by their end time.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
user_id |
string | No | filter by user ID |
limit |
string | No | maximum number of sessions to return |
pagination_token |
string | No | cursor token for paginating through results |
location_id |
string | No | filter by location ID |
status |
string | No | filter by session status (active/ended) |
from |
string | No | query from date (YYYY-MM-DD) |
to |
string | No | query to date (YYYY-MM-DD) |
Responses
200 response
pagination_token
string
Cursor token for the next page of results
data
[object]
access_key_id
string
Null, if no access key
fee
object
Null, if not paid session
currency
string
value
string
end_time
string
Null, if session is not ended (RFC3339)
rating
object
Null, if no rating
rating
string
comment
string
storage
object
Parking related metadata
location
object
id
string
uri
string
device
object
id
string
uri
string
uri
string
start_time
string
Null, if session not started (RFC3339)
user_id
string
booked_until_time
string
RFC3339
payment
object
Null, if not paid session
status
string
PENDING
PAID
NEEDS_APPROVAL
APPROVED
CANCELED
PAYMENT_FAILED
REFUNDED
REFUND_FAILED
NOT_CHARGED
id
string
travel
object
Micromobility rent related metadata
start_location
object
id
string
uri
string
rental_device
object
id
string
uri
string
seconds_paused
number
battery_used
number
rental_fleet
object
id
string
uri
string
distance_travelled
number
seconds_active
number
end_location
object
id
string
uri
string
booked_time
string
Null, if session did not include booking (RFC3339)
auxiliary_devices
[object]
id
string
uri
string
events
[object]
name
string
bookstartendpauseresume
timestamp
string
RFC3339
status
string
pendingbookedactiveended
Current session status
uri
string
{
"pagination_token": "string",
"data": [
{
"access_key_id": "00000000-0000-0000-0000-000000000000",
"fee": {
"currency": "string",
"value": "string"
},
"end_time": "string",
"rating": {
"rating": "string",
"comment": "string"
},
"storage": {
"location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"device": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
}
},
"uri": "https://example.com/resource",
"start_time": "string",
"user_id": "00000000-0000-0000-0000-000000000000",
"booked_until_time": "string",
"payment": {
"status": "PENDING"
},
"id": "00000000-0000-0000-0000-000000000000",
"travel": {
"start_location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"rental_device": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"seconds_paused": 0,
"battery_used": 0,
"rental_fleet": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"distance_travelled": 0,
"seconds_active": 0,
"end_location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
}
},
"booked_time": "string",
"auxiliary_devices": [
{
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
}
],
"events": [
{
"name": "book",
"timestamp": "2025-01-15T12:00:00Z"
}
],
"status": "pending"
}
],
"uri": "https://example.com/resource"
}
400 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
500 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
Example Request
curl \
"https://services.bikeep.com/session/v2/sessions" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
/session/v2/users/{user_id}/sessions/{session_id}
Get target session
Path Parameters
| Name | Type | Description |
|---|---|---|
session_id |
string | Target session ID required |
user_id |
string | User whose session to query required |
Responses
200 response
access_key_id
string
Null, if no access key
fee
object
Null, if not paid session
currency
string
value
string
end_time
string
Null, if session is not ended (RFC3339)
rating
object
Null, if no rating
rating
string
comment
string
storage
object
Parking related metadata
location
object
id
string
uri
string
device
object
id
string
uri
string
uri
string
start_time
string
Null, if session not started (RFC3339)
user_id
string
booked_until_time
string
RFC3339
payment
object
Null, if not paid session
status
string
PENDING
PAID
NEEDS_APPROVAL
APPROVED
CANCELED
PAYMENT_FAILED
REFUNDED
REFUND_FAILED
NOT_CHARGED
id
string
travel
object
Micromobility rent related metadata
start_location
object
id
string
uri
string
rental_device
object
id
string
uri
string
seconds_paused
number
battery_used
number
rental_fleet
object
id
string
uri
string
distance_travelled
number
seconds_active
number
end_location
object
id
string
uri
string
booked_time
string
Null, if session did not include booking (RFC3339)
auxiliary_devices
[object]
id
string
uri
string
events
[object]
name
string
bookstartendpauseresume
timestamp
string
RFC3339
status
string
pendingbookedactiveended
Current session status
{
"access_key_id": "00000000-0000-0000-0000-000000000000",
"fee": {
"currency": "string",
"value": "string"
},
"end_time": "string",
"rating": {
"rating": "string",
"comment": "string"
},
"storage": {
"location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"device": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
}
},
"uri": "https://example.com/resource",
"start_time": "string",
"user_id": "00000000-0000-0000-0000-000000000000",
"booked_until_time": "string",
"payment": {
"status": "PENDING"
},
"id": "00000000-0000-0000-0000-000000000000",
"travel": {
"start_location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"rental_device": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"seconds_paused": 0,
"battery_used": 0,
"rental_fleet": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
},
"distance_travelled": 0,
"seconds_active": 0,
"end_location": {
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
}
},
"booked_time": "string",
"auxiliary_devices": [
{
"id": "00000000-0000-0000-0000-000000000000",
"uri": "https://example.com/resource"
}
],
"events": [
{
"name": "book",
"timestamp": "2025-01-15T12:00:00Z"
}
],
"status": "pending"
}
400 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
500 response
error_message
string
Human-readable error message.
status_code
integer
HTTP status code.
correlation_id
string
Request correlation ID for tracing.
error_code
string
Machine-readable error code, e.g. ERRORS.NOT_FOUND
{
"error_message": "string",
"status_code": 0,
"correlation_id": "00000000-0000-0000-0000-000000000000",
"error_code": "string"
}
Example Request
curl \
"https://services.bikeep.com/session/v2/users/{USER_ID}/sessions/{SESSION_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"