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

# Get extraction detail

> Retrieve the full extraction result for a specific job, including all
line items (Positionen) with article numbers, quantities, and prices.

This is the endpoint to use for the "Rückimport" into your ERP/Materialwirtschaft system.




## OpenAPI

````yaml get /v1/openapi/extractions/{id}
openapi: 3.0.3
info:
  title: Oktavius ERP Public API
  version: 1.0.0
  description: |
    Public API for retrieving document extraction results from Oktavius ERP.

    Designed for external systems (e.g. ERP / Materialwirtschaft) to pull
    structured data extracted from Regiescheine and other work documents.
  contact:
    name: Texterous Support
    email: info@texterous.com
servers:
  - url: https://api.oktavius.ai
    description: Production
  - url: https://dev-api.oktavius.ai
    description: Development
security:
  - bearerAuth: []
paths:
  /v1/openapi/extractions/{id}:
    get:
      tags:
        - Extractions
      summary: Get extraction detail
      description: >
        Retrieve the full extraction result for a specific job, including all

        line items (Positionen) with article numbers, quantities, and prices.


        This is the endpoint to use for the "Rückimport" into your
        ERP/Materialwirtschaft system.
      operationId: getExtraction
      parameters:
        - name: id
          in: path
          required: true
          description: Extraction job UUID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Full extraction detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/ExtractionDetail'
              example:
                success: true
                data:
                  id: 550e8400-e29b-41d4-a716-446655440000
                  status: completed
                  completed_at: '2026-03-03T14:00:00Z'
                  created_at: '2026-03-03T13:00:00Z'
                  auftragsnummer: '22201161'
                  baustelle: Mokka
                  regietaetigkeit: Aufgrund von mehrmaligen Planänderungen. Kabel eingezogen.
                  positionen:
                    - kategorie: ARBEIT
                      artikelnummer: ''
                      bezeichnung: Obermonteurstunden
                      menge: 55
                      eh: Std
                      preis_einheit: 80.5
                      positionspreis: 4427.5
                    - kategorie: MATERIAL
                      artikelnummer: '12011900716'
                      bezeichnung: NYM-J 5x2,5mm²
                      menge: 500
                      eh: m
                      preis_einheit: 1.15
                      positionspreis: 575
                  gesamtuebersicht:
                    summe_arbeit: 4427.5
                    summe_material: 836.75
                    summe_gesamt: 5264.24
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ExtractionDetail:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          example: completed
        completed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        auftragsnummer:
          type: string
          nullable: true
          example: '22201161'
        baustelle:
          type: string
          nullable: true
          example: Mokka
        regietaetigkeit:
          type: string
          nullable: true
          description: Description of work performed
          example: Aufgrund von mehrmaligen Planänderungen. Kabel eingezogen.
        positionen:
          type: array
          items:
            $ref: '#/components/schemas/PositionItem'
        gesamtuebersicht:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Gesamtuebersicht'
      required:
        - id
        - status
        - completed_at
        - created_at
        - auftragsnummer
        - baustelle
        - regietaetigkeit
        - positionen
        - gesamtuebersicht
    PositionItem:
      type: object
      properties:
        kategorie:
          type: string
          description: ARBEIT or MATERIAL
          example: MATERIAL
        artikelnummer:
          type: string
          description: Article number (usually EAN). Empty string if not found.
          example: '12011900716'
        bezeichnung:
          type: string
          description: Description / name of the article or labor type
          example: NYM-J 5x2,5mm²
        menge:
          type: number
          description: Quantity (uses sold quantity for labor if available)
          example: 500
        eh:
          type: string
          description: Unit of measure
          example: m
        preis_einheit:
          type: number
          description: Unit price (net)
          example: 1.15
        positionspreis:
          type: number
          description: Total position price
          example: 575
      required:
        - kategorie
        - artikelnummer
        - bezeichnung
        - menge
        - eh
        - preis_einheit
        - positionspreis
    Gesamtuebersicht:
      type: object
      properties:
        summe_arbeit:
          type: number
          description: Total labor costs
          example: 4427.5
        summe_material:
          type: number
          description: Total material costs
          example: 836.75
        summe_gesamt:
          type: number
          description: Grand total
          example: 5264.24
      required:
        - summe_arbeit
        - summe_material
        - summe_gesamt
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Invalid API token.
      required:
        - success
        - error
        - message
    RateLimitResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            details:
              type: object
              properties:
                limit:
                  type: integer
                  example: 1000
                window:
                  type: string
                  example: 1 hour
                resets_at:
                  type: string
                  format: date-time
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error: Bad Request
            message: >-
              status: Invalid enum value. Expected 'completed' | 'failed',
              received 'bogus'
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: |
        Use an API token starting with `okt_live_`.
        Pass it as: `Authorization: Bearer okt_live_your_token_here`

````