Time off

Balances, requests and approvals, previews (how many days a request would use), the team calendar, adjustments, and dated allowance changes.

MethodPathSummary
GET/api/leave/balanceA person's time-off balance
GET/api/leave/requestsList time-off requests
POST/api/leave/previewHow many days a request would use
POST/api/leave/requestsRequest time off
POST/api/leave/requests/:id/decideApprove or decline time off
POST/api/leave/requests/:id/cancelCancel time off
POST/api/leave/adjustmentsAdd or take away days
DELETE/api/leave/adjustments/:idRemove an adjustment
POST/api/leave/allowance-changesFrom a leave year on, someone's allowance is days a year ('set') or days on top of the policy ('extra')
DELETE/api/leave/allowance-changes/:idRemove an allowance change
GET/api/leave/calendarWho's off when
GET/api/leave/typesLeave types

#A person's time-off balance

GET/api/leave/balance
Address
https://<your-org>.brambleit.cloud/hr/api/leave/balance
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Query parameters

NameTypeDescription
employeeanyThe person (default you).
datestring (date)The leave year containing this date (default today).

Response 200

FieldTypeDescription
balanceany
Example response
JSON
{
  "balance": null
}

Errors

StatusMessage
403You can't see this person's time off

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/balance', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#List time-off requests

GET/api/leave/requests
Address
https://<your-org>.brambleit.cloud/hr/api/leave/requests
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Query parameters

NameTypeDescription
scopeanymine (default), approvals (waiting for you to decide), or a person's with employee.
employeeanyThe person.

Response 200

FieldTypeDescription
requestsarray of any
Example response
JSON
{
  "requests": []
}

Errors

StatusMessage
403You can't see this person's time off

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/requests', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#How many days a request would use

POST/api/leave/preview
Address
https://<your-org>.brambleit.cloud/hr/api/leave/preview
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Request body JSON

NameTypeDescription
employee_idinteger
type_idinteger

Response 200

Errors

StatusMessage
400Choose the type of time off
403You can't book time off for this person

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/preview', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"employee_id":7,"type_id":7}),
});
const data = await res.json();

#Request time off

POST/api/leave/requests
Address
https://<your-org>.brambleit.cloud/hr/api/leave/requests
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Request body JSON

NameTypeDescription
employee_idintegerWho it's for (default you; HR and managers can book for others).
type_idintegerThe leave type.
notestringA note for the approver.
start_dateanyFirst day.
end_dateanyLast day.

Response 201

FieldTypeDescription
idinteger
statusstring
daysarray of any
Example response
JSON
{
  "id": 42,
  "status": "active",
  "days": []
}

Errors

StatusMessage
400Choose the type of time off
400That's before their start date
400That's after their last day
403You can't book time off for this person

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/requests', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"employee_id":7,"type_id":7,"note":"string","start_date":"…","end_date":"…"}),
});
const data = await res.json();

#Approve or decline time off

POST/api/leave/requests/:id/decide
Address
https://<your-org>.brambleit.cloud/hr/api/leave/requests/:id/decide
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
approveanytrue to approve, false to decline.
noteanyA note for the person.
overrideanyApprove even though it goes over their balance.

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
400This request has already been …
403You can't approve this person's time off
409Approving this would take … to … days in …. Approve anyway?
409That takes … to … days of … this year — the limit is …. Approve anyway?
409Someone else has just dealt with this request

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/requests/42/decide', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"approve":"…","note":"…","override":"…"}),
});
const data = await res.json();

#Cancel time off

POST/api/leave/requests/:id/cancel
Address
https://<your-org>.brambleit.cloud/hr/api/leave/requests/:id/cancel
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
400This request is already …
400This has already started — ask your manager to change it
403You can't cancel this person's time off

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/requests/42/cancel', {
  method: 'POST',
  credentials: 'include',
});
const data = await res.json();

#Add or take away days

POST/api/leave/adjustments
Address
https://<your-org>.brambleit.cloud/hr/api/leave/adjustments
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Request body JSON

NameTypeDescription
employee_idintegerThe person.
daysnumberDays to add (negative to take away).
reasonstringWhy.
datestring (date)Which leave year it counts in.

Response 201

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
400Give a number of days (use a minus for fewer)
400Give a reason — it shows on their balance
403Only HR admins can adjust allowances

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/adjustments', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"employee_id":7,"days":12.5,"reason":"string","date":"2026-11-12"}),
});
const data = await res.json();

#Remove an adjustment

DELETE/api/leave/adjustments/:id
Address
https://<your-org>.brambleit.cloud/hr/api/leave/adjustments/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Path parameters

NameTypeDescription
idrequirednumber

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
403Only HR admins can adjust allowances
404Adjustment not found

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/adjustments/12.5', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();

#From a leave year on, someone's allowance is `days` a year ('set') or `days` on top of the policy ('extra')

POST/api/leave/allowance-changes

From a leave year on, someone's allowance is days a year ('set') or days on top of the policy ('extra'). One change per person per year: saving another for the same year replaces it.

Address
https://<your-org>.brambleit.cloud/hr/api/leave/allowance-changes
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Request body JSON

NameTypeDescription
employee_idinteger
kindstring
daysrequirednumber
fromrequiredstring (date)
reasonstring

Response 201

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
400Give a number of days
400The allowance must be between 0 and 366 days
400Extra days must be between -100 and 100
400Choose the leave year it starts from
403Only HR admins can change allowances

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/allowance-changes', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"employee_id":7,"kind":"string","days":12.5,"from":"2026-11-12","reason":"string"}),
});
const data = await res.json();

#Remove an allowance change

DELETE/api/leave/allowance-changes/:id
Address
https://<your-org>.brambleit.cloud/hr/api/leave/allowance-changes/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Path parameters

NameTypeDescription
idrequirednumber

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
403Only HR admins can change allowances
404Allowance change not found

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/allowance-changes/12.5', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();

#Who's off when

GET/api/leave/calendar
Address
https://<your-org>.brambleit.cloud/hr/api/leave/calendar
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Query parameters

NameTypeDescription
fromstring (date)First date.
tostring (date)Last date.

Response 200

FieldTypeDescription
fromany
toany
daysarray of any
entriesarray of any
peoplearray of any
Example response
JSON
{
  "from": null,
  "to": null,
  "days": [],
  "entries": [],
  "people": []
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/calendar', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Leave types

GET/api/leave/types
Address
https://<your-org>.brambleit.cloud/hr/api/leave/types
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: HR.

Response 200

FieldTypeDescription
typesarray of any
Example response
JSON
{
  "types": []
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/hr/api/leave/types', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();