Developers
Everything a company’s staff manage in Majali is available to the company’s own website and tools through one API. This section is for whoever builds that website or connects those tools.
Three ways to plug in
| Situation | How |
|---|---|
| The company has a website and a developer | The website reads listings, areas and team profiles from the API, and posts enquiries and booking requests straight from the visitor’s browser. Static sites rebuild on the rebuild hook. |
| The company keeps a CRM, a helpdesk or an accounting package | A server key with the right scopes, and webhooks to hear about changes. See keeping your CRM in sync. |
| The company’s holiday-home guests should stay on its website | The guest space is embedded with one snippet. |
The address
Every call goes to the company’s own host: https://<company host>/api/v1/..., where the host is <company>.cloud.majali.app or the company’s own domain. The host decides which company’s data you get, so no path, header or body ever carries a company identifier.
What needs a key
- Reads need no key. They return only what the company publishes, and are limited per visitor address.
- Enquiries and booking requests from a website need a publishable key, sent from one of the key’s allowed origins.
- Everything else needs a server key, sent from a server, never from a browser.
See Keys.
The reference
The full reference, with every field, example and error, is inside the company’s admin: Developers, then API documentation. It is not public: a staff member whose role includes reading the API documentation opens it, and can save the schema from there for typed clients. Ask the company for access, or for the schema file.
In this section
- Keys: publishable keys, server keys, scopes, rotation.
- Conventions: languages, pagination, errors, rate limits, versioning.
- Listings and SEO: the catalogue reads, paths, structured data, the sitemap feed.
- Lead forms: sending enquiries from any form, including owners offering a property.
- Bookings: availability, quotes and booking requests for holiday homes.
- Keeping your CRM in sync: contacts, leads, activities and tasks, with no echoes.
- Leases, maintenance and pipelines: mirroring the other lines of business.
- Webhooks and the rebuild hook: the events, their signature, the static-site hook.
- Embedding the guest space: the loader snippet and its messages.
- Typed clients and the reference.