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

# Void the agreement

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

Withdraws a finance agreement that was sent through the API, while nobody has signed it. Use it when an agreement went to the wrong email, or names the wrong signer. The response is the [application](https://docs.bridgelinepf.com/concepts/applications.md), back at `ready_for_agreement`.

* **Live keys only, and off unless Bridgeline turns it on.** The same switches as [send](https://docs.bridgelinepf.com/api-reference/applications/send.md): otherwise every call is a [`403 STRAIGHT_THROUGH_NOT_ENABLED`](https://docs.bridgelinepf.com/errors/STRAIGHT_THROUGH_NOT_ENABLED) (or [`403 APPLICATIONS_NOT_ENABLED`](https://docs.bridgelinepf.com/errors/APPLICATIONS_NOT_ENABLED)). These are not stored under your `Idempotency-Key`.
* **An `Idempotency-Key` is required.**
* **Only before a signature.** Once the insured or your agency's signer has signed, the answer is [`409 AGREEMENT_ALREADY_SIGNED`](https://docs.bridgelinepf.com/errors/AGREEMENT_ALREADY_SIGNED). The loan exists, and unwinding it is done by a person at Bridgeline.
* **Only an agreement the API sent.** One your broker sent from the portal at their own price is withdrawn in the portal.
* Needs the `agreements:write` scope. A key without it gets [`403 MISSING_SCOPE`](https://docs.bridgelinepf.com/errors/MISSING_SCOPE).
* **At most 3 voids per application.** Each void and re-send is a new signing request to the insured. After the third void, send answers [`409 APPLICATION_NOT_SENDABLE`](https://docs.bridgelinepf.com/errors/APPLICATION_NOT_SENDABLE) with `VOID_LIMIT_REACHED`: your broker sends the next agreement in the portal. (A void on an application that has reached the limit answers [`409 AGREEMENT_NOT_VOIDABLE`](https://docs.bridgelinepf.com/errors/AGREEMENT_NOT_VOIDABLE) with the same detail.)
* The request has no body.

## What happens

1. We check the live signing state with the e-signature service. If we can't confirm that nobody has signed, nothing is voided and you get a `503`.
2. We cancel the signing request. The link in the insured's email stops working.
3. The agreement is kept on our side as a voided record. The application goes back to `ready_for_agreement`, with `agreement: null` and the same fixed price.

## Sending again

Call [send](https://docs.bridgelinepf.com/api-reference/applications/send.md) with the corrected `signer` or `insured_phone`. It creates a new agreement at the same price.

Voiding does not extend the price. The send runs the [price check](https://docs.bridgelinepf.com/concepts/indicative-quotes.md#how-long-a-price-holds) again, measured from the day the quote was priced. If the price is no longer good, nothing is sent and you get [`409 APPLICATION_PRICE_LAPSED`](https://docs.bridgelinepf.com/errors/APPLICATION_PRICE_LAPSED); once the quote is more than 30 days old, the application is also [canceled](https://docs.bridgelinepf.com/concepts/applications.md#canceled-applications). So void and send again promptly.

## When nothing is voided

| Response | Meaning | What to do |
| - | - | - |
| [`409 AGREEMENT_ALREADY_SIGNED`](https://docs.bridgelinepf.com/errors/AGREEMENT_ALREADY_SIGNED) | Somebody has signed | Contact Bridgeline if the agreement is wrong |
| [`409 AGREEMENT_NOT_VOIDABLE`](https://docs.bridgelinepf.com/errors/AGREEMENT_NOT_VOIDABLE) | There is no sent agreement the API can void, or the application has reached 3 voids; `details[]` says why | Read the application |
| [`409 APPLICATION_MANAGED_IN_PORTAL`](https://docs.bridgelinepf.com/errors/APPLICATION_MANAGED_IN_PORTAL) | The agreement was sent from the portal at an agent's price | Nothing. The agent withdraws it in the portal |
| [`409 APPLICATION_CANCELED`](https://docs.bridgelinepf.com/errors/APPLICATION_CANCELED) | The application was canceled earlier and has no agreement out | Create a new quote |
| [`403 STRAIGHT_THROUGH_NOT_ENABLED`](https://docs.bridgelinepf.com/errors/STRAIGHT_THROUGH_NOT_ENABLED) | Not turned on for your agency, or a test key | Ask your Bridgeline contact |
| [`403 DEFAULT_BROKER_INACTIVE`](https://docs.bridgelinepf.com/errors/DEFAULT_BROKER_INACTIVE) | The key's default broker is no longer active | Ask an agency admin for a new API key |
| [`404 NOT_FOUND`](https://docs.bridgelinepf.com/errors/NOT_FOUND) | No application with this id that your key can see | Check the id and the key |
| [`503 SERVICE_UNAVAILABLE`](https://docs.bridgelinepf.com/errors/SERVICE_UNAVAILABLE) | We couldn't confirm the signing state, or couldn't finish the void | Wait for `Retry-After`, then retry with the **same** key |

A `404` or `409` is stored under the key you sent. A `403` and a `503` are not stored: the same key runs the void again.

## Retries

| What you got | What to do |
| - | - |
| `200` | Done. The signing request no longer works |
| No answer (timeout, network error) | Send the same request again with the same key |
| `503` | Wait for `Retry-After`, then the same request with the same key. It finishes a void that was half done |
| `409 IDEMPOTENCY_REQUEST_IN_PROGRESS` | Wait for `Retry-After`, then the same request with the same key |
| `500` | Retry with the same key. If it answers [`500 IDEMPOTENCY_RECORD_LOST`](https://docs.bridgelinepf.com/errors/IDEMPOTENCY_RECORD_LOST) or a replayed `500`, read the application: `agreement: null` and `ready_for_agreement` mean it was voided |

```bash cURL theme={null}
curl -X POST https://portal.bridgelinepf.com/api/v1/applications/app_1rvJBK4j6przAMoe6NxpXJ/void \
  -H "Authorization: Bearer $BRIDGELINE_API_KEY" \
  -H "Bridgeline-Version: 2026-09-23" \
  -H "Idempotency-Key: $(uuidgen)"
```

```javascript Node theme={null}
const res = await fetch(`https://portal.bridgelinepf.com/api/v1/applications/${applicationId}/void`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.BRIDGELINE_API_KEY}`,
    'Bridgeline-Version': '2026-09-23',
    'Idempotency-Key': crypto.randomUUID(),
  },
})
const application = await res.json()
```

```python Python theme={null}
import os
import uuid
import requests

res = requests.post(
    f"https://portal.bridgelinepf.com/api/v1/applications/{application_id}/void",
    headers={
        "Authorization": f"Bearer {os.environ['BRIDGELINE_API_KEY']}",
        "Bridgeline-Version": "2026-09-23",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=60,
)
application = res.json()
```

```json 200 theme={null}
{
  "id": "app_1rvJBK4j6przAMoe6NxpXJ",
  "object": "application",
  "livemode": true,
  "status": "ready_for_agreement",
  "created_via": "api",
  "quote_id": "qte_2lo4LFk5rf8toDFJHSUZ2O",
  "accepted_option_id": "opt_25_10",
  "pricing": {
    "option_id": "opt_25_10",
    "down_payment_rate": 0.25,
    "term_months": 10,
    "apr": 0.1094,
    "down_payment": "12146.46",
    "amount_financed": "36439.39",
    "monthly_payment": "3830.26",
    "finance_charge": "1863.20",
    "total_of_payments": "38302.59",
    "total_cost": "50449.05",
    "selected_by": "system"
  },
  "price_guaranteed_until": "2026-11-27T15:04:05Z",
  "straight_through": {"route": "straight_through", "reasons": []},
  "agreement": null,
  "payout": {
    "confirmed_at": null,
    "policies": [
      {"id": "pol_2o9fj1oLkchQ9qNzyigGf8", "commission_rate": 0.125, "commission": "5762.50", "agency_fee": "0.00"}
    ],
    "due_to_agency": "5762.50",
    "due_to_billing_company": "42823.35",
    "total": "48585.85"
  },
  "cancellation": null,
  "insured": {
    "name": "Lone Star Fabrication LLC",
    "address": {
      "line1": "1200 Industrial Blvd",
      "city": "Houston",
      "state": "TX",
      "postal_code": "77002"
    }
  },
  "broker": {"email": "maria@lonestarrisk.example"},
  "policies": [
    {
      "id": "pol_2o9fj1oLkchQ9qNzyigGf8",
      "carrier": {"name": "Scottsdale Insurance Company", "match": "matched"},
      "total": "48585.85",
      "effective_date": "2026-10-15",
      "expiration_date": "2027-10-15",
      "document_type": "binder",
      "policy_number": "CPS7712045"
    }
  ],
  "requirements": {"blocking": [], "outstanding": []},
  "portal_url": "https://portal.bridgelinepf.com/application/3d6f1c2e-9a3b-4d4c-8e5f-60718293a4b5",
  "client_reference_id": "EPIC-PROP-2026-0412",
  "metadata": {},
  "created_at": "2026-11-20T15:04:05Z"
}
```

```json 409 Already signed theme={null}
{
  "error": {
    "type": "conflict",
    "code": "AGREEMENT_ALREADY_SIGNED",
    "message": "This agreement has been signed, so it can no longer be voided through the API. Contact Bridgeline to unwind it.",
    "doc_url": "https://docs.bridgelinepf.com/errors#AGREEMENT_ALREADY_SIGNED",
    "request_id": "req_8fJ2kQ9xLm4TzW7nB3cY5pDv"
  }
}
```


## OpenAPI

````yaml POST /v1/applications/{id}/void
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/applications/{id}/void:
    post:
      tags:
        - Applications
      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.
      operationId: voidApplication
      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'
      security:
        - bearerAuth: []
components:
  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_
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: bl_live_… or bl_test_… API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.