APIFreaks - API Hub for Developers PDF Upload and Download APIs API

The PDF Upload and Download APIs API from APIFreaks - API Hub for Developers — 3 operation(s) for pdf upload and download apis.

OpenAPI Specification

apifreaks-api-hub-for-developers-pdf-upload-and-download-apis-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Apifreaks Api Hub For Developers PDF Upload and Download APIs API
  version: 1.0.0
  contact:
    name: APIFreaks Support
    url: https://apifreaks.com/contact
    email: support@apifreaks.com
  description: 'Operations tagged PDF Upload and Download APIs across 3 of this provider''s published API definitions: apifreaks-api-hub-for-developers-pdf-resource-download-openapi.json, apifreaks-api-hub-for-developers-pdf-resource-upload-binary-openapi.json, apifreaks-api-hub-for-developers-pdf-resource-upload-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.apifreaks.com/v1.0
  description: PDF Resource Download API Server
security:
- ApiKeyAuthHeader: []
- ApiKeyAuthQuery: []
tags:
- name: PDF Upload and Download APIs
paths:
  /pdf/resource/download:
    servers:
    - url: https://api.apifreaks.com/v1.0
      description: PDF Resource Download API Server
    get:
      tags:
      - PDF Upload and Download APIs
      summary: Download PDF resource
      description: This API downloads PDF files or ZIP archives from the server using their unique resource ID.
      parameters:
      - name: format
        in: query
        required: false
        schema:
          type: string
          enum:
          - json
          - xml
          default: json
        description: 'Response format: ''json'' (default) or ''xml''.'
      - name: resource_id
        in: query
        description: The unique identifier of the file or ZIP archive to download.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 'File download successful. Returns the raw file bytes with Content-Disposition: attachment, not a JSON body.'
          content:
            application/pdf:
              schema:
                type: string
                format: binary
            application/zip:
              schema:
                type: string
                format: binary
        '400':
          description: Bad Request — Missing required resource_id parameter
          content:
            application/json:
              examples:
                missingResourceId:
                  summary: Missing resource_id parameter
                  value:
                    error: Invalid Param Exception
                    message: please pass correct parameters
                    path: /v1.0/pdf/resource/download
                    status: 400
                    timestamp: '2026-07-27T10:47:12.356Z'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource ID Not Found
          content:
            application/json:
              examples:
                error:
                  summary: Resource ID not found
                  value:
                    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.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: downloadResource
  /pdf/resource/upload-binary:
    servers:
    - url: https://api.apifreaks.com/v1.0
      description: PDF Binary Resource Upload API Server
    post:
      tags:
      - PDF Upload and Download APIs
      summary: Upload a PDF in binary format
      description: This API uploads PDF files to the API Freaks server in binary format.
      parameters:
      - name: format
        in: query
        required: false
        schema:
          type: string
          enum:
          - json
          - xml
          default: json
        description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
      - name: file_name
        in: query
        required: true
        schema:
          type: string
        description: "The desired name for the uploaded PDF file. This name will be used for storage on the server.\n\n\n **NOTE**: Please ensure file_name has extension `.pdf`."
      requestBody:
        description: Raw PDF file bytes sent directly as the request body (not multipart).
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
              description: The PDF file to be uploaded to the API Freaks server in binary format.
      responses:
        '200':
          description: PDF upload successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BinaryResourceUploadResponse'
              examples:
                success:
                  summary: File uploaded
                  value:
                    fileName: binarytest.pdf
                    fileId: b0fbf78c-8fe2-49b6-ad3d-63efb4ac8e58
        '400':
          description: Bad Request — Missing file_name or empty body
          content:
            application/json:
              examples:
                missingFileName:
                  summary: Missing file_name query parameter
                  value:
                    error: Invalid Param Exception
                    message: please pass correct parameters
                    path: /v1.0/pdf/resource/upload-binary
                    status: 400
                    timestamp: '2026-07-27T10:48:14.902Z'
                emptyBody:
                  summary: Empty request body
                  value:
                    timestamp: '2026-07-27T10:48:16.046Z'
                    path: /v1.0/pdf/upload-binary
                    status: 400
                    error: Invalid Parameter
                    message: Invalid parameter value provided for 'dataBufferFlux'.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported Media Type — File extension not supported
          content:
            application/json:
              examples:
                UnsupportedFileType:
                  summary: Unsupported file type
                  value:
                    timestamp: '2026-07-27T10:48:15.449Z'
                    path: /v1.0/pdf/upload-binary
                    status: 415
                    error: Unsupported File Type
                    message: The provided file type is not supported. Refer to the documentation for valid file types.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: uploadResourceBinary
  /pdf/resource/upload:
    servers:
    - url: https://api.apifreaks.com/v1.0
      description: PDF Resource Upload API Server
    post:
      tags:
      - PDF Upload and Download APIs
      summary: Upload multiple PDFs and get file IDs
      description: This API uploads multiple PDF files to the API Freaks server and generates their unique file IDs.
      operationId: uploadResource
      parameters:
      - name: format
        in: query
        required: false
        schema:
          type: string
          enum:
          - json
          - xml
          default: json
        description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
      requestBody:
        description: Multipart form-data body carrying the PDF file(s) to upload. Repeat the file field to upload multiple files in one request.
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ResourceUploadRequest'
            examples:
              typicalUpload:
                summary: Upload a single PDF file
                value:
                  file: <binary PDF file content>
      responses:
        '200':
          description: PDF upload successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceUploadResponse'
              examples:
                typicalSuccess:
                  summary: Single file uploaded
                  value:
                    files:
                    - fileName: test.pdf
                      fileId: b61a80d1-9b2d-4748-b3d1-04d747dedc8c
                multipleFiles:
                  summary: Multiple files uploaded in one request
                  value:
                    files:
                    - fileName: test.pdf
                      fileId: 9922d104-25a0-432c-8c26-2be2ba14798a
                    - fileName: test.pdf
                      fileId: 8a6b3332-6fe0-42b0-a808-df7a36926a79
        '400':
          description: Bad Request — Missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingFile:
                  summary: No file provided in the request body
                  value:
                    timestamp: '2026-07-27T10:42:36.770Z'
                    path: /v1.0/pdf/upload
                    status: 400
                    error: Missing or Invalid Parameters
                    message: One or more required parameters are missing or incorrect.
        '415':
          description: Unsupported Media Type — File type not supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unsupportedFileType:
                  summary: Unsupported file type
                  value:
                    timestamp: '2026-07-27T10:47:37.481Z'
                    path: /v1.0/pdf/upload
                    status: 415
                    error: Unsupported File Type
                    message: The provided file type is not supported. Refer to the documentation for valid file types.
components:
  schemas:
    ResourceUploadResponse:
      type: object
      required:
      - files
      properties:
        files:
          type: array
          items:
            type: object
            required:
            - fileName
            - fileId
            properties:
              fileName:
                type: string
                description: Name of the uploaded file.
              fileId:
                type: string
                description: Unique ID of the uploaded file, used to reference it in processing operations.
          description: Array of uploaded file metadata objects.
      description: Resource upload response containing file metadata.
    BinaryResourceUploadResponse:
      type: object
      required:
      - fileName
      - fileId
      properties:
        fileName:
          type: string
          description: The name of the uploaded file.
        fileId:
          type: string
          description: The unique identifier assigned to the uploaded file.
      description: Binary resource upload response containing file metadata.
    ErrorResponse:
      type: object
      description: Standard error envelope returned by the API on failed requests.
      required:
      - message
      properties:
        error:
          type: string
          description: Short error category or exception type.
        message:
          type: string
          description: Human-readable error message describing the failure.
        path:
          type: string
          description: API endpoint path that produced the error.
        status:
          type: integer
          description: HTTP status code returned with the error.
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the error occurred (ISO 8601).
    ResourceUploadRequest:
      type: object
      description: Multipart form-data request body containing the file to upload.
      required: []
      properties:
        file:
          type: string
          format: binary
          description: Raw PDF file bytes sent as a multipart/form-data field named 'file'. Repeat this field to upload multiple files in one request.
  securitySchemes:
    ApiKeyAuthHeader:
      type: apiKey
      in: header
      name: X-apiKey
      description: Pass your API key via the X-apiKey request header.
    ApiKeyAuthQuery:
      type: apiKey
      in: query
      name: apiKey
      description: Pass your API key via the apiKey query parameter.
x-refined-from:
- apifreaks-api-hub-for-developers-pdf-resource-download-openapi.json
- apifreaks-api-hub-for-developers-pdf-resource-upload-binary-openapi.json
- apifreaks-api-hub-for-developers-pdf-resource-upload-openapi.json