Actions77
- Employee Actions
- Attendance Actions
- Employee Checkin Actions
- Expense Claim Actions
- Holiday List Actions
- Leave Allocation Actions
- Leave Application Actions
- Salary Slip Actions
- Shift Assignment Actions
- Custom DocType Actions
- Frappe Method Actions
Leave Allocation → Create
AI-generatedSummary
Create a new Leave Allocation document in ERPNext by providing the document details as JSON.
Inputs
- API Version — Select the Frappe REST API version (v1 or v2) to use for the request.
- Data JSON (required) — JSON object specifying the fields and values for the Leave Allocation document to create.
Output shape
a single JSON object representing the created Leave Allocation document.
The returned object contains the fields of the newly created document as returned by ERPNext API. The operation will fail if the provided JSON is not a valid object or if required fields are missing in the payload.
Examples
Example 1: Create a Leave Allocation with employee and leave type details
Set 'API Version' to 'v1' or 'v2', and provide valid Leave Allocation fields in 'Data JSON' such as employee ID, leave type, and allocation amount.