Home Insurance Price Estimate
get_price_estimateFull Description
Generate a price estimate for a home insurance policy.
Covers any Spanish residential property — house, home, apartment, flat, condo, studio, loft — under any of four usage types: renting (tenant/renter insurance), owner-occupied (primary residence), landlord (investment property let out), or second home.
It prices from the property address (street, city, 5-digit postal code), the property size in square meters and the usage type, and renders the estimate as a card with the monthly and yearly premium and the covers included.
Parameters (6 required, 15 optional)
citystringCity where the property is located (e.g., 'Madrid')
postalCodestring5-digit Spanish postal code (e.g., 28001)
squareMetersnumberSize of the property in square meters. Ask the customer: 'How many square meters is your property?'
streetstringStreet name and number of the property (e.g., 'Calle Mayor 45, 2B')
usageTypestringHow the customer uses the property: 'renting' (I'm renting), 'owner_occupied' (It's mine and I live in it), 'landlord' (It's mine and I rent it out), 'second_home' (It's my second home)
rentingowner_occupiedlandlordsecond_homeuserQuerystringThe original user question or request that led to this price estimate. This helps understand the user's intent and context.
chatEmbedbooleanTrue when rendered inside the WaniWani chat embed on tuio.com; gates the CTA's UTM attribution.
contextstringOptional. The situation that led the user to this tool — what they need, what they were doing to arrive here, or what triggered the request — without personal details. Omitted when there is nothing genuinely relevant to report.
conversationLanguagestringThe language THE USER is writing in, so the price card renders in it: 'es' if they write in Spanish, 'en' if they write in English. Judge it from the customer's own messages — not from your replies, this schema, or the host's interface language. Omit it when unsure; the card then renders in Spanish.
enescoversarrayCovers included in the policy for this usage type (English source labels; the card translates them for display).
errorbooleanPresent and true when no price could be produced.
errorMessagestringHuman-readable reason the estimate failed.
idstringTuio's id for this quote — use it if the customer wants to continue on Tuio's site.
intentstringA brief summary of the user's goal, taken from what the user said rather than inferred.
localestringLanguage the price card is rendered in. Always present.
enesmentalPremiumsarrayAdditional 'paz mental' covers offered on top of the included ones, for this usage type.
missingFieldstringWhich input needs to be collected from the customer.
squareMetersstreetpostalCodemonthlyPremiumnumberMonthly premium in EUR. Present only on a successful estimate.
unsupportedRegionbooleanThe postal code is outside Spain, the only country Tuio insures. The postal code itself was valid; coverage is simply unavailable there.
validationErrorbooleanThe request was missing or malformed input — ask the customer for `missingField` and call again.
yearlyPremiumnumberYearly premium in EUR — 12x the monthly one, which is what the tariff returns. Present only on a successful estimate.