Code for a Terudo Element
elements_snippetReady-to-paste code that mounts one Terudo Element in a page, for HTML, React, Next.js or Vue, with the trip data given. Optionally the server code for an element session (client discount, trusted email, reference, return URL).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"element": "<element>"
},
"name": "elements_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Departure, YYYY-MM-DD. | |
| key | No | A publishable key pk_live_… or pk_test_…. Default: the public demo key. | |
| days | No | plans: adds daily plans of that length. | |
| color | No | Brand colour, e.g. #0a5b8a. | |
| No | Traveller email to prefill, when the page knows it. | ||
| start | No | Arrival, YYYY-MM-DD. | |
| locale | No | fr, en, de, es, it, pt, zh, ar or hi. Default en. | |
| element | Yes | Which element: booking-banner (confirmation page), trip-offer (visa approval, trip page), plans (destination page), destination-picker (shop), esim-status (customer area). | |
| esim_id | No | esim-status: the order's esim.id. | |
| session | No | Also give the server code creating an element session. | |
| framework | No | Default html. | |
| return_url | No | Where the checkout sends the traveller back. | |
| destination | No | ISO country code (MA, JP) or region (EU-35). |