Chilkat Online Tools

unicodeCpp / PandaDoc API Reference / Delete Contact

Back to Collection Items

#include <CkHttpW.h>
#include <CkHttpResponseW.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttpW http;
    bool success;

    // Adds the "Authorization: Bearer {{access_token}}" header.
    http.put_AuthToken(L"{{access_token}}");

    CkHttpResponseW *resp = http.QuickRequest(L"DELETE",L"https://api.pandadoc.com/public/v1/contacts/{{contact_id}}/");
    if (http.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    wprintf(L"%d\n",resp->get_StatusCode());
    wprintf(L"%s\n",resp->bodyStr());
    delete resp;
    }

Curl Command

curl -X DELETE
	-H "Authorization: API-Key {{api_key}}"
	-H "Authorization: Bearer {{access_token}}"
https://api.pandadoc.com/public/v1/contacts/{{contact_id}}/

Postman Collection Item JSON

{
  "name": "Delete Contact",
  "event": [
    {
      "listen": "test",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "DELETE",
    "header": [
      {
        "key": "Authorization",
        "value": "API-Key {{api_key}}",
        "type": "text"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{access_token}}",
        "type": "text",
        "disabled": true
      }
    ],
    "url": {
      "raw": "https://api.pandadoc.com/public/v1/contacts/{{contact_id}}/",
      "protocol": "https",
      "host": [
        "api",
        "pandadoc",
        "com"
      ],
      "path": [
        "public",
        "v1",
        "contacts",
        "{{contact_id}}",
        ""
      ]
    }
  },
  "response": [
  ]
}