Skip to content

Staff Capacity

GET
/businesses/{businessId}/staff/{staffId}/capacity
curl --request GET \
--url https://api.upvio.com/v1/businesses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/staff/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/capacity \
--header 'Authorization: Bearer <token>'

Retrieve Capacity for a Staff Member

businessId
required
string format: uuid

Business ID

staffId
required
string format: uuid

Staff ID

startDate
string format: date-time

Start of date range

endDate
string format: date-time

End of date range

A Staff member within your business

Media typeapplication/json
object
data
object
blockedTime

Total minutes blocked by external events or time blockers.

object
externalEvents
number
timeBlockers
number
bookableMinutes

Total minutes the staff could potentially be booked (from his working hours).

number
availableBookableMinutes

Total minutes the staff was available for booking (bookable minutes minus blocked minutes)

number
bookedMinutes

Total minutes the staff was booked.

number

Example generated

{
"data": {
"blockedTime": {
"externalEvents": 1,
"timeBlockers": 1
},
"bookableMinutes": 1,
"availableBookableMinutes": 1,
"bookedMinutes": 1
}
}

The staff ID is malformed, or the dates are invalid.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: BadRequestError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 400,
"type": "BadRequestError",
"title": "Invalid date ranges"
}
}

The API key is missing or invalid, or the Business cannot be accessed with it.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: UnauthorizedError BusinessArchivedError BusinessDisabledError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 403,
"type": "UnauthorizedError",
"title": "Invalid API token"
}
}

The staff member does not exist. Also returned when the date range is longer than 31 days.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: NotFoundError BusinessNotFoundError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 404,
"type": "NotFoundError",
"title": "Maximum range is 31 days"
}
}