Skip to content

Get the caller's time off balance(s)

GET
/time-off/balance
Code sample: Shell / cURL
curl --request GET \
--url https://example.com/api/v1/time-off/balance \
--header 'Authorization: Bearer <token>'

With policyId, returns the caller’s balance for that policy. Without it, returns one balance per policy assigned to the caller. Balances are created on demand for the current year.

policyId

Return the balance for this policy only. Without it, one balance per assigned policy is returned.

string

Return the balance for this policy only. Without it, one balance per assigned policy is returned.

A single balance when policyId is provided; otherwise an array with one balance per assigned policy.

Media typeapplication/json
object
data
required
Any of:

A member’s time-off balance for one policy and year, created on demand.

object
carriedOver
required
integer
>= -9007199254740991 <= 9007199254740991
id
required
string
memberId
required
string
policyId
required
string
totalDays
required
integer
>= -9007199254740991 <= 9007199254740991
usedDays
required
integer
>= -9007199254740991 <= 9007199254740991
year
required
integer
>= -9007199254740991 <= 9007199254740991

Example generated

{
"data": {
"carriedOver": 1,
"id": "example",
"memberId": "example",
"policyId": "example",
"totalDays": 1,
"usedDays": 1,
"year": 1
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.