//native
/**
* Retrieve an IT order
* Retrieve detailed information about a single IT equipment order using its unique identifier. This allows you to track the order's status, review shipping details, and see the associated product. For more info, visit [Orders](https://developer.deel.com/docs/deel-it-api#orders).
**Token scopes**: `it-orders:read`
*/
export async function main(auth: RT.Deel, order_id: string) {
const url = new URL(`https://api.letsdeel.com/rest/v2/it/orders/${order_id}`)
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