> ## 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.

# Validate UBL Document

> Validate the correctness of a UBL document



## OpenAPI

````yaml /openapi.json post /api/validate/ubl
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/validate/ubl:
    post:
      tags:
        - Validate
      summary: Validate UBL Document
      description: Validate the correctness of a UBL document
      operationId: validate_ubl_api_validate_ubl_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_validate_ubl_api_validate_ubl_post'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UBLDocumentValidationResponse'
        '422':
          description: 'Unprocessable File: Invalid file type'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 'Too Many Requests: rate limit exceeded for this API key'
          headers:
            Retry-After:
              description: Number of seconds until the rate limit resets
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: 'Internal Server Error: Unexpected server error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_validate_ubl_api_validate_ubl_post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_validate_ubl_api_validate_ubl_post
    UBLDocumentValidationResponse:
      properties:
        id:
          type: string
          title: Id
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name
        is_valid:
          type: boolean
          title: Is Valid
        issues:
          items:
            $ref: '#/components/schemas/ValidationIssue'
          type: array
          title: Issues
        ubl_document:
          anyOf:
            - type: string
            - type: 'null'
          title: Ubl Document
      type: object
      required:
        - id
        - file_name
        - is_valid
        - issues
      title: UBLDocumentValidationResponse
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error response model.
    ValidationIssue:
      properties:
        message:
          type: string
          title: Message
        type:
          $ref: '#/components/schemas/IssueType'
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
        rule_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Rule Id
        flag:
          anyOf:
            - type: string
            - type: 'null'
          title: Flag
        test:
          anyOf:
            - type: string
            - type: 'null'
          title: Test
        schematron:
          type: string
          title: Schematron
      type: object
      required:
        - message
        - type
        - schematron
      title: ValidationIssue
    IssueType:
      type: string
      enum:
        - error
        - warning
      title: IssueType
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````