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

# Analyze Spare Part



## OpenAPI

````yaml https://api.microflowtek.com/openapi.json post /api/spare-parts/analyze
openapi: 3.1.0
info:
  title: Microflowtek API
  version: 0.1.0
servers: []
security: []
paths:
  /api/spare-parts/analyze:
    post:
      summary: Analyze Spare Part
      operationId: analyze_spare_part_api_spare_parts_analyze_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_analyze_spare_part_api_spare_parts_analyze_post
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SparePartAnalysisResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_analyze_spare_part_api_spare_parts_analyze_post:
      properties:
        file:
          type: string
          format: binary
          title: File
        customer_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Reference
        site_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Site Type
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        system_manufacturer:
          anyOf:
            - type: string
            - type: 'null'
          title: System Manufacturer
        system_model:
          anyOf:
            - type: string
            - type: 'null'
          title: System Model
        system_type:
          anyOf:
            - type: string
            - type: 'null'
          title: System Type
        approximate_installation_year:
          anyOf:
            - type: string
            - type: 'null'
          title: Approximate Installation Year
        energy_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Energy Source
        suspected_component:
          anyOf:
            - type: string
            - type: 'null'
          title: Suspected Component
        observed_failure:
          anyOf:
            - type: string
            - type: 'null'
          title: Observed Failure
        technician_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Technician Note
        urgency:
          anyOf:
            - type: string
            - type: 'null'
          title: Urgency
        intent:
          type: string
          title: Intent
          default: find_replacement
      type: object
      required:
        - file
      title: Body_analyze_spare_part_api_spare_parts_analyze_post
    SparePartAnalysisResponse:
      properties:
        mode:
          type: string
          enum:
            - openai
            - mock
            - fallback
          title: Mode
        extracted:
          $ref: '#/components/schemas/SparePartExtractedData'
        search_queries:
          items:
            type: string
          type: array
          title: Search Queries
        context_used:
          $ref: '#/components/schemas/SparePartWorkflowContext'
        context_warnings:
          items:
            type: string
          type: array
          title: Context Warnings
        recommended_next_actions:
          items:
            type: string
          type: array
          title: Recommended Next Actions
        sales_relevance:
          $ref: '#/components/schemas/SalesRelevance'
        notes:
          items:
            type: string
          type: array
          title: Notes
      type: object
      required:
        - mode
        - extracted
        - search_queries
        - context_used
        - context_warnings
        - recommended_next_actions
        - sales_relevance
        - notes
      title: SparePartAnalysisResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SparePartExtractedData:
      properties:
        manufacturer:
          anyOf:
            - type: string
            - type: 'null'
          title: Manufacturer
        brand_or_logo:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand Or Logo
        model_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Number
        serial_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Serial Number
        part_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Part Number
        component_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Component Type
        visible_markings:
          items:
            type: string
          type: array
          title: Visible Markings
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
          default: 0
      type: object
      title: SparePartExtractedData
    SparePartWorkflowContext:
      properties:
        customer_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Reference
        site_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Site Type
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          default: Germany
        system_manufacturer:
          anyOf:
            - type: string
            - type: 'null'
          title: System Manufacturer
        system_model:
          anyOf:
            - type: string
            - type: 'null'
          title: System Model
        system_type:
          anyOf:
            - type: string
            - type: 'null'
          title: System Type
        approximate_installation_year:
          anyOf:
            - type: string
            - type: 'null'
          title: Approximate Installation Year
        energy_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Energy Source
        suspected_component:
          anyOf:
            - type: string
            - type: 'null'
          title: Suspected Component
        observed_failure:
          anyOf:
            - type: string
            - type: 'null'
          title: Observed Failure
        technician_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Technician Note
        urgency:
          anyOf:
            - type: string
            - type: 'null'
          title: Urgency
        intent:
          type: string
          title: Intent
          default: find_replacement
      type: object
      title: SparePartWorkflowContext
    SalesRelevance:
      properties:
        likely_replacement_needed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Likely Replacement Needed
        suggested_action:
          type: string
          enum:
            - identify_more
            - search_replacement
            - manual_review
            - prepare_offer
          title: Suggested Action
        reason:
          type: string
          title: Reason
      type: object
      required:
        - suggested_action
        - reason
      title: SalesRelevance
    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

````