0

Get worker's KYC details

by
Published Oct 17, 2025

This endpoint allows organizations managing workers on Deel to retrieve detailed KYC verification data using the worker’s profile ID. It provides comprehensive information including verification status, document type, submission, approval, rejection, and expiry dates, supporting compliance monitoring and onboarding workflows **Token scopes**: `screenings:read`

Script deel Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Get worker's KYC details
4
 * This endpoint allows organizations managing workers on Deel to retrieve detailed KYC verification data using the worker’s profile ID. It provides comprehensive information including verification status, document type, submission, approval, rejection, and expiry dates, supporting compliance monitoring and onboarding workflows
5
 **Token scopes**: `screenings:read`
6
 */
7
export async function main(
8
	auth: RT.Deel,
9
	worker_profile_id?: string | undefined,
10
	profile_id?: string | undefined
11
) {
12
	const url = new URL(`https://api.letsdeel.com/rest/v2/screenings/kyc/details`)
13
	for (const [k, v] of [
14
		['worker_profile_id', worker_profile_id],
15
		['profile_id', profile_id]
16
	]) {
17
		if (v !== undefined && v !== '') {
18
			url.searchParams.append(k, v)
19
		}
20
	}
21
	const response = await fetch(url, {
22
		method: 'GET',
23
		headers: {
24
			Authorization: 'Bearer ' + auth.apiKey
25
		},
26
		body: undefined
27
	})
28
	if (!response.ok) {
29
		const text = await response.text()
30
		throw new Error(`${response.status} ${text}`)
31
	}
32
	return await response.json()
33
}
34