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

# Get coverages data

> Returns coverage and premium for a given loan amount under a license.

This endpoint is used to calculate the coverage and premium values that Anzi will provide for your loan. It is particularly useful when your premium conditions are variable (for example, within a range such as 0.5%–7.5%) or when the premium percentage depends on the loan term (e.g., 0.5% at 30 days and 1% at 60 days).


## OpenAPI

````yaml /openapi.yaml get /guarantees/coverages
openapi: 3.0.3
info:
  title: Anzi Backend API
  version: 1.0.0
  description: |
    API reference for Anzi. This spec is scoped to the Organizations module.
servers:
  - url: https://sandbox-api.anzi.finance/v1
    description: Sanbox
  - url: https://api.anzi.finance/v1
    description: Production
security: []
tags:
  - name: Licenses
    description: Operational licenses
  - name: Users
    description: Manage users and API keys
  - name: Claims
    description: Manage claims
paths:
  /guarantees/coverages:
    get:
      tags:
        - Guarantees
      summary: Get coverages data
      description: Returns coverage and premium for a given loan amount under a license.
      parameters:
        - in: query
          name: license
          required: true
          schema:
            type: string
          description: License UID (string)
        - in: query
          name: loanAmount
          required: true
          schema:
            type: number
          description: Loan principal amount. Must be within the license's allowed range.
        - in: query
          name: premiumPercentage
          required: false
          schema:
            type: number
          description: >-
            Optional. This field is required only when both
            license.isVariablePremium and license.isPremiumDefinedByClient are
            set to true. In this case, the premium must be defined by you, and
            it must fall within the range specified by license.minimumPremium
            and license.maximumPremium.
        - in: query
          name: loanTerms
          required: false
          style: deepObject
          explode: true
          schema:
            type: object
            properties:
              disbursementDate:
                type: string
                format: date
                description: Loan Disbursement date (YYYY-MM-DD)
              paymentTerm:
                type: string
                format: date
                description: Loan due date (YYYY-MM-DD). Must be after disbursementDate.
          description: >-
            Optional. Required when the license.isVariablePremium is true and
            license.isPremiumDefinedByClient is false. Provides date context for
            premium calculation.
      responses:
        '200':
          description: Coverage and premium
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoveragesData'
              examples:
                example:
                  value:
                    coverage: 50000
                    premium: 1750
                    premiumPercentage: 3.5
        '400':
          description: Bad request (validation error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                GUA_03:
                  summary: Loan amount disallowed by license config
                  value:
                    code: GUA_03
                    message: Loan Amount disallowed by license config
                GUA_08:
                  summary: Premium percentage outside license range
                  value:
                    code: GUA_08
                    message: Premium percentage is out of range
                GUA_27:
                  summary: Portfolio Coverage Cap exceeded for SURETY license
                  value:
                    code: GUA_27
                    message: >-
                      The total Portfolio Coverage Cap spent exceeds the limit
                      allowed by the license. Please adjust it to continue with
                      the guarantee creation.
                GUA_37:
                  summary: Missing/invalid loan terms for variable premium
                  value:
                    code: GUA_37
                    message: >-
                      Is not possible to calculate the guarantee premium. Check
                      the data and try again
        '401':
          description: Unauthorized (invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                AUTH_01:
                  value:
                    code: AUTH_01
                    message: Invalid API Key
        '404':
          description: License not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                LI_00:
                  value:
                    code: LI_00
                    message: License Not Found
      security:
        - apiKeyAuth: []
components:
  schemas:
    CoveragesData:
      type: object
      properties:
        coverage:
          type: number
          description: >-
            Calculated coverage amount. For SURETY licenses, this is loanAmount
            * coveragePercentage; for FIRST_LOSS licenses, it equals the
            loanAmount.
        premium:
          type: number
          description: Calculated premium value for the provided loan amount.
        premiumPercentage:
          type: number
          description: >-
            Percentage used to compute the premium. Derived from the license
            rate table or provided by the client when allowed.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````