Chilkat Online Tools

Foxpro / PandaDoc API Reference / List Attachments

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')

loHttp.SetRequestHeader("Authorization","API-Key {{api_key}}")

loSbResponseBody = CreateObject('Chilkat_9_5_0.StringBuilder')
lnSuccess = loHttp.QuickGetSb("https://api.pandadoc.com/public/v1/documents/{{document_id}}/attachments/",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: Bearer {{access_token}}"
	-H "Authorization: API-Key {{api_key}}"
https://api.pandadoc.com/public/v1/documents/{{document_id}}/attachments/

Postman Collection Item JSON

{
  "name": "List Attachments",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "Bearer {{access_token}}",
        "type": "text",
        "disabled": true
      },
      {
        "key": "Authorization",
        "value": "API-Key {{api_key}}",
        "type": "text"
      }
    ],
    "url": {
      "raw": "https://api.pandadoc.com/public/v1/documents/{{document_id}}/attachments/",
      "protocol": "https",
      "host": [
        "api",
        "pandadoc",
        "com"
      ],
      "path": [
        "public",
        "v1",
        "documents",
        "{{document_id}}",
        "attachments",
        ""
      ]
    }
  },
  "response": [
  ]
}