Quickstart
Create and publish an itinerary in five calls. You need two keys from Organization → API keys in the Mountaya app, and the member the writes act as:
- a publishable key with the
studio-embeddedscope, - a secret key, which stays on your server,
- the member's
user_id(find it).
1
Every write acts as a member. Your server mints a token that names them, for studio-embedded.
The token lasts five minutes. Check that user_id names your member.
2
An itinerary takes an activity at creation. The catalog nests activities under categories: pick hiking-and-trail.
3
POST /v1/itineraries takes a name, the activity, and whether the itinerary is private.
It answers 201 Created. The Idempotency-Key makes a retry safe: the same key is answered the first 201.
4
A directions segment takes a GeoJSON MultiPoint of 2 to 45 waypoints, as [longitude, latitude]. The router draws the trail between them.
The answer is the whole itinerary, with its totals recomputed. Distances are in meters, durations in seconds.
5
Edits change a draft. Publishing freezes the draft into what embeds and share links show.
Your itinerary now shows in embeds and share links. Publishing covers edits after a publish.
List your members with a key that carries the management scope. Create one under Organization → API keys: it carries no other scope, so it stays on your server.
Match the person signed in to your product by email, and store their user_id.