---
title: "Search LeaveRules"
method: POST
path: "/resource/LeaveRules/QUERY"
tags: ["LeaveRules"]
---

# Search LeaveRules

`POST /resource/LeaveRules/QUERY`

## Request

- Base URL: `https://your-subdomain.deputy.deputy.com/api/v1`
- URL: `https://your-subdomain.deputy.deputy.com/api/v1/resource/LeaveRules/QUERY`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://once.deputy.com/my/oauth/login`
    - Token URL: `https://once.deputy.com/my/oauth/access_token`

Flexible search endpoint. Body supports `search`, `sort`, `start`, `max`, and `join` clauses. Example: `{"search": {"s1": {"field": "Id", "data": 1, "type": "eq"}}}`.

## Request body

- QueryRequest: V1 Resource search payload. All fields optional; an empty body returns the first page of results.
  - `search` object: Map of search clauses keyed by an arbitrary id (e.g. `s1`, `s2`). Each clause filters one field.
  - `sort` object: Map of field name → `asc` or `desc`.
  - `start` integer: Pagination offset (0-indexed).
  - `max` integer: Max records per page (server caps at 500).
  - `join` string[]: Related ORMs to expand inline (e.g. `["EmployeeObject"]`).

## Response `200`

Success

- LeaveRules[]
  - `Id` integer, required
  - `SvcLeavePolicyId` string
  - `Name` string, required
  - `Type` string, required
  - `Description` string
  - `MaxAllowedAnnually` number, double
  - `PaidLeave` boolean
  - `AnnualRollOver` boolean
  - `Visible` boolean
  - `UnitType` integer
  - `ResetType` integer
  - `ResetSchedule` integer
  - `ResetValue` number, double
  - `PayoutOnTermination` boolean
  - `EntitlementAfterMonth` integer
  - `ExportType` integer
  - `PayrollCategory` string
  - `CalcType` integer
  - `Calc` string
  - `F00` string
  - `F01` string
  - `F02` string
  - `F03` string
  - `F04` string
  - `F05` string
  - `F06` string
  - `F07` string
  - `F08` string
  - `F09` string
  - `Creator` integer
  - `Created` string, date-time
  - `Modified` string, required
  - `ResetScheduleObject` object

## Other responses

- `400`: Bad request
- `401`: Authentication required or invalid token
- `403`: Forbidden — token lacks access to this resource
- `404`: Resource not found

---

[API](https://skmtc.dev/deputy/apis/deputy-v1-resource-api.md) - [All operations](https://skmtc.dev/deputy/apis/deputy-v1-resource-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deputy/apis/deputy-v1-resource-api/revisions/5d8e44000786?raw)
