Draft 0.1
Schema reference, draft 0.1
Pages and sections
- 1. Identity of the extension
- 2. Common types
- 3. Distributor (core, level 1)
- 4. Products (core, level 1)
- 5. Documents (core, level 1)
- 6. Question sets (core, level 2)
- 7. Quote (core, level 2)
- 8. Sector modules
- 9. Insurance module
- 10. Parties, needs and consent (core)
- 11. PAP operations with financial terms (levels 3 and 4)
- 12. Evidence (core)
- 13. Agreements (core, level 4)
- 14. Errors (core)
- 15. Conversation binding (PROPOSED, NOT DECIDED)
- 16. Tool index
Every type of OFAP draft 0.1, generated from schema.ts through schema.json. The sections follow schema.ts. The rules in the descriptions use the RFC 2119 keywords.
1.Identity of the extension
ConformanceLevel
Conformance level that a distributor declares.
- 1 Inform:
get_distributor,list_products,get_documents - 2 Quote: level 1, plus
get_question_setandquote - 3 Subscribe: level 2, plus
submit_applicationorconclude - 4 Service: level 3, plus
get_agreementandamend_agreement
A server that declares a level MUST implement every tool of that level and of the levels below it, except that level 3 needs only one of submit_application and conclude.
Type: one of 1, 2, 3, 4.
InterfaceKind
How a distributor exposes the protocol.
Type: one of tools, conversation.
OfapSettings
Settings object of the extension. A server puts it under capabilities.extensions["org.openfinancialagent/ofap"] in its MCP server/discover response, and under the same key in the extensions field of its PAP poppy.json.
| Field | Type | Required | Description |
|---|---|---|---|
version |
string | Yes | Protocol version the server implements. |
conformance_level |
ConformanceLevel |
Yes | |
interfaces |
list of InterfaceKind |
Yes | |
sectors |
list of Sector |
Yes | Sector modules the server implements. |
lines |
list of ProductLine |
Yes | Product lines the server can quote or serve. |
countries |
list of CountryCode |
Yes | Countries where the server's products are sold. |
can_conclude |
boolean | Yes | True when the server can conclude an agreement inside the agent (conclude). False when the customer always finishes on the distributor's own page. |
2.Common types
CountryCode
ISO 3166-1 alpha-2 country code, upper case.
Type: string. Pattern: ^[A-Z]{2}$.
CurrencyCode
ISO 4217 currency code.
Type: string. Pattern: ^[A-Z]{3}$.
LanguageTag
BCP 47 language tag, for example fr or es-ES.
Type: string. Pattern: ^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$.
DateString
Calendar date, ISO 8601.
Type: string (date).
DateTimeString
Date and time with offset, ISO 8601.
Type: string (date-time).
Url
Type: string (uri).
Sha256
Lower-case hex SHA-256 digest.
Type: string. Pattern: ^[a-f0-9]{64}$.
Decimal
A decimal number as a string, so that no value is lost to floating point, for example "12.90".
Type: string. Pattern: ^-?[0-9]+(\.[0-9]+)?$.
Money
| Field | Type | Required | Description |
|---|---|---|---|
amount |
Decimal |
Yes | |
currency |
CurrencyCode |
Yes |
ProductLine
Product line. Servers SHOULD use a value of KnownProductLine. Other values MUST be lower case with underscores.
Type: string. Pattern: ^[a-z][a-z0-9_]*$.
KnownProductLine
Lines that have, or will have, a profile in OFAP. A sector module adds its own group.
Type: one of pet, home, renters, motor, travel, health, life, funeral, borrower_insurance, professional_liability, general_liability, business_owners_policy, workers_compensation.
3.Distributor (core, level 1)
DistributorRole
Role of a party in the distribution chain. The provider roles are in ProviderRole. A sector module adds its intermediary roles here.
Type: ProviderRole or broker or agent or mga or comparator.
RegisterIdentifierType
Kind of public register identifier. A sector module adds the registers of its sector.
Type: one of orias_number, fca_frn, npn, dgsfp_key, other.
Licence
One entry in a public register that gives the right to distribute a product.
| Field | Type | Required | Description |
|---|---|---|---|
country |
CountryCode |
Yes | |
regulator |
string | Yes | Supervising authority, for example "ACPR", "FCA", "DGSFP". |
register |
string | Yes | Name of the public register, for example "ORIAS", "FCA Register", "NIPR". |
identifier_type |
RegisterIdentifierType |
Yes | |
identifier |
string | Yes | |
role |
DistributorRole |
Yes | |
sectors |
list of Sector |
Yes | Sectors this entry covers. |
categories |
list of string | Register categories, for example ORIAS "COA" (insurance broker) or "AGA" (tied insurance agent). | |
subdivisions |
list of string | Subdivisions where the licence applies, for example US states as ISO 3166-2 codes ("US-CA"). Omit when the licence covers the whole country. | |
verification_url |
Url |
Public page where anyone can check the entry. |
GetDistributorParams
Params of get_distributor. No params.
Type: object.
GetDistributorResult
| Field | Type | Required | Description |
|---|---|---|---|
legal_name |
string | Yes | |
trading_name |
string | ||
domain |
string | Yes | Domain the distributor controls. It MUST match the server's own domain. |
roles |
list of DistributorRole |
Yes | |
licences |
list of Licence |
Yes | Every licence the distributor relies on to sell the listed products. |
countries |
list of CountryCode |
Yes | |
complaints_url |
Url |
Where a customer can complain. Required by most regulators. | |
ofap |
OfapSettings |
Yes | Settings the server declares for OFAP. |
4.Products (core, level 1)
ProviderRole
Role of the party that carries the risk or provides the money. A sector module adds its provider role, for example a lender.
Type: insurer.
ProviderRef
The party that carries the risk or provides the money.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | |
legal_name |
string | ||
role |
ProviderRole |
Yes | |
licence |
Licence |
SubscriptionPath
How a customer can subscribe to a product.
Type: one of conclude, application, handoff.
Product
| Field | Type | Required | Description |
|---|---|---|---|
product_id |
string | Yes | |
name |
string | Yes | |
sector |
Sector |
Yes | |
line |
ProductLine |
Yes | |
provider |
ProviderRef |
Provider of the product, when it is not the distributor. | |
countries |
list of CountryCode |
Yes | |
summary |
string | Yes | |
details |
ProductDetails |
Yes | |
subscription_paths |
list of SubscriptionPath |
Yes |
ProductDetails
Details of the product's sector. One member per sector module.
Type: InsuranceProductDetails.
ListProductsParams
| Field | Type | Required | Description |
|---|---|---|---|
country |
CountryCode |
||
sector |
Sector |
||
line |
ProductLine |
||
cursor |
string |
ListProductsResult
| Field | Type | Required | Description |
|---|---|---|---|
products |
list of Product |
Yes | |
next_cursor |
string |
5.Documents (core, level 1)
DocumentType
Kind of document. A sector module adds the documents that the law of its sector asks for.
Type: one of pre_contract_information, terms_of_business, other, ipid, general_conditions, special_conditions, demands_and_needs, proof_of_insurance.
FinancialDocument
| Field | Type | Required | Description |
|---|---|---|---|
document_id |
string | Yes | |
type |
DocumentType |
Yes | |
title |
string | Yes | |
language |
LanguageTag |
Yes | |
version |
string | Yes | Version label set by the distributor. A new text MUST get a new version. |
url |
Url |
Yes | |
media_type |
string | Yes | |
sha256 |
Sha256 |
Yes | Digest of the exact file at url. Used as evidence of what was delivered. |
required_before_commitment |
boolean | Yes | True when the law requires that the customer receives this document before they commit, for example the IPID. |
GetDocumentsParams
Params of get_documents. Give exactly one of the three references.
Variant 1
| Field | Type | Required | Description |
|---|---|---|---|
product_id |
string | Yes | |
country |
CountryCode |
||
language |
LanguageTag |
Variant 2
| Field | Type | Required | Description |
|---|---|---|---|
offer_id |
string | Yes | |
language |
LanguageTag |
Variant 3
| Field | Type | Required | Description |
|---|---|---|---|
agreement_number |
string | Yes | |
language |
LanguageTag |
GetDocumentsResult
| Field | Type | Required | Description |
|---|---|---|---|
documents |
list of FinancialDocument |
Yes |
6.Question sets (core, level 2)
CollectedBy
Who collects the value of a question.
agent: the agent MAY ask and send the value.distributor_page: the value MUST NOT pass through the agent. The customer gives it on the distributor's own page. Use it for identity numbers, bank account and card numbers, tax numbers, health details and passwords.
Type: one of agent, distributor_page.
AnswersSchema
A JSON Schema (2020-12) object that describes the answers. Each property is one question. OFAP adds these keywords to each property:
x-collected-by: aCollectedByvalue. Defaultagent.x-profile-key: the key of the matching question in the line profile, when the question is part of the common core.x-ask: a short question the agent can ask the customer, in plain words.
| Field | Type | Required | Description |
|---|---|---|---|
type |
object |
Yes | |
properties |
map of map of any | Yes | |
required |
list of string |
QuestionSet
| Field | Type | Required | Description |
|---|---|---|---|
question_set_id |
string | Yes | |
version |
string | Yes | Version of this question set. A change in any question MUST change it. |
product_id |
string | Yes | |
sector |
Sector |
Yes | |
line |
ProductLine |
Yes | |
profile |
string | Line profile and version this question set builds on, for example "insurance/pet@0.1". | |
answers_schema |
AnswersSchema |
Yes |
GetQuestionSetParams
| Field | Type | Required | Description |
|---|---|---|---|
product_id |
string | Yes | |
country |
CountryCode |
GetQuestionSetResult
| Field | Type | Required | Description |
|---|---|---|---|
question_set |
QuestionSet |
Yes |
QuestionSetRef
| Field | Type | Required | Description |
|---|---|---|---|
question_set_id |
string | Yes | |
version |
string | Yes |
Answers
Answers keyed by property name in answers_schema.
Type: map of any.
7.Quote (core, level 2)
QuoteParams
Params of quote.
The agent MAY send partial answers. The server then returns needs_input with the missing fields, and the agent calls quote again with more answers. This one loop replaces the multi-step flow tools (action, stateUpdates, sessionId) that most servers use. Some servers already work this way.
To read a quote that is still in progress, send only quote_request_id.
Variant 1
| Field | Type | Required | Description |
|---|---|---|---|
product_id |
string | Yes | |
question_set |
QuestionSetRef |
Yes | |
answers |
Answers |
Yes | |
options |
list of string | Options the customer wants priced, by key (optional covers, extra services). | |
language |
LanguageTag |
Variant 2
| Field | Type | Required | Description |
|---|---|---|---|
quote_request_id |
string | Yes |
Offer
One priced offer. A distributor can return several offers: one per tier, per provider, or per duration.
| Field | Type | Required | Description |
|---|---|---|---|
offer_id |
string | Yes | |
product_id |
string | Yes | |
sector |
Sector |
Yes | |
tier |
string | Name of the tier or plan, for example "Terceros Ampliado" or "Band B". | |
provider |
ProviderRef |
Yes | |
pricing |
Pricing |
Yes | |
indicative |
boolean | Yes | True when the offer is indicative and can change after checks. |
valid_until |
DateTimeString |
Yes | Last moment the offer can be accepted at this price. |
subscription_paths |
list of SubscriptionPath |
Yes | |
handoff_url |
Url |
Page where the customer can continue with this exact offer. Required when subscription_paths contains handoff. It MUST NOT contain personal data. |
|
recommended |
boolean | True when the distributor recommends this offer after advice. |
Pricing
Price in the form of the offer's sector. One member per sector module.
Type: InsurancePricing.
QuoteResult
status: complete
| Field | Type | Required | Description |
|---|---|---|---|
status |
complete |
Yes | |
quote_request_id |
string | Yes | |
question_set |
QuestionSetRef |
Yes | |
answers_sha256 |
Sha256 |
Yes | SHA-256 of the canonical JSON (RFC 8785) of the answers used. |
offers |
list of Offer |
Yes | |
no_offer |
NoOffer |
Required when offers is empty. |
status: needs_input
| Field | Type | Required | Description |
|---|---|---|---|
status |
needs_input |
Yes | |
quote_request_id |
string | Yes | |
missing_fields |
list of FieldIssue |
Yes | Properties of answers_schema that are missing or not valid. |
status: in_progress
| Field | Type | Required | Description |
|---|---|---|---|
status |
in_progress |
Yes | |
quote_request_id |
string | Yes | |
retry_after_seconds |
number | Yes | When the agent SHOULD read the quote again. |
message |
string | Plain-language status, for example "Two insurers have answered, three to go". |
NoOffer
Why no offer is possible.
| Field | Type | Required | Description |
|---|---|---|---|
reason_code |
string | Yes | Stable reason code, for example "risk_not_accepted", "age_not_accepted", "breed_not_accepted", "claims_history_not_accepted", "not_available_in_region". |
message |
string | Yes | Plain-language explanation the agent can pass to the customer. |
FieldIssue
| Field | Type | Required | Description |
|---|---|---|---|
field |
string | Yes | |
issue |
one of missing, invalid, not_accepted |
Yes | |
message |
string |
8.Sector modules
Sector
Sector modules of this draft. Draft 0.1 defines one module: insurance (section 9).
The core is the same for every sector. A sector module adds what the law of its sector asks for. A module MUST define:
- its value in
Sector, and its group of lines inKnownProductLine; - one member of
ProductDetails,PricingandNeedsAssessment, each with asectorfield that holds the module's value; - its values in
ProviderRole,DistributorRole,RegisterIdentifierType,DocumentType,PartyRoleandAmendmentChange, when the sector needs them; - which of its documents are
required_before_commitment; - its line profiles in
profiles.ts, and checks for the rules of its sector that a JSON Schema cannot express.
A module MUST NOT change a core type or a core rule. The tools, the quote loop, the declaration, the PAP operations and the evidence record stay the same for every sector.
A server declares the modules it implements in OfapSettings.sectors. An agent MUST NOT show a product, an offer or an agreement of a sector it does not implement as if it were of a known sector.
Candidate modules for a later draft:
- credit: SECCI and ESIS, creditworthiness (CCD Art. 18, MCD Art. 18), APR and total cost of credit;
- investment: KID (PRIIPs), suitability or appropriateness (MiFID II Art. 25), fees and risk indicator.
Type: insurance.
9.Insurance module
PremiumPeriod
Type: one of month, quarter, half_year, year, single.
Premium
| Field | Type | Required | Description |
|---|---|---|---|
amount |
Money |
Yes | |
period |
PremiumPeriod |
Yes | |
taxes_included |
boolean | Yes | True when taxes and mandatory levies are in amount. |
CoverLimit
| Field | Type | Required | Description |
|---|---|---|---|
key |
string | Yes | Stable key, for example "vet_costs_per_year". |
label |
string | Yes | |
limit |
Money |
||
reimbursement_rate |
number | Share of a claim paid back, from 0 to 1. Used by pet and health cover. |
CoverSummary
| Field | Type | Required | Description |
|---|---|---|---|
included |
list of string | Yes | Covers included, as short labels. |
limits |
list of CoverLimit |
||
excess |
Money |
||
main_exclusions |
list of string | Main exclusions. The full list is in the documents. | |
waiting_period_days |
number |
ProductOption
An option the customer can add (optional cover, extra service).
| Field | Type | Required | Description |
|---|---|---|---|
key |
string | Yes | |
label |
string | Yes | |
price |
Premium or Money |
Cost of the option, in the same form as the main price. |
InsuranceProductDetails
| Field | Type | Required | Description |
|---|---|---|---|
sector |
insurance |
Yes | |
cover |
CoverSummary |
Yes | |
options |
list of ProductOption |
InsurancePricing
| Field | Type | Required | Description |
|---|---|---|---|
sector |
insurance |
Yes | |
premium |
Premium |
Yes | |
alternative_premiums |
list of Premium |
The same price for another period, when the server can give it. | |
cover |
CoverSummary |
Yes | |
options |
list of ProductOption |
||
start_date |
DateString |
InsuranceNeedsAssessment
Demands and needs, recorded before the contract is concluded (IDD Art. 20(1)).
| Field | Type | Required | Description |
|---|---|---|---|
sector |
insurance |
Yes | |
kind |
demands_and_needs |
Yes | |
statement |
string | Yes | The need in the customer's words or a faithful summary. |
advice_given |
boolean | Yes | True when the distributor gave a personal recommendation (advice). |
advice_rationale |
string | Why the recommended offer meets the need. Required when advice_given is true. |
|
recorded_at |
DateTimeString |
Yes |
10.Parties, needs and consent (core)
PartyRole
Role of a party in the agreement. A sector module adds the roles of its sector.
Type: one of subscriber, payer, insured, beneficiary.
Party
A person or organisation in the agreement. Data in a party MUST be limited to what the product needs. Identity numbers MUST NOT be here (see CollectedBy).
| Field | Type | Required | Description |
|---|---|---|---|
party_ref |
string | Yes | Local reference, unique in one application. |
kind |
one of person, organisation |
Yes | |
roles |
list of PartyRole |
Yes | |
display_name |
string | Yes | |
relationship_to_subscriber |
string | Relationship to the subscriber, for example "self", "spouse", "child", "employee". | |
date_of_birth |
DateString |
||
country_of_residence |
CountryCode |
NeedsAssessment
Needs assessment that the law of the sector asks for. One member per sector module.
Type: InsuranceNeedsAssessment.
ContactConsent
The customer's choice about later contact.
| Field | Type | Required | Description |
|---|---|---|---|
channels |
list of one of email, phone, sms, post |
Yes | Channels the distributor MAY use to contact the customer. Empty means none. |
details_collected_by |
CollectedBy |
Yes | When distributor_page, the contact details never pass through the agent. |
providers_may_contact |
boolean | Yes | True only when the customer agreed that providers may contact them too. |
purposes |
list of string | Yes | Purposes the customer agreed to, for example "this_application", "marketing". |
DeliveredDocument
| Field | Type | Required | Description |
|---|---|---|---|
document_id |
string | Yes | |
version |
string | Yes | |
sha256 |
Sha256 |
Yes | |
delivered_at |
DateTimeString |
Yes |
Declaration
The answers the customer commits to.
| Field | Type | Required | Description |
|---|---|---|---|
question_set |
QuestionSetRef |
Yes | |
answers |
Answers |
Yes | |
answers_sha256 |
Sha256 |
Yes | |
accuracy_confirmed |
boolean | Yes | True when the customer confirmed that the answers are true and complete. The agent MUST NOT set it to true for invented or test data. |
11.PAP operations with financial terms (levels 3 and 4)
OperationState
Type: one of proposed, in_progress, succeeded, failed, cancelled, expired.
Operation<(ApplicationTerms|AmendmentTerms)>
A PAP operation. This mirrors the PAP operations extension (version 1). PAP is the authority for every field here except terms and ofap_progress. When the two differ, PAP wins.
An MCP tool returns it in structuredContent.operation. The agent confirms it at the PAP operations endpoint, never through an OFAP tool.
| Field | Type | Required | Description |
|---|---|---|---|
operation_id |
string | Yes | |
revision |
number | Yes | Starts at 1. Increases when the terms change. Only the latest revision can be confirmed. |
state |
OperationState |
Yes | |
summary |
string | Yes | Plain-language terms that the customer can decide from alone. |
terms |
ApplicationTerms or AmendmentTerms |
Yes | |
expires_at |
DateTimeString |
Required while proposed. |
|
user_approval_required |
boolean | Yes | When true, a standing permission is not enough. The customer MUST approve this revision. |
url |
Url |
||
confirmation |
null or object with revision, approved_by, confirmed_at |
Yes | |
result |
null or object with summary, data |
Yes | |
ofap_progress |
OfapProgress |
OFAP reason why the operation is in_progress. Not a PAP field. Clients that do not know OFAP ignore it. |
Operation<AmendmentTerms>
A PAP operation. This mirrors the PAP operations extension (version 1). PAP is the authority for every field here except terms and ofap_progress. When the two differ, PAP wins.
An MCP tool returns it in structuredContent.operation. The agent confirms it at the PAP operations endpoint, never through an OFAP tool.
| Field | Type | Required | Description |
|---|---|---|---|
operation_id |
string | Yes | |
revision |
number | Yes | Starts at 1. Increases when the terms change. Only the latest revision can be confirmed. |
state |
OperationState |
Yes | |
summary |
string | Yes | Plain-language terms that the customer can decide from alone. |
terms |
AmendmentTerms |
Yes | |
expires_at |
DateTimeString |
Required while proposed. |
|
user_approval_required |
boolean | Yes | When true, a standing permission is not enough. The customer MUST approve this revision. |
url |
Url |
||
confirmation |
null or object with revision, approved_by, confirmed_at |
Yes | |
result |
null or object with summary, data |
Yes | |
ofap_progress |
OfapProgress |
OFAP reason why the operation is in_progress. Not a PAP field. Clients that do not know OFAP ignore it. |
Operation<ApplicationTerms>
A PAP operation. This mirrors the PAP operations extension (version 1). PAP is the authority for every field here except terms and ofap_progress. When the two differ, PAP wins.
An MCP tool returns it in structuredContent.operation. The agent confirms it at the PAP operations endpoint, never through an OFAP tool.
| Field | Type | Required | Description |
|---|---|---|---|
operation_id |
string | Yes | |
revision |
number | Yes | Starts at 1. Increases when the terms change. Only the latest revision can be confirmed. |
state |
OperationState |
Yes | |
summary |
string | Yes | Plain-language terms that the customer can decide from alone. |
terms |
ApplicationTerms |
Yes | |
expires_at |
DateTimeString |
Required while proposed. |
|
user_approval_required |
boolean | Yes | When true, a standing permission is not enough. The customer MUST approve this revision. |
url |
Url |
||
confirmation |
null or object with revision, approved_by, confirmed_at |
Yes | |
result |
null or object with summary, data |
Yes | |
ofap_progress |
OfapProgress |
OFAP reason why the operation is in_progress. Not a PAP field. Clients that do not know OFAP ignore it. |
OfapProgress
| Field | Type | Required | Description |
|---|---|---|---|
reason |
one of licensed_review, provider_decision, customer_action_on_distributor_page, payment_pending |
Yes | |
url |
Url |
||
expected_by |
DateTimeString |
ApplicationTerms
Terms of an application or a conclusion. Every field the law needs as evidence is here, so that a confirmed revision records exactly what the customer accepted.
| Field | Type | Required | Description |
|---|---|---|---|
offer_id |
string | Yes | |
product_id |
string | Yes | |
sector |
Sector |
Yes | |
provider |
ProviderRef |
Yes | |
pricing |
Pricing |
Yes | |
options |
list of string | Yes | |
start_date |
DateString |
||
parties |
list of Party |
Yes | |
declaration |
Declaration |
Yes | |
needs_assessment |
NeedsAssessment |
Yes | It MUST be of the same sector as the offer. |
documents_delivered |
list of DeliveredDocument |
Yes | Documents delivered before this revision was proposed. Every document of the offer with required_before_commitment: true MUST be in this list. |
contact_consent |
ContactConsent |
Yes | |
withdrawal_period_days |
number | Days the customer has to withdraw after conclusion, when the law gives the right. |
SubmitApplicationParams
| Field | Type | Required | Description |
|---|---|---|---|
offer_id |
string | Yes | |
parties |
list of Party |
Yes | |
declaration |
Declaration |
Yes | |
needs_assessment |
NeedsAssessment |
Yes | |
documents_delivered |
list of DeliveredDocument |
Yes | |
contact_consent |
ContactConsent |
Yes | |
options |
list of string | ||
start_date |
DateString |
SubmitApplicationResult
When the operation succeeds, result.data holds an ApplicationOutcome.
| Field | Type | Required | Description |
|---|---|---|---|
operation |
Operation<ApplicationTerms> |
Yes |
ApplicationOutcome
| Field | Type | Required | Description |
|---|---|---|---|
application_id |
string | Yes | |
evidence |
EvidenceRecord |
Yes | |
handoff_url |
Url |
Yes | Page where the customer finishes the subscription. |
ConcludeParams
Type: SubmitApplicationParams.
ConcludeResult
Result of conclude. The operation MUST have user_approval_required: true. When it succeeds, result.data holds a ConcludeOutcome.
| Field | Type | Required | Description |
|---|---|---|---|
operation |
Operation<ApplicationTerms> |
Yes |
ConcludeOutcome
| Field | Type | Required | Description |
|---|---|---|---|
agreement_number |
string | Yes | |
evidence |
EvidenceRecord |
Yes | |
documents |
list of FinancialDocument |
Yes |
12.Evidence (core)
EvidenceRecord
What the distributor keeps when an operation succeeds. It links the exact revision the customer accepted to the documents, the declaration, the needs assessment and the consent. The distributor MUST keep it for the period the law requires.
A PAP confirmation proves that an agent stated the customer approved a revision. It does not prove that the customer saw the terms. This record adds what was delivered and what was declared. It still does not prove that the customer read the documents.
| Field | Type | Required | Description |
|---|---|---|---|
record_id |
string | Yes | |
operation_id |
string | Yes | |
revision |
number | Yes | |
approved_by |
one of user, standing_permission |
Yes | |
confirmed_at |
DateTimeString |
Yes | |
documents_delivered |
list of DeliveredDocument |
Yes | |
question_set |
QuestionSetRef |
Yes | |
answers_sha256 |
Sha256 |
Yes | |
needs_assessment |
NeedsAssessment |
Yes | |
contact_consent |
ContactConsent |
Yes | |
terms_sha256 |
Sha256 |
Yes | SHA-256 of the canonical JSON (RFC 8785) of the confirmed terms. |
13.Agreements (core, level 4)
AgreementStatus
Type: one of pending, active, suspended, lapsed, cancelled, closed, expired.
Agreement
An agreement in force. In the insurance module, a policy.
| Field | Type | Required | Description |
|---|---|---|---|
agreement_number |
string | Yes | |
sector |
Sector |
Yes | |
status |
AgreementStatus |
Yes | |
product_id |
string | Yes | |
line |
ProductLine |
Yes | |
provider |
ProviderRef |
Yes | |
parties |
list of Party |
Yes | |
pricing |
Pricing |
Yes | Price as agreed, in the form of the sector. |
options |
list of string | Yes | |
start_date |
DateString |
Yes | |
renewal_date |
DateString |
||
end_date |
DateString |
||
subjects |
list of Subject |
Yes | What the agreement covers: a pet, a home, a vehicle, a property. |
documents |
list of FinancialDocument |
Yes | Includes the proof of insurance when the product has one. |
Subject
| Field | Type | Required | Description |
|---|---|---|---|
subject_ref |
string | Yes | |
kind |
one of pet, home, vehicle, property, valuable_item, business, person, other |
Yes | |
display_name |
string | Yes | |
attributes |
map of any | Yes | Attributes of the subject, following the line profile. |
GetAgreementParams
Requires a signed-in PAP session with read scope.
| Field | Type | Required | Description |
|---|---|---|---|
agreement_number |
string | Yes |
GetAgreementResult
| Field | Type | Required | Description |
|---|---|---|---|
agreement |
Agreement |
Yes |
AmendmentChange
One change to an agreement. A sector module adds the changes of its sector.
kind: update_address
| Field | Type | Required | Description |
|---|---|---|---|
kind |
update_address |
Yes | |
country |
CountryCode |
Yes | |
postal_code |
string | Yes | |
city |
string | Yes | |
street |
string | Yes |
kind: add_party
| Field | Type | Required | Description |
|---|---|---|---|
kind |
add_party |
Yes | |
party |
Party |
Yes |
kind: remove_party
| Field | Type | Required | Description |
|---|---|---|---|
kind |
remove_party |
Yes | |
party_ref |
string | Yes |
kind: add_option
| Field | Type | Required | Description |
|---|---|---|---|
kind |
add_option |
Yes | |
option |
string | Yes |
kind: remove_option
| Field | Type | Required | Description |
|---|---|---|---|
kind |
remove_option |
Yes | |
option |
string | Yes |
kind: change_excess
| Field | Type | Required | Description |
|---|---|---|---|
kind |
change_excess |
Yes | |
excess |
Money |
Yes |
kind: add_subject
| Field | Type | Required | Description |
|---|---|---|---|
kind |
add_subject |
Yes | |
subject |
Subject |
Yes |
kind: remove_subject
| Field | Type | Required | Description |
|---|---|---|---|
kind |
remove_subject |
Yes | |
subject_ref |
string | Yes |
AmendAgreementParams
Requires a signed-in PAP session with write scope.
| Field | Type | Required | Description |
|---|---|---|---|
agreement_number |
string | Yes | |
changes |
list of AmendmentChange |
Yes | |
effective_date |
DateString |
When the changes take effect. Default: the earliest date the provider accepts. | |
declaration |
Declaration |
Required when a change adds a party or a subject that the provider must price. | |
needs_assessment |
NeedsAssessment |
||
documents_delivered |
list of DeliveredDocument |
AmendmentTerms
| Field | Type | Required | Description |
|---|---|---|---|
agreement_number |
string | Yes | |
changes |
list of AmendmentChange |
Yes | |
effective_date |
DateString |
Yes | |
pricing_before |
Pricing |
Yes | |
pricing_after |
Pricing |
Yes | |
amount_due_now |
Money |
Amount the customer pays at once, or gets back when negative, for example a premium adjustment. | |
declaration |
Declaration |
||
needs_assessment |
NeedsAssessment |
||
documents_delivered |
list of DeliveredDocument |
Yes |
AmendAgreementResult
Result of amend_agreement. The operation MUST have user_approval_required: true when pricing_after differs from pricing_before, when amount_due_now is set, or when a change adds or removes a party or a subject. A standing permission is not enough for these.
| Field | Type | Required | Description |
|---|---|---|---|
operation |
Operation<AmendmentTerms> |
Yes |
14.Errors (core)
OfapErrorCode
Type: one of not_licensed, not_available_in_region, product_not_found, offer_not_found, offer_expired, question_set_outdated, sensitive_field_received, documents_not_delivered, accuracy_not_confirmed, needs_assessment_invalid, agreement_not_found, amendment_not_allowed, not_supported.
OfapError
Error returned in an MCP tool result with isError: true, in structuredContent.error. PAP errors (insufficient_scope, sign_in_required, terms_changed) keep their PAP form.
| Field | Type | Required | Description |
|---|---|---|---|
code |
OfapErrorCode |
Yes | |
message |
string | Yes | |
fields |
list of FieldIssue |
15.Conversation binding (PROPOSED, NOT DECIDED)
ConversationData
PROPOSED. Some distributors expose only a company agent. If OFAP accepts them at level 2, each message that carries an OFAP object puts it here, in the message's structured data (data in a PAP conversation, structuredContent in a chat tool).
| Field | Type | Required | Description |
|---|---|---|---|
question |
object with field, ask, schema |
||
quote |
QuoteResult |
||
documents |
list of FinancialDocument |
||
operation |
Operation<(ApplicationTerms|AmendmentTerms)> |
16.Tool index
ToolName
Type: one of get_distributor, list_products, get_documents, get_question_set, quote, submit_application, conclude, get_agreement, amend_agreement.
SessionRequirement
Session that a tool needs (PAP draft 0.2).
Type: one of none, signed_out_or_none, signed_in_read, signed_in_write.
ToolSignatures
Params and result type of each tool.
| Field | Type | Required | Description |
|---|---|---|---|
get_distributor |
object with params, result |
Yes | |
list_products |
object with params, result |
Yes | |
get_documents |
object with params, result |
Yes | |
get_question_set |
object with params, result |
Yes | |
quote |
object with params, result |
Yes | |
submit_application |
object with params, result |
Yes | |
conclude |
object with params, result |
Yes | |
get_agreement |
object with params, result |
Yes | |
amend_agreement |
object with params, result |
Yes |