//native
type Pandadoc = {
apiKey: string
}
export async function main(auth: Pandadoc, id: string, linked_object_id: string) {
const url = new URL(
`https://api.pandadoc.com/public/v1/documents/${id}/linked-objects/${linked_object_id}`
)
const response = await fetch(url, {
method: 'DELETE',
headers: {
Authorization: `API-Key ${auth.apiKey}`
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.text()
}
Submitted by hugo697 581 days ago