0

Submit employee sign-off review for offboarding documents

by
Published Oct 17, 2025

Use this endpoint to submit an employee's review decision for the EOR offboarding document set for contract. Employees can approve the documents or request changes by providing feedback. **Token scopes**: `worker:write`

Script deel Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Submit employee sign-off review for offboarding documents
4
 * Use this endpoint to submit an employee's review decision for the EOR offboarding document set for contract. Employees can approve the documents or request changes by providing feedback.
5
 **Token scopes**: `worker:write`
6
 */
7
export async function main(auth: RT.Deel, contract_id: string, body: Body) {
8
	const url = new URL(
9
		`https://api.letsdeel.com/rest/v2/eor/contracts/${contract_id}/offboarding/review-employee-sign-offs`
10
	)
11

12
	const response = await fetch(url, {
13
		method: 'POST',
14
		headers: {
15
			'Content-Type': 'application/json',
16
			Authorization: 'Bearer ' + auth.apiKey
17
		},
18
		body: JSON.stringify(body)
19
	})
20
	if (!response.ok) {
21
		const text = await response.text()
22
		throw new Error(`${response.status} ${text}`)
23
	}
24
	return await response.json()
25
}
26

27
/* eslint-disable */
28
/**
29
 * This file was automatically generated by json-schema-to-typescript.
30
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
31
 * and run json-schema-to-typescript to regenerate this file.
32
 */
33

34
export interface Body {
35
	data?: {
36
		/**
37
		 * Indicates if the employee has approved the sign-off review
38
		 */
39
		approved: boolean
40
		/**
41
		 * Details of requested changes if the review is not approved
42
		 */
43
		requested_changes: string
44
		/**
45
		 * Signature of the reviewer if the review is approved
46
		 */
47
		reviewer_signature: string
48
		[k: string]: unknown
49
	}
50
	[k: string]: unknown
51
}
52