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

> Get the lifecycle events stated about an invoice or credit note after creation (Peppol Message Level and Invoice Responses, partner status events), oldest first. Each event carries a route-agnostic canonical status next to the untouched native code of its source; native codes without a canonical equivalent have canonical_status null.



## OpenAPI

````yaml /openapi.json get /api/documents/{document_id}/lifecycle
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}/lifecycle:
    get:
      tags:
        - Documents
      summary: Get Document Lifecycle
      description: >-
        Get the lifecycle events stated about an invoice or credit note after
        creation (Peppol Message Level and Invoice Responses, partner status
        events), oldest first. Each event carries a route-agnostic canonical
        status next to the untouched native code of its source; native codes
        without a canonical equivalent have canonical_status null.
      operationId: get_document_lifecycle
      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/DocumentLifecycle'
        '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: 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:
    DocumentLifecycle:
      properties:
        document_id:
          type: string
          title: Document Id
        events:
          items:
            $ref: '#/components/schemas/LifecycleEvent'
          type: array
          title: Events
      type: object
      required:
        - document_id
        - events
      title: DocumentLifecycle
    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
    LifecycleEvent:
      properties:
        level:
          $ref: '#/components/schemas/LifecycleLevel'
        canonical_status:
          anyOf:
            - $ref: '#/components/schemas/CanonicalStatus'
            - type: 'null'
        native_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Native Code
        source:
          $ref: '#/components/schemas/LifecycleSource'
        direction:
          $ref: '#/components/schemas/LifecycleDirection'
        reason_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason Code
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        occurred_at:
          type: string
          format: date-time
          title: Occurred At
      type: object
      required:
        - level
        - canonical_status
        - native_code
        - source
        - direction
        - reason_code
        - reason
        - occurred_at
      title: LifecycleEvent
    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
    LifecycleLevel:
      type: string
      enum:
        - transport
        - business
      title: LifecycleLevel
    CanonicalStatus:
      type: string
      enum:
        - deposited
        - emitted
        - delivered
        - rejected
        - acknowledged
        - approved
        - partially_approved
        - disputed
        - on_hold
        - refused
        - payment_sent
        - paid
      title: CanonicalStatus
    LifecycleSource:
      type: string
      enum:
        - peppol:mlr
        - peppol:mls
        - peppol:imr
        - fr:superpdp
        - local
      title: LifecycleSource
    LifecycleDirection:
      type: string
      enum:
        - in
        - out
      title: LifecycleDirection
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.