Quote one Flat
quote_flatUse while the customer is still deciding — "how much is …?": the exact price of one configuration (country, speed, days and optionally which Flat / networks), the server price the customer would pay. Quote it as returned, never compute or scale it yourself. The result carries a buy_url for reference; when the customer says they want to buy, call start_checkout instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | Yes | Days of mobile data (1–30). | |
| flat | No | Optional: which Flat of the country, as get_flats numbers them. Omit = the cheapest Flat that allows the speed. | |
| mbps | No | Maximum speed in Mbps (5, 10, 25, 50; default 5). Data is unlimited at that speed. 25 Mbps and up need a 5G network. | |
| bucket | No | Optional language-region bucket the customer shops in, e.g. en-gb, de-de (sets currency and link locale). Defaults from language. | |
| currency | No | Optional ISO 4217 override for prices. | |
| language | No | ISO language of the conversation, e.g. en, de, ja. Localizes country names and sets the language/currency of links and prices. | |
| networks | No | Optional: operator names from get_flats that must be included (the cheapest Flat holding all of them is used). Ignored when flat is given. | |
| destination | Yes | Country in ANY language or its ISO code, e.g. "Japan", "Japon", "jp". Map a city to its country first. One country per Flat. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iso | No | ISO 3166-1 alpha-2, lower case. | |
| data | No | ||
| days | No | Days booked, counted from the first connection in the destination country. | |
| flat | No | Which Flat of the country (1 = cheapest network only; higher numbers include more networks). Pass it back to quote the same Flat. | |
| name | No | The Flat's name as the shop shows it: "Flat · Vodafone + O2" or "Flat · all 4 networks". | |
| note | No | Present when something about the request had to be adjusted (a step up for the speed, an unknown network) — read it to the customer. | |
| price | No | FULL price of this configuration in currency — the amount paid. Not per day. | |
| topup | No | How the customer adds days to this Flat later (not through the tools). | |
| has_5g | No | A 5G network is included. | |
| starts | No | ||
| buy_url | No | The roamflat card preset to exactly this configuration. Use verbatim. | |
| hotspot | No | ||
| currency | No | ||
| networks | No | Operator names included, as the shop states them. | |
| speed_mbps | No | The chosen maximum speed. Data is unlimited at this speed. | |
| destination | No | Resolved country name (localized). | |
| price_basis | No | ||
| all_networks | No | ||
| price_per_day | No | For comparison only. Never multiply it yourself. | |
| price_is_final | No | ||
| networks_unmatched | No | Present when a requested network does not exist in this country: those names. The quote then uses the Flat listed in networks. |