//native
/**
* Retrieve a required document for a case
* Use this endpoint to retrieve the details of a specific document requirement for a worker's case. This includes the requirement's status and information about any previously rejected documents
**Token scopes**: `worker:read`
*/
export async function main(auth: RT.Deel, worker_id: string, case_id: string) {
const url = new URL(
`https://api.letsdeel.com/rest/v2/immigration/workers/${worker_id}/cases/${case_id}/required-document`
)
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: 'Bearer ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 235 days ago