> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e-invoice.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Convert a PDF to a document

> Convert a PDF to a document



## OpenAPI

````yaml /openapi.json post /api/conversion/pdf
openapi: 3.1.0
info:
  title: e-invoice.be Peppol Access Point API
  version: 1.1.0
  x-logo:
    url: https://e-invoice.be/einvoice.svg
servers:
  - url: https://api.e-invoice.be
    description: Production
security: []
paths:
  /api/conversion/pdf:
    post:
      tags:
        - Conversion
      summary: Convert a PDF to a document
      description: Convert a PDF to a document
      operationId: post_document_pdf_async_api_conversion_pdf_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_post_document_pdf_async_api_conversion_pdf_post
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentCreateFromPdfTask'
        '401':
          description: 'Unauthorized: API key is missing, invalid, or inactive'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: 'Not Found: Tenant not found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: 'Internal Server Error: Unexpected server error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_post_document_pdf_async_api_conversion_pdf_post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_post_document_pdf_async_api_conversion_pdf_post
    DocumentCreateFromPdfTask:
      properties:
        task_id:
          type: string
          title: Task Id
          description: The ID of the task that will process the PDF
        status:
          $ref: '#/components/schemas/DocumentCreateFromPdfTaskStatus'
          description: The status of the task
          default: pending
      type: object
      required:
        - task_id
      title: DocumentCreateFromPdfTask
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentCreateFromPdfTaskStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
      title: DocumentCreateFromPdfTaskStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````