Leave Budget Events
A budget event records changes in an employee’s leave balance.
- When a leave request is approved, the budget decreases.
- Leave is automatically added each month.
- HR can manually adjust leave balances (add/remove), with all changes audited in this service.
Endpoints
get/api/v3/office/leave/budget_events
Return a paginated list of office/leave/budgets
Input Schema
object
page?:
object
The page number, default to 1
number?: integer
The number of items per page, default to 1000
size?: integer
The sort order, comma separated list of fields. See sorting section for more details
sort?: string
Set to true to return the total number of items in the collection
count?: boolean
filter?:
object
id?: unknown
amount?: unknown
leave_budget_id?: unknown
created_at__gte?: unknown
created_at__lte?: unknown
The related resources to include in the response. Allowed resources are:
- `leave_request`
- `leave_request.employee`
- `created_by`
- `leave_budget`
included?: - `leave_request`
- `leave_request.employee`
- `created_by`
- `leave_budget`
array
Elements: string
The fields to include in the response.
The key is the resource type and the value is an array of fields.
fields?: The key is the resource type and the value is an array of fields.
dictionary
Values: array
Typescript
type InputSchema = {
page?: {
// The page number, default to 1
number?: number;
// The number of items per page, default to 1000
size?: number;
};
// The sort order, comma separated list of fields. See sorting section for more details
sort?: string;
// Set to true to return the total number of items in the collection
count?: boolean;
filter?: {
id?: any;
amount?: any;
leave_budget_id?: any;
created_at__gte?: any;
created_at__lte?: any;
};
// The related resources to include in the response. Allowed resources are:
// - `leave_request`
// - `leave_request.employee`
// - `created_by`
// - `leave_budget`
included?: Array<string>;
// The fields to include in the response.
// The key is the resource type and the value is an array of fields.
fields?: { [key: string]: Array<any> };
};
Output Schema
object
data:
array
Elements:
object
type: string
id?: string
attributes?:
object
id?: integer
amount?: integer
relationships?: open struct
included?:
array
Elements: open struct
Typescript
type OutputSchema = {
data: Array<{
type: string;
id?: string;
attributes?: { id?: number; amount?: number };
relationships?: Record<string, any>;
}>;
included?: Array<Record<string, any>>;
};
get/api/v3/office/leave/budget_events/:resource_id
Show a specific office/leave/budgets
Input Schema
object
resource_id: integer
included?:
array
Elements: string
fields?:
dictionary
Values: array
Typescript
type InputSchema = {
resource_id: number;
included?: Array<string>;
fields?: { [key: string]: Array<any> };
};
Output Schema
object
data:
object
type: string
id?: string
attributes?:
object
id?: integer
amount?: integer
relationships?: open struct
included?:
array
Elements: open struct
Typescript
type OutputSchema = {
data: {
type: string;
id?: string;
attributes?: { id?: number; amount?: number };
relationships?: Record<string, any>;
};
included?: Array<Record<string, any>>;
};