{
  "openapi": "3.1.0",
  "info": {
    "title": "Bridgeline Public API",
    "version": "2026-09-23",
    "description": "Premium finance quotes and applications for agencies, and partner quotes for distribution partners (the endpoints under /v1/partner/). Authenticate with an API key: an agency admin creates agency and broker keys in the Bridgeline portal under API Keys; a distribution partner's admin creates partner keys in the partner console under Settings, then API keys. Scopes: `quotes:read` (Read quotes), `quotes:write` (Create quotes and replace their links), `applications:read` (Read applications), `applications:write` (Accept a quote into an application), `agreements:write` (Send and void finance agreements). `loans:read` and `webhooks:manage` are reserved for endpoints that are not built yet and allow nothing today."
  },
  "servers": [
    {
      "url": "https://portal.bridgelinepf.com/api",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/whoami": {
      "get": {
        "operationId": "getWhoami",
        "summary": "Introspect the calling API key",
        "description": "Returns the agency, the key's default broker (the broker every request acts as unless a write names another with broker_email in its body), scopes and mode. Requires no scope; use it to verify a key.",
        "tags": [
          "Meta"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [],
        "parameters": [
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The principal summary.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "whoami"
                    },
                    "livemode": {
                      "type": "boolean",
                      "description": "false for bl_test_ keys."
                    },
                    "brokerage": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ]
                    },
                    "acting_broker": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "email",
                        "name"
                      ]
                    },
                    "api_key": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "agency",
                            "broker"
                          ],
                          "description": "Additional values may be added.",
                          "x-extensible-enum": true
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "type",
                        "scopes"
                      ]
                    },
                    "api_version": {
                      "type": "string",
                      "description": "The API version this key is pinned to: the version that was current when the key was created. A request without a Bridgeline-Version header runs at it. A request with the header runs at the header's version, which the Bridgeline-Version response header echoes; this field stays the key's."
                    }
                  },
                  "required": [
                    "object",
                    "livemode",
                    "brokerage",
                    "acting_broker",
                    "api_key",
                    "api_version"
                  ],
                  "description": "Who the calling API key acts as."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes": {
      "post": {
        "operationId": "createQuote",
        "summary": "Create a quote",
        "description": "Prices one or more policies financed together as one loan and returns every down payment × term option we can offer. A deal we cannot finance still returns 201, with eligibility.status \"ineligible\", its reasons and no options; 422 is only for malformed input. hosted_url is returned only here.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retrying with the same key and body within 24h replays the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "broker_email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "insured": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dba": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fein": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "address": {
                        "type": "object",
                        "properties": {
                          "line1": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "line2": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "city": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "AL",
                              "AK",
                              "AZ",
                              "AR",
                              "CA",
                              "CO",
                              "CT",
                              "DE",
                              "FL",
                              "GA",
                              "HI",
                              "ID",
                              "IL",
                              "IN",
                              "IA",
                              "KS",
                              "KY",
                              "LA",
                              "ME",
                              "MD",
                              "MA",
                              "MI",
                              "MN",
                              "MS",
                              "MO",
                              "MT",
                              "NE",
                              "NV",
                              "NH",
                              "NJ",
                              "NM",
                              "NY",
                              "NC",
                              "ND",
                              "OH",
                              "OK",
                              "OR",
                              "PA",
                              "RI",
                              "SC",
                              "SD",
                              "TN",
                              "TX",
                              "UT",
                              "VT",
                              "VA",
                              "WA",
                              "WV",
                              "WI",
                              "WY",
                              "DC",
                              "PR",
                              "GU",
                              "VI",
                              "AS",
                              "MP"
                            ],
                            "description": "Two-letter USPS state code (e.g. `TX`)",
                            "examples": [
                              "TX"
                            ]
                          },
                          "postal_code": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "state"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "name",
                      "address"
                    ],
                    "additionalProperties": false
                  },
                  "policies": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "premium": {
                          "type": "string",
                          "pattern": "^\\d+(\\.\\d{1,2})?$"
                        },
                        "agency_fee": {
                          "description": "The agency's own fee on this policy, when it charges one. Financed with the premium and always earned. Do not also list it in taxes_and_fees, or it is financed twice. Omit it when there is none.",
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^\\d+(\\.\\d{1,2})?$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "taxes_and_fees": {
                          "anyOf": [
                            {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "description": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "amount": {
                                    "type": "string",
                                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                                  },
                                  "earned": {
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "amount"
                                ],
                                "additionalProperties": false
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "minimum_earned": {
                          "type": "object",
                          "properties": {
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "amount": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d+(\\.\\d{1,2})?$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "effective_date": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "expiration_date": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "carrier": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "maxLength": 500
                            },
                            "naic_code": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "am_best_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "mga": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "coverages": {
                          "minItems": 1,
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "maxLength": 500
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "auditable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "document_type": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "quote",
                                "binder",
                                "policy"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "policy_number": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 500
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metadata": {
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "premium",
                        "minimum_earned",
                        "effective_date",
                        "expiration_date",
                        "carrier",
                        "coverages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "client_reference_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "maxLength": 500
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "insured",
                  "policies"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The quote, eligible or not.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "qte_…"
                    },
                    "object": {
                      "type": "string",
                      "const": "quote"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "interested",
                        "expired",
                        "accepted"
                      ],
                      "description": "accepted once the quote has become an application (it wins over every other value); otherwise interested once the insured responds, expired once past expires_at, else active. Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "application_id": {
                      "description": "The application this quote became (app_…); null until it is accepted.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accepted_at": {
                      "description": "When the quote was accepted; null until then.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "broker": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "email"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "price_guaranteed_until": {
                      "description": "7 days after the quote was priced; null when the quote has no priced options. Up to this time our price check treats the quoted price as still good unless the benchmark rate (SOFR) has moved by more than 0.50 percentage points; from then until expires_at, only if recalculating the deal gives the same numbers. Derived from the stored quote, so it never changes. The quote itself stays indicative: see Indicative quotes.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "hosted_url": {
                      "description": "Returned when the quote is created; null when retrieved.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "selected_option_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "interest": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "option_id": {
                              "type": "string",
                              "description": "The option the insured picked (opt_…); the same as selected_option_id."
                            },
                            "note": {
                              "description": "The insured's optional note to the broker (at most 500 characters); null when left blank. Untrusted text typed on a public page: escape it before rendering.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "submitted_at": {
                              "type": "string",
                              "description": "When the insured tapped I'm interested."
                            },
                            "broker_notification": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "sent",
                                    "skipped",
                                    "failed"
                                  ],
                                  "description": "pending until we have tried to email the agency; then sent, skipped (nothing was sent; see reason) or failed. Additional values may be added.",
                                  "x-extensible-enum": true
                                },
                                "reason": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "demo_agency",
                                        "test_mode",
                                        "no_recipient",
                                        "email_disabled",
                                        "send_failed"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Why nothing was sent; null when pending or sent. demo_agency: a demo agency, where we email only internal Bridgeline addresses, and none applied. test_mode: a test-mode (bl_test_) quote, which never emails anyone. no_recipient: the agency has no active broker or admin to email. email_disabled: email delivery is switched off in this environment. send_failed: the email could not be sent, and Bridgeline ops were alerted."
                                },
                                "recipient": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "broker",
                                        "agency_admins"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Who we emailed: the quote's broker, or the agency's admins when that broker is no longer active. null when nobody was chosen."
                                },
                                "recipients": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "The agency staff email addresses the notification was actually sent to. Empty for a broker-scoped key when the email went to the agency's admins."
                                },
                                "at": {
                                  "description": "When the outcome was recorded; null while pending.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "reason",
                                "recipient",
                                "recipients",
                                "at"
                              ],
                              "description": "Whether we emailed the agency about this interest."
                            }
                          },
                          "required": [
                            "option_id",
                            "note",
                            "submitted_at",
                            "broker_notification"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The insured's response on the hosted page; null unless status is interested. This object is also the payload the Phase 3 quote.interest_expressed webhook will reuse."
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "premium": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "taxes_and_fees": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places. The sum of every taxes_and_fees item. The agency fee is not in it."
                        },
                        "agency_fee": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places. The sum of the policies' agency_fee; 0.00 when none was stated. premium + taxes_and_fees + agency_fee = total."
                        },
                        "total": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "weighted_minimum_earned_rate": {
                          "type": "number",
                          "description": "A fraction: 0.25 means 25%."
                        },
                        "financing_start_date": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "premium",
                        "taxes_and_fees",
                        "agency_fee",
                        "total",
                        "weighted_minimum_earned_rate",
                        "financing_start_date"
                      ]
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "Premium plus all taxes and fees, and the agency fee when one was sent."
                          },
                          "minimum_earned": {
                            "type": "object",
                            "properties": {
                              "rate": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "A fraction: 0.25 means 25%."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The minimum earned rate we used."
                              }
                            },
                            "required": [
                              "rate"
                            ]
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "am_best": {
                                "type": "object",
                                "properties": {
                                  "rating": {
                                    "type": "string"
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "am_best",
                                      "broker",
                                      "document",
                                      "assumed"
                                    ],
                                    "description": "Additional values may be added.",
                                    "x-extensible-enum": true
                                  }
                                },
                                "required": [
                                  "rating",
                                  "source"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "am_best"
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "total",
                          "minimum_earned",
                          "carrier",
                          "metadata"
                        ]
                      }
                    },
                    "eligibility": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "eligible",
                            "ineligible"
                          ],
                          "description": "Additional values may be added.",
                          "x-extensible-enum": true
                        },
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "passed": {
                                "type": "boolean"
                              },
                              "limit": {
                                "type": "string"
                              },
                              "actual": {
                                "type": "string"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "partially_assumed"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              "param": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "passed"
                            ]
                          }
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          },
                          "description": "Why the deal is ineligible; empty when eligible."
                        }
                      },
                      "required": [
                        "status",
                        "checks",
                        "reasons"
                      ]
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "binding_readiness": {
                      "type": "object",
                      "properties": {
                        "ready": {
                          "type": "boolean"
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          }
                        }
                      },
                      "required": [
                        "ready",
                        "issues"
                      ]
                    },
                    "recommended_option_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "opt_<down payment percent>_<term months>, e.g. opt_25_10."
                          },
                          "down_payment_rate": {
                            "type": "number",
                            "description": "A fraction: 0.25 means 25%."
                          },
                          "term_months": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "apr": {
                            "type": "number",
                            "description": "A fraction: 0.25 means 25%."
                          },
                          "down_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "amount_financed": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "monthly_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "finance_charge": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "total_of_payments": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. amount_financed + finance_charge, exactly: the same figure the finance agreement prints as its total of payments."
                          },
                          "total_cost": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. down_payment + total_of_payments, exactly."
                          },
                          "spread_clamped": {
                            "type": "boolean",
                            "description": "True when the agency's spread was reduced to keep this option under the APR limit."
                          }
                        },
                        "required": [
                          "id",
                          "down_payment_rate",
                          "term_months",
                          "apr",
                          "down_payment",
                          "amount_financed",
                          "monthly_payment",
                          "finance_charge",
                          "total_of_payments",
                          "total_cost",
                          "spread_clamped"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "application_id",
                    "accepted_at",
                    "client_reference_id",
                    "metadata",
                    "broker",
                    "created_at",
                    "expires_at",
                    "price_guaranteed_until",
                    "hosted_url",
                    "selected_option_id",
                    "interest",
                    "totals",
                    "policies",
                    "eligibility",
                    "assumptions",
                    "warnings",
                    "binding_readiness",
                    "recommended_option_id",
                    "options"
                  ],
                  "description": "An indicative quote: a stored snapshot, not a price lock."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request, or still in flight.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unable to serve the request (e.g. pricing inputs unavailable). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listQuotes",
        "summary": "List quotes",
        "description": "The quotes your key can read, created with a key of the same mode, newest first, as the same object GET /v1/quotes/{id} returns: every quote in your agency for an agency key, only its own broker's for a broker key. Filter by client_reference_id, status and interested. Cursor-paginated with limit and starting_after.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "description": "How many quotes to return, 1 to 100. Default 20.",
              "type": "string"
            },
            "description": "How many quotes to return, 1 to 100. Default 20."
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A quote id (qte_…) from the previous page (its next_cursor). Returns the quotes created before it.",
              "type": "string"
            },
            "description": "A quote id (qte_…) from the previous page (its next_cursor). Returns the quotes created before it."
          },
          {
            "name": "client_reference_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only quotes with exactly this client_reference_id.",
              "type": "string"
            },
            "description": "Only quotes with exactly this client_reference_id."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only quotes with this status, worked out as the quote's status is: accepted once accepted, otherwise interested once your client has responded, otherwise expired from expires_at on, otherwise active.",
              "type": "string",
              "enum": [
                "active",
                "interested",
                "expired",
                "accepted"
              ]
            },
            "description": "Only quotes with this status, worked out as the quote's status is: accepted once accepted, otherwise interested once your client has responded, otherwise expired from expires_at on, otherwise active."
          },
          {
            "name": "interested",
            "in": "query",
            "required": false,
            "schema": {
              "description": "true: only quotes your client has said they are interested in (interest is set; this includes accepted quotes that had an interest). false: only quotes without.",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "true: only quotes your client has said they are interested in (interest is set; this includes accepted quotes that had an interest). false: only quotes without."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of quotes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "qte_…"
                          },
                          "object": {
                            "type": "string",
                            "const": "quote"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "interested",
                              "expired",
                              "accepted"
                            ],
                            "description": "accepted once the quote has become an application (it wins over every other value); otherwise interested once the insured responds, expired once past expires_at, else active. Additional values may be added.",
                            "x-extensible-enum": true
                          },
                          "application_id": {
                            "description": "The application this quote became (app_…); null until it is accepted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "accepted_at": {
                            "description": "When the quote was accepted; null until then.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "client_reference_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "broker": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "email": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "email"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "expires_at": {
                            "type": "string"
                          },
                          "price_guaranteed_until": {
                            "description": "7 days after the quote was priced; null when the quote has no priced options. Up to this time our price check treats the quoted price as still good unless the benchmark rate (SOFR) has moved by more than 0.50 percentage points; from then until expires_at, only if recalculating the deal gives the same numbers. Derived from the stored quote, so it never changes. The quote itself stays indicative: see Indicative quotes.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "hosted_url": {
                            "description": "Returned when the quote is created; null when retrieved.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "selected_option_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "interest": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "option_id": {
                                    "type": "string",
                                    "description": "The option the insured picked (opt_…); the same as selected_option_id."
                                  },
                                  "note": {
                                    "description": "The insured's optional note to the broker (at most 500 characters); null when left blank. Untrusted text typed on a public page: escape it before rendering.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "submitted_at": {
                                    "type": "string",
                                    "description": "When the insured tapped I'm interested."
                                  },
                                  "broker_notification": {
                                    "type": "object",
                                    "properties": {
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "pending",
                                          "sent",
                                          "skipped",
                                          "failed"
                                        ],
                                        "description": "pending until we have tried to email the agency; then sent, skipped (nothing was sent; see reason) or failed. Additional values may be added.",
                                        "x-extensible-enum": true
                                      },
                                      "reason": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "demo_agency",
                                              "test_mode",
                                              "no_recipient",
                                              "email_disabled",
                                              "send_failed"
                                            ],
                                            "description": "Additional values may be added.",
                                            "x-extensible-enum": true
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "description": "Why nothing was sent; null when pending or sent. demo_agency: a demo agency, where we email only internal Bridgeline addresses, and none applied. test_mode: a test-mode (bl_test_) quote, which never emails anyone. no_recipient: the agency has no active broker or admin to email. email_disabled: email delivery is switched off in this environment. send_failed: the email could not be sent, and Bridgeline ops were alerted."
                                      },
                                      "recipient": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "broker",
                                              "agency_admins"
                                            ],
                                            "description": "Additional values may be added.",
                                            "x-extensible-enum": true
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "description": "Who we emailed: the quote's broker, or the agency's admins when that broker is no longer active. null when nobody was chosen."
                                      },
                                      "recipients": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        },
                                        "description": "The agency staff email addresses the notification was actually sent to. Empty for a broker-scoped key when the email went to the agency's admins."
                                      },
                                      "at": {
                                        "description": "When the outcome was recorded; null while pending.",
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "status",
                                      "reason",
                                      "recipient",
                                      "recipients",
                                      "at"
                                    ],
                                    "description": "Whether we emailed the agency about this interest."
                                  }
                                },
                                "required": [
                                  "option_id",
                                  "note",
                                  "submitted_at",
                                  "broker_notification"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The insured's response on the hosted page; null unless status is interested. This object is also the payload the Phase 3 quote.interest_expressed webhook will reuse."
                          },
                          "totals": {
                            "type": "object",
                            "properties": {
                              "premium": {
                                "type": "string",
                                "pattern": "^\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              "taxes_and_fees": {
                                "type": "string",
                                "pattern": "^\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places. The sum of every taxes_and_fees item. The agency fee is not in it."
                              },
                              "agency_fee": {
                                "type": "string",
                                "pattern": "^\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places. The sum of the policies' agency_fee; 0.00 when none was stated. premium + taxes_and_fees + agency_fee = total."
                              },
                              "total": {
                                "type": "string",
                                "pattern": "^\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              "weighted_minimum_earned_rate": {
                                "type": "number",
                                "description": "A fraction: 0.25 means 25%."
                              },
                              "financing_start_date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "premium",
                              "taxes_and_fees",
                              "agency_fee",
                              "total",
                              "weighted_minimum_earned_rate",
                              "financing_start_date"
                            ]
                          },
                          "policies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "total": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "Premium plus all taxes and fees, and the agency fee when one was sent."
                                },
                                "minimum_earned": {
                                  "type": "object",
                                  "properties": {
                                    "rate": {
                                      "anyOf": [
                                        {
                                          "type": "number",
                                          "description": "A fraction: 0.25 means 25%."
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "The minimum earned rate we used."
                                    }
                                  },
                                  "required": [
                                    "rate"
                                  ]
                                },
                                "carrier": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "am_best": {
                                      "type": "object",
                                      "properties": {
                                        "rating": {
                                          "type": "string"
                                        },
                                        "source": {
                                          "type": "string",
                                          "enum": [
                                            "am_best",
                                            "broker",
                                            "document",
                                            "assumed"
                                          ],
                                          "description": "Additional values may be added.",
                                          "x-extensible-enum": true
                                        }
                                      },
                                      "required": [
                                        "rating",
                                        "source"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "am_best"
                                  ]
                                },
                                "metadata": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "total",
                                "minimum_earned",
                                "carrier",
                                "metadata"
                              ]
                            }
                          },
                          "eligibility": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "eligible",
                                  "ineligible"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              "checks": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string"
                                    },
                                    "passed": {
                                      "type": "boolean"
                                    },
                                    "limit": {
                                      "type": "string"
                                    },
                                    "actual": {
                                      "type": "string"
                                    },
                                    "basis": {
                                      "type": "string",
                                      "enum": [
                                        "partially_assumed"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    "param": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "passed"
                                  ]
                                }
                              },
                              "reasons": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string"
                                    },
                                    "param": {
                                      "type": "string",
                                      "description": "The request path this refers to, e.g. policies[1].auditable."
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "param",
                                    "message"
                                  ]
                                },
                                "description": "Why the deal is ineligible; empty when eligible."
                              }
                            },
                            "required": [
                              "status",
                              "checks",
                              "reasons"
                            ]
                          },
                          "assumptions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "param": {
                                  "type": "string",
                                  "description": "The request path this refers to, e.g. policies[1].auditable."
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "param",
                                "message"
                              ]
                            }
                          },
                          "warnings": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "param": {
                                  "type": "string",
                                  "description": "The request path this refers to, e.g. policies[1].auditable."
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "param",
                                "message"
                              ]
                            }
                          },
                          "binding_readiness": {
                            "type": "object",
                            "properties": {
                              "ready": {
                                "type": "boolean"
                              },
                              "issues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string"
                                    },
                                    "param": {
                                      "type": "string",
                                      "description": "The request path this refers to, e.g. policies[1].auditable."
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "param",
                                    "message"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "ready",
                              "issues"
                            ]
                          },
                          "recommended_option_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "opt_<down payment percent>_<term months>, e.g. opt_25_10."
                                },
                                "down_payment_rate": {
                                  "type": "number",
                                  "description": "A fraction: 0.25 means 25%."
                                },
                                "term_months": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "apr": {
                                  "type": "number",
                                  "description": "A fraction: 0.25 means 25%."
                                },
                                "down_payment": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places."
                                },
                                "amount_financed": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places."
                                },
                                "monthly_payment": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places."
                                },
                                "finance_charge": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places."
                                },
                                "total_of_payments": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places. amount_financed + finance_charge, exactly: the same figure the finance agreement prints as its total of payments."
                                },
                                "total_cost": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places. down_payment + total_of_payments, exactly."
                                },
                                "spread_clamped": {
                                  "type": "boolean",
                                  "description": "True when the agency's spread was reduced to keep this option under the APR limit."
                                }
                              },
                              "required": [
                                "id",
                                "down_payment_rate",
                                "term_months",
                                "apr",
                                "down_payment",
                                "amount_financed",
                                "monthly_payment",
                                "finance_charge",
                                "total_of_payments",
                                "total_cost",
                                "spread_clamped"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "status",
                          "application_id",
                          "accepted_at",
                          "client_reference_id",
                          "metadata",
                          "broker",
                          "created_at",
                          "expires_at",
                          "price_guaranteed_until",
                          "hosted_url",
                          "selected_option_id",
                          "interest",
                          "totals",
                          "policies",
                          "eligibility",
                          "assumptions",
                          "warnings",
                          "binding_readiness",
                          "recommended_option_id",
                          "options"
                        ],
                        "description": "An indicative quote: a stored snapshot, not a price lock."
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "description": "Pass as starting_after for the next page; null on the last page.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more",
                    "next_cursor"
                  ],
                  "description": "A page of quotes, newest first."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes/{id}": {
      "get": {
        "operationId": "getQuote",
        "summary": "Retrieve a quote",
        "description": "Returns the stored snapshot (never re-priced), including whether the insured has said they are interested. status is active until expires_at, then expired; interested once the insured picks an option on the hosted page (selected_option_id); interest then carries their note and whether we emailed the agency. Once the quote is accepted, status is accepted and application_id names the application. hosted_url is always null here: it is returned only when the quote is created, or when you replace the link with the hosted-link endpoint.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The quote id (qte_…)."
            },
            "description": "The quote id (qte_…)."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The quote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "qte_…"
                    },
                    "object": {
                      "type": "string",
                      "const": "quote"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "interested",
                        "expired",
                        "accepted"
                      ],
                      "description": "accepted once the quote has become an application (it wins over every other value); otherwise interested once the insured responds, expired once past expires_at, else active. Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "application_id": {
                      "description": "The application this quote became (app_…); null until it is accepted.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accepted_at": {
                      "description": "When the quote was accepted; null until then.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "broker": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "email"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "price_guaranteed_until": {
                      "description": "7 days after the quote was priced; null when the quote has no priced options. Up to this time our price check treats the quoted price as still good unless the benchmark rate (SOFR) has moved by more than 0.50 percentage points; from then until expires_at, only if recalculating the deal gives the same numbers. Derived from the stored quote, so it never changes. The quote itself stays indicative: see Indicative quotes.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "hosted_url": {
                      "description": "Returned when the quote is created; null when retrieved.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "selected_option_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "interest": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "option_id": {
                              "type": "string",
                              "description": "The option the insured picked (opt_…); the same as selected_option_id."
                            },
                            "note": {
                              "description": "The insured's optional note to the broker (at most 500 characters); null when left blank. Untrusted text typed on a public page: escape it before rendering.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "submitted_at": {
                              "type": "string",
                              "description": "When the insured tapped I'm interested."
                            },
                            "broker_notification": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "sent",
                                    "skipped",
                                    "failed"
                                  ],
                                  "description": "pending until we have tried to email the agency; then sent, skipped (nothing was sent; see reason) or failed. Additional values may be added.",
                                  "x-extensible-enum": true
                                },
                                "reason": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "demo_agency",
                                        "test_mode",
                                        "no_recipient",
                                        "email_disabled",
                                        "send_failed"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Why nothing was sent; null when pending or sent. demo_agency: a demo agency, where we email only internal Bridgeline addresses, and none applied. test_mode: a test-mode (bl_test_) quote, which never emails anyone. no_recipient: the agency has no active broker or admin to email. email_disabled: email delivery is switched off in this environment. send_failed: the email could not be sent, and Bridgeline ops were alerted."
                                },
                                "recipient": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "broker",
                                        "agency_admins"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Who we emailed: the quote's broker, or the agency's admins when that broker is no longer active. null when nobody was chosen."
                                },
                                "recipients": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "The agency staff email addresses the notification was actually sent to. Empty for a broker-scoped key when the email went to the agency's admins."
                                },
                                "at": {
                                  "description": "When the outcome was recorded; null while pending.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "reason",
                                "recipient",
                                "recipients",
                                "at"
                              ],
                              "description": "Whether we emailed the agency about this interest."
                            }
                          },
                          "required": [
                            "option_id",
                            "note",
                            "submitted_at",
                            "broker_notification"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The insured's response on the hosted page; null unless status is interested. This object is also the payload the Phase 3 quote.interest_expressed webhook will reuse."
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "premium": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "taxes_and_fees": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places. The sum of every taxes_and_fees item. The agency fee is not in it."
                        },
                        "agency_fee": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places. The sum of the policies' agency_fee; 0.00 when none was stated. premium + taxes_and_fees + agency_fee = total."
                        },
                        "total": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "weighted_minimum_earned_rate": {
                          "type": "number",
                          "description": "A fraction: 0.25 means 25%."
                        },
                        "financing_start_date": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "premium",
                        "taxes_and_fees",
                        "agency_fee",
                        "total",
                        "weighted_minimum_earned_rate",
                        "financing_start_date"
                      ]
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "Premium plus all taxes and fees, and the agency fee when one was sent."
                          },
                          "minimum_earned": {
                            "type": "object",
                            "properties": {
                              "rate": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "A fraction: 0.25 means 25%."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The minimum earned rate we used."
                              }
                            },
                            "required": [
                              "rate"
                            ]
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "am_best": {
                                "type": "object",
                                "properties": {
                                  "rating": {
                                    "type": "string"
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "am_best",
                                      "broker",
                                      "document",
                                      "assumed"
                                    ],
                                    "description": "Additional values may be added.",
                                    "x-extensible-enum": true
                                  }
                                },
                                "required": [
                                  "rating",
                                  "source"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "am_best"
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "total",
                          "minimum_earned",
                          "carrier",
                          "metadata"
                        ]
                      }
                    },
                    "eligibility": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "eligible",
                            "ineligible"
                          ],
                          "description": "Additional values may be added.",
                          "x-extensible-enum": true
                        },
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "passed": {
                                "type": "boolean"
                              },
                              "limit": {
                                "type": "string"
                              },
                              "actual": {
                                "type": "string"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "partially_assumed"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              "param": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "passed"
                            ]
                          }
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          },
                          "description": "Why the deal is ineligible; empty when eligible."
                        }
                      },
                      "required": [
                        "status",
                        "checks",
                        "reasons"
                      ]
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "binding_readiness": {
                      "type": "object",
                      "properties": {
                        "ready": {
                          "type": "boolean"
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          }
                        }
                      },
                      "required": [
                        "ready",
                        "issues"
                      ]
                    },
                    "recommended_option_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "opt_<down payment percent>_<term months>, e.g. opt_25_10."
                          },
                          "down_payment_rate": {
                            "type": "number",
                            "description": "A fraction: 0.25 means 25%."
                          },
                          "term_months": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "apr": {
                            "type": "number",
                            "description": "A fraction: 0.25 means 25%."
                          },
                          "down_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "amount_financed": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "monthly_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "finance_charge": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "total_of_payments": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. amount_financed + finance_charge, exactly: the same figure the finance agreement prints as its total of payments."
                          },
                          "total_cost": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. down_payment + total_of_payments, exactly."
                          },
                          "spread_clamped": {
                            "type": "boolean",
                            "description": "True when the agency's spread was reduced to keep this option under the APR limit."
                          }
                        },
                        "required": [
                          "id",
                          "down_payment_rate",
                          "term_months",
                          "apr",
                          "down_payment",
                          "amount_financed",
                          "monthly_payment",
                          "finance_charge",
                          "total_of_payments",
                          "total_cost",
                          "spread_clamped"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "application_id",
                    "accepted_at",
                    "client_reference_id",
                    "metadata",
                    "broker",
                    "created_at",
                    "expires_at",
                    "price_guaranteed_until",
                    "hosted_url",
                    "selected_option_id",
                    "interest",
                    "totals",
                    "policies",
                    "eligibility",
                    "assumptions",
                    "warnings",
                    "binding_readiness",
                    "recommended_option_id",
                    "options"
                  ],
                  "description": "An indicative quote: a stored snapshot, not a price lock."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for other agencies' ids).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes/{id}/hosted-link": {
      "post": {
        "operationId": "rotateQuoteHostedLink",
        "summary": "Get a new hosted link for a quote",
        "description": "Revokes the quote's current hosted page link immediately and returns a new one. Use it when a link was sent to the wrong person, or to get a link again after creating the quote (GET returns hosted_url null). The quote's expires_at never changes; an expired quote is a 409 QUOTE_EXPIRED. Retrying with the same Idempotency-Key returns the same link.",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The quote id (qte_…)."
            },
            "description": "The quote id (qte_…)."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retrying with the same key and body within 24h replays the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The new link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quote_id": {
                      "type": "string",
                      "description": "The quote this link opens (qte_…)."
                    },
                    "url": {
                      "type": "string",
                      "description": "The new hosted page link. Every earlier link for this quote no longer works."
                    },
                    "expires_at": {
                      "type": "string",
                      "description": "The quote's expiry, unchanged: a new link never extends it."
                    },
                    "object": {
                      "type": "string",
                      "const": "hosted_link"
                    },
                    "id": {
                      "type": "string",
                      "description": "Deprecated: the same value as quote_id, kept for compatibility.",
                      "deprecated": true
                    },
                    "hosted_url": {
                      "type": "string",
                      "description": "Deprecated: the same value as url, kept for compatibility.",
                      "deprecated": true
                    }
                  },
                  "required": [
                    "quote_id",
                    "url",
                    "expires_at",
                    "object",
                    "id",
                    "hosted_url"
                  ],
                  "description": "A freshly minted hosted link for a quote."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for other agencies' ids).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request, or still in flight. QUOTE_EXPIRED: the quote has expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes/{id}/accept": {
      "post": {
        "operationId": "acceptQuote",
        "summary": "Accept a quote",
        "description": "Turns a quote into a draft application in the broker's portal, with the option you name recorded on it. A quote can be accepted one time: a second call is a 409 QUOTE_ALREADY_ACCEPTED carrying error.application_id, and retrying the first call with the same Idempotency-Key returns what that call stored (normally the 201). The application starts at requires_information: the broker reviews the policies, prices it and sends the agreement in the portal. Nothing is sent to the insured. Live keys only for now, and only for agencies Bridgeline has turned this on for (403 APPLICATIONS_NOT_ENABLED otherwise). With straight-through binding turned on for your agency, a clean deal has its price fixed at the option you name, and send: true also sends the agreement; the price is checked first (409 QUOTE_PRICE_CHANGED when it is no longer good).",
        "tags": [
          "Quotes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "applications:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The quote id (qte_…)."
            },
            "description": "The quote id (qte_…)."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retrying with the same key and body within 24h replays the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "option_id": {
                    "type": "string",
                    "description": "The option to accept: an id from the quote's options (opt_<down payment percent>_<term months>)."
                  },
                  "borrower_contact": {
                    "type": "object",
                    "properties": {
                      "first_name": {
                        "description": "First name of the person who will sign for the insured. 1 to 100 characters after trimming, in characters the financing agreement can print (Latin letters, accents included).",
                        "minLength": 1,
                        "maxLength": 100,
                        "type": "string"
                      },
                      "last_name": {
                        "description": "Their last name. The same rules as first_name.",
                        "minLength": 1,
                        "maxLength": 100,
                        "type": "string"
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                        "description": "Where the financing agreement is sent for signature. Stored on the application; not returned by the API."
                      },
                      "phone": {
                        "description": "Optional. A US phone number only (ten digits, area code first), with an optional extension of 1 to 6 digits: \"713-555-0142\" or \"713-555-0142 x204\". Without it the application lists INSURED_PHONE_MISSING in requirements.blocking until the broker adds one. The contact is stored on the application but not returned by the API.",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "first_name",
                      "last_name",
                      "email"
                    ],
                    "additionalProperties": false,
                    "description": "Who signs the financing agreement for the insured. Required."
                  },
                  "broker_email": {
                    "description": "The broker who will own the application. Omit it to keep the quote's broker (or, if that broker is no longer active, the key's default broker).",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "client_reference_id": {
                    "description": "Your own id for this application. Stored and returned as is.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "maxLength": 500
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "policies": {
                    "description": "Each policy's commission, one entry per policy in the order the quote lists its policies. Use {} for a policy you are not stating a rate for. The number of entries must equal the number of policies.",
                    "anyOf": [
                      {
                        "minItems": 1,
                        "maxItems": 25,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "commission_rate": {
                              "description": "The agency's commission on this policy, as a fraction of its base premium: 0.125 means 12.5%. From 0 to below 1, with at most 4 decimal places. 0 is allowed. null or omitted: nothing is stated for this policy in this call.",
                              "minimum": 0,
                              "exclusiveMaximum": 1,
                              "type": [
                                "number",
                                "null"
                              ]
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "send": {
                    "description": "true: when the price is fixed at this option, also send the finance agreement to borrower_contact for signature. Needs borrower_contact.phone, a commission_rate for every policy (policies), the agreements:write scope, and straight-through binding turned on for your agency (403 STRAIGHT_THROUGH_NOT_ENABLED otherwise). The 201 says whether it was sent: status awaiting_signature, and Bridgeline emails the signing request to the insured. If agreement is null, call POST /v1/applications/{id}/send for the reason.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [
                  "option_id",
                  "borrower_contact"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The application the quote became.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "app_…"
                    },
                    "object": {
                      "type": "string",
                      "const": "application"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "processing",
                        "requires_information",
                        "ready_for_agreement",
                        "awaiting_signature",
                        "pending_activation",
                        "active",
                        "canceled"
                      ],
                      "description": "processing, requires_information (an item in requirements.blocking holds the agreement back), ready_for_agreement, awaiting_signature (the agreement was sent), pending_activation (the borrower signed; the loan goes live once the down payment settles and the agreement is countersigned), active (final), canceled (final; cancellation says why). New values may be added: treat an unknown one as \"in progress\". Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "created_via": {
                      "type": "string",
                      "enum": [
                        "api",
                        "portal",
                        "email"
                      ],
                      "description": "api: accepted from a quote through the API. portal: created in the Bridgeline portal. email: created from an email to an intake address. Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "quote_id": {
                      "description": "The application's current quote (qte_…), or null when it has none.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accepted_option_id": {
                      "description": "The option chosen when the application was created from a quote (opt_…): accepted through POST /v1/quotes/{id}/accept, or picked with \"I'm interested\" on a partner's quote link. Null otherwise. A record of the choice, not a price lock.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pricing": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "option_id": {
                              "description": "opt_<down payment percent>_<term months>; null when the down payment is not a whole percent.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "down_payment_rate": {
                              "type": "number",
                              "description": "A fraction: 0.25 means 25%."
                            },
                            "term_months": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "apr": {
                              "type": "number",
                              "description": "A fraction: 0.25 means 25%."
                            },
                            "down_payment": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "amount_financed": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "monthly_payment": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "finance_charge": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "total_of_payments": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "total_cost": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "selected_by": {
                              "type": "string",
                              "enum": [
                                "broker",
                                "system"
                              ],
                              "description": "broker: the broker picked these terms in the portal. system: fixed without a broker choosing it: the option accepted through the API on a straight-through application, or our recommended option, which the broker kept. Additional values may be added.",
                              "x-extensible-enum": true
                            }
                          },
                          "required": [
                            "option_id",
                            "down_payment_rate",
                            "term_months",
                            "apr",
                            "down_payment",
                            "amount_financed",
                            "monthly_payment",
                            "finance_charge",
                            "total_of_payments",
                            "total_cost",
                            "selected_by"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The terms the broker has priced in the portal, which the agreement will carry; once the agreement is sent, its own terms. null until the application reaches pricing. total_of_payments is amount_financed + finance_charge, as on the agreement; total_cost is down_payment + total_of_payments."
                    },
                    "price_guaranteed_until": {
                      "description": "The accepted quote's price_guaranteed_until: 7 days after that quote was priced. null when the application was not accepted from a quote through the API.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "straight_through": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "route": {
                              "type": "string",
                              "enum": [
                                "straight_through",
                                "portal_path",
                                "managed_in_portal"
                              ],
                              "description": "straight_through: the price is fixed at the accepted option and the agreement can be sent through the API. portal_path: the broker reviews, prices and sends in the portal. managed_in_portal: the price was fixed, and an agent has since changed it in the portal; the API no longer sends this application. Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "reasons": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "param": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "description": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "param",
                                  "description"
                                ]
                              },
                              "description": "Why the deal is on the portal path. Empty on the other routes. New codes may be added."
                            }
                          },
                          "required": [
                            "route",
                            "reasons"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whether this application can go to the insured without a portal visit. null for an application that was not accepted with straight-through binding turned on."
                    },
                    "agreement": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "sent_at": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "sent_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The finance agreement, once it has been sent (by your broker or through the API). null before that. Bridgeline emails the signing request to the insured; the application's status says where it stands."
                    },
                    "payout": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "confirmed_at": {
                              "description": "When these figures were recorded for the agreement that was sent. null before an agreement is sent: the figures are then worked out from what is on each policy now.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "policies": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "The policy (pol_…), as in policies."
                                  },
                                  "commission_rate": {
                                    "type": "number",
                                    "description": "The agency's commission as a fraction of the policy's base premium: 0.125 means 12.5%."
                                  },
                                  "commission": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "Base premium times commission_rate, rounded half up to the cent."
                                  },
                                  "agency_fee": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "The agency's own fee on this policy. 0.00 when the quote stated none."
                                  }
                                },
                                "required": [
                                  "id",
                                  "commission_rate",
                                  "commission",
                                  "agency_fee"
                                ]
                              }
                            },
                            "due_to_agency": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "Every commission plus every agency fee."
                            },
                            "due_to_billing_company": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "total minus due_to_agency."
                            },
                            "total": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "The total premium financed: every policy total, taxes, fees and agency fees included."
                            }
                          },
                          "required": [
                            "confirmed_at",
                            "policies",
                            "due_to_agency",
                            "due_to_billing_company",
                            "total"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The agency's commission and agency fee on each policy, and how the financed premium divides between the agency and the billing company. null until every policy has a commission rate. We record exactly what you state and infer nothing."
                    },
                    "cancellation": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "reason": {
                              "type": "string",
                              "enum": [
                                "price_lapsed"
                              ],
                              "description": "price_lapsed: the quote behind the fixed price had expired (it was more than 30 days old) when the agreement was about to be sent. New values may be added. Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "at": {
                              "type": "string",
                              "description": "When the application was canceled."
                            }
                          },
                          "required": [
                            "reason",
                            "at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why and when the application was canceled. null unless status is canceled. A canceled application is closed for good: create a new quote to start again."
                    },
                    "insured": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "address": {
                          "type": "object",
                          "properties": {
                            "line1": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "city": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "state": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "line1",
                            "city",
                            "state",
                            "postal_code"
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "address"
                      ]
                    },
                    "broker": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "email"
                      ],
                      "description": "The broker who owns the application."
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "pol_… (22 characters on an application; a quote's policy ids are 8)."
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "match": {
                                "type": "string",
                                "enum": [
                                  "matched",
                                  "pending"
                                ],
                                "description": "matched once the carrier is linked to our carrier records. Additional values may be added.",
                                "x-extensible-enum": true
                              }
                            },
                            "required": [
                              "name",
                              "match"
                            ]
                          },
                          "total": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Premium plus all taxes and fees; null when not known yet."
                          },
                          "effective_date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "A calendar date, YYYY-MM-DD."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expiration_date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "A calendar date, YYYY-MM-DD."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "document_type": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "quote",
                                  "binder",
                                  "policy"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "policy_number": {
                            "description": "null when missing, or when only a placeholder such as \"TBD\" is on file.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "carrier",
                          "total",
                          "effective_date",
                          "expiration_date",
                          "document_type",
                          "policy_number"
                        ]
                      }
                    },
                    "requirements": {
                      "type": "object",
                      "properties": {
                        "blocking": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Stable, machine-readable code. Branch on this, never on description."
                              },
                              "param": {
                                "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "due_by": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A calendar date, YYYY-MM-DD."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "description",
                              "due_by"
                            ]
                          },
                          "description": "Must clear before the agreement can be sent. CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE are listed here early but do not hold the status back yet. Empty once the agreement is sent (except AGREEMENT_DECLINED)."
                        },
                        "outstanding": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Stable, machine-readable code. Branch on this, never on description."
                              },
                              "param": {
                                "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "due_by": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A calendar date, YYYY-MM-DD."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "description",
                              "due_by"
                            ]
                          },
                          "description": "Owed after signing, by due_by. Never blocks the agreement."
                        }
                      },
                      "required": [
                        "blocking",
                        "outstanding"
                      ],
                      "description": "What's left on the deal. New codes may be added: show description for a code you don't know."
                    },
                    "portal_url": {
                      "type": "string",
                      "description": "Where the broker works on this application in the Bridgeline portal (requires a portal login)."
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "created_via",
                    "quote_id",
                    "accepted_option_id",
                    "pricing",
                    "price_guaranteed_until",
                    "straight_through",
                    "agreement",
                    "payout",
                    "cancellation",
                    "insured",
                    "broker",
                    "policies",
                    "requirements",
                    "portal_url",
                    "client_reference_id",
                    "metadata",
                    "created_at"
                  ],
                  "description": "A deal in progress toward a signed premium finance agreement and loan."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active. APPLICATIONS_NOT_ENABLED: accepting quotes is not turned on for this agency, or the key is a test key. STRAIGHT_THROUGH_NOT_ENABLED: sending agreements through the API (which also needs accepting quotes) is not turned on for this agency, or the key is a test key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for other agencies' ids).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request, or still in flight. QUOTE_EXPIRED: the quote has expired. QUOTE_ALREADY_ACCEPTED: the quote already became an application. QUOTE_NOT_ACCEPTABLE: the quote can never be accepted (see details); create a new quote. QUOTE_PRICE_CHANGED: the quoted price is no longer good (see details); nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. A retry with the same Idempotency-Key either replays this 500 (Idempotent-Replayed: true) or runs the call again. Either way, if you still have no 201, read the quote: status accepted means the application exists (application_id). Otherwise accept again with a new key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unable to serve the request (e.g. pricing inputs unavailable). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/applications": {
      "get": {
        "operationId": "listApplications",
        "summary": "List applications",
        "description": "Every application your key can see, newest first: an agency key sees the whole agency, a broker key only its own broker's. Includes applications created in the portal and by email. Cursor-paginated with limit and starting_after.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "applications:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "description": "How many applications to return, 1 to 100. Default 20.",
              "type": "string"
            },
            "description": "How many applications to return, 1 to 100. Default 20."
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "description": "An application id (app_…) from the previous page (its next_cursor). Returns the applications created before it.",
              "type": "string"
            },
            "description": "An application id (app_…) from the previous page (its next_cursor). Returns the applications created before it."
          },
          {
            "name": "client_reference_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only applications with this client_reference_id.",
              "type": "string"
            },
            "description": "Only applications with this client_reference_id."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of applications.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "app_…"
                          },
                          "object": {
                            "type": "string",
                            "const": "application"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "processing",
                              "requires_information",
                              "ready_for_agreement",
                              "awaiting_signature",
                              "pending_activation",
                              "active",
                              "canceled"
                            ],
                            "description": "processing, requires_information (an item in requirements.blocking holds the agreement back), ready_for_agreement, awaiting_signature (the agreement was sent), pending_activation (the borrower signed; the loan goes live once the down payment settles and the agreement is countersigned), active (final), canceled (final; cancellation says why). New values may be added: treat an unknown one as \"in progress\". Additional values may be added.",
                            "x-extensible-enum": true
                          },
                          "created_via": {
                            "type": "string",
                            "enum": [
                              "api",
                              "portal",
                              "email"
                            ],
                            "description": "api: accepted from a quote through the API. portal: created in the Bridgeline portal. email: created from an email to an intake address. Additional values may be added.",
                            "x-extensible-enum": true
                          },
                          "quote_id": {
                            "description": "The application's current quote (qte_…), or null when it has none.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "accepted_option_id": {
                            "description": "The option chosen when the application was created from a quote (opt_…): accepted through POST /v1/quotes/{id}/accept, or picked with \"I'm interested\" on a partner's quote link. Null otherwise. A record of the choice, not a price lock.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pricing": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "option_id": {
                                    "description": "opt_<down payment percent>_<term months>; null when the down payment is not a whole percent.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "down_payment_rate": {
                                    "type": "number",
                                    "description": "A fraction: 0.25 means 25%."
                                  },
                                  "term_months": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "apr": {
                                    "type": "number",
                                    "description": "A fraction: 0.25 means 25%."
                                  },
                                  "down_payment": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "US dollars, a decimal string with two decimal places."
                                  },
                                  "amount_financed": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "US dollars, a decimal string with two decimal places."
                                  },
                                  "monthly_payment": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "US dollars, a decimal string with two decimal places."
                                  },
                                  "finance_charge": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "US dollars, a decimal string with two decimal places."
                                  },
                                  "total_of_payments": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "US dollars, a decimal string with two decimal places."
                                  },
                                  "total_cost": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "US dollars, a decimal string with two decimal places."
                                  },
                                  "selected_by": {
                                    "type": "string",
                                    "enum": [
                                      "broker",
                                      "system"
                                    ],
                                    "description": "broker: the broker picked these terms in the portal. system: fixed without a broker choosing it: the option accepted through the API on a straight-through application, or our recommended option, which the broker kept. Additional values may be added.",
                                    "x-extensible-enum": true
                                  }
                                },
                                "required": [
                                  "option_id",
                                  "down_payment_rate",
                                  "term_months",
                                  "apr",
                                  "down_payment",
                                  "amount_financed",
                                  "monthly_payment",
                                  "finance_charge",
                                  "total_of_payments",
                                  "total_cost",
                                  "selected_by"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The terms the broker has priced in the portal, which the agreement will carry; once the agreement is sent, its own terms. null until the application reaches pricing. total_of_payments is amount_financed + finance_charge, as on the agreement; total_cost is down_payment + total_of_payments."
                          },
                          "price_guaranteed_until": {
                            "description": "The accepted quote's price_guaranteed_until: 7 days after that quote was priced. null when the application was not accepted from a quote through the API.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "straight_through": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "route": {
                                    "type": "string",
                                    "enum": [
                                      "straight_through",
                                      "portal_path",
                                      "managed_in_portal"
                                    ],
                                    "description": "straight_through: the price is fixed at the accepted option and the agreement can be sent through the API. portal_path: the broker reviews, prices and sends in the portal. managed_in_portal: the price was fixed, and an agent has since changed it in the portal; the API no longer sends this application. Additional values may be added.",
                                    "x-extensible-enum": true
                                  },
                                  "reasons": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string"
                                        },
                                        "param": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "description": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "param",
                                        "description"
                                      ]
                                    },
                                    "description": "Why the deal is on the portal path. Empty on the other routes. New codes may be added."
                                  }
                                },
                                "required": [
                                  "route",
                                  "reasons"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Whether this application can go to the insured without a portal visit. null for an application that was not accepted with straight-through binding turned on."
                          },
                          "agreement": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "sent_at": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "sent_at"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The finance agreement, once it has been sent (by your broker or through the API). null before that. Bridgeline emails the signing request to the insured; the application's status says where it stands."
                          },
                          "payout": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "confirmed_at": {
                                    "description": "When these figures were recorded for the agreement that was sent. null before an agreement is sent: the figures are then worked out from what is on each policy now.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "policies": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "description": "The policy (pol_…), as in policies."
                                        },
                                        "commission_rate": {
                                          "type": "number",
                                          "description": "The agency's commission as a fraction of the policy's base premium: 0.125 means 12.5%."
                                        },
                                        "commission": {
                                          "type": "string",
                                          "pattern": "^-?\\d+\\.\\d{2}$",
                                          "description": "Base premium times commission_rate, rounded half up to the cent."
                                        },
                                        "agency_fee": {
                                          "type": "string",
                                          "pattern": "^-?\\d+\\.\\d{2}$",
                                          "description": "The agency's own fee on this policy. 0.00 when the quote stated none."
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "commission_rate",
                                        "commission",
                                        "agency_fee"
                                      ]
                                    }
                                  },
                                  "due_to_agency": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "Every commission plus every agency fee."
                                  },
                                  "due_to_billing_company": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "total minus due_to_agency."
                                  },
                                  "total": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "The total premium financed: every policy total, taxes, fees and agency fees included."
                                  }
                                },
                                "required": [
                                  "confirmed_at",
                                  "policies",
                                  "due_to_agency",
                                  "due_to_billing_company",
                                  "total"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The agency's commission and agency fee on each policy, and how the financed premium divides between the agency and the billing company. null until every policy has a commission rate. We record exactly what you state and infer nothing."
                          },
                          "cancellation": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "price_lapsed"
                                    ],
                                    "description": "price_lapsed: the quote behind the fixed price had expired (it was more than 30 days old) when the agreement was about to be sent. New values may be added. Additional values may be added.",
                                    "x-extensible-enum": true
                                  },
                                  "at": {
                                    "type": "string",
                                    "description": "When the application was canceled."
                                  }
                                },
                                "required": [
                                  "reason",
                                  "at"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Why and when the application was canceled. null unless status is canceled. A canceled application is closed for good: create a new quote to start again."
                          },
                          "insured": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "address": {
                                "type": "object",
                                "properties": {
                                  "line1": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "city": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "state": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "postal_code": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "line1",
                                  "city",
                                  "state",
                                  "postal_code"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "address"
                            ]
                          },
                          "broker": {
                            "type": "object",
                            "properties": {
                              "email": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "description": "The broker who owns the application."
                          },
                          "policies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "pol_… (22 characters on an application; a quote's policy ids are 8)."
                                },
                                "carrier": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "match": {
                                      "type": "string",
                                      "enum": [
                                        "matched",
                                        "pending"
                                      ],
                                      "description": "matched once the carrier is linked to our carrier records. Additional values may be added.",
                                      "x-extensible-enum": true
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "match"
                                  ]
                                },
                                "total": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^-?\\d+\\.\\d{2}$",
                                      "description": "US dollars, a decimal string with two decimal places."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Premium plus all taxes and fees; null when not known yet."
                                },
                                "effective_date": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "description": "A calendar date, YYYY-MM-DD."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "expiration_date": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "description": "A calendar date, YYYY-MM-DD."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "document_type": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "quote",
                                        "binder",
                                        "policy"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "policy_number": {
                                  "description": "null when missing, or when only a placeholder such as \"TBD\" is on file.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "carrier",
                                "total",
                                "effective_date",
                                "expiration_date",
                                "document_type",
                                "policy_number"
                              ]
                            }
                          },
                          "requirements": {
                            "type": "object",
                            "properties": {
                              "blocking": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "description": "Stable, machine-readable code. Branch on this, never on description."
                                    },
                                    "param": {
                                      "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "due_by": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "description": "A calendar date, YYYY-MM-DD."
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "param",
                                    "description",
                                    "due_by"
                                  ]
                                },
                                "description": "Must clear before the agreement can be sent. CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE are listed here early but do not hold the status back yet. Empty once the agreement is sent (except AGREEMENT_DECLINED)."
                              },
                              "outstanding": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "description": "Stable, machine-readable code. Branch on this, never on description."
                                    },
                                    "param": {
                                      "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "due_by": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "description": "A calendar date, YYYY-MM-DD."
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "param",
                                    "description",
                                    "due_by"
                                  ]
                                },
                                "description": "Owed after signing, by due_by. Never blocks the agreement."
                              }
                            },
                            "required": [
                              "blocking",
                              "outstanding"
                            ],
                            "description": "What's left on the deal. New codes may be added: show description for a code you don't know."
                          },
                          "portal_url": {
                            "type": "string",
                            "description": "Where the broker works on this application in the Bridgeline portal (requires a portal login)."
                          },
                          "client_reference_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "created_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "status",
                          "created_via",
                          "quote_id",
                          "accepted_option_id",
                          "pricing",
                          "price_guaranteed_until",
                          "straight_through",
                          "agreement",
                          "payout",
                          "cancellation",
                          "insured",
                          "broker",
                          "policies",
                          "requirements",
                          "portal_url",
                          "client_reference_id",
                          "metadata",
                          "created_at"
                        ],
                        "description": "A deal in progress toward a signed premium finance agreement and loan."
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "description": "Pass as starting_after for the next page; null on the last page.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more",
                    "next_cursor"
                  ],
                  "description": "A page of applications, newest first."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unable to serve the request (e.g. pricing inputs unavailable). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/applications/{id}": {
      "get": {
        "operationId": "getApplication",
        "summary": "Retrieve an application",
        "description": "Returns one application: its status, the terms the broker has priced, its policies and requirements (what is left before the agreement can be sent, and what is owed after signing). Computed fresh on every request. Applications created in the portal or by email are included; their quote_id is null.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "applications:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The application id (app_…)."
            },
            "description": "The application id (app_…)."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The application.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "app_…"
                    },
                    "object": {
                      "type": "string",
                      "const": "application"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "processing",
                        "requires_information",
                        "ready_for_agreement",
                        "awaiting_signature",
                        "pending_activation",
                        "active",
                        "canceled"
                      ],
                      "description": "processing, requires_information (an item in requirements.blocking holds the agreement back), ready_for_agreement, awaiting_signature (the agreement was sent), pending_activation (the borrower signed; the loan goes live once the down payment settles and the agreement is countersigned), active (final), canceled (final; cancellation says why). New values may be added: treat an unknown one as \"in progress\". Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "created_via": {
                      "type": "string",
                      "enum": [
                        "api",
                        "portal",
                        "email"
                      ],
                      "description": "api: accepted from a quote through the API. portal: created in the Bridgeline portal. email: created from an email to an intake address. Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "quote_id": {
                      "description": "The application's current quote (qte_…), or null when it has none.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accepted_option_id": {
                      "description": "The option chosen when the application was created from a quote (opt_…): accepted through POST /v1/quotes/{id}/accept, or picked with \"I'm interested\" on a partner's quote link. Null otherwise. A record of the choice, not a price lock.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pricing": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "option_id": {
                              "description": "opt_<down payment percent>_<term months>; null when the down payment is not a whole percent.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "down_payment_rate": {
                              "type": "number",
                              "description": "A fraction: 0.25 means 25%."
                            },
                            "term_months": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "apr": {
                              "type": "number",
                              "description": "A fraction: 0.25 means 25%."
                            },
                            "down_payment": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "amount_financed": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "monthly_payment": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "finance_charge": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "total_of_payments": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "total_cost": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "selected_by": {
                              "type": "string",
                              "enum": [
                                "broker",
                                "system"
                              ],
                              "description": "broker: the broker picked these terms in the portal. system: fixed without a broker choosing it: the option accepted through the API on a straight-through application, or our recommended option, which the broker kept. Additional values may be added.",
                              "x-extensible-enum": true
                            }
                          },
                          "required": [
                            "option_id",
                            "down_payment_rate",
                            "term_months",
                            "apr",
                            "down_payment",
                            "amount_financed",
                            "monthly_payment",
                            "finance_charge",
                            "total_of_payments",
                            "total_cost",
                            "selected_by"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The terms the broker has priced in the portal, which the agreement will carry; once the agreement is sent, its own terms. null until the application reaches pricing. total_of_payments is amount_financed + finance_charge, as on the agreement; total_cost is down_payment + total_of_payments."
                    },
                    "price_guaranteed_until": {
                      "description": "The accepted quote's price_guaranteed_until: 7 days after that quote was priced. null when the application was not accepted from a quote through the API.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "straight_through": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "route": {
                              "type": "string",
                              "enum": [
                                "straight_through",
                                "portal_path",
                                "managed_in_portal"
                              ],
                              "description": "straight_through: the price is fixed at the accepted option and the agreement can be sent through the API. portal_path: the broker reviews, prices and sends in the portal. managed_in_portal: the price was fixed, and an agent has since changed it in the portal; the API no longer sends this application. Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "reasons": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "param": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "description": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "param",
                                  "description"
                                ]
                              },
                              "description": "Why the deal is on the portal path. Empty on the other routes. New codes may be added."
                            }
                          },
                          "required": [
                            "route",
                            "reasons"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whether this application can go to the insured without a portal visit. null for an application that was not accepted with straight-through binding turned on."
                    },
                    "agreement": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "sent_at": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "sent_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The finance agreement, once it has been sent (by your broker or through the API). null before that. Bridgeline emails the signing request to the insured; the application's status says where it stands."
                    },
                    "payout": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "confirmed_at": {
                              "description": "When these figures were recorded for the agreement that was sent. null before an agreement is sent: the figures are then worked out from what is on each policy now.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "policies": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "The policy (pol_…), as in policies."
                                  },
                                  "commission_rate": {
                                    "type": "number",
                                    "description": "The agency's commission as a fraction of the policy's base premium: 0.125 means 12.5%."
                                  },
                                  "commission": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "Base premium times commission_rate, rounded half up to the cent."
                                  },
                                  "agency_fee": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "The agency's own fee on this policy. 0.00 when the quote stated none."
                                  }
                                },
                                "required": [
                                  "id",
                                  "commission_rate",
                                  "commission",
                                  "agency_fee"
                                ]
                              }
                            },
                            "due_to_agency": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "Every commission plus every agency fee."
                            },
                            "due_to_billing_company": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "total minus due_to_agency."
                            },
                            "total": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "The total premium financed: every policy total, taxes, fees and agency fees included."
                            }
                          },
                          "required": [
                            "confirmed_at",
                            "policies",
                            "due_to_agency",
                            "due_to_billing_company",
                            "total"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The agency's commission and agency fee on each policy, and how the financed premium divides between the agency and the billing company. null until every policy has a commission rate. We record exactly what you state and infer nothing."
                    },
                    "cancellation": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "reason": {
                              "type": "string",
                              "enum": [
                                "price_lapsed"
                              ],
                              "description": "price_lapsed: the quote behind the fixed price had expired (it was more than 30 days old) when the agreement was about to be sent. New values may be added. Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "at": {
                              "type": "string",
                              "description": "When the application was canceled."
                            }
                          },
                          "required": [
                            "reason",
                            "at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why and when the application was canceled. null unless status is canceled. A canceled application is closed for good: create a new quote to start again."
                    },
                    "insured": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "address": {
                          "type": "object",
                          "properties": {
                            "line1": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "city": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "state": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "line1",
                            "city",
                            "state",
                            "postal_code"
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "address"
                      ]
                    },
                    "broker": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "email"
                      ],
                      "description": "The broker who owns the application."
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "pol_… (22 characters on an application; a quote's policy ids are 8)."
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "match": {
                                "type": "string",
                                "enum": [
                                  "matched",
                                  "pending"
                                ],
                                "description": "matched once the carrier is linked to our carrier records. Additional values may be added.",
                                "x-extensible-enum": true
                              }
                            },
                            "required": [
                              "name",
                              "match"
                            ]
                          },
                          "total": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Premium plus all taxes and fees; null when not known yet."
                          },
                          "effective_date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "A calendar date, YYYY-MM-DD."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expiration_date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "A calendar date, YYYY-MM-DD."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "document_type": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "quote",
                                  "binder",
                                  "policy"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "policy_number": {
                            "description": "null when missing, or when only a placeholder such as \"TBD\" is on file.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "carrier",
                          "total",
                          "effective_date",
                          "expiration_date",
                          "document_type",
                          "policy_number"
                        ]
                      }
                    },
                    "requirements": {
                      "type": "object",
                      "properties": {
                        "blocking": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Stable, machine-readable code. Branch on this, never on description."
                              },
                              "param": {
                                "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "due_by": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A calendar date, YYYY-MM-DD."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "description",
                              "due_by"
                            ]
                          },
                          "description": "Must clear before the agreement can be sent. CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE are listed here early but do not hold the status back yet. Empty once the agreement is sent (except AGREEMENT_DECLINED)."
                        },
                        "outstanding": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Stable, machine-readable code. Branch on this, never on description."
                              },
                              "param": {
                                "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "due_by": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A calendar date, YYYY-MM-DD."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "description",
                              "due_by"
                            ]
                          },
                          "description": "Owed after signing, by due_by. Never blocks the agreement."
                        }
                      },
                      "required": [
                        "blocking",
                        "outstanding"
                      ],
                      "description": "What's left on the deal. New codes may be added: show description for a code you don't know."
                    },
                    "portal_url": {
                      "type": "string",
                      "description": "Where the broker works on this application in the Bridgeline portal (requires a portal login)."
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "created_via",
                    "quote_id",
                    "accepted_option_id",
                    "pricing",
                    "price_guaranteed_until",
                    "straight_through",
                    "agreement",
                    "payout",
                    "cancellation",
                    "insured",
                    "broker",
                    "policies",
                    "requirements",
                    "portal_url",
                    "client_reference_id",
                    "metadata",
                    "created_at"
                  ],
                  "description": "A deal in progress toward a signed premium finance agreement and loan."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for other agencies' ids).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unable to serve the request (e.g. pricing inputs unavailable). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/applications/{id}/send": {
      "post": {
        "operationId": "sendApplication",
        "summary": "Send the agreement",
        "description": "Sends the finance agreement to the insured's signer for an application whose price was fixed when its quote was accepted. Bridgeline emails the signing request to the insured. An application has one agreement: calling again returns the same one. Before anything is sent we check that the price is still good and that nothing on the deal needs a person first; a 409 says which. If the price is no longer good the application is canceled and stays closed. Every policy needs a commission rate: send it in policies, or rely on the one given when the quote was accepted. Corrections to the phone or the signer are saved only when the agreement is sent, and are ignored once one is out, as are commission rates. Live keys only, and only for agencies Bridgeline has turned straight-through binding on for.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "applications:write",
          "agreements:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The application id (app_…)."
            },
            "description": "The application id (app_…)."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Retrying with the same key and body within 24h replays the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "insured_phone": {
                    "description": "The insured's phone, when the application has none or it needs correcting. A US number (ten digits, area code first), with an optional extension: \"713-555-0142 x204\". An agreement can't be sent without one.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "signer": {
                    "description": "Who signs for the insured, when it needs correcting. Replaces the signer named at accept, and is where the agreement is emailed.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "first_name": {
                            "description": "First name of the person who will sign for the insured. 1 to 100 characters after trimming, in characters the financing agreement can print (Latin letters, accents included).",
                            "minLength": 1,
                            "maxLength": 100,
                            "type": "string"
                          },
                          "last_name": {
                            "description": "Their last name. The same rules as first_name.",
                            "minLength": 1,
                            "maxLength": 100,
                            "type": "string"
                          },
                          "email": {
                            "type": "string",
                            "maxLength": 254,
                            "format": "email",
                            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                            "description": "Where the financing agreement is sent for signature. Stored on the application; not returned by the API."
                          }
                        },
                        "required": [
                          "first_name",
                          "last_name",
                          "email"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "policies": {
                    "description": "Each policy's commission, one entry per policy in the order the quote lists its policies. Use {} for a policy you are not stating a rate for. The number of entries must equal the number of policies.",
                    "anyOf": [
                      {
                        "minItems": 1,
                        "maxItems": 25,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "commission_rate": {
                              "description": "The agency's commission on this policy, as a fraction of its base premium: 0.125 means 12.5%. From 0 to below 1, with at most 4 decimal places. 0 is allowed. null or omitted: nothing is stated for this policy in this call.",
                              "minimum": 0,
                              "exclusiveMaximum": 1,
                              "type": [
                                "number",
                                "null"
                              ]
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The application, with its agreement sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "app_…"
                    },
                    "object": {
                      "type": "string",
                      "const": "application"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "processing",
                        "requires_information",
                        "ready_for_agreement",
                        "awaiting_signature",
                        "pending_activation",
                        "active",
                        "canceled"
                      ],
                      "description": "processing, requires_information (an item in requirements.blocking holds the agreement back), ready_for_agreement, awaiting_signature (the agreement was sent), pending_activation (the borrower signed; the loan goes live once the down payment settles and the agreement is countersigned), active (final), canceled (final; cancellation says why). New values may be added: treat an unknown one as \"in progress\". Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "created_via": {
                      "type": "string",
                      "enum": [
                        "api",
                        "portal",
                        "email"
                      ],
                      "description": "api: accepted from a quote through the API. portal: created in the Bridgeline portal. email: created from an email to an intake address. Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "quote_id": {
                      "description": "The application's current quote (qte_…), or null when it has none.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accepted_option_id": {
                      "description": "The option chosen when the application was created from a quote (opt_…): accepted through POST /v1/quotes/{id}/accept, or picked with \"I'm interested\" on a partner's quote link. Null otherwise. A record of the choice, not a price lock.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pricing": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "option_id": {
                              "description": "opt_<down payment percent>_<term months>; null when the down payment is not a whole percent.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "down_payment_rate": {
                              "type": "number",
                              "description": "A fraction: 0.25 means 25%."
                            },
                            "term_months": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "apr": {
                              "type": "number",
                              "description": "A fraction: 0.25 means 25%."
                            },
                            "down_payment": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "amount_financed": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "monthly_payment": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "finance_charge": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "total_of_payments": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "total_cost": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "selected_by": {
                              "type": "string",
                              "enum": [
                                "broker",
                                "system"
                              ],
                              "description": "broker: the broker picked these terms in the portal. system: fixed without a broker choosing it: the option accepted through the API on a straight-through application, or our recommended option, which the broker kept. Additional values may be added.",
                              "x-extensible-enum": true
                            }
                          },
                          "required": [
                            "option_id",
                            "down_payment_rate",
                            "term_months",
                            "apr",
                            "down_payment",
                            "amount_financed",
                            "monthly_payment",
                            "finance_charge",
                            "total_of_payments",
                            "total_cost",
                            "selected_by"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The terms the broker has priced in the portal, which the agreement will carry; once the agreement is sent, its own terms. null until the application reaches pricing. total_of_payments is amount_financed + finance_charge, as on the agreement; total_cost is down_payment + total_of_payments."
                    },
                    "price_guaranteed_until": {
                      "description": "The accepted quote's price_guaranteed_until: 7 days after that quote was priced. null when the application was not accepted from a quote through the API.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "straight_through": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "route": {
                              "type": "string",
                              "enum": [
                                "straight_through",
                                "portal_path",
                                "managed_in_portal"
                              ],
                              "description": "straight_through: the price is fixed at the accepted option and the agreement can be sent through the API. portal_path: the broker reviews, prices and sends in the portal. managed_in_portal: the price was fixed, and an agent has since changed it in the portal; the API no longer sends this application. Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "reasons": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "param": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "description": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "param",
                                  "description"
                                ]
                              },
                              "description": "Why the deal is on the portal path. Empty on the other routes. New codes may be added."
                            }
                          },
                          "required": [
                            "route",
                            "reasons"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whether this application can go to the insured without a portal visit. null for an application that was not accepted with straight-through binding turned on."
                    },
                    "agreement": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "sent_at": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "sent_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The finance agreement, once it has been sent (by your broker or through the API). null before that. Bridgeline emails the signing request to the insured; the application's status says where it stands."
                    },
                    "payout": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "confirmed_at": {
                              "description": "When these figures were recorded for the agreement that was sent. null before an agreement is sent: the figures are then worked out from what is on each policy now.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "policies": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "The policy (pol_…), as in policies."
                                  },
                                  "commission_rate": {
                                    "type": "number",
                                    "description": "The agency's commission as a fraction of the policy's base premium: 0.125 means 12.5%."
                                  },
                                  "commission": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "Base premium times commission_rate, rounded half up to the cent."
                                  },
                                  "agency_fee": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "The agency's own fee on this policy. 0.00 when the quote stated none."
                                  }
                                },
                                "required": [
                                  "id",
                                  "commission_rate",
                                  "commission",
                                  "agency_fee"
                                ]
                              }
                            },
                            "due_to_agency": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "Every commission plus every agency fee."
                            },
                            "due_to_billing_company": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "total minus due_to_agency."
                            },
                            "total": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "The total premium financed: every policy total, taxes, fees and agency fees included."
                            }
                          },
                          "required": [
                            "confirmed_at",
                            "policies",
                            "due_to_agency",
                            "due_to_billing_company",
                            "total"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The agency's commission and agency fee on each policy, and how the financed premium divides between the agency and the billing company. null until every policy has a commission rate. We record exactly what you state and infer nothing."
                    },
                    "cancellation": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "reason": {
                              "type": "string",
                              "enum": [
                                "price_lapsed"
                              ],
                              "description": "price_lapsed: the quote behind the fixed price had expired (it was more than 30 days old) when the agreement was about to be sent. New values may be added. Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "at": {
                              "type": "string",
                              "description": "When the application was canceled."
                            }
                          },
                          "required": [
                            "reason",
                            "at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why and when the application was canceled. null unless status is canceled. A canceled application is closed for good: create a new quote to start again."
                    },
                    "insured": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "address": {
                          "type": "object",
                          "properties": {
                            "line1": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "city": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "state": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "line1",
                            "city",
                            "state",
                            "postal_code"
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "address"
                      ]
                    },
                    "broker": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "email"
                      ],
                      "description": "The broker who owns the application."
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "pol_… (22 characters on an application; a quote's policy ids are 8)."
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "match": {
                                "type": "string",
                                "enum": [
                                  "matched",
                                  "pending"
                                ],
                                "description": "matched once the carrier is linked to our carrier records. Additional values may be added.",
                                "x-extensible-enum": true
                              }
                            },
                            "required": [
                              "name",
                              "match"
                            ]
                          },
                          "total": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Premium plus all taxes and fees; null when not known yet."
                          },
                          "effective_date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "A calendar date, YYYY-MM-DD."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expiration_date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "A calendar date, YYYY-MM-DD."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "document_type": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "quote",
                                  "binder",
                                  "policy"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "policy_number": {
                            "description": "null when missing, or when only a placeholder such as \"TBD\" is on file.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "carrier",
                          "total",
                          "effective_date",
                          "expiration_date",
                          "document_type",
                          "policy_number"
                        ]
                      }
                    },
                    "requirements": {
                      "type": "object",
                      "properties": {
                        "blocking": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Stable, machine-readable code. Branch on this, never on description."
                              },
                              "param": {
                                "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "due_by": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A calendar date, YYYY-MM-DD."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "description",
                              "due_by"
                            ]
                          },
                          "description": "Must clear before the agreement can be sent. CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE are listed here early but do not hold the status back yet. Empty once the agreement is sent (except AGREEMENT_DECLINED)."
                        },
                        "outstanding": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Stable, machine-readable code. Branch on this, never on description."
                              },
                              "param": {
                                "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "due_by": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A calendar date, YYYY-MM-DD."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "description",
                              "due_by"
                            ]
                          },
                          "description": "Owed after signing, by due_by. Never blocks the agreement."
                        }
                      },
                      "required": [
                        "blocking",
                        "outstanding"
                      ],
                      "description": "What's left on the deal. New codes may be added: show description for a code you don't know."
                    },
                    "portal_url": {
                      "type": "string",
                      "description": "Where the broker works on this application in the Bridgeline portal (requires a portal login)."
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "created_via",
                    "quote_id",
                    "accepted_option_id",
                    "pricing",
                    "price_guaranteed_until",
                    "straight_through",
                    "agreement",
                    "payout",
                    "cancellation",
                    "insured",
                    "broker",
                    "policies",
                    "requirements",
                    "portal_url",
                    "client_reference_id",
                    "metadata",
                    "created_at"
                  ],
                  "description": "A deal in progress toward a signed premium finance agreement and loan."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active. STRAIGHT_THROUGH_NOT_ENABLED: sending agreements through the API (which also needs accepting quotes) is not turned on for this agency, or the key is a test key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for other agencies' ids).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request, or still in flight. APPLICATION_NOT_SENDABLE: something is needed before the agreement can be sent (details lists every reason). APPLICATION_PRICE_LAPSED: the price fixed at accept is no longer good (see details); nothing was sent. When the detail is EXPIRED the application is now canceled. APPLICATION_CANCELED: the application was canceled earlier and is closed (its cancellation field says why). APPLICATION_MANAGED_IN_PORTAL: an agent changed the price in the portal; the agreement is sent, and withdrawn, from there.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unable to serve the request (e.g. pricing inputs unavailable). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/applications/{id}/void": {
      "post": {
        "operationId": "voidApplication",
        "summary": "Void the agreement",
        "description": "Withdraws an agreement that was sent through the API, while nobody has signed it. The signing request stops working, the application goes back to ready_for_agreement at the same price, and you can send again with a corrected phone or signer. We check the live signing state first: once anyone has signed, the answer is 409 AGREEMENT_ALREADY_SIGNED. An application can have at most 3 agreements voided. The request has no body. Live keys only, and only for agencies Bridgeline has turned straight-through binding on for.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "agreements:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The application id (app_…)."
            },
            "description": "The application id (app_…)."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Retrying with the same key and body within 24h replays the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The application, ready for a new agreement (or still canceled, if it had been canceled).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "app_…"
                    },
                    "object": {
                      "type": "string",
                      "const": "application"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "processing",
                        "requires_information",
                        "ready_for_agreement",
                        "awaiting_signature",
                        "pending_activation",
                        "active",
                        "canceled"
                      ],
                      "description": "processing, requires_information (an item in requirements.blocking holds the agreement back), ready_for_agreement, awaiting_signature (the agreement was sent), pending_activation (the borrower signed; the loan goes live once the down payment settles and the agreement is countersigned), active (final), canceled (final; cancellation says why). New values may be added: treat an unknown one as \"in progress\". Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "created_via": {
                      "type": "string",
                      "enum": [
                        "api",
                        "portal",
                        "email"
                      ],
                      "description": "api: accepted from a quote through the API. portal: created in the Bridgeline portal. email: created from an email to an intake address. Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "quote_id": {
                      "description": "The application's current quote (qte_…), or null when it has none.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accepted_option_id": {
                      "description": "The option chosen when the application was created from a quote (opt_…): accepted through POST /v1/quotes/{id}/accept, or picked with \"I'm interested\" on a partner's quote link. Null otherwise. A record of the choice, not a price lock.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pricing": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "option_id": {
                              "description": "opt_<down payment percent>_<term months>; null when the down payment is not a whole percent.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "down_payment_rate": {
                              "type": "number",
                              "description": "A fraction: 0.25 means 25%."
                            },
                            "term_months": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "apr": {
                              "type": "number",
                              "description": "A fraction: 0.25 means 25%."
                            },
                            "down_payment": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "amount_financed": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "monthly_payment": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "finance_charge": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "total_of_payments": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "total_cost": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "US dollars, a decimal string with two decimal places."
                            },
                            "selected_by": {
                              "type": "string",
                              "enum": [
                                "broker",
                                "system"
                              ],
                              "description": "broker: the broker picked these terms in the portal. system: fixed without a broker choosing it: the option accepted through the API on a straight-through application, or our recommended option, which the broker kept. Additional values may be added.",
                              "x-extensible-enum": true
                            }
                          },
                          "required": [
                            "option_id",
                            "down_payment_rate",
                            "term_months",
                            "apr",
                            "down_payment",
                            "amount_financed",
                            "monthly_payment",
                            "finance_charge",
                            "total_of_payments",
                            "total_cost",
                            "selected_by"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The terms the broker has priced in the portal, which the agreement will carry; once the agreement is sent, its own terms. null until the application reaches pricing. total_of_payments is amount_financed + finance_charge, as on the agreement; total_cost is down_payment + total_of_payments."
                    },
                    "price_guaranteed_until": {
                      "description": "The accepted quote's price_guaranteed_until: 7 days after that quote was priced. null when the application was not accepted from a quote through the API.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "straight_through": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "route": {
                              "type": "string",
                              "enum": [
                                "straight_through",
                                "portal_path",
                                "managed_in_portal"
                              ],
                              "description": "straight_through: the price is fixed at the accepted option and the agreement can be sent through the API. portal_path: the broker reviews, prices and sends in the portal. managed_in_portal: the price was fixed, and an agent has since changed it in the portal; the API no longer sends this application. Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "reasons": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "param": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "description": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "param",
                                  "description"
                                ]
                              },
                              "description": "Why the deal is on the portal path. Empty on the other routes. New codes may be added."
                            }
                          },
                          "required": [
                            "route",
                            "reasons"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Whether this application can go to the insured without a portal visit. null for an application that was not accepted with straight-through binding turned on."
                    },
                    "agreement": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "sent_at": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "sent_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The finance agreement, once it has been sent (by your broker or through the API). null before that. Bridgeline emails the signing request to the insured; the application's status says where it stands."
                    },
                    "payout": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "confirmed_at": {
                              "description": "When these figures were recorded for the agreement that was sent. null before an agreement is sent: the figures are then worked out from what is on each policy now.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "policies": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "The policy (pol_…), as in policies."
                                  },
                                  "commission_rate": {
                                    "type": "number",
                                    "description": "The agency's commission as a fraction of the policy's base premium: 0.125 means 12.5%."
                                  },
                                  "commission": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "Base premium times commission_rate, rounded half up to the cent."
                                  },
                                  "agency_fee": {
                                    "type": "string",
                                    "pattern": "^-?\\d+\\.\\d{2}$",
                                    "description": "The agency's own fee on this policy. 0.00 when the quote stated none."
                                  }
                                },
                                "required": [
                                  "id",
                                  "commission_rate",
                                  "commission",
                                  "agency_fee"
                                ]
                              }
                            },
                            "due_to_agency": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "Every commission plus every agency fee."
                            },
                            "due_to_billing_company": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "total minus due_to_agency."
                            },
                            "total": {
                              "type": "string",
                              "pattern": "^-?\\d+\\.\\d{2}$",
                              "description": "The total premium financed: every policy total, taxes, fees and agency fees included."
                            }
                          },
                          "required": [
                            "confirmed_at",
                            "policies",
                            "due_to_agency",
                            "due_to_billing_company",
                            "total"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The agency's commission and agency fee on each policy, and how the financed premium divides between the agency and the billing company. null until every policy has a commission rate. We record exactly what you state and infer nothing."
                    },
                    "cancellation": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "reason": {
                              "type": "string",
                              "enum": [
                                "price_lapsed"
                              ],
                              "description": "price_lapsed: the quote behind the fixed price had expired (it was more than 30 days old) when the agreement was about to be sent. New values may be added. Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "at": {
                              "type": "string",
                              "description": "When the application was canceled."
                            }
                          },
                          "required": [
                            "reason",
                            "at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why and when the application was canceled. null unless status is canceled. A canceled application is closed for good: create a new quote to start again."
                    },
                    "insured": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "address": {
                          "type": "object",
                          "properties": {
                            "line1": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "city": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "state": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "line1",
                            "city",
                            "state",
                            "postal_code"
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "address"
                      ]
                    },
                    "broker": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "email"
                      ],
                      "description": "The broker who owns the application."
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "pol_… (22 characters on an application; a quote's policy ids are 8)."
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "match": {
                                "type": "string",
                                "enum": [
                                  "matched",
                                  "pending"
                                ],
                                "description": "matched once the carrier is linked to our carrier records. Additional values may be added.",
                                "x-extensible-enum": true
                              }
                            },
                            "required": [
                              "name",
                              "match"
                            ]
                          },
                          "total": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Premium plus all taxes and fees; null when not known yet."
                          },
                          "effective_date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "A calendar date, YYYY-MM-DD."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expiration_date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "A calendar date, YYYY-MM-DD."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "document_type": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "quote",
                                  "binder",
                                  "policy"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "policy_number": {
                            "description": "null when missing, or when only a placeholder such as \"TBD\" is on file.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "carrier",
                          "total",
                          "effective_date",
                          "expiration_date",
                          "document_type",
                          "policy_number"
                        ]
                      }
                    },
                    "requirements": {
                      "type": "object",
                      "properties": {
                        "blocking": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Stable, machine-readable code. Branch on this, never on description."
                              },
                              "param": {
                                "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "due_by": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A calendar date, YYYY-MM-DD."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "description",
                              "due_by"
                            ]
                          },
                          "description": "Must clear before the agreement can be sent. CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE are listed here early but do not hold the status back yet. Empty once the agreement is sent (except AGREEMENT_DECLINED)."
                        },
                        "outstanding": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Stable, machine-readable code. Branch on this, never on description."
                              },
                              "param": {
                                "description": "Where the fix goes, e.g. policies[pol_…].policy_number, insured.address, signer.borrower or pricing; null when no single field applies.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "due_by": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "A calendar date, YYYY-MM-DD."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The date an outstanding policy number or document is owed by: 30 days after the agreement is executed (the carrier notice deadline); null before execution. Always null for blocking items, and for CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE, which have no deadline of their own."
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "description",
                              "due_by"
                            ]
                          },
                          "description": "Owed after signing, by due_by. Never blocks the agreement."
                        }
                      },
                      "required": [
                        "blocking",
                        "outstanding"
                      ],
                      "description": "What's left on the deal. New codes may be added: show description for a code you don't know."
                    },
                    "portal_url": {
                      "type": "string",
                      "description": "Where the broker works on this application in the Bridgeline portal (requires a portal login)."
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "created_via",
                    "quote_id",
                    "accepted_option_id",
                    "pricing",
                    "price_guaranteed_until",
                    "straight_through",
                    "agreement",
                    "payout",
                    "cancellation",
                    "insured",
                    "broker",
                    "policies",
                    "requirements",
                    "portal_url",
                    "client_reference_id",
                    "metadata",
                    "created_at"
                  ],
                  "description": "A deal in progress toward a signed premium finance agreement and loan."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active. STRAIGHT_THROUGH_NOT_ENABLED: sending agreements through the API (which also needs accepting quotes) is not turned on for this agency, or the key is a test key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for other agencies' ids).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request, or still in flight. APPLICATION_CANCELED: the application was canceled earlier and is closed (its cancellation field says why). APPLICATION_MANAGED_IN_PORTAL: an agent changed the price in the portal; the agreement is sent, and withdrawn, from there. AGREEMENT_ALREADY_SIGNED: a party has signed the agreement; it can no longer be voided. AGREEMENT_NOT_VOIDABLE: there is no sent agreement to void (see details).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unable to serve the request (e.g. pricing inputs unavailable). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/coverage-types": {
      "get": {
        "operationId": "listCoverageTypes",
        "summary": "List coverage types",
        "description": "Every value coverages[].type accepts, with its definition, common aliases and flags. Requires no scope.",
        "tags": [
          "Reference"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [],
        "parameters": [
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The coverage-type catalogue.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "general_liability",
                              "liquor_liability",
                              "umbrella_excess",
                              "pollution_environmental",
                              "abuse_molestation",
                              "commercial_property",
                              "windstorm",
                              "builders_risk",
                              "equipment_breakdown",
                              "inland_marine",
                              "flood",
                              "commercial_auto",
                              "motor_truck_cargo",
                              "ocean_marine",
                              "aviation",
                              "workers_compensation",
                              "occupational_accident",
                              "professional_liability",
                              "directors_officers",
                              "employment_practices",
                              "fiduciary_liability",
                              "crime",
                              "cyber",
                              "farm",
                              "surety_bond",
                              "other"
                            ],
                            "description": "Additional values may be added.",
                            "x-extensible-enum": true
                          },
                          "name": {
                            "type": "string"
                          },
                          "definition": {
                            "type": "string"
                          },
                          "aliases": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Common names for this line, e.g. on binders and dec pages."
                          },
                          "flags": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "verify_minimum_earned",
                                "review",
                                "not_financeable"
                              ],
                              "description": "Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "description": "verify_minimum_earned: often fully earned or seasonal; priced, with a warning. review: priced, flagged for broker review. not_financeable: accepted, but the quote comes back ineligible."
                          }
                        },
                        "required": [
                          "type",
                          "name",
                          "definition",
                          "aliases",
                          "flags"
                        ]
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "description": "Every coverage type. We may add types; treat an unknown value as other."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/test_helpers/quotes/{id}/interest": {
      "post": {
        "operationId": "testHelperQuoteInterest",
        "summary": "Simulate the insured saying they are interested (test mode)",
        "description": "Test-mode keys only. Does what the insured's \"I'm interested\" on the hosted page does: the quote becomes interested with this option and note. Nothing is emailed or posted anywhere; interest.broker_notification is skipped with reason test_mode. One time per quote, like the hosted page. A live key gets 403 TEST_MODE_ONLY.",
        "tags": [
          "Test helpers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The test-mode quote id (qte_…)."
            },
            "description": "The test-mode quote id (qte_…)."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retrying with the same key and body within 24h replays the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "option_id": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "The option the insured picks (opt_…), one of the quote's options."
                  },
                  "note": {
                    "description": "An optional note from the insured, at most 500 characters after trimming.",
                    "type": "string"
                  }
                },
                "required": [
                  "option_id"
                ],
                "additionalProperties": false,
                "description": "The simulated insured response."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The quote, now interested.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "qte_…"
                    },
                    "object": {
                      "type": "string",
                      "const": "quote"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "interested",
                        "expired",
                        "accepted"
                      ],
                      "description": "accepted once the quote has become an application (it wins over every other value); otherwise interested once the insured responds, expired once past expires_at, else active. Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "application_id": {
                      "description": "The application this quote became (app_…); null until it is accepted.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accepted_at": {
                      "description": "When the quote was accepted; null until then.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "broker": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "email"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "price_guaranteed_until": {
                      "description": "7 days after the quote was priced; null when the quote has no priced options. Up to this time our price check treats the quoted price as still good unless the benchmark rate (SOFR) has moved by more than 0.50 percentage points; from then until expires_at, only if recalculating the deal gives the same numbers. Derived from the stored quote, so it never changes. The quote itself stays indicative: see Indicative quotes.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "hosted_url": {
                      "description": "Returned when the quote is created; null when retrieved.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "selected_option_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "interest": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "option_id": {
                              "type": "string",
                              "description": "The option the insured picked (opt_…); the same as selected_option_id."
                            },
                            "note": {
                              "description": "The insured's optional note to the broker (at most 500 characters); null when left blank. Untrusted text typed on a public page: escape it before rendering.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "submitted_at": {
                              "type": "string",
                              "description": "When the insured tapped I'm interested."
                            },
                            "broker_notification": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "sent",
                                    "skipped",
                                    "failed"
                                  ],
                                  "description": "pending until we have tried to email the agency; then sent, skipped (nothing was sent; see reason) or failed. Additional values may be added.",
                                  "x-extensible-enum": true
                                },
                                "reason": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "demo_agency",
                                        "test_mode",
                                        "no_recipient",
                                        "email_disabled",
                                        "send_failed"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Why nothing was sent; null when pending or sent. demo_agency: a demo agency, where we email only internal Bridgeline addresses, and none applied. test_mode: a test-mode (bl_test_) quote, which never emails anyone. no_recipient: the agency has no active broker or admin to email. email_disabled: email delivery is switched off in this environment. send_failed: the email could not be sent, and Bridgeline ops were alerted."
                                },
                                "recipient": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "broker",
                                        "agency_admins"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Who we emailed: the quote's broker, or the agency's admins when that broker is no longer active. null when nobody was chosen."
                                },
                                "recipients": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "The agency staff email addresses the notification was actually sent to. Empty for a broker-scoped key when the email went to the agency's admins."
                                },
                                "at": {
                                  "description": "When the outcome was recorded; null while pending.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "reason",
                                "recipient",
                                "recipients",
                                "at"
                              ],
                              "description": "Whether we emailed the agency about this interest."
                            }
                          },
                          "required": [
                            "option_id",
                            "note",
                            "submitted_at",
                            "broker_notification"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The insured's response on the hosted page; null unless status is interested. This object is also the payload the Phase 3 quote.interest_expressed webhook will reuse."
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "premium": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "taxes_and_fees": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places. The sum of every taxes_and_fees item. The agency fee is not in it."
                        },
                        "agency_fee": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places. The sum of the policies' agency_fee; 0.00 when none was stated. premium + taxes_and_fees + agency_fee = total."
                        },
                        "total": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "weighted_minimum_earned_rate": {
                          "type": "number",
                          "description": "A fraction: 0.25 means 25%."
                        },
                        "financing_start_date": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "premium",
                        "taxes_and_fees",
                        "agency_fee",
                        "total",
                        "weighted_minimum_earned_rate",
                        "financing_start_date"
                      ]
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "Premium plus all taxes and fees, and the agency fee when one was sent."
                          },
                          "minimum_earned": {
                            "type": "object",
                            "properties": {
                              "rate": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "A fraction: 0.25 means 25%."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The minimum earned rate we used."
                              }
                            },
                            "required": [
                              "rate"
                            ]
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "am_best": {
                                "type": "object",
                                "properties": {
                                  "rating": {
                                    "type": "string"
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "am_best",
                                      "broker",
                                      "document",
                                      "assumed"
                                    ],
                                    "description": "Additional values may be added.",
                                    "x-extensible-enum": true
                                  }
                                },
                                "required": [
                                  "rating",
                                  "source"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "am_best"
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "total",
                          "minimum_earned",
                          "carrier",
                          "metadata"
                        ]
                      }
                    },
                    "eligibility": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "eligible",
                            "ineligible"
                          ],
                          "description": "Additional values may be added.",
                          "x-extensible-enum": true
                        },
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "passed": {
                                "type": "boolean"
                              },
                              "limit": {
                                "type": "string"
                              },
                              "actual": {
                                "type": "string"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "partially_assumed"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              "param": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "passed"
                            ]
                          }
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          },
                          "description": "Why the deal is ineligible; empty when eligible."
                        }
                      },
                      "required": [
                        "status",
                        "checks",
                        "reasons"
                      ]
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "binding_readiness": {
                      "type": "object",
                      "properties": {
                        "ready": {
                          "type": "boolean"
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          }
                        }
                      },
                      "required": [
                        "ready",
                        "issues"
                      ]
                    },
                    "recommended_option_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "opt_<down payment percent>_<term months>, e.g. opt_25_10."
                          },
                          "down_payment_rate": {
                            "type": "number",
                            "description": "A fraction: 0.25 means 25%."
                          },
                          "term_months": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "apr": {
                            "type": "number",
                            "description": "A fraction: 0.25 means 25%."
                          },
                          "down_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "amount_financed": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "monthly_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "finance_charge": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "total_of_payments": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. amount_financed + finance_charge, exactly: the same figure the finance agreement prints as its total of payments."
                          },
                          "total_cost": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. down_payment + total_of_payments, exactly."
                          },
                          "spread_clamped": {
                            "type": "boolean",
                            "description": "True when the agency's spread was reduced to keep this option under the APR limit."
                          }
                        },
                        "required": [
                          "id",
                          "down_payment_rate",
                          "term_months",
                          "apr",
                          "down_payment",
                          "amount_financed",
                          "monthly_payment",
                          "finance_charge",
                          "total_of_payments",
                          "total_cost",
                          "spread_clamped"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "application_id",
                    "accepted_at",
                    "client_reference_id",
                    "metadata",
                    "broker",
                    "created_at",
                    "expires_at",
                    "price_guaranteed_until",
                    "hosted_url",
                    "selected_option_id",
                    "interest",
                    "totals",
                    "policies",
                    "eligibility",
                    "assumptions",
                    "warnings",
                    "binding_readiness",
                    "recommended_option_id",
                    "options"
                  ],
                  "description": "An indicative quote: a stored snapshot, not a price lock."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing scope, or the acting broker is not active. TEST_MODE_ONLY: this endpoint takes test-mode (bl_test_) keys only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for other agencies' ids).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request, or still in flight. QUOTE_EXPIRED: the quote has expired. QUOTE_ALREADY_INTERESTED: the insured has already responded to this quote. QUOTE_ALREADY_ACCEPTED: the quote already became an application. QUOTE_NOT_ACCEPTABLE: the quote can never be accepted (see details); create a new quote.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/whoami": {
      "get": {
        "operationId": "getPartnerWhoami",
        "summary": "Introspect the calling partner API key",
        "description": "Returns the partner the key acts as, its scopes and its mode. A partner key acts as the partner organisation: there is no agency and no broker behind it. Requires no scope; use it to verify a key.",
        "tags": [
          "Partners"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [],
        "parameters": [
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The principal summary.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "partner_whoami"
                    },
                    "livemode": {
                      "type": "boolean",
                      "description": "false for bl_test_ keys."
                    },
                    "partner": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ]
                    },
                    "api_key": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "partner"
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "type",
                        "scopes"
                      ]
                    },
                    "api_version": {
                      "type": "string",
                      "description": "The API version this key is pinned to: the version that was current when the key was created. A request without a Bridgeline-Version header runs at it. A request with the header runs at the header's version, which the Bridgeline-Version response header echoes; this field stays the key's."
                    }
                  },
                  "required": [
                    "object",
                    "livemode",
                    "partner",
                    "api_key",
                    "api_version"
                  ],
                  "description": "Who the calling partner API key acts as."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this partner (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED) or a missing scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/quotes": {
      "post": {
        "operationId": "createPartnerQuote",
        "summary": "Create a partner quote",
        "description": "Prices one or more policies financed together as one loan and returns every down payment × term option we can offer, at the agency's cost (price_basis \"agency_cost\"): the price before the agency that takes the quote adds its own compensation. The quote belongs to your partner account; no agency is attached and no link is returned. A deal we cannot finance still returns 201, with eligibility.status \"ineligible\", its reasons and no options; 422 is only for malformed input. A deal we can finance is never priced without your account's pricing settings: if they cannot be read, the request is refused with 503 and nothing is stored.",
        "tags": [
          "Partners"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retrying with the same key and body within 24h replays the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "insured": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dba": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fein": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "address": {
                        "type": "object",
                        "properties": {
                          "line1": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "line2": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "city": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "AL",
                              "AK",
                              "AZ",
                              "AR",
                              "CA",
                              "CO",
                              "CT",
                              "DE",
                              "FL",
                              "GA",
                              "HI",
                              "ID",
                              "IL",
                              "IN",
                              "IA",
                              "KS",
                              "KY",
                              "LA",
                              "ME",
                              "MD",
                              "MA",
                              "MI",
                              "MN",
                              "MS",
                              "MO",
                              "MT",
                              "NE",
                              "NV",
                              "NH",
                              "NJ",
                              "NM",
                              "NY",
                              "NC",
                              "ND",
                              "OH",
                              "OK",
                              "OR",
                              "PA",
                              "RI",
                              "SC",
                              "SD",
                              "TN",
                              "TX",
                              "UT",
                              "VT",
                              "VA",
                              "WA",
                              "WV",
                              "WI",
                              "WY",
                              "DC",
                              "PR",
                              "GU",
                              "VI",
                              "AS",
                              "MP"
                            ],
                            "description": "Two-letter USPS state code (e.g. `TX`)",
                            "examples": [
                              "TX"
                            ]
                          },
                          "postal_code": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "state"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "name",
                      "address"
                    ],
                    "additionalProperties": false
                  },
                  "policies": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "premium": {
                          "type": "string",
                          "pattern": "^\\d+(\\.\\d{1,2})?$"
                        },
                        "taxes_and_fees": {
                          "anyOf": [
                            {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "description": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "amount": {
                                    "type": "string",
                                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                                  },
                                  "earned": {
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "amount"
                                ],
                                "additionalProperties": false
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "minimum_earned": {
                          "type": "object",
                          "properties": {
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "amount": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d+(\\.\\d{1,2})?$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "effective_date": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "expiration_date": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "carrier": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "maxLength": 500
                            },
                            "naic_code": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "am_best_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "mga": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "coverages": {
                          "minItems": 1,
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "maxLength": 500
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "auditable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "document_type": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "quote",
                                "binder",
                                "policy"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "policy_number": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 500
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metadata": {
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "premium",
                        "minimum_earned",
                        "effective_date",
                        "expiration_date",
                        "carrier",
                        "coverages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "client_reference_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "maxLength": 500
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "insured",
                  "policies"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The quote, eligible or not.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The quote id (pqt_…). A quote created before 2026-11-27 was returned as qte_…; partner routes accept either form."
                    },
                    "object": {
                      "type": "string",
                      "const": "partner_quote"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "expired"
                      ],
                      "description": "Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "price_basis": {
                      "type": "string",
                      "const": "agency_cost",
                      "description": "What the options' prices are. agency_cost: the price before the agency that takes this quote adds its own compensation."
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "premium": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "taxes_and_fees": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "total": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "weighted_minimum_earned_rate": {
                          "type": "number",
                          "description": "A fraction: 0.25 means 25%."
                        },
                        "financing_start_date": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "premium",
                        "taxes_and_fees",
                        "total",
                        "weighted_minimum_earned_rate",
                        "financing_start_date"
                      ]
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "Premium plus all taxes and fees, and the agency fee when one was sent."
                          },
                          "minimum_earned": {
                            "type": "object",
                            "properties": {
                              "rate": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "A fraction: 0.25 means 25%."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The minimum earned rate we used."
                              }
                            },
                            "required": [
                              "rate"
                            ]
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "am_best": {
                                "type": "object",
                                "properties": {
                                  "rating": {
                                    "type": "string"
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "am_best",
                                      "broker",
                                      "document",
                                      "assumed"
                                    ],
                                    "description": "Additional values may be added.",
                                    "x-extensible-enum": true
                                  }
                                },
                                "required": [
                                  "rating",
                                  "source"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "am_best"
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "total",
                          "minimum_earned",
                          "carrier",
                          "metadata"
                        ]
                      }
                    },
                    "eligibility": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "eligible",
                            "ineligible"
                          ],
                          "description": "Additional values may be added.",
                          "x-extensible-enum": true
                        },
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "passed": {
                                "type": "boolean"
                              },
                              "limit": {
                                "type": "string"
                              },
                              "actual": {
                                "type": "string"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "partially_assumed"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              "param": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "passed"
                            ]
                          }
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          },
                          "description": "Why the deal is ineligible; empty when eligible."
                        }
                      },
                      "required": [
                        "status",
                        "checks",
                        "reasons"
                      ]
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "binding_readiness": {
                      "type": "object",
                      "properties": {
                        "ready": {
                          "type": "boolean"
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          }
                        }
                      },
                      "required": [
                        "ready",
                        "issues"
                      ]
                    },
                    "recommended_option_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "opt_<down payment percent>_<term months>, e.g. opt_25_10."
                          },
                          "down_payment_rate": {
                            "type": "number",
                            "description": "A fraction: 0.25 means 25%."
                          },
                          "term_months": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "apr": {
                            "type": "number",
                            "description": "The annual percentage rate, as a fraction. This is the agency's cost: the price before the agency adds its own compensation."
                          },
                          "down_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "amount_financed": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "monthly_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. This is the agency's cost: the price before the agency adds its own compensation."
                          },
                          "finance_charge": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. This is the agency's cost: the price before the agency adds its own compensation."
                          },
                          "total_of_payments": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. amount_financed + finance_charge, exactly: the same figure the finance agreement prints as its total of payments."
                          },
                          "total_cost": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. down_payment + total_of_payments, exactly."
                          }
                        },
                        "required": [
                          "id",
                          "down_payment_rate",
                          "term_months",
                          "apr",
                          "down_payment",
                          "amount_financed",
                          "monthly_payment",
                          "finance_charge",
                          "total_of_payments",
                          "total_cost"
                        ]
                      }
                    },
                    "interest": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "interested_at": {
                              "type": "string"
                            },
                            "option_id": {
                              "type": "string",
                              "description": "The option the agency chose (opt_<down payment percent>_<term months>)."
                            },
                            "contact": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name the visitor typed. Not verified."
                                },
                                "email": {
                                  "type": "string",
                                  "description": "The work email the visitor typed. Not verified."
                                }
                              },
                              "required": [
                                "name",
                                "email"
                              ]
                            },
                            "note": {
                              "description": "The visitor's optional note, as typed; null when none.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "interested_at",
                            "option_id",
                            "contact",
                            "note"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Someone at an agency opened your link and sent \"I'm interested\": once per quote. null until then. Replacing the link does not clear it."
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "client_reference_id",
                    "metadata",
                    "created_at",
                    "expires_at",
                    "price_basis",
                    "totals",
                    "policies",
                    "eligibility",
                    "assumptions",
                    "warnings",
                    "binding_readiness",
                    "recommended_option_id",
                    "options",
                    "interest"
                  ],
                  "description": "An indicative quote owned by a partner, priced at the agency's cost: a stored snapshot, not a price lock."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this partner (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED) or a missing scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request, or still in flight.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unable to serve the request (e.g. pricing inputs unavailable). Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listPartnerQuotes",
        "summary": "List partner quotes",
        "description": "Every quote your partner account created with a key of the same mode, newest first, as the same object GET /v1/partner/quotes/{id} returns. Filter by client_reference_id, status and interested. Cursor-paginated with limit and starting_after.",
        "tags": [
          "Partners"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "description": "How many quotes to return, 1 to 100. Default 20.",
              "type": "string"
            },
            "description": "How many quotes to return, 1 to 100. Default 20."
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A quote id (pqt_…) from the previous page (its next_cursor). Returns the quotes created before it. The qte_… form of the same quote is accepted too.",
              "type": "string"
            },
            "description": "A quote id (pqt_…) from the previous page (its next_cursor). Returns the quotes created before it. The qte_… form of the same quote is accepted too."
          },
          {
            "name": "client_reference_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only quotes with exactly this client_reference_id.",
              "type": "string"
            },
            "description": "Only quotes with exactly this client_reference_id."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only quotes with this status: active until expires_at, expired from then on.",
              "type": "string",
              "enum": [
                "active",
                "expired"
              ]
            },
            "description": "Only quotes with this status: active until expires_at, expired from then on."
          },
          {
            "name": "interested",
            "in": "query",
            "required": false,
            "schema": {
              "description": "true: only quotes an agency has sent \"I'm interested\" on (interest is set). false: only quotes without.",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "true: only quotes an agency has sent \"I'm interested\" on (interest is set). false: only quotes without."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of quotes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The quote id (pqt_…). A quote created before 2026-11-27 was returned as qte_…; partner routes accept either form."
                          },
                          "object": {
                            "type": "string",
                            "const": "partner_quote"
                          },
                          "livemode": {
                            "type": "boolean"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "expired"
                            ],
                            "description": "Additional values may be added.",
                            "x-extensible-enum": true
                          },
                          "client_reference_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "expires_at": {
                            "type": "string"
                          },
                          "price_basis": {
                            "type": "string",
                            "const": "agency_cost",
                            "description": "What the options' prices are. agency_cost: the price before the agency that takes this quote adds its own compensation."
                          },
                          "totals": {
                            "type": "object",
                            "properties": {
                              "premium": {
                                "type": "string",
                                "pattern": "^\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              "taxes_and_fees": {
                                "type": "string",
                                "pattern": "^\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              "total": {
                                "type": "string",
                                "pattern": "^\\d+\\.\\d{2}$",
                                "description": "US dollars, a decimal string with two decimal places."
                              },
                              "weighted_minimum_earned_rate": {
                                "type": "number",
                                "description": "A fraction: 0.25 means 25%."
                              },
                              "financing_start_date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "premium",
                              "taxes_and_fees",
                              "total",
                              "weighted_minimum_earned_rate",
                              "financing_start_date"
                            ]
                          },
                          "policies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "total": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "Premium plus all taxes and fees, and the agency fee when one was sent."
                                },
                                "minimum_earned": {
                                  "type": "object",
                                  "properties": {
                                    "rate": {
                                      "anyOf": [
                                        {
                                          "type": "number",
                                          "description": "A fraction: 0.25 means 25%."
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "The minimum earned rate we used."
                                    }
                                  },
                                  "required": [
                                    "rate"
                                  ]
                                },
                                "carrier": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "am_best": {
                                      "type": "object",
                                      "properties": {
                                        "rating": {
                                          "type": "string"
                                        },
                                        "source": {
                                          "type": "string",
                                          "enum": [
                                            "am_best",
                                            "broker",
                                            "document",
                                            "assumed"
                                          ],
                                          "description": "Additional values may be added.",
                                          "x-extensible-enum": true
                                        }
                                      },
                                      "required": [
                                        "rating",
                                        "source"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "am_best"
                                  ]
                                },
                                "metadata": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "total",
                                "minimum_earned",
                                "carrier",
                                "metadata"
                              ]
                            }
                          },
                          "eligibility": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "eligible",
                                  "ineligible"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              "checks": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string"
                                    },
                                    "passed": {
                                      "type": "boolean"
                                    },
                                    "limit": {
                                      "type": "string"
                                    },
                                    "actual": {
                                      "type": "string"
                                    },
                                    "basis": {
                                      "type": "string",
                                      "enum": [
                                        "partially_assumed"
                                      ],
                                      "description": "Additional values may be added.",
                                      "x-extensible-enum": true
                                    },
                                    "param": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "passed"
                                  ]
                                }
                              },
                              "reasons": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string"
                                    },
                                    "param": {
                                      "type": "string",
                                      "description": "The request path this refers to, e.g. policies[1].auditable."
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "param",
                                    "message"
                                  ]
                                },
                                "description": "Why the deal is ineligible; empty when eligible."
                              }
                            },
                            "required": [
                              "status",
                              "checks",
                              "reasons"
                            ]
                          },
                          "assumptions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "param": {
                                  "type": "string",
                                  "description": "The request path this refers to, e.g. policies[1].auditable."
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "param",
                                "message"
                              ]
                            }
                          },
                          "warnings": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "param": {
                                  "type": "string",
                                  "description": "The request path this refers to, e.g. policies[1].auditable."
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "param",
                                "message"
                              ]
                            }
                          },
                          "binding_readiness": {
                            "type": "object",
                            "properties": {
                              "ready": {
                                "type": "boolean"
                              },
                              "issues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string"
                                    },
                                    "param": {
                                      "type": "string",
                                      "description": "The request path this refers to, e.g. policies[1].auditable."
                                    },
                                    "message": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "param",
                                    "message"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "ready",
                              "issues"
                            ]
                          },
                          "recommended_option_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "opt_<down payment percent>_<term months>, e.g. opt_25_10."
                                },
                                "down_payment_rate": {
                                  "type": "number",
                                  "description": "A fraction: 0.25 means 25%."
                                },
                                "term_months": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "apr": {
                                  "type": "number",
                                  "description": "The annual percentage rate, as a fraction. This is the agency's cost: the price before the agency adds its own compensation."
                                },
                                "down_payment": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places."
                                },
                                "amount_financed": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places."
                                },
                                "monthly_payment": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places. This is the agency's cost: the price before the agency adds its own compensation."
                                },
                                "finance_charge": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places. This is the agency's cost: the price before the agency adds its own compensation."
                                },
                                "total_of_payments": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places. amount_financed + finance_charge, exactly: the same figure the finance agreement prints as its total of payments."
                                },
                                "total_cost": {
                                  "type": "string",
                                  "pattern": "^\\d+\\.\\d{2}$",
                                  "description": "US dollars, a decimal string with two decimal places. down_payment + total_of_payments, exactly."
                                }
                              },
                              "required": [
                                "id",
                                "down_payment_rate",
                                "term_months",
                                "apr",
                                "down_payment",
                                "amount_financed",
                                "monthly_payment",
                                "finance_charge",
                                "total_of_payments",
                                "total_cost"
                              ]
                            }
                          },
                          "interest": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "interested_at": {
                                    "type": "string"
                                  },
                                  "option_id": {
                                    "type": "string",
                                    "description": "The option the agency chose (opt_<down payment percent>_<term months>)."
                                  },
                                  "contact": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "description": "The name the visitor typed. Not verified."
                                      },
                                      "email": {
                                        "type": "string",
                                        "description": "The work email the visitor typed. Not verified."
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "email"
                                    ]
                                  },
                                  "note": {
                                    "description": "The visitor's optional note, as typed; null when none.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "interested_at",
                                  "option_id",
                                  "contact",
                                  "note"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Someone at an agency opened your link and sent \"I'm interested\": once per quote. null until then. Replacing the link does not clear it."
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "livemode",
                          "status",
                          "client_reference_id",
                          "metadata",
                          "created_at",
                          "expires_at",
                          "price_basis",
                          "totals",
                          "policies",
                          "eligibility",
                          "assumptions",
                          "warnings",
                          "binding_readiness",
                          "recommended_option_id",
                          "options",
                          "interest"
                        ],
                        "description": "An indicative quote owned by a partner, priced at the agency's cost: a stored snapshot, not a price lock."
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "description": "Pass as starting_after for the next page; null on the last page.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more",
                    "next_cursor"
                  ],
                  "description": "A page of partner quotes, newest first."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this partner (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED) or a missing scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/quotes/{id}": {
      "get": {
        "operationId": "getPartnerQuote",
        "summary": "Retrieve a partner quote",
        "description": "Returns the stored snapshot of a quote your partner account created (never re-priced). status is active until expires_at, then expired. A quote created with a key of the other mode, or by anyone else, is a 404.",
        "tags": [
          "Partners"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The quote id (pqt_…). The qte_… form a quote created before 2026-11-27 was returned with is accepted too."
            },
            "description": "The quote id (pqt_…). The qte_… form a quote created before 2026-11-27 was returned with is accepted too."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The quote.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The quote id (pqt_…). A quote created before 2026-11-27 was returned as qte_…; partner routes accept either form."
                    },
                    "object": {
                      "type": "string",
                      "const": "partner_quote"
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "expired"
                      ],
                      "description": "Additional values may be added.",
                      "x-extensible-enum": true
                    },
                    "client_reference_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "price_basis": {
                      "type": "string",
                      "const": "agency_cost",
                      "description": "What the options' prices are. agency_cost: the price before the agency that takes this quote adds its own compensation."
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "premium": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "taxes_and_fees": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "total": {
                          "type": "string",
                          "pattern": "^\\d+\\.\\d{2}$",
                          "description": "US dollars, a decimal string with two decimal places."
                        },
                        "weighted_minimum_earned_rate": {
                          "type": "number",
                          "description": "A fraction: 0.25 means 25%."
                        },
                        "financing_start_date": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "premium",
                        "taxes_and_fees",
                        "total",
                        "weighted_minimum_earned_rate",
                        "financing_start_date"
                      ]
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "total": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "Premium plus all taxes and fees, and the agency fee when one was sent."
                          },
                          "minimum_earned": {
                            "type": "object",
                            "properties": {
                              "rate": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "A fraction: 0.25 means 25%."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The minimum earned rate we used."
                              }
                            },
                            "required": [
                              "rate"
                            ]
                          },
                          "carrier": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "am_best": {
                                "type": "object",
                                "properties": {
                                  "rating": {
                                    "type": "string"
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "am_best",
                                      "broker",
                                      "document",
                                      "assumed"
                                    ],
                                    "description": "Additional values may be added.",
                                    "x-extensible-enum": true
                                  }
                                },
                                "required": [
                                  "rating",
                                  "source"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "am_best"
                            ]
                          },
                          "metadata": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "total",
                          "minimum_earned",
                          "carrier",
                          "metadata"
                        ]
                      }
                    },
                    "eligibility": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "eligible",
                            "ineligible"
                          ],
                          "description": "Additional values may be added.",
                          "x-extensible-enum": true
                        },
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "passed": {
                                "type": "boolean"
                              },
                              "limit": {
                                "type": "string"
                              },
                              "actual": {
                                "type": "string"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "partially_assumed"
                                ],
                                "description": "Additional values may be added.",
                                "x-extensible-enum": true
                              },
                              "param": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "passed"
                            ]
                          }
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          },
                          "description": "Why the deal is ineligible; empty when eligible."
                        }
                      },
                      "required": [
                        "status",
                        "checks",
                        "reasons"
                      ]
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "param": {
                            "type": "string",
                            "description": "The request path this refers to, e.g. policies[1].auditable."
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ]
                      }
                    },
                    "binding_readiness": {
                      "type": "object",
                      "properties": {
                        "ready": {
                          "type": "boolean"
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "param": {
                                "type": "string",
                                "description": "The request path this refers to, e.g. policies[1].auditable."
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "param",
                              "message"
                            ]
                          }
                        }
                      },
                      "required": [
                        "ready",
                        "issues"
                      ]
                    },
                    "recommended_option_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "opt_<down payment percent>_<term months>, e.g. opt_25_10."
                          },
                          "down_payment_rate": {
                            "type": "number",
                            "description": "A fraction: 0.25 means 25%."
                          },
                          "term_months": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "apr": {
                            "type": "number",
                            "description": "The annual percentage rate, as a fraction. This is the agency's cost: the price before the agency adds its own compensation."
                          },
                          "down_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "amount_financed": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places."
                          },
                          "monthly_payment": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. This is the agency's cost: the price before the agency adds its own compensation."
                          },
                          "finance_charge": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. This is the agency's cost: the price before the agency adds its own compensation."
                          },
                          "total_of_payments": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. amount_financed + finance_charge, exactly: the same figure the finance agreement prints as its total of payments."
                          },
                          "total_cost": {
                            "type": "string",
                            "pattern": "^\\d+\\.\\d{2}$",
                            "description": "US dollars, a decimal string with two decimal places. down_payment + total_of_payments, exactly."
                          }
                        },
                        "required": [
                          "id",
                          "down_payment_rate",
                          "term_months",
                          "apr",
                          "down_payment",
                          "amount_financed",
                          "monthly_payment",
                          "finance_charge",
                          "total_of_payments",
                          "total_cost"
                        ]
                      }
                    },
                    "interest": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "interested_at": {
                              "type": "string"
                            },
                            "option_id": {
                              "type": "string",
                              "description": "The option the agency chose (opt_<down payment percent>_<term months>)."
                            },
                            "contact": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name the visitor typed. Not verified."
                                },
                                "email": {
                                  "type": "string",
                                  "description": "The work email the visitor typed. Not verified."
                                }
                              },
                              "required": [
                                "name",
                                "email"
                              ]
                            },
                            "note": {
                              "description": "The visitor's optional note, as typed; null when none.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "interested_at",
                            "option_id",
                            "contact",
                            "note"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Someone at an agency opened your link and sent \"I'm interested\": once per quote. null until then. Replacing the link does not clear it."
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "livemode",
                    "status",
                    "client_reference_id",
                    "metadata",
                    "created_at",
                    "expires_at",
                    "price_basis",
                    "totals",
                    "policies",
                    "eligibility",
                    "assumptions",
                    "warnings",
                    "binding_readiness",
                    "recommended_option_id",
                    "options",
                    "interest"
                  ],
                  "description": "An indicative quote owned by a partner, priced at the agency's cost: a stored snapshot, not a price lock."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this partner (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED) or a missing scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for an id your key cannot see).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/quotes/{id}/hosted-link": {
      "post": {
        "operationId": "createPartnerQuoteHostedLink",
        "summary": "Create a link to a partner quote",
        "description": "Returns a link to a page that shows this quote, in your brand, to the agency you are quoting for: the insured's name, the policies and every option at the agency's cost. Each call replaces the previous link, which stops working at once; nothing else about the quote changes, and expires_at never moves. An expired quote is a 409 QUOTE_EXPIRED. Retrying with the same Idempotency-Key returns the same link without replacing it again. A quote created by anyone else, or with a key of the other mode, is a 404.",
        "tags": [
          "Partners"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The quote id (pqt_…). The qte_… form a quote created before 2026-11-27 was returned with is accepted too."
            },
            "description": "The quote id (pqt_…). The qte_… form a quote created before 2026-11-27 was returned with is accepted too."
          },
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retrying with the same key and body within 24h replays the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The new link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quote_id": {
                      "type": "string",
                      "description": "The quote this link opens (pqt_…)."
                    },
                    "url": {
                      "type": "string",
                      "description": "The page to send to the agency. It shows the quote in your brand, at the agency's cost. The quote keeps only a hash of the link's token, so we can't show the link again: store it if you need it. A response stored for an Idempotency-Key replay holds the link for up to 24 hours."
                    },
                    "expires_at": {
                      "type": "string",
                      "description": "When the link stops showing a current quote: the quote's own expires_at, which a new link never changes."
                    },
                    "object": {
                      "type": "string",
                      "const": "partner_hosted_link"
                    },
                    "client_reference_id": {
                      "description": "The quote's client_reference_id, so you can match the link to your own record.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "quote_id",
                    "url",
                    "expires_at",
                    "object",
                    "client_reference_id"
                  ],
                  "description": "A link to a partner quote page. Requesting a new one replaces it."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this partner (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED) or a missing scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also returned for an id your key cannot see).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key reused with a different request, or still in flight. QUOTE_EXPIRED: the quote has expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/coverage-types": {
      "get": {
        "operationId": "listPartnerCoverageTypes",
        "summary": "List coverage types (partner keys)",
        "description": "Every value coverages[].type accepts, with its definition, common aliases and flags: the same catalogue as GET /v1/coverage-types, for a partner key. Requires no scope.",
        "tags": [
          "Partners"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scopes": [],
        "parameters": [
          {
            "name": "Bridgeline-Version",
            "in": "header",
            "required": false,
            "description": "API version (a date). Defaults to the version the API key is pinned to (set when the key is created); only a released version is accepted. Every response echoes the version used.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-09-23"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The coverage-type catalogue.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "general_liability",
                              "liquor_liability",
                              "umbrella_excess",
                              "pollution_environmental",
                              "abuse_molestation",
                              "commercial_property",
                              "windstorm",
                              "builders_risk",
                              "equipment_breakdown",
                              "inland_marine",
                              "flood",
                              "commercial_auto",
                              "motor_truck_cargo",
                              "ocean_marine",
                              "aviation",
                              "workers_compensation",
                              "occupational_accident",
                              "professional_liability",
                              "directors_officers",
                              "employment_practices",
                              "fiduciary_liability",
                              "crime",
                              "cyber",
                              "farm",
                              "surety_bond",
                              "other"
                            ],
                            "description": "Additional values may be added.",
                            "x-extensible-enum": true
                          },
                          "name": {
                            "type": "string"
                          },
                          "definition": {
                            "type": "string"
                          },
                          "aliases": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Common names for this line, e.g. on binders and dec pages."
                          },
                          "flags": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "verify_minimum_earned",
                                "review",
                                "not_financeable"
                              ],
                              "description": "Additional values may be added.",
                              "x-extensible-enum": true
                            },
                            "description": "verify_minimum_earned: often fully earned or seasonal; priced, with a warning. review: priced, flagged for broker review. not_financeable: accepted, but the quote comes back ineligible."
                          }
                        },
                        "required": [
                          "type",
                          "name",
                          "definition",
                          "aliases",
                          "flags"
                        ]
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "description": "Every coverage type. We may add types; treat an unknown value as other."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (bad JSON, version or header).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "API access not enabled for this partner (API_ACCESS_NOT_ENABLED for a live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED) or a missing scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error. Safe to retry with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "bl_live_… or bl_test_… API key."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "type",
              "code",
              "message",
              "doc_url",
              "request_id"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "invalid_request",
                  "authentication",
                  "permission",
                  "not_found",
                  "conflict",
                  "rate_limit",
                  "api_error"
                ],
                "description": "The broad category of the error. Additional values may be added.",
                "x-extensible-enum": true
              },
              "code": {
                "type": "string",
                "description": "Stable, machine-readable error code. Branch on this, never on `message`.",
                "examples": [
                  "INVALID_REQUEST",
                  "INVALID_JSON",
                  "INVALID_API_VERSION",
                  "INVALID_PAGINATION",
                  "IDEMPOTENCY_KEY_REQUIRED",
                  "IDEMPOTENCY_KEY_INVALID",
                  "VALIDATION_FAILED",
                  "INVALID_API_KEY",
                  "KEY_REVOKED",
                  "KEY_EXPIRED",
                  "MISSING_SCOPE",
                  "BROKER_NOT_ACTIVE",
                  "DEFAULT_BROKER_INACTIVE",
                  "ACTING_BROKER_NOT_ALLOWED",
                  "API_ACCESS_NOT_ENABLED",
                  "TEST_MODE_NOT_ENABLED",
                  "TEST_MODE_ONLY",
                  "KEY_TYPE_NOT_ALLOWED",
                  "APPLICATIONS_NOT_ENABLED",
                  "STRAIGHT_THROUGH_NOT_ENABLED",
                  "NOT_FOUND",
                  "METHOD_NOT_ALLOWED",
                  "IDEMPOTENCY_KEY_REUSED",
                  "IDEMPOTENCY_REQUEST_IN_PROGRESS",
                  "QUOTE_EXPIRED",
                  "QUOTE_ALREADY_INTERESTED",
                  "QUOTE_ALREADY_ACCEPTED",
                  "QUOTE_NOT_ACCEPTABLE",
                  "QUOTE_PRICE_CHANGED",
                  "APPLICATION_NOT_SENDABLE",
                  "APPLICATION_PRICE_LAPSED",
                  "APPLICATION_CANCELED",
                  "AGREEMENT_ALREADY_SIGNED",
                  "AGREEMENT_NOT_VOIDABLE",
                  "APPLICATION_MANAGED_IN_PORTAL",
                  "RATE_LIMITED",
                  "INTERNAL",
                  "IDEMPOTENCY_RECORD_LOST",
                  "SERVICE_UNAVAILABLE"
                ]
              },
              "message": {
                "type": "string"
              },
              "param": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "param": {
                      "type": "string"
                    }
                  }
                }
              },
              "application_id": {
                "type": "string",
                "description": "Only on QUOTE_ALREADY_ACCEPTED: the id (app_…) of the application the quote became. It may have been created by a different call than yours."
              },
              "doc_url": {
                "type": "string",
                "format": "uri"
              },
              "request_id": {
                "type": "string",
                "pattern": "^req_"
              }
            }
          }
        }
      }
    }
  }
}
