Extensions in Manager.io are custom web applications that run inside the Manager interface using an embedded IFRAME. They allow developers to build tailored functionality—such as data visualizations, automation tools, or integrations—without modifying the core Manager software.
When loaded, Manager passes a context object to the extension using the postMessage
API. This context contains everything the extension needs to interact with the Manager API, including:
Extensions can then use this context to make authenticated API calls, display business data, or provide interactive tools directly within the Manager UI. Each extension is tied to a specific page in Manager (like Customers or Sales Invoice), and is configured through the Extensions screen under Settings.
Here is the minimal extension for Manager.io:
<html>
<body>
<h1>Sample Extension</h1>
<script>
window.addEventListener("message", (event) => {
window.managerAppContext = event.data;
});
</script>
</body>
</html>
The script above listens for a postMessage
event from Manager. When the extension is loaded in an IFRAME, Manager will send a context object. This object will be stored in the window.managerAppContext
variable.
To embed extension in Manager.io:
Sample Extension
https://extensions.manager.io/example
)/bank-and-cash-accounts
The managerAppContext
contains:
Business
, Key
)Once you have the context, you can make API calls like this:
fetch("${window.managerAppContext.apiEndpoint}/customers", {
method: "GET",
headers: {
"Authorization": "Bearer ${window.managerAppContext.apiAccessToken}"
}
})
.then(response => response.json())
.then(data => {
// Do something with the data
});
Use the API to read or write data. Remember: