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

# Create a quote



## OpenAPI

````yaml https://api.prets.io/v1/openapi.json post /v1/quotes
openapi: 3.1.0
info:
  title: Prets API
  version: 1.0.0
servers:
  - url: https://api.prets.app
security:
  - bearerAuth: []
paths:
  /v1/quotes:
    post:
      summary: Create a quote
      parameters:
        - schema:
            type:
              - boolean
              - 'null'
            default: false
            description: Include a single-use session URL in the response
            example: true
          required: false
          description: Include a single-use session URL in the response
          name: session
          in: query
        - schema:
            type: string
            description: Target merchant organization slug.
            example: prets
            x-internal: true
          required: false
          description: Target merchant organization slug.
          name: Prets-Organization
          in: header
        - schema:
            type: string
            format: uuid
            description: >-
              Optional client-generated UUID for idempotent retries. If omitted,
              a key is derived from the request body.
            example: 550e8400-e29b-41d4-a716-446655440000
          required: false
          description: >-
            Optional client-generated UUID for idempotent retries. If omitted, a
            key is derived from the request body.
          name: Idempotency-Key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQuoteRequest'
      responses:
        '200':
          description: Quote created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateQuoteResponse'
        '400':
          description: Bad request - invalid input or merchant not found
        '401':
          description: Unauthorized - authentication required
        '403':
          description: Forbidden — missing `org:quotes:create` permission
        '409':
          description: >-
            Conflict - a request with this Idempotency-Key is already in
            progress
        '500':
          description: Internal server error
components:
  schemas:
    CreateQuoteRequest:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        contact:
          $ref: '#/components/schemas/ContactWithoutId'
        currency:
          type: string
          enum:
            - EUR
          description: Quote currency (currently EUR only)
          example: EUR
        terms:
          type: array
          items:
            $ref: '#/components/schemas/QuoteTerm'
          minItems: 1
          uniqueItems: true
          description: Quote terms and conditions
          example:
            - subject_to_financing
        expiresAt:
          type: string
          format: date
          description: Quote expiration timestamp (ISO 8601)
          example: '2024-12-31T23:59:59Z'
        sentAt:
          type: string
          format: date
          description: Timestamp when quote was sent to customer (ISO 8601)
          example: '2024-06-15T10:30:00Z'
        totalInclTax:
          type: number
          minimum: 0
          maximum: 250000
          description: Total quote amount including tax in EUR
          example: 25000
        totalExclTax:
          type: number
          minimum: 0
          maximum: 250000
          description: Total quote amount excluding tax in EUR
          example: 20661.16
        description:
          type: string
          minLength: 1
          description: Description of the quote
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system (quote level)
          example: QUOTE-2024-001
        tags:
          type: array
          items:
            $ref: '#/components/schemas/QuoteTag'
          minItems: 1
          uniqueItems: true
          description: >-
            Tags describing customer context and support needs to help ops team
            provide appropriate service
          example:
            - smartphone_only
            - less_digitally_skilled
        lineItems:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/BatteryLineItem'
              - $ref: '#/components/schemas/PVLineItem'
              - $ref: '#/components/schemas/HeatPumpLineItem'
              - $ref: '#/components/schemas/WallInsulationLineItem'
              - $ref: '#/components/schemas/SlopedRoofInsulationLineItem'
              - $ref: '#/components/schemas/FlatRoofInsulationLineItem'
              - $ref: '#/components/schemas/FloorInsulationLineItem'
              - $ref: '#/components/schemas/WindowsLineItem'
              - $ref: '#/components/schemas/SubsidyLineItem'
            discriminator:
              propertyName: type
              mapping:
                battery:
                  $ref: '#/components/schemas/BatteryLineItem'
                pv:
                  $ref: '#/components/schemas/PVLineItem'
                heat_pump:
                  $ref: '#/components/schemas/HeatPumpLineItem'
                wall_insulation:
                  $ref: '#/components/schemas/WallInsulationLineItem'
                sloped_roof_insulation:
                  $ref: '#/components/schemas/SlopedRoofInsulationLineItem'
                flat_roof_insulation:
                  $ref: '#/components/schemas/FlatRoofInsulationLineItem'
                floor_insulation:
                  $ref: '#/components/schemas/FloorInsulationLineItem'
                windows:
                  $ref: '#/components/schemas/WindowsLineItem'
                subsidy:
                  $ref: '#/components/schemas/SubsidyLineItem'
          minItems: 1
          description: Line items for the quote (at least one required)
        quoteId:
          type: string
          pattern: ^qot_[0-9A-HJKMNP-TV-Z]{26}$
          description: >-
            Client-generated id (`qot_{ULID}`). When provided the server uses
            this as the canonical quote ID, enabling optimistic UI on the
            client.
      required:
        - address
        - contact
        - currency
        - totalInclTax
        - lineItems
      description: Create a new quote for sustainability home improvements
    CreateQuoteResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Quote'
        links:
          type: object
          properties:
            portalQuote:
              type: string
              format: uri
              description: >-
                Deeplink to this quote in the Prets merchant portal (only
                present for org API keys)
              example: >-
                https://my.prets.app/orgs/acme/quotes/qot_01ARZ3NDEKTSV4RRFFQ69G5AV
            session:
              type: string
              format: uri
              description: >-
                Single-use authenticated session URL (only present when
                session=true)
              example: https://app.prets.io/session?ticket=abc123
          description: Hypermedia navigation links
      required:
        - data
      description: Quote creation response
    Address:
      anyOf:
        - $ref: '#/components/schemas/NLAddress'
        - $ref: '#/components/schemas/InternationalAddress'
      description: Installation address (Dutch or international format based on country)
    ContactWithoutId:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Contact email address
          example: jan.jansen@example.nl
        firstName:
          type: string
          minLength: 1
          description: First name / given name
          example: Jan
        lastName:
          type: string
          minLength: 1
          description: Last name / family name
          example: Jansen
        phoneNumber:
          type: string
          pattern: ^\+[1-9]\d{6,14}$
          description: Phone number in E.164 format
          example: '+31612345678'
      required:
        - email
        - lastName
        - phoneNumber
      description: >-
        Contact payload without server-assigned id (e.g. quote create/update
        body)
    QuoteTerm:
      type: string
      enum:
        - subject_to_financing
      description: Quote term and condition
    QuoteTag:
      type: string
      enum:
        - smartphone_only
        - landline_only
        - less_digitally_skilled
        - financially_complex
        - moderately_complex_finances
        - prefers_phone_contact
        - prefers_email_contact
      description: >-
        Special circumstances and support requirements that ops team should be
        aware of
    BatteryLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - battery
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        totalInclTax:
          type: number
          minimum: 0
          description: Total price including tax
          example: 12500
        totalExclTax:
          type: number
          minimum: 0
          description: Total price excluding tax
          example: 10330.58
        unitPrice:
          type: number
          minimum: 0
          description: Unit price per item before quantity multiplication
          example: 250
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          description: >-
            Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov
            in FR)
          example:
            - ISDE-2024-WP
            - PROV-NH-2024
        description:
          type: string
          minLength: 1
          description: Description of the line item
        totalNameplateCapacity:
          type: number
          minimum: 0
          description: Total battery energy capacity in watt-hours (Wh)
          example: 13500
        totalNameplatePower:
          type: number
          minimum: 0
          description: Maximum continuous charge/discharge power in watts (W)
          example: 5000
      required:
        - type
        - totalInclTax
      description: Battery storage system line item
    PVLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - pv
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        totalInclTax:
          type: number
          minimum: 0
          description: Total price including tax
          example: 12500
        totalExclTax:
          type: number
          minimum: 0
          description: Total price excluding tax
          example: 10330.58
        unitPrice:
          type: number
          minimum: 0
          description: Unit price per item before quantity multiplication
          example: 250
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          description: >-
            Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov
            in FR)
          example:
            - ISDE-2024-WP
            - PROV-NH-2024
        description:
          type: string
          minLength: 1
          description: Description of the line item
        quantity:
          type: integer
          minimum: 1
          description: Number of solar panels
          example: 12
        wpPerModule:
          type: integer
          exclusiveMinimum: 0
          description: Watt-peak (Wp) rating per panel at STC conditions
          example: 400
        azimuth:
          type: number
          minimum: 0
          maximum: 360
          description: Compass direction in degrees (0°=N, 90°=E, 180°=S, 270°=W)
          example: 180
        tilt:
          type: number
          minimum: 0
          maximum: 90
          description: Inclination angle from horizontal in degrees (0°=flat, 90°=vertical)
          example: 35
      required:
        - type
        - totalInclTax
      description: Solar PV panel installation line item
    HeatPumpLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - heat_pump
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        totalInclTax:
          type: number
          minimum: 0
          description: Total price including tax
          example: 12500
        totalExclTax:
          type: number
          minimum: 0
          description: Total price excluding tax
          example: 10330.58
        unitPrice:
          type: number
          minimum: 0
          description: Unit price per item before quantity multiplication
          example: 250
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          description: >-
            Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov
            in FR)
          example:
            - ISDE-2024-WP
            - PROV-NH-2024
        description:
          type: string
          minLength: 1
          description: Description of the line item
        heatTransferMedium:
          type:
            - string
            - 'null'
          enum:
            - air_to_air
            - air_to_water
            - air_to_brine
            - water_to_air
            - water_to_water
            - water_to_brine
            - brine_to_air
            - brine_to_water
            - brine_to_brine
            - null
          description: >-
            Heat transfer medium per EN 14511 (source_to_sink). Brine =
            ground-source/geothermal.
          example: air_to_water
        systemConfiguration:
          type:
            - string
            - 'null'
          enum:
            - electric
            - hybrid
            - null
          description: >-
            System configuration: electric (monovalent) or hybrid (bivalent with
            backup heating)
          example: electric
        nameplatePower:
          type: number
          minimum: 0
          description: Rated heating/cooling power output in watts (W)
          example: 8000
      required:
        - type
        - totalInclTax
      description: Heat pump installation line item
    WallInsulationLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - wall_insulation
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        totalInclTax:
          type: number
          minimum: 0
          description: Total price including tax
          example: 12500
        totalExclTax:
          type: number
          minimum: 0
          description: Total price excluding tax
          example: 10330.58
        unitPrice:
          type: number
          minimum: 0
          description: Unit price per item before quantity multiplication
          example: 250
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          description: >-
            Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov
            in FR)
          example:
            - ISDE-2024-WP
            - PROV-NH-2024
        description:
          type: string
          minLength: 1
          description: Description of the line item
        surfaceArea:
          type: number
          exclusiveMinimum: 0
          description: Insulated surface area in square meters (m²)
          example: 120.5
        rValue:
          type: number
          exclusiveMinimum: 0
          description: Thermal resistance (R-value) in m²K/W - higher is better.
          example: 3.5
      required:
        - type
        - totalInclTax
      description: Wall insulation line item
    SlopedRoofInsulationLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - sloped_roof_insulation
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        totalInclTax:
          type: number
          minimum: 0
          description: Total price including tax
          example: 12500
        totalExclTax:
          type: number
          minimum: 0
          description: Total price excluding tax
          example: 10330.58
        unitPrice:
          type: number
          minimum: 0
          description: Unit price per item before quantity multiplication
          example: 250
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          description: >-
            Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov
            in FR)
          example:
            - ISDE-2024-WP
            - PROV-NH-2024
        description:
          type: string
          minLength: 1
          description: Description of the line item
        surfaceArea:
          type: number
          exclusiveMinimum: 0
          description: Insulated surface area in square meters (m²)
          example: 120.5
        rValue:
          type: number
          exclusiveMinimum: 0
          description: Thermal resistance (R-value) in m²K/W - higher is better.
          example: 3.5
      required:
        - type
        - totalInclTax
      description: Sloped roof insulation line item
    FlatRoofInsulationLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - flat_roof_insulation
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        totalInclTax:
          type: number
          minimum: 0
          description: Total price including tax
          example: 12500
        totalExclTax:
          type: number
          minimum: 0
          description: Total price excluding tax
          example: 10330.58
        unitPrice:
          type: number
          minimum: 0
          description: Unit price per item before quantity multiplication
          example: 250
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          description: >-
            Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov
            in FR)
          example:
            - ISDE-2024-WP
            - PROV-NH-2024
        description:
          type: string
          minLength: 1
          description: Description of the line item
        surfaceArea:
          type: number
          exclusiveMinimum: 0
          description: Insulated surface area in square meters (m²)
          example: 120.5
        rValue:
          type: number
          exclusiveMinimum: 0
          description: Thermal resistance (R-value) in m²K/W - higher is better.
          example: 3.5
      required:
        - type
        - totalInclTax
      description: Flat roof insulation line item
    FloorInsulationLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - floor_insulation
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        totalInclTax:
          type: number
          minimum: 0
          description: Total price including tax
          example: 12500
        totalExclTax:
          type: number
          minimum: 0
          description: Total price excluding tax
          example: 10330.58
        unitPrice:
          type: number
          minimum: 0
          description: Unit price per item before quantity multiplication
          example: 250
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          description: >-
            Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov
            in FR)
          example:
            - ISDE-2024-WP
            - PROV-NH-2024
        description:
          type: string
          minLength: 1
          description: Description of the line item
        surfaceArea:
          type: number
          exclusiveMinimum: 0
          description: Insulated surface area in square meters (m²)
          example: 120.5
        rValue:
          type: number
          exclusiveMinimum: 0
          description: Thermal resistance (R-value) in m²K/W - higher is better.
          example: 3.5
      required:
        - type
        - totalInclTax
      description: Floor insulation line item
    WindowsLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - windows
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        totalInclTax:
          type: number
          minimum: 0
          description: Total price including tax
          example: 12500
        totalExclTax:
          type: number
          minimum: 0
          description: Total price excluding tax
          example: 10330.58
        unitPrice:
          type: number
          minimum: 0
          description: Unit price per item before quantity multiplication
          example: 250
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          description: >-
            Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov
            in FR)
          example:
            - ISDE-2024-WP
            - PROV-NH-2024
        description:
          type: string
          minLength: 1
          description: Description of the line item
        paneCount:
          type: string
          enum:
            - single
            - double
            - triple
            - quadruple
          description: Number of panes in the glazing unit
          example: triple
        performanceRating:
          type:
            - string
            - 'null'
          enum:
            - HR
            - HR+
            - HR++
            - HR+++
            - HR++++
            - null
          description: >-
            Dutch HR glass performance rating (Hoog Rendement = High
            Efficiency). Values such as `"HR+++ Glas"` from older SF payloads
            normalize to canonical codes on parse.
          example: HR++
        surfaceArea:
          type: number
          exclusiveMinimum: 0
          description: Total window surface area in square meters (m²)
          example: 15.8
        uValue:
          type: number
          exclusiveMinimum: 0
          description: Thermal transmittance (U-value) in W/m²K - lower is better
          example: 0.8
      required:
        - type
        - totalInclTax
      description: Window/glazing installation line item
    SubsidyLineItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - subsidy
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system
          example: QUOTE-2024-001-PV
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        incentiveCodes:
          type: array
          items:
            $ref: '#/components/schemas/IncentiveCode'
          minItems: 1
          description: >-
            Incentive programme codes this subsidy covers; joins to the product
            line items carrying the same codes
          example:
            - ISDE-2024-WP
        description:
          type: string
          minLength: 1
          description: Description of the line item
        totalInclTax:
          type: number
          exclusiveMaximum: 0
          description: >-
            Subsidy amount as a negative reduction. Excluded from the gross
            Quote total; summing all line items yields the subsidy-deducted
            figure.
          example: -2000
      required:
        - type
        - incentiveCodes
        - totalInclTax
      description: >-
        A merchant-declared subsidy reduction, joined to product line items by
        incentive code
    Quote:
      type: object
      properties:
        quoteId:
          type: string
          pattern: ^qot_[0-9A-HJKMNP-TV-Z]{26}$
          description: Unique identifier for the quote
          example: qot_01ARZ3NDEKTSV4RRFFQ69G5AV
        opportunity:
          $ref: '#/components/schemas/QuoteOpportunity'
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the quote was created
          example: '2024-06-15T10:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the quote was last updated
          example: '2024-06-15T10:30:00.000Z'
        address:
          $ref: '#/components/schemas/Address'
        contact:
          $ref: '#/components/schemas/ContactWithoutId'
        currency:
          type: string
          enum:
            - EUR
          description: Quote currency (currently EUR only)
          example: EUR
        terms:
          type: array
          items:
            $ref: '#/components/schemas/QuoteTerm'
          minItems: 1
          uniqueItems: true
          description: Quote terms and conditions
          example:
            - subject_to_financing
        expiresAt:
          type: string
          format: date
          description: Quote expiration timestamp (ISO 8601)
          example: '2024-12-31T23:59:59Z'
        sentAt:
          type: string
          format: date
          description: Timestamp when quote was sent to customer (ISO 8601)
          example: '2024-06-15T10:30:00Z'
        totalInclTax:
          type: number
          minimum: 0
          maximum: 250000
          description: Total quote amount including tax in EUR
          example: 25000
        totalExclTax:
          type: number
          minimum: 0
          maximum: 250000
          description: Total quote amount excluding tax in EUR
          example: 20661.16
        description:
          type: string
          minLength: 1
          description: Description of the quote
        externalId:
          type: string
          minLength: 1
          description: External reference ID for merchant's system (quote level)
          example: QUOTE-2024-001
        tags:
          type: array
          items:
            $ref: '#/components/schemas/QuoteTag'
          minItems: 1
          uniqueItems: true
          description: >-
            Tags describing customer context and support needs to help ops team
            provide appropriate service
          example:
            - smartphone_only
            - less_digitally_skilled
        financing:
          type: object
          properties:
            phase:
              $ref: '#/components/schemas/QuoteFinancingPhase'
            status:
              $ref: '#/components/schemas/QuoteFinancingStatus'
            subStatus:
              $ref: '#/components/schemas/QuoteFinancingSubStatus'
            method:
              type: array
              items:
                $ref: '#/components/schemas/QuoteFinancingMethod'
              description: >-
                Funding sources that completed the financing. Sources stack, so
                more than one may be present. Empty until classified; only
                meaningful when `status === completed`.
              example:
                - loan
                - subsidy
            waitingOn:
              $ref: '#/components/schemas/QuoteFinancingWaitingOn'
            statusChangedAt:
              type: string
              format: date-time
              description: >-
                ISO 8601 timestamp of the last change to `status` or
                `subStatus`.
              example: '2024-06-15T10:30:00.000Z'
          required:
            - phase
            - status
            - subStatus
            - method
            - waitingOn
            - statusChangedAt
          description: Current financing journey state for this quote
        lineItems:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - battery
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  totalNameplateCapacity:
                    type: number
                    minimum: 0
                    description: Total battery energy capacity in watt-hours (Wh)
                    example: 13500
                  totalNameplatePower:
                    type: number
                    minimum: 0
                    description: Maximum continuous charge/discharge power in watts (W)
                    example: 5000
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - pv
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  quantity:
                    type: integer
                    minimum: 1
                    description: Number of solar panels
                    example: 12
                  wpPerModule:
                    type: integer
                    exclusiveMinimum: 0
                    description: Watt-peak (Wp) rating per panel at STC conditions
                    example: 400
                  azimuth:
                    type: number
                    minimum: 0
                    maximum: 360
                    description: Compass direction in degrees (0°=N, 90°=E, 180°=S, 270°=W)
                    example: 180
                  tilt:
                    type: number
                    minimum: 0
                    maximum: 90
                    description: >-
                      Inclination angle from horizontal in degrees (0°=flat,
                      90°=vertical)
                    example: 35
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - heat_pump
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  heatTransferMedium:
                    type:
                      - string
                      - 'null'
                    enum:
                      - air_to_air
                      - air_to_water
                      - air_to_brine
                      - water_to_air
                      - water_to_water
                      - water_to_brine
                      - brine_to_air
                      - brine_to_water
                      - brine_to_brine
                      - null
                    description: >-
                      Heat transfer medium per EN 14511 (source_to_sink). Brine
                      = ground-source/geothermal.
                    example: air_to_water
                  systemConfiguration:
                    type:
                      - string
                      - 'null'
                    enum:
                      - electric
                      - hybrid
                      - null
                    description: >-
                      System configuration: electric (monovalent) or hybrid
                      (bivalent with backup heating)
                    example: electric
                  nameplatePower:
                    type: number
                    minimum: 0
                    description: Rated heating/cooling power output in watts (W)
                    example: 8000
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - wall_insulation
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  surfaceArea:
                    type: number
                    exclusiveMinimum: 0
                    description: Insulated surface area in square meters (m²)
                    example: 120.5
                  rValue:
                    type: number
                    exclusiveMinimum: 0
                    description: Thermal resistance (R-value) in m²K/W - higher is better.
                    example: 3.5
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - sloped_roof_insulation
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  surfaceArea:
                    type: number
                    exclusiveMinimum: 0
                    description: Insulated surface area in square meters (m²)
                    example: 120.5
                  rValue:
                    type: number
                    exclusiveMinimum: 0
                    description: Thermal resistance (R-value) in m²K/W - higher is better.
                    example: 3.5
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - flat_roof_insulation
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  surfaceArea:
                    type: number
                    exclusiveMinimum: 0
                    description: Insulated surface area in square meters (m²)
                    example: 120.5
                  rValue:
                    type: number
                    exclusiveMinimum: 0
                    description: Thermal resistance (R-value) in m²K/W - higher is better.
                    example: 3.5
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - floor_insulation
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  surfaceArea:
                    type: number
                    exclusiveMinimum: 0
                    description: Insulated surface area in square meters (m²)
                    example: 120.5
                  rValue:
                    type: number
                    exclusiveMinimum: 0
                    description: Thermal resistance (R-value) in m²K/W - higher is better.
                    example: 3.5
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - windows
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  paneCount:
                    type: string
                    enum:
                      - single
                      - double
                      - triple
                      - quadruple
                    description: Number of panes in the glazing unit
                    example: triple
                  performanceRating:
                    type:
                      - string
                      - 'null'
                    enum:
                      - HR
                      - HR+
                      - HR++
                      - HR+++
                      - HR++++
                      - null
                    description: >-
                      Dutch HR glass performance rating (Hoog Rendement = High
                      Efficiency). Values such as `"HR+++ Glas"` from older SF
                      payloads normalize to canonical codes on parse.
                    example: HR++
                  surfaceArea:
                    type: number
                    exclusiveMinimum: 0
                    description: Total window surface area in square meters (m²)
                    example: 15.8
                  uValue:
                    type: number
                    exclusiveMinimum: 0
                    description: Thermal transmittance (U-value) in W/m²K - lower is better
                    example: 0.8
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - subsidy
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    minItems: 1
                    description: >-
                      Incentive programme codes this subsidy covers; joins to
                      the product line items carrying the same codes
                    example:
                      - ISDE-2024-WP
                  description:
                    type: string
                    minLength: 1
                    description: Description of the line item
                  totalInclTax:
                    type: number
                    exclusiveMaximum: 0
                    description: >-
                      Subsidy amount as a negative reduction. Excluded from the
                      gross Quote total; summing all line items yields the
                      subsidy-deducted figure.
                    example: -2000
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - incentiveCodes
                  - totalInclTax
                  - lineItemId
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - other
                  externalId:
                    type: string
                    minLength: 1
                    description: External reference ID for merchant's system
                    example: QUOTE-2024-001-PV
                  totalInclTax:
                    type: number
                    minimum: 0
                    description: Total price including tax
                    example: 12500
                  totalExclTax:
                    type: number
                    minimum: 0
                    description: Total price excluding tax
                    example: 10330.58
                  unitPrice:
                    type: number
                    minimum: 0
                    description: Unit price per item before quantity multiplication
                    example: 250
                  productIdentifiers:
                    $ref: '#/components/schemas/ProductIdentifiers'
                  incentiveCodes:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncentiveCode'
                    description: >-
                      Subsidy/incentive codes (e.g., ISDE in NL, BAFA in DE,
                      MaPrimeRénov in FR)
                    example:
                      - ISDE-2024-WP
                      - PROV-NH-2024
                  description:
                    type: string
                  lineItemId:
                    type: string
                    pattern: ^lit_[0-9A-HJKMNP-TV-Z]{26}$
                required:
                  - type
                  - totalInclTax
                  - lineItemId
          description: Line items for the quote
      required:
        - quoteId
        - opportunity
        - createdAt
        - updatedAt
        - address
        - contact
        - currency
        - totalInclTax
        - financing
        - lineItems
      description: A quote for sustainability home improvements
    NLAddress:
      type: object
      properties:
        postalCode:
          type: string
          pattern: ^\d{4} ?[a-zA-Z]{2}$
          description: >-
            Postal/ZIP code. Letter suffix is case-insensitive; canonicalized on
            parse to `1234 AB`.
          example: 1000 AA
        city:
          type: string
          minLength: 1
          description: City/locality name
          example: Brussels
        country:
          type: string
          enum:
            - NL
        street:
          type: string
          minLength: 1
          description: Street name (Dutch format)
          example: Kerkstraat
        houseNumber:
          type: string
          pattern: ^\d+$
          description: House number
          example: '42'
        houseNumberAddition:
          type: string
          minLength: 1
          description: House number addition/suffix
          example: A
      required:
        - postalCode
        - country
        - houseNumber
      description: Dutch address format with structured house number
    InternationalAddress:
      type: object
      properties:
        streetAddress:
          type: string
          minLength: 1
          description: >-
            Street address (single line; include any sub-address like apt/floor
            inline)
          example: Rue de la Loi 200, Apt 4B
        postalCode:
          type: string
          minLength: 1
          description: Postal/ZIP code
          example: '1000'
        city:
          type: string
          minLength: 1
          description: City/locality name
          example: Brussels
        country:
          type: string
          minLength: 2
          maxLength: 2
          description: ISO 3166-1 alpha-2 country code
          example: BE
      required:
        - streetAddress
        - postalCode
        - city
        - country
      description: International address format (UPU S42 compliant)
    ProductIdentifiers:
      type: object
      properties:
        brand:
          type: string
          minLength: 1
          description: Product manufacturer or brand name
          example: Enphase
        manufacturerPartNumber:
          type: string
          minLength: 1
          description: Manufacturer Part Number (MPN)
          example: SE7600H-US
        globalTradeItemNumber:
          type: string
          minLength: 1
          description: Global Trade Item Number (GTIN/EAN/UPC barcode)
          example: '0885629362058'
      description: Product identification metadata for matching and verification
    IncentiveCode:
      type: string
      minLength: 1
      pattern: ^[^;]+$
      description: >-
        Subsidy/incentive code (e.g., ISDE in NL, BAFA in DE, MaPrimeRénov in
        FR)
      example: ISDE-2024-WP
    QuoteOpportunity:
      type: object
      properties:
        opportunityId:
          type: string
          pattern: ^opp_[0-9A-HJKMNP-TV-Z]{26}$
          description: Salesforce opportunity this quote belongs to
          example: opp_01ARZ3NDEKTSV4RRFFQ69G5AV
      required:
        - opportunityId
    QuoteFinancingPhase:
      type: string
      enum:
        - new
        - engaged
        - in_progress
        - completed
        - canceled
      description: Coarse financing list bucket derived from journey status
    QuoteFinancingStatus:
      type: string
      enum:
        - new_customer
        - engaged
        - application_started
        - documents_required
        - under_review
        - additional_documents_required
        - offer_received
        - invoice_pending
        - completed
        - financing_rejected
        - canceled_by_consumer
        - offer_canceled
      description: >-
        Fine journey step of the consumer financing process from the merchant
        perspective
    QuoteFinancingSubStatus:
      oneOf:
        - $ref: '#/components/schemas/QuoteFinancingSubStatusNone'
        - $ref: '#/components/schemas/QuoteFinancingSubStatusOnHold'
        - $ref: '#/components/schemas/QuoteFinancingSubStatusCanceled'
      discriminator:
        propertyName: type
        mapping:
          none:
            $ref: '#/components/schemas/QuoteFinancingSubStatusNone'
          on_hold:
            $ref: '#/components/schemas/QuoteFinancingSubStatusOnHold'
          canceled:
            $ref: '#/components/schemas/QuoteFinancingSubStatusCanceled'
      description: >-
        Overlay orthogonal to journey `status` (ops pause or cancellation
        reason); always present.
    QuoteFinancingMethod:
      type: string
      enum:
        - loan
        - own_funds
        - subsidy
      description: >-
        A single funding source that contributed to the completed financing.
        Open enum; default-branch on unknown values.
    QuoteFinancingWaitingOn:
      type: string
      enum:
        - none
        - consumer
        - lender
        - merchant
        - prets
      description: Party that must act next on the headline financing path
    QuoteFinancingSubStatusNone:
      type: object
      properties:
        type:
          type: string
          enum:
            - none
      required:
        - type
      description: No ops pause overlay; journey `status` and `waitingOn` are sufficient.
    QuoteFinancingSubStatusOnHold:
      type: object
      properties:
        type:
          type: string
          enum:
            - on_hold
        reason:
          $ref: '#/components/schemas/QuoteFinancingOnHoldReason'
        description:
          type: string
          minLength: 1
          description: >-
            Free-text note explaining the hold, captured in Salesforce; suitable
            for display to the merchant.
          example: Waiting on the signed contract
      required:
        - type
        - reason
      description: >-
        Financing process is paused; the journey `status` still reflects the
        underlying stage.
    QuoteFinancingSubStatusCanceled:
      type: object
      properties:
        type:
          type: string
          enum:
            - canceled
        reason:
          $ref: '#/components/schemas/QuoteFinancingCancellationReason'
        description:
          type: string
          minLength: 1
          description: >-
            Free-text detail explaining the cancellation, captured in
            Salesforce; suitable for display to the merchant.
          example: Consumer chose to postpone the project
      required:
        - type
        - reason
      description: >-
        Accompanies a terminal canceled `status`; explains why the financing was
        canceled. Never changes `waitingOn` (terminal → `none`).
    QuoteFinancingOnHoldReason:
      type: string
      enum:
        - customer_unreachable
        - quote_under_consideration
        - customer_personal_reason
        - customer_evaluating_independently
        - cancellation_requested
        - awaiting_documents
        - customer_no_show_unreachable
        - customer_no_show_voicemail
        - customer_no_show_rescheduled
        - installation_blocked
        - general_question
        - unknown
      description: Reason why the financing process is on hold
    QuoteFinancingCancellationReason:
      type: string
      enum:
        - no_contact
        - declined_support
        - dropped_pre_offer
        - offer_declined
        - lender_rejected
        - other
        - unknown
      description: >-
        Reason a terminal canceled financing ended the way it did. Open enum;
        default-branch on unknown values.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````