Skip to main content
POST
Withdraw a leave request this key made

Authorizations

Authorization
string
header
required

Authorization: Bearer atk_live_… (a sandbox's keys are atk_test_…). Created in the API keys section of the Integrations settings; the secret is shown once.

Headers

Idempotency-Key
string
required

Unique per request; reuse it only to retry the same request with the same body. Remembered 24 hours.

Maximum string length: 255

Path Parameters

id
string
required

The leave request id.

Response

Withdrawn. The request as it now stands.

id
string
required
employeeId
string
required
companyId
string
required
leaveTypeId
string
required
startDate
string
required
Pattern: ^\d{4}-\d{2}-\d{2}$
endDate
string
required
Pattern: ^\d{4}-\d{2}-\d{2}$
partOfDay
enum<string> | null
required

A half day: am or pm. Null for whole days.

Available options:
am,
pm
amount
number
required

Working days, or hours for an hours type, as counted when the request was made.

unit
enum<string>
required
Available options:
days,
hours
status
enum<string>
required
Available options:
awaiting_approval,
approved,
declined,
withdrawn
decidedAt
string<date-time> | null
required

The last approval or decline time, else the approval time. Null while the request awaits approval, or when nobody decided it. A request withdrawn after approval keeps its approval time.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updatedAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$