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

> Validate a UBL document according to Peppol BIS Billing 3.0



## OpenAPI

````yaml /openapi.json post /api/documents/{document_id}/validate
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/documents/{document_id}/validate:
    post:
      tags:
        - Documents
      summary: Validate Document
      description: Validate a UBL document according to Peppol BIS Billing 3.0
      operationId: post_document_validate_api_documents__document_id__validate_post
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            title: Document Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UBLDocumentValidationResponse'
        '400':
          description: 'Bad Request: Document is invalid according to Peppol BIS Billing 3.0'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 'Unauthorized: API key is missing, invalid, or inactive'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: 'Not Found: Document with the specified ID doesn''t exist'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: 'Unprocessable Entity: Invalid response data'
          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:
    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

````