Leaves
Create leave request
Request Body
application/x-www-form-urlencoded
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/public/v3/leave_requests" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'employee_id=string&leave_type_id=string&starts_on=2019-08-24&ends_on=2019-08-24&description=string&skip_approval=string'{ "data": { "id": 0, "employee_id": 0, "leave_type_id": 0, "leave_type": "string", "state": "pending", "amount": "string", "hours": "string", "tracking_time_in": "hours", "on_demand": true, "starts_on": "2019-08-24", "ends_on": "2019-08-24", "comment": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "attachment_url": "string", "attachments": [ { "filename": "string", "url": "string", "expires_at": "2019-08-24T14:15:22Z" } ], "employee": { "id": 0, "first_name": "string", "last_name": "string", "email": "string" }, "entries": [ { "date": "string", "amount": "string", "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z" } ], "leave_type_policy": { "name": "string", "visibility": "public", "activity_type": "not_working_paid" }, "approvals": [ { "state": "queued", "assigned_to": { "id": 0, "full_name": "string" } } ] }}