Leaves
Create a leave for a person
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
person_id*string
UUID of the person the leave belongs to.
TypeScript Definitions
Use the request body type in TypeScript.
Request body for creating a leave under a person. The leave's owning person is taken from the path (/people/{person_id}/leaves), so it is not part of the body.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/people/497f6eca-6276-4993-bfeb-53cbbbba6f08/leaves" \ -H "Content-Type: application/json" \ -d '{ "data": { "type": "leaves" } }'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "leaves", "attributes": { "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "type": "string", "type_external_id": "string", "active": true, "status": "string" }, "relationships": { "person": { "links": { "self": "../dictionary", "related": "../dictionary" }, "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "people" } } } }}{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "leaves", "attributes": { "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "type": "string", "type_external_id": "string", "active": true, "status": "string" }, "relationships": { "person": { "links": { "self": "../dictionary", "related": "../dictionary" }, "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "people" } } } }}{ "errors": [ { "status": 0, "title": "string", "source": { "pointer": "string", "parameter": "string" }, "meta": { "error": "string", "field": "string" } } ]}{ "errors": [ { "status": 0, "title": "string", "source": { "pointer": "string", "parameter": "string" }, "meta": { "error": "string", "field": "string" } } ]}