Miridia
Portal
Developers

API overview

The two Miridia APIs, their hosts, and how a request finds your organisation and your business.

Almost every action in the Miridia portal is also available through the API. Use the API to connect a system to Miridia, to import data, or to build your own automation.

Two APIs

Miridia has two REST APIs. Each API has its own host.

APIHostWhat it does
Global APIhttps://global.miridia.ioYour identity and your account: login, organisations, API keys, subscriptions, and support tickets.
Core APIhttps://api.miridia.ioThe data of your business: products, prices, locations, inventory, purchase orders, transfer orders, production, orders, customers, workflows, and insights.

The Global API issues the token. The Core API accepts that token and serves the data of your organisation.

How a request finds your data

Each request to the Core API must answer two questions: which organisation, and which business.

  1. The organisation comes from the credential. A token or an API key belongs to one organisation. Miridia keeps the data of each organisation separate. A credential can never read the data of a different organisation.
  2. The business comes from the X-Business-Id header. Send the id of the business in this header on each request. Miridia makes sure that the user is a member of that business. An API key that names a business does not need the header.

A few operations do not need a business, for example GET /api/me. The reference tells you when the header is not necessary.

The reference

Each page of the reference covers one resource. Each operation shows:

  • The method and the path.
  • The access rule: which permission the caller needs.
  • The parameters and the request body, with each field.
  • The response envelope, and a link to each model on the page.
  • A curl example and an example response.

Authentication

Log in, choose an organisation, and make an API key.

Conventions

Response envelopes, paging, filters, enums, dates, and errors.

Global API reference

Authentication, organisations, users, linked accounts, and subscriptions.

Core API reference

Catalogue, inventory, procurement, manufacturing, sales, logistics, insights, integrations, and administration.

Versions

Most Core API paths include a version segment, for example /api/v1/purchase-orders. The segment lets Miridia add a new version of an operation next to the current version. Some older paths have no version segment, for example /api/business.

OpenAPI documents

The reference comes from the OpenAPI documents of the two APIs. Download them to generate a client, or to import the APIs into a tool such as Postman.