# Worked example: pet insurance

A broker, Example Pets, sells the pet insurance of an insurer, Example Mutual, in France. An agent quotes a cat called Miso for Camille Martin, applies, and later adds a dog to the policy. All companies, people and prices are fictional. The repository writes these files with [`scripts/examples.ts`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/scripts/examples.ts) and checks them against the [schema](https://openfinancialagent.org/spec/0.1/reference) and the rules on every push.

## 1. Find the distributor

*get_distributor, result* · [`examples/insurance-01-get_distributor.result.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-01-get_distributor.result.json)

The agent asks who sells and under which licence. Example Pets is a broker in the ORIAS register, and it declares level 4 for pet insurance in France.

```json
{
  "legal_name": "Example Pets SAS",
  "trading_name": "Example Pets",
  "domain": "pets.example.com",
  "roles": [
    "broker"
  ],
  "licences": [
    {
      "country": "FR",
      "regulator": "ACPR",
      "register": "ORIAS",
      "identifier_type": "orias_number",
      "identifier": "00000000",
      "role": "broker",
      "sectors": [
        "insurance"
      ],
      "categories": [
        "COA"
      ],
      "verification_url": "https://www.orias.fr/"
    }
  ],
  "countries": [
    "FR"
  ],
  "complaints_url": "https://pets.example.com/complaints",
  "ofap": {
    "version": "0.1",
    "conformance_level": 4,
    "interfaces": [
      "tools"
    ],
    "sectors": [
      "insurance"
    ],
    "lines": [
      "pet"
    ],
    "countries": [
      "FR"
    ],
    "can_conclude": false
  }
}
```

## 2. Get the documents

*get_documents, result* · [`examples/insurance-02-get_documents.result.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-02-get_documents.result.json)

Two documents must reach the customer before they commit: the IPID and the general conditions. Each one has a version and the hash of its file.

```json
{
  "documents": [
    {
      "document_id": "doc-ipid-pet-fr",
      "type": "ipid",
      "title": "IPID Example Pets Essentiel",
      "language": "fr",
      "version": "2026-09",
      "url": "https://pets.example.com/docs/ipid-essentiel-2026-09.pdf",
      "media_type": "application/pdf",
      "sha256": "fcc6278ba8b67d6258f56c9e5ce11ea5604bde5a49e005416e19891863b99a8d",
      "required_before_commitment": true
    },
    {
      "document_id": "doc-cg-pet-fr",
      "type": "general_conditions",
      "title": "Conditions générales",
      "language": "fr",
      "version": "2026-09",
      "url": "https://pets.example.com/docs/cg-2026-09.pdf",
      "media_type": "application/pdf",
      "sha256": "430aaae4bb2e758857c68516a6077a52c8f46031f445a3d082af80a0e5da2414",
      "required_before_commitment": true
    }
  ]
}
```

## 3. Get the questions

*get_question_set, result* · [`examples/insurance-03-get_question_set.result.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-03-get_question_set.result.json)

The questions come as a JSON Schema that builds on the `insurance/pet@0.1` profile. The microchip number is collected on the distributor's page, so the agent never asks for it.

```json
{
  "question_set": {
    "question_set_id": "qs-pet-fr-essentiel",
    "version": "3",
    "product_id": "pet-fr-essentiel",
    "sector": "insurance",
    "line": "pet",
    "profile": "insurance/pet@0.1",
    "answers_schema": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string",
          "pattern": "^[A-Z]{2}$",
          "x-profile-key": "country"
        },
        "postal_code": {
          "type": "string",
          "x-profile-key": "postal_code",
          "x-ask": "What is your postal code?"
        },
        "species": {
          "type": "string",
          "enum": [
            "dog",
            "cat"
          ],
          "x-profile-key": "species"
        },
        "pet_name": {
          "type": "string",
          "x-profile-key": "pet_name"
        },
        "breed": {
          "type": "string",
          "x-profile-key": "breed"
        },
        "sex": {
          "type": "string",
          "enum": [
            "female",
            "male"
          ],
          "x-profile-key": "sex"
        },
        "is_neutered": {
          "type": "boolean",
          "x-profile-key": "is_neutered"
        },
        "date_of_birth": {
          "type": "string",
          "format": "date",
          "x-profile-key": "date_of_birth"
        },
        "lifestyle": {
          "type": "string",
          "enum": [
            "indoor",
            "outdoor"
          ],
          "x-profile-key": "lifestyle"
        },
        "currently_insured": {
          "type": "boolean",
          "x-ask": "Is your pet insured with another company today?"
        },
        "microchip_number": {
          "type": "string",
          "x-collected-by": "distributor_page",
          "description": "Collected on the distributor's page after the quote."
        }
      },
      "required": [
        "country",
        "postal_code",
        "species",
        "pet_name",
        "breed",
        "sex",
        "is_neutered",
        "date_of_birth",
        "currently_insured"
      ]
    }
  }
}
```

## 4. Quote with partial answers

*quote, params* · [`examples/insurance-04-quote.params.partial.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-04-quote.params.partial.json)

The agent quotes with the five answers it has.

```json
{
  "product_id": "pet-fr-essentiel",
  "question_set": {
    "question_set_id": "qs-pet-fr-essentiel",
    "version": "3"
  },
  "answers": {
    "country": "FR",
    "postal_code": "69003",
    "species": "cat",
    "pet_name": "Miso",
    "breed": "European shorthair"
  },
  "language": "fr"
}
```

## 5. Get the missing fields

*quote, result* · [`examples/insurance-05-quote.result.needs_input.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-05-quote.result.needs_input.json)

The server lists what is missing. The agent asks Camille.

```json
{
  "status": "needs_input",
  "quote_request_id": "qr-7f3a",
  "missing_fields": [
    {
      "field": "sex",
      "issue": "missing"
    },
    {
      "field": "is_neutered",
      "issue": "missing"
    },
    {
      "field": "date_of_birth",
      "issue": "missing",
      "message": "An approximate date is fine."
    },
    {
      "field": "currently_insured",
      "issue": "missing"
    }
  ]
}
```

## 6. Quote with every answer

*quote, params* · [`examples/insurance-06-quote.params.complete.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-06-quote.params.complete.json)

The agent sends the full answers to the same question set version.

```json
{
  "product_id": "pet-fr-essentiel",
  "question_set": {
    "question_set_id": "qs-pet-fr-essentiel",
    "version": "3"
  },
  "answers": {
    "country": "FR",
    "postal_code": "69003",
    "species": "cat",
    "pet_name": "Miso",
    "breed": "European shorthair",
    "sex": "female",
    "is_neutered": true,
    "date_of_birth": "2023-04-01",
    "lifestyle": "indoor",
    "currently_insured": false
  },
  "language": "fr"
}
```

## 7. Compare the offers

*quote, result* · [`examples/insurance-07-quote.result.complete.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-07-quote.result.complete.json)

Two offers, one per tier, in the same shape. `answers_sha256` is the hash of the answers that the prices use.

```json
{
  "status": "complete",
  "quote_request_id": "qr-7f3a",
  "question_set": {
    "question_set_id": "qs-pet-fr-essentiel",
    "version": "3"
  },
  "answers_sha256": "3e9c2dddf3f4f8ea10c0cd851fc69b1c9d904e067b2ed3551fdd051ee792de67",
  "offers": [
    {
      "offer_id": "of-essentiel-70",
      "product_id": "pet-fr-essentiel",
      "sector": "insurance",
      "tier": "Essentiel 70",
      "provider": {
        "name": "Example Mutual",
        "legal_name": "Example Mutual Assurances SA",
        "role": "insurer"
      },
      "indicative": false,
      "pricing": {
        "sector": "insurance",
        "premium": {
          "amount": {
            "amount": "14.90",
            "currency": "EUR"
          },
          "period": "month",
          "taxes_included": true
        },
        "alternative_premiums": [
          {
            "amount": {
              "amount": "171.00",
              "currency": "EUR"
            },
            "period": "year",
            "taxes_included": true
          }
        ],
        "cover": {
          "included": [
            "Accident",
            "Illness",
            "Surgery"
          ],
          "limits": [
            {
              "key": "vet_costs_per_year",
              "label": "Frais vétérinaires par an",
              "limit": {
                "amount": "1500.00",
                "currency": "EUR"
              },
              "reimbursement_rate": 0.7
            }
          ],
          "excess": {
            "amount": "0.00",
            "currency": "EUR"
          },
          "main_exclusions": [
            "Pre-existing conditions"
          ],
          "waiting_period_days": 45
        },
        "options": [
          {
            "key": "prevention",
            "label": "Forfait prévention",
            "price": {
              "amount": {
                "amount": "3.00",
                "currency": "EUR"
              },
              "period": "month",
              "taxes_included": true
            }
          }
        ],
        "start_date": "2026-11-01"
      },
      "valid_until": "2026-11-19T23:59:59+01:00",
      "subscription_paths": [
        "application",
        "handoff"
      ],
      "handoff_url": "https://pets.example.com/q/of-essentiel-70"
    },
    {
      "offer_id": "of-essentiel-90",
      "product_id": "pet-fr-essentiel",
      "sector": "insurance",
      "tier": "Essentiel 90",
      "provider": {
        "name": "Example Mutual",
        "legal_name": "Example Mutual Assurances SA",
        "role": "insurer"
      },
      "indicative": false,
      "pricing": {
        "sector": "insurance",
        "premium": {
          "amount": {
            "amount": "21.40",
            "currency": "EUR"
          },
          "period": "month",
          "taxes_included": true
        },
        "alternative_premiums": [
          {
            "amount": {
              "amount": "246.00",
              "currency": "EUR"
            },
            "period": "year",
            "taxes_included": true
          }
        ],
        "cover": {
          "included": [
            "Accident",
            "Illness",
            "Surgery"
          ],
          "limits": [
            {
              "key": "vet_costs_per_year",
              "label": "Frais vétérinaires par an",
              "limit": {
                "amount": "2500.00",
                "currency": "EUR"
              },
              "reimbursement_rate": 0.9
            }
          ],
          "excess": {
            "amount": "0.00",
            "currency": "EUR"
          },
          "main_exclusions": [
            "Pre-existing conditions"
          ],
          "waiting_period_days": 45
        },
        "options": [
          {
            "key": "prevention",
            "label": "Forfait prévention",
            "price": {
              "amount": {
                "amount": "3.00",
                "currency": "EUR"
              },
              "period": "month",
              "taxes_included": true
            }
          }
        ],
        "start_date": "2026-11-01"
      },
      "valid_until": "2026-11-19T23:59:59+01:00",
      "subscription_paths": [
        "application",
        "handoff"
      ],
      "handoff_url": "https://pets.example.com/q/of-essentiel-90"
    }
  ]
}
```

## 8. Get a reason when there is no offer

*quote, result* · [`examples/insurance-08-quote.result.no_offer.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-08-quote.result.no_offer.json)

For a dog born in 2015, the insurer makes no offer and gives a stable reason code.

```json
{
  "status": "complete",
  "quote_request_id": "qr-8b21",
  "question_set": {
    "question_set_id": "qs-pet-fr-essentiel",
    "version": "3"
  },
  "answers_sha256": "49b096f890adbb6b541efdcd3987264a175976808541b51a6efd3e84cd620f2a",
  "offers": [],
  "no_offer": {
    "reason_code": "age_not_accepted",
    "message": "Example Mutual does not start cover for a dog older than 9 years."
  }
}
```

## 9. Apply

*submit_application, params* · [`examples/insurance-09-submit_application.params.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-09-submit_application.params.json)

The agent applies for the first offer. It sends the parties, the declaration, the demands and needs, the documents it delivered and the contact consent.

```json
{
  "offer_id": "of-essentiel-70",
  "parties": [
    {
      "party_ref": "p1",
      "kind": "person",
      "roles": [
        "subscriber",
        "insured",
        "payer"
      ],
      "display_name": "Camille Martin",
      "country_of_residence": "FR"
    }
  ],
  "declaration": {
    "question_set": {
      "question_set_id": "qs-pet-fr-essentiel",
      "version": "3"
    },
    "answers": {
      "country": "FR",
      "postal_code": "69003",
      "species": "cat",
      "pet_name": "Miso",
      "breed": "European shorthair",
      "sex": "female",
      "is_neutered": true,
      "date_of_birth": "2023-04-01",
      "lifestyle": "indoor",
      "currently_insured": false
    },
    "answers_sha256": "3e9c2dddf3f4f8ea10c0cd851fc69b1c9d904e067b2ed3551fdd051ee792de67",
    "accuracy_confirmed": true
  },
  "needs_assessment": {
    "sector": "insurance",
    "kind": "demands_and_needs",
    "statement": "Cover vet bills for an indoor cat, with a budget under 20 EUR a month.",
    "advice_given": false,
    "recorded_at": "2026-10-20T10:02:00+02:00"
  },
  "documents_delivered": [
    {
      "document_id": "doc-ipid-pet-fr",
      "version": "2026-09",
      "sha256": "fcc6278ba8b67d6258f56c9e5ce11ea5604bde5a49e005416e19891863b99a8d",
      "delivered_at": "2026-10-20T10:03:00+02:00"
    },
    {
      "document_id": "doc-cg-pet-fr",
      "version": "2026-09",
      "sha256": "430aaae4bb2e758857c68516a6077a52c8f46031f445a3d082af80a0e5da2414",
      "delivered_at": "2026-10-20T10:03:00+02:00"
    }
  ],
  "contact_consent": {
    "channels": [
      "email"
    ],
    "details_collected_by": "distributor_page",
    "providers_may_contact": false,
    "purposes": [
      "this_application"
    ]
  },
  "start_date": "2026-11-01"
}
```

## 10. Get a PAP operation

*submit_application, result* · [`examples/insurance-10-submit_application.result.proposed.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-10-submit_application.result.proposed.json)

Nothing is committed yet. The server returns a PAP operation whose terms hold the whole application, and Camille must approve this revision.

```json
{
  "operation": {
    "operation_id": "op-51c2",
    "revision": 1,
    "state": "proposed",
    "summary": "Apply for Essentiel 70 cat insurance for Miso with Example Mutual, 14.90 EUR a month from 1 November 2026. You finish on Example Pets' site.",
    "terms": {
      "offer_id": "of-essentiel-70",
      "product_id": "pet-fr-essentiel",
      "sector": "insurance",
      "provider": {
        "name": "Example Mutual",
        "legal_name": "Example Mutual Assurances SA",
        "role": "insurer"
      },
      "pricing": {
        "sector": "insurance",
        "premium": {
          "amount": {
            "amount": "14.90",
            "currency": "EUR"
          },
          "period": "month",
          "taxes_included": true
        },
        "alternative_premiums": [
          {
            "amount": {
              "amount": "171.00",
              "currency": "EUR"
            },
            "period": "year",
            "taxes_included": true
          }
        ],
        "cover": {
          "included": [
            "Accident",
            "Illness",
            "Surgery"
          ],
          "limits": [
            {
              "key": "vet_costs_per_year",
              "label": "Frais vétérinaires par an",
              "limit": {
                "amount": "1500.00",
                "currency": "EUR"
              },
              "reimbursement_rate": 0.7
            }
          ],
          "excess": {
            "amount": "0.00",
            "currency": "EUR"
          },
          "main_exclusions": [
            "Pre-existing conditions"
          ],
          "waiting_period_days": 45
        },
        "options": [
          {
            "key": "prevention",
            "label": "Forfait prévention",
            "price": {
              "amount": {
                "amount": "3.00",
                "currency": "EUR"
              },
              "period": "month",
              "taxes_included": true
            }
          }
        ],
        "start_date": "2026-11-01"
      },
      "options": [],
      "start_date": "2026-11-01",
      "parties": [
        {
          "party_ref": "p1",
          "kind": "person",
          "roles": [
            "subscriber",
            "insured",
            "payer"
          ],
          "display_name": "Camille Martin",
          "country_of_residence": "FR"
        }
      ],
      "declaration": {
        "question_set": {
          "question_set_id": "qs-pet-fr-essentiel",
          "version": "3"
        },
        "answers": {
          "country": "FR",
          "postal_code": "69003",
          "species": "cat",
          "pet_name": "Miso",
          "breed": "European shorthair",
          "sex": "female",
          "is_neutered": true,
          "date_of_birth": "2023-04-01",
          "lifestyle": "indoor",
          "currently_insured": false
        },
        "answers_sha256": "3e9c2dddf3f4f8ea10c0cd851fc69b1c9d904e067b2ed3551fdd051ee792de67",
        "accuracy_confirmed": true
      },
      "needs_assessment": {
        "sector": "insurance",
        "kind": "demands_and_needs",
        "statement": "Cover vet bills for an indoor cat, with a budget under 20 EUR a month.",
        "advice_given": false,
        "recorded_at": "2026-10-20T10:02:00+02:00"
      },
      "documents_delivered": [
        {
          "document_id": "doc-ipid-pet-fr",
          "version": "2026-09",
          "sha256": "fcc6278ba8b67d6258f56c9e5ce11ea5604bde5a49e005416e19891863b99a8d",
          "delivered_at": "2026-10-20T10:03:00+02:00"
        },
        {
          "document_id": "doc-cg-pet-fr",
          "version": "2026-09",
          "sha256": "430aaae4bb2e758857c68516a6077a52c8f46031f445a3d082af80a0e5da2414",
          "delivered_at": "2026-10-20T10:03:00+02:00"
        }
      ],
      "contact_consent": {
        "channels": [
          "email"
        ],
        "details_collected_by": "distributor_page",
        "providers_may_contact": false,
        "purposes": [
          "this_application"
        ]
      },
      "withdrawal_period_days": 14
    },
    "expires_at": "2026-10-20T11:00:00+02:00",
    "user_approval_required": true,
    "url": "https://pets.example.com/ops/op-51c2",
    "confirmation": null,
    "result": null
  }
}
```

## 11. Keep the evidence

*PAP operation, after confirmation* · [`examples/insurance-11-operation.succeeded.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-11-operation.succeeded.json)

Camille approves, and the agent confirms at the PAP operations endpoint. The operation succeeds and carries the evidence record, with the hash of the confirmed terms.

```json
{
  "operation": {
    "operation_id": "op-51c2",
    "revision": 1,
    "state": "succeeded",
    "summary": "Apply for Essentiel 70 cat insurance for Miso with Example Mutual, 14.90 EUR a month from 1 November 2026. You finish on Example Pets' site.",
    "terms": {
      "offer_id": "of-essentiel-70",
      "product_id": "pet-fr-essentiel",
      "sector": "insurance",
      "provider": {
        "name": "Example Mutual",
        "legal_name": "Example Mutual Assurances SA",
        "role": "insurer"
      },
      "pricing": {
        "sector": "insurance",
        "premium": {
          "amount": {
            "amount": "14.90",
            "currency": "EUR"
          },
          "period": "month",
          "taxes_included": true
        },
        "alternative_premiums": [
          {
            "amount": {
              "amount": "171.00",
              "currency": "EUR"
            },
            "period": "year",
            "taxes_included": true
          }
        ],
        "cover": {
          "included": [
            "Accident",
            "Illness",
            "Surgery"
          ],
          "limits": [
            {
              "key": "vet_costs_per_year",
              "label": "Frais vétérinaires par an",
              "limit": {
                "amount": "1500.00",
                "currency": "EUR"
              },
              "reimbursement_rate": 0.7
            }
          ],
          "excess": {
            "amount": "0.00",
            "currency": "EUR"
          },
          "main_exclusions": [
            "Pre-existing conditions"
          ],
          "waiting_period_days": 45
        },
        "options": [
          {
            "key": "prevention",
            "label": "Forfait prévention",
            "price": {
              "amount": {
                "amount": "3.00",
                "currency": "EUR"
              },
              "period": "month",
              "taxes_included": true
            }
          }
        ],
        "start_date": "2026-11-01"
      },
      "options": [],
      "start_date": "2026-11-01",
      "parties": [
        {
          "party_ref": "p1",
          "kind": "person",
          "roles": [
            "subscriber",
            "insured",
            "payer"
          ],
          "display_name": "Camille Martin",
          "country_of_residence": "FR"
        }
      ],
      "declaration": {
        "question_set": {
          "question_set_id": "qs-pet-fr-essentiel",
          "version": "3"
        },
        "answers": {
          "country": "FR",
          "postal_code": "69003",
          "species": "cat",
          "pet_name": "Miso",
          "breed": "European shorthair",
          "sex": "female",
          "is_neutered": true,
          "date_of_birth": "2023-04-01",
          "lifestyle": "indoor",
          "currently_insured": false
        },
        "answers_sha256": "3e9c2dddf3f4f8ea10c0cd851fc69b1c9d904e067b2ed3551fdd051ee792de67",
        "accuracy_confirmed": true
      },
      "needs_assessment": {
        "sector": "insurance",
        "kind": "demands_and_needs",
        "statement": "Cover vet bills for an indoor cat, with a budget under 20 EUR a month.",
        "advice_given": false,
        "recorded_at": "2026-10-20T10:02:00+02:00"
      },
      "documents_delivered": [
        {
          "document_id": "doc-ipid-pet-fr",
          "version": "2026-09",
          "sha256": "fcc6278ba8b67d6258f56c9e5ce11ea5604bde5a49e005416e19891863b99a8d",
          "delivered_at": "2026-10-20T10:03:00+02:00"
        },
        {
          "document_id": "doc-cg-pet-fr",
          "version": "2026-09",
          "sha256": "430aaae4bb2e758857c68516a6077a52c8f46031f445a3d082af80a0e5da2414",
          "delivered_at": "2026-10-20T10:03:00+02:00"
        }
      ],
      "contact_consent": {
        "channels": [
          "email"
        ],
        "details_collected_by": "distributor_page",
        "providers_may_contact": false,
        "purposes": [
          "this_application"
        ]
      },
      "withdrawal_period_days": 14
    },
    "user_approval_required": true,
    "url": "https://pets.example.com/ops/op-51c2",
    "confirmation": {
      "revision": 1,
      "approved_by": "user",
      "confirmed_at": "2026-10-20T10:05:12+02:00"
    },
    "result": {
      "summary": "Application received. Camille finishes on Example Pets' site.",
      "data": {
        "application_id": "app-3310",
        "evidence": {
          "record_id": "ev-90aa",
          "operation_id": "op-51c2",
          "revision": 1,
          "approved_by": "user",
          "confirmed_at": "2026-10-20T10:05:12+02:00",
          "documents_delivered": [
            {
              "document_id": "doc-ipid-pet-fr",
              "version": "2026-09",
              "sha256": "fcc6278ba8b67d6258f56c9e5ce11ea5604bde5a49e005416e19891863b99a8d",
              "delivered_at": "2026-10-20T10:03:00+02:00"
            },
            {
              "document_id": "doc-cg-pet-fr",
              "version": "2026-09",
              "sha256": "430aaae4bb2e758857c68516a6077a52c8f46031f445a3d082af80a0e5da2414",
              "delivered_at": "2026-10-20T10:03:00+02:00"
            }
          ],
          "question_set": {
            "question_set_id": "qs-pet-fr-essentiel",
            "version": "3"
          },
          "answers_sha256": "3e9c2dddf3f4f8ea10c0cd851fc69b1c9d904e067b2ed3551fdd051ee792de67",
          "needs_assessment": {
            "sector": "insurance",
            "kind": "demands_and_needs",
            "statement": "Cover vet bills for an indoor cat, with a budget under 20 EUR a month.",
            "advice_given": false,
            "recorded_at": "2026-10-20T10:02:00+02:00"
          },
          "contact_consent": {
            "channels": [
              "email"
            ],
            "details_collected_by": "distributor_page",
            "providers_may_contact": false,
            "purposes": [
              "this_application"
            ]
          },
          "terms_sha256": "20d1f65771484f5ede6dff46f793b821d6705cea266e3b91e3585d7bc7696dae"
        },
        "handoff_url": "https://pets.example.com/a/app-3310"
      }
    }
  }
}
```

## 12. Add a dog

*amend_agreement, result* · [`examples/insurance-12-amend_agreement.result.proposed.json`](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/examples/insurance-12-amend_agreement.result.proposed.json)

Later, Camille adds a dog. The premium changes and a subject is added, so Camille must approve this revision too.

```json
{
  "operation": {
    "operation_id": "op-77d0",
    "revision": 1,
    "state": "proposed",
    "summary": "Add Pixel (beagle, born February 2025) from 1 December 2026. The premium goes from 14.90 to 31.20 EUR a month.",
    "terms": {
      "agreement_number": "EXP-2026-004812",
      "changes": [
        {
          "kind": "add_subject",
          "subject": {
            "subject_ref": "pet-2",
            "kind": "pet",
            "display_name": "Pixel",
            "attributes": {
              "species": "dog",
              "breed": "Beagle",
              "sex": "male",
              "is_neutered": false,
              "date_of_birth": "2025-02-10"
            }
          }
        }
      ],
      "effective_date": "2026-12-01",
      "pricing_before": {
        "sector": "insurance",
        "premium": {
          "amount": {
            "amount": "14.90",
            "currency": "EUR"
          },
          "period": "month",
          "taxes_included": true
        },
        "alternative_premiums": [
          {
            "amount": {
              "amount": "171.00",
              "currency": "EUR"
            },
            "period": "year",
            "taxes_included": true
          }
        ],
        "cover": {
          "included": [
            "Accident",
            "Illness",
            "Surgery"
          ],
          "limits": [
            {
              "key": "vet_costs_per_year",
              "label": "Frais vétérinaires par an",
              "limit": {
                "amount": "1500.00",
                "currency": "EUR"
              },
              "reimbursement_rate": 0.7
            }
          ],
          "excess": {
            "amount": "0.00",
            "currency": "EUR"
          },
          "main_exclusions": [
            "Pre-existing conditions"
          ],
          "waiting_period_days": 45
        },
        "options": [
          {
            "key": "prevention",
            "label": "Forfait prévention",
            "price": {
              "amount": {
                "amount": "3.00",
                "currency": "EUR"
              },
              "period": "month",
              "taxes_included": true
            }
          }
        ],
        "start_date": "2026-11-01"
      },
      "pricing_after": {
        "sector": "insurance",
        "premium": {
          "amount": {
            "amount": "31.20",
            "currency": "EUR"
          },
          "period": "month",
          "taxes_included": true
        },
        "cover": {
          "included": [
            "Accident",
            "Illness",
            "Surgery"
          ],
          "limits": [
            {
              "key": "vet_costs_per_year",
              "label": "Frais vétérinaires par an",
              "limit": {
                "amount": "1500.00",
                "currency": "EUR"
              },
              "reimbursement_rate": 0.7
            }
          ],
          "excess": {
            "amount": "0.00",
            "currency": "EUR"
          },
          "main_exclusions": [
            "Pre-existing conditions"
          ],
          "waiting_period_days": 45
        },
        "options": [
          {
            "key": "prevention",
            "label": "Forfait prévention",
            "price": {
              "amount": {
                "amount": "3.00",
                "currency": "EUR"
              },
              "period": "month",
              "taxes_included": true
            }
          }
        ],
        "start_date": "2026-11-01"
      },
      "declaration": {
        "question_set": {
          "question_set_id": "qs-pet-fr-essentiel",
          "version": "3"
        },
        "answers": {
          "species": "dog",
          "breed": "Beagle",
          "sex": "male",
          "is_neutered": false,
          "date_of_birth": "2025-02-10"
        },
        "answers_sha256": "d9b538359cbe5f14a78bb6b38e7ec1e7a1c09a827e67e84b9864eb1131c428b0",
        "accuracy_confirmed": true
      },
      "documents_delivered": [
        {
          "document_id": "doc-ipid-pet-fr",
          "version": "2026-09",
          "sha256": "fcc6278ba8b67d6258f56c9e5ce11ea5604bde5a49e005416e19891863b99a8d",
          "delivered_at": "2026-10-20T10:03:00+02:00"
        },
        {
          "document_id": "doc-cg-pet-fr",
          "version": "2026-09",
          "sha256": "430aaae4bb2e758857c68516a6077a52c8f46031f445a3d082af80a0e5da2414",
          "delivered_at": "2026-10-20T10:03:00+02:00"
        }
      ]
    },
    "expires_at": "2026-11-20T12:00:00+01:00",
    "user_approval_required": true,
    "confirmation": null,
    "result": null
  }
}
```

---

Licensed under the [Apache License 2.0](https://github.com/OFA-Foundation/open-financial-agent-protocol/blob/main/LICENSE).
