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

# Monthly payment preview



## OpenAPI

````yaml https://api.prets.io/v1/openapi.json post /v1/quotes/cost/preview
openapi: 3.1.0
info:
  title: Prets API
  version: 1.0.0
servers:
  - url: https://api.prets.app
security:
  - bearerAuth: []
paths:
  /v1/quotes/cost/preview:
    post:
      summary: Monthly payment preview
      parameters:
        - schema:
            type: string
            minLength: 1
            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
            description: BCP 47 language tag; defaults to nl-NL
            example: nl-NL
          required: false
          description: BCP 47 language tag; defaults to nl-NL
          name: Accept-Language
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteCostPreviewRequest'
      responses:
        '200':
          description: >-
            Indicative representative examples and response-level `content`
            (`text_warning`). Per-example `lineItems` present when the request
            included `lineItems`. `links.loanIndicationWidget` present when
            merchant org context is available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteCostPreviewResponse'
        '400':
          description: Validation error
        '404':
          description: Unknown organization or merchant
        '422':
          description: >-
            Cannot compute indicative monthly cost (no financing terms for the
            given amount)
        '500':
          description: Internal server error
components:
  schemas:
    QuoteCostPreviewRequest:
      type: object
      properties:
        currency:
          type: string
          enum:
            - EUR
          description: Quote currency (currently EUR only)
          example: EUR
        totalInclTax:
          type: number
          minimum: 0
          description: Quote total including tax in EUR
          example: 12500
        address:
          anyOf:
            - $ref: '#/components/schemas/NLAddress'
            - $ref: '#/components/schemas/InternationalAddress'
          description: >-
            Installation address; when omitted, eligibility may be broader where
            rules allow
        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
                required:
                  - type
                  - externalId
                  - totalInclTax
              - 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
                  - externalId
                  - totalInclTax
              - 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
                  - externalId
                  - totalInclTax
              - 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
                  - externalId
                  - totalInclTax
              - 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
                  - externalId
                  - totalInclTax
              - 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
                  - externalId
                  - totalInclTax
              - 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
                  - externalId
                  - totalInclTax
              - 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
                  - externalId
                  - totalInclTax
          description: >-
            Quote line items. When supplied, each representativeExample includes
            a lineItems[] breakdown pro-rating its monthlyCost across the lines.
      required:
        - currency
        - totalInclTax
      description: Indicative financing cost preview
    QuoteCostPreviewResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/QuoteCostPreviewData'
        links:
          type: object
          properties:
            loanIndicationWidget:
              type: object
              properties:
                png:
                  type: string
                  format: uri
                url:
                  type: string
                  format: uri
              required:
                - png
                - url
          required:
            - loanIndicationWidget
      required:
        - data
      description: Indicative financing cost preview
    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
    QuoteCostPreviewData:
      type: object
      properties:
        currency:
          type: string
          enum:
            - EUR
        content:
          type: array
          items:
            $ref: '#/components/schemas/ResponseContentText'
          description: >-
            Response-level copy. Currently a single `text_warning` entry; render
            prominently whenever any representative example is shown.
        representativeExamples:
          type: array
          items:
            $ref: '#/components/schemas/RepresentativeExample'
          minItems: 1
          description: >-
            Indicative financing examples for this quote. Equal status; the
            consumer picks which to render as the headline. Order is not
            significant.
      required:
        - currency
        - content
        - representativeExamples
    ResponseContentText:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        name:
          type: string
          enum:
            - text_warning
        value:
          type: string
          description: >-
            Localised mandatory warning. Must be rendered prominently whenever
            any representative example is shown.
      required:
        - type
        - name
        - value
    RepresentativeExample:
      type: object
      properties:
        loanAmount:
          type: number
          description: Total amount of credit.
        numInstallments:
          type: integer
          description: Number of instalments.
        repaymentPeriodUnit:
          type: string
          enum:
            - months
        monthlyCost:
          type: number
          description: Indicative monthly instalment.
        totalPayable:
          type: number
          description: Indicative total amount payable.
        nominalAnnualRate:
          type: number
          description: Nominal annual interest rate, as a fraction (0..1).
        annualCostRate:
          type: number
          description: Annual cost rate (APR-equivalent), as a fraction (0..1).
        lender:
          $ref: '#/components/schemas/RepresentativeExampleLender'
        content:
          type: array
          items:
            $ref: '#/components/schemas/ExampleContentText'
          description: >-
            Localised, ready-to-render copy for this example. `text_main` is a
            short customer-facing line; `text_legal` is the full indicative
            example sentence.
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/ExampleLineItem'
          description: >-
            Present when the request supplied lineItems. Each entry pro-rates
            this example's monthlyCost across the quote lines.
      required:
        - loanAmount
        - numInstallments
        - repaymentPeriodUnit
        - monthlyCost
        - totalPayable
        - nominalAnnualRate
        - annualCostRate
        - lender
        - content
      description: Indicative financing example for one set of terms.
    RepresentativeExampleLender:
      type: object
      properties:
        slug:
          $ref: '#/components/schemas/LenderSlug'
        name:
          type: string
      required:
        - slug
        - name
      description: Lender backing this example.
    ExampleContentText:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        name:
          type: string
          enum:
            - text_main
            - text_legal
        value:
          type: string
      required:
        - type
        - name
        - value
    ExampleLineItem:
      type: object
      properties:
        externalId:
          type: string
        monthlyCost:
          type: number
          description: >-
            Pro-rated portion of this example's monthlyCost across the request's
            lineItems. Display aid only.
      required:
        - externalId
        - monthlyCost
    LenderSlug:
      type: string
      enum:
        - abnamro
        - asn-bank
        - directa
        - freo
        - ing
        - lender-spender
        - nationaal-warmtefonds
        - svn
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````