ERPNext HRMS icon

ERPNext HRMS

Work with ERPNext/Frappe HRMS v15-v16 documents and methods

Leave Allocation → Create

AI-generated

Summary

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.

Links

Discussion