---
title: PDF Resource Download API Reference
version: 1.0.0
description: Download PDF files or ZIP archives from the server using their unique resource ID. Returns the file as a binary stream for direct download. Supports PDF and ZIP output formats depending on the requested resource.
openapi: 3.1.1
servers:
  - https://api.apifreaks.com/v1.0
paths: 1
operations: 1
schemas: 1
---

## Table of Contents

- [PDF Resource Download API Reference v1.0.0](#pdf-resource-download-api-reference-v100)
  - [Authentication](#authentication)
  - [PDF Upload and Download APIs](#pdf-upload-and-download-apis)
    - [downloadResource](#downloadresource)
      - [Parameters](#parameters)
      - [Responses](#responses)
  - [Schemas](#schemas)
    - [ErrorResponse](#errorresponse)



# PDF Resource Download API Reference v1.0.0

Download PDF files or ZIP archives from the server using their unique resource ID. Returns the file as a binary stream for direct download. Supports PDF and ZIP output formats depending on the requested resource.

Base URLs:

* [https://api.apifreaks.com/v1.0](https://api.apifreaks.com/v1.0)

## Authentication

* API Key (ApiKeyAuthHeader)
    - Parameter Name: **X-apiKey**, in: header. Pass your API key via the X-apiKey request header.

* API Key (ApiKeyAuthQuery)
    - Parameter Name: **apiKey**, in: query. Pass your API key via the apiKey query parameter.

## PDF Upload and Download APIs

### downloadResource

`GET /pdf/resource/download`

*Download PDF resource*

This API downloads PDF files or ZIP archives from the server using their unique resource ID.

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Response format: 'json' (default) or 'xml'.|
|resource_id|query|string|true|The unique identifier of the file or ZIP archive to download.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|

> Example responses

> 200 Response

> Bad Request — Missing required resource_id parameter

```json
{
  "error": "Invalid Param Exception",
  "message": "please pass correct parameters",
  "path": "/v1.0/pdf/resource/download",
  "status": 400,
  "timestamp": "2026-07-27T10:47:12.356Z"
}
```

> Resource ID Not Found

```json
{
  "timestamp": "2026-07-27T10:47:12.926Z",
  "path": "/v1.0/pdf/resource",
  "status": 404,
  "error": "Resource ID Not Found",
  "message": "Please provide a valid resource ID."
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|File download successful. Returns the raw file bytes with Content-Disposition: attachment, not a JSON body.|string|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Missing required resource_id parameter|[ErrorResponse](#errorresponse)|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|Resource ID Not Found|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|404|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

## Schemas

### ErrorResponse

Standard error envelope returned by the API on failed requests.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|error|string|false|none|Short error category or exception type.|
|message|string|true|none|Human-readable error message describing the failure.|
|path|string|false|none|API endpoint path that produced the error.|
|status|integer|false|none|HTTP status code returned with the error.|
|timestamp|string(date-time)|false|none|Timestamp when the error occurred (ISO 8601).|
