Staff Capacity
const url = 'https://api.upvio.com/v1/businesses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/staff/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/capacity';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Business ID
Staff ID
Query Parameters
Section titled “Query Parameters”Start of date range
End of date range
Responses
Section titled “Responses”A Staff member within your business
object
object
Total minutes blocked by external events or time blockers.
object
Total minutes the staff could potentially be booked (from his working hours).
Total minutes the staff was available for booking (bookable minutes minus blocked minutes)
Total minutes the staff was booked.
Example generated
{ "data": { "blockedTime": { "externalEvents": 1, "timeBlockers": 1 }, "bookableMinutes": 1, "availableBookableMinutes": 1, "bookedMinutes": 1 }}The staff ID is malformed, or the dates are invalid.
object
object
The specific error that occurred.
Human-readable description of the error.
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.
object
object
The specific error that occurred.
Human-readable description of the error.
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.
object
object
The specific error that occurred.
Human-readable description of the error.
Example
{ "error": { "code": 404, "type": "NotFoundError", "title": "Maximum range is 31 days" }}