Back to Collection Items
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim http As New ChilkatHttp
Dim success As Long
http.SetRequestHeader "Authorization","{{apiKey}}"
http.SetRequestHeader "Accept","application/pdf"
Dim sbResponseBody As New ChilkatStringBuilder
success = http.QuickGetSb("https://api.easybill.de/rest/v1/documents/:id/pdf",sbResponseBody)
If (success = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
ERROR: "=" expected
ERROR: Undefined variable(ERROR)
Curl Command
curl -X GET
-H "Authorization: {{apiKey}}"
-H "Accept: application/pdf"
https://api.easybill.de/rest/v1/documents/:id/pdf
Postman Collection Item JSON
{
"name": "Fetch pdf document",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/pdf"
}
],
"url": {
"raw": "{{baseUrl}}/documents/:id/pdf",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id",
"pdf"
],
"variable": [
{
"key": "id",
"value": "<long>",
"description": "(Required) ID of document"
}
]
}
},
"response": [
{
"name": "Successful operation",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/pdf"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/documents/:id/pdf",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id",
"pdf"
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "application/pdf"
}
],
"cookie": [
],
"body": "<string>"
},
{
"name": "Not found",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/documents/:id/pdf",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id",
"pdf"
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
},
{
"name": "Too Many Requests",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/documents/:id/pdf",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id",
"pdf"
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}