Back to Collection Items
require 'chilkat'
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
http = Chilkat::CkHttp.new()
http.SetRequestHeader("Authorization","API-Key {{api_key}}")
# resp is a CkHttpResponse
resp = http.QuickRequest("DELETE","https://api.pandadoc.com/public/v1/documents/{{document_id}}")
if (http.get_LastMethodSuccess() == false)
print http.lastErrorText() + "\n";
exit
end
print resp.get_StatusCode().to_s() + "\n";
print resp.bodyStr() + "\n";
Curl Command
curl -X DELETE
-H "Authorization: Bearer {{access_token}}"
-H "Authorization: API-Key {{api_key}}"
https://api.pandadoc.com/public/v1/documents/{{document_id}}
Postman Collection Item JSON
{
"name": "Delete Document",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"disabled": true
},
{
"key": "Authorization",
"value": "API-Key {{api_key}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.pandadoc.com/public/v1/documents/{{document_id}}",
"protocol": "https",
"host": [
"api",
"pandadoc",
"com"
],
"path": [
"public",
"v1",
"documents",
"{{document_id}}"
]
},
"description": "For details go to [https://developers.pandadoc.com/v1/reference#delete-document](https://developers.pandadoc.com/v1/reference#delete-document)."
},
"response": [
]
}