Chilkat Online Tools

Foxpro / PandaDoc API Reference / List Contacts

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loSbResponseBody

* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.

loHttp = CreateObject('Chilkat_9_5_0.Http')

* Adds the "Authorization: Bearer {{access_token}}" header.
loHttp.AuthToken = "{{access_token}}"

loSbResponseBody = CreateObject('Chilkat_9_5_0.StringBuilder')
lnSuccess = loHttp.QuickGetSb("https://api.pandadoc.com/public/v1/contacts/",loSbResponseBody)
IF (lnSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loSbResponseBody
    CANCEL
ENDIF

? "Response status code = " + STR(loHttp.LastStatus)
? loSbResponseBody.GetAsString()

RELEASE loHttp
RELEASE loSbResponseBody

Curl Command

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

Postman Collection Item JSON

{
  "name": "List Contacts",
  "event": [
    {
      "listen": "test",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "GET",
    "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/",
      "protocol": "https",
      "host": [
        "api",
        "pandadoc",
        "com"
      ],
      "path": [
        "public",
        "v1",
        "contacts",
        ""
      ]
    }
  },
  "response": [
  ]
}