Session

Service to keep track of parking and renting sessions.

GET deprecated /session/v1/device-sessions
Authenticated

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

NameTypeRequiredDescription
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
end_time string

Marks the end of the parking session, when the device was unlocked

rating object

Null, if no rating

location object
payment object
id string
uri string
device object
events [object]
uri string

Example Request

curl \
  "https://services.bikeep.com/session/v1/device-sessions" \
  -H "Authorization: Bearer {ACCESS_TOKEN}"
GET deprecated /session/v1/device-sessions/{session_id}
Authenticated

Get target device session

Deprecated: Use GET v2/users/{user_id}/sessions/{session_id} instead.

Path Parameters

NameTypeDescription
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

Example Request

curl \
  "https://services.bikeep.com/session/v1/device-sessions/{SESSION_ID}" \
  -H "Authorization: Bearer {ACCESS_TOKEN}"
GET deprecated /session/v1/devices/{device_id}/sessions
Authenticated

Get parking session by target device ID

Deprecated: Use GET v2/sessions by location_id instead.

Path Parameters

NameTypeDescription
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

Example Request

curl \
  "https://services.bikeep.com/session/v1/devices/{DEVICE_ID}/sessions" \
  -H "Authorization: Bearer {ACCESS_TOKEN}"
GET /session/v2/sessions
Authenticated

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

NameTypeRequiredDescription
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

end_time string

Null, if session is not ended (RFC3339)

rating object

Null, if no rating

storage object

Parking related metadata

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

id string
travel object

Micromobility rent related metadata

booked_time string

Null, if session did not include booking (RFC3339)

auxiliary_devices [object]
events [object]
status string pendingbookedactiveended

Current session status

uri string

Example Request

curl \
  "https://services.bikeep.com/session/v2/sessions" \
  -H "Authorization: Bearer {ACCESS_TOKEN}"
GET /session/v2/users/{user_id}/sessions/{session_id}
Authenticated

Get target session

Path Parameters

NameTypeDescription
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
device object
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
rental_device object
seconds_paused number
battery_used number
rental_fleet object
distance_travelled number
seconds_active number
end_location object
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

Example Request

curl \
  "https://services.bikeep.com/session/v2/users/{USER_ID}/sessions/{SESSION_ID}" \
  -H "Authorization: Bearer {ACCESS_TOKEN}"