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

# Get Document UBL

> Get the UBL for an invoice or credit note



## OpenAPI

````yaml /openapi.json get /api/documents/{document_id}/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/documents/{document_id}/ubl:
    get:
      tags:
        - Documents
      summary: Get Document UBL
      description: Get the UBL for an invoice or credit note
      operationId: get_document_ubl
      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/DocumentUBL'
        '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:
    DocumentUBL:
      properties:
        file_name:
          type: string
          title: File Name
        file_size:
          type: integer
          title: File Size
          default: 0
        signed_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Signed Url
        sender_peppol_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender Peppol Id
        sender_peppol_scheme:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender Peppol Scheme
        receiver_peppol_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Receiver Peppol Id
        receiver_peppol_scheme:
          anyOf:
            - type: string
            - type: 'null'
          title: Receiver Peppol Scheme
        file_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: File Hash
        validated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Validated At
        id:
          type: string
          title: Id
      type: object
      required:
        - file_name
        - id
      title: DocumentUBL
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error response model.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````