Tools
get_quote
Get a quote for one plan: its price in the requested currency, and the link where the traveler buys it on getwigoo.com.
- Read only
- Idempotent
- Closed world
The last step before the traveler pays. It returns the price of one plan, the plan link that opens its purchase, and the steps to finish the purchase without an account. It does not place an order: the purchase happens on the website.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
destination_id | string | Yes | Destination id from search_destinations, e.g. "jp" or "eu-42".1 to 40 characters |
plan_id | string | Yes | Plan id from list_plans.1 to 80 characters |
currency | string | No | ISO 4217 code for prices, e.g. EUR, GBP, JPY. Defaults to USD.Three letters |
language | string | No | Language of the buy link and of region names: en, it, es, fr, de, pl, pt, tr. Defaults to en.Up to 10 characters |
Behavior
- Give it a
destination_idand aplan_idthat belong together. A plan id from another destination is a tool error. priceis in the requested currency.price_usdis the same plan in US dollars, the currency Wigoo prices in first, which is useful to compare or to show both.buy_urlis built for the plan: it opens the purchase sheet for that plan, in the requestedlanguage. Hand it to the traveler unchanged. See the plan link.how_to_buyis written for a model to follow. It names the buttons exactly as they appear on the page in the requested language, so an agent that drives a browser can find them. The same labels are in checkout without an account.
Response
| Field | Type | Meaning |
|---|---|---|
destination | object | id and name of the destination |
plan | object | The plan, as in list_plans |
price | price | The list price in the requested currency, same as plan.price |
price_usd | price | The list price in US dollars |
buy_url | string | The link that opens the purchase of this plan |
how_to_buy | string | The steps to buy without an account, with the page's own button labels |
note | string | A reminder that the price is a list price and the final amount is set at checkout |
Example
curl https://api.getwigoo.com/api/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"get_quote","arguments":{"destination_id":"jp","plan_id":"JP_1_7","currency":"EUR","language":"it"}}}'{
"destination": { "id": "jp", "name": "Japan" },
"plan": {
"plan_id": "JP_1_7",
"name": "Japan 1GB 7Days",
"type": "fixed",
"data": "1 GB",
"validity_days": 7,
"price": { "amount": 2.19, "currency": "EUR", "formatted": "€2.19" },
"networks": ["KDDI/au (5G)", "NTT docomo (5G)", "Rakuten Mobile (5G)", "SoftBank (5G)"],
"supports_top_up": true
},
"price": { "amount": 2.19, "currency": "EUR", "formatted": "€2.19" },
"price_usd": { "amount": 2.49, "currency": "USD", "formatted": "$2.49" },
"buy_url": "https://getwigoo.com/it/buy/jp?plan=JP_1_7&days=7&utm_source=mcp&utm_medium=agent",
"how_to_buy": "Open buy_url: the page opens on this plan with the purchase sheet ready. No account is needed: enter the traveler's email and choose \"Continua senza codice\", the underlined link under the email field. Then pay with a card, Apple Pay or Google Pay. The eSIM QR code appears on the page right after payment and is also sent to that email. If the sheet is not open, find the 1 GB plan for 7 days and press \"Compra\". Text in quotes is written exactly as it appears on the page.",
"note": "List price. The final amount is calculated at checkout, in the buyer's currency."
}Note how the labels in how_to_buy follow language: the page is Italian, so the buttons are Continua senza codice and Compra.