Miridia
Portal
Getting started

Quickstart with the API

Log in, make an API key, and read your products with curl in five minutes.

The Miridia API has two parts. The Global API manages your identity: login, organisations, API keys, and billing. The Core API holds your business data: products, stock, orders, and more. Read the API overview for the full model.

What you need

Log in

Send your email address and password to the Global API.

Terminal
curl -X POST https://global.miridia.io/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"<your-password>"}'

The response holds a session with an access token. Keep the value of data.session.accessToken.

Response
{
  "data": {
    "requiresOrganizationSelection": false,
    "session": {
      "accessToken": "eyJhbGciOiJSUzI1NiIs...",
      "expiresAtUtc": "2026-09-29T09:00:00Z",
      "organization": { "id": "...", "slug": "your-company", "name": "Your Company" }
    }
  },
  "statusCode": 200,
  "messages": []
}
If you are a member of more than one organisation, the response holds requiresOrganizationSelection: true, a selectionToken, and a list of organizations. Send POST /api/auth/select-organization to choose one. Read Authentication.

Find your business id

Read your account from the Core API. The response lists the businesses that you can use.

Terminal
curl https://api.miridia.io/api/me \
  -H "Authorization: Bearer $MIRIDIA_TOKEN"

The data.userBusinesses list holds your businesses. Keep the id of the business that you want to use.

Make an API key

An access token expires after a short time. For a system that calls Miridia, make an API key.

Terminal
curl -X POST https://global.miridia.io/api/auth/tokens \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"label":"My first integration","businessId":"<your-business-id>"}'

The response holds the key in data.token. Miridia shows the key only one time. Keep it in a secret store.

Read your products

Send the API key in the x-dispatch-api-key header.

Terminal
curl "https://api.miridia.io/api/v1/Products?Page=1&PageSize=20" \
  -H "x-dispatch-api-key: $MIRIDIA_API_KEY"

The response is a PagedResult. The data field holds the products.

Next steps