Miridia
Portal
Getting started

Concepts

The organisation, the business, the location, the product, the three order types, and the movement ledger.

Each page of this documentation uses the terms on this page. Read this page first.

Organisation and business

An organisation is your account in Miridia. It holds your data, your users, your API keys, and your subscription. Miridia keeps the data of each organisation separate from all other organisations.

A business is a trading entity in an organisation. It has its own customers, products, locations, orders, and stock. Most organisations have one business. A group of companies, or a franchise, can have more than one.

  • To register a new organisation, send POST /api/organizations to the Global API. This also creates the first business and the first user.
  • To add a business to an organisation that exists, send POST /api/business to the Core API.

A business can be a sub-business of a master business. Read Business hierarchy.

Users, roles, and API keys

A user is a person who logs in. One user can be a member of more than one organisation. A user has a role in each business, and the role gives permissions for each module. Read Users and roles.

An API key lets a system call Miridia without a person. An API key belongs to one organisation and acts for one business. You can revoke it at any time. Read Authentication.

Location

A location is a physical place where the business operates: a warehouse, a storefront, a factory, or an office. Stock, transfers, receipts, production, and price lists all refer to a location. One location is the default for the business. Read Locations.

Product

A product is each item that Miridia tracks. A product has a type: a finished good, a raw material, a component, a consumable, or a service. The type decides where the product can appear. For example, a raw material is purchasable but not sellable. Read Products.

Currency and price lists

Each business has one currency. Each document keeps the currency that it was created in, for example an order or a purchase order. A later change of the business currency does not change an old document. You cannot change the business currency after the first stock movement, because the average cost of stock works in one currency.

A product has a default price in the price history. A price list sets a different price for a context, for example a customer group or a sales channel. A price list has a product scope: "Selected products" prices only the products that you add, and "All products" prices every product except the ones that you exclude. A list has a pricing mode: "Relative pricing" applies one rule to the default price, and "Fixed pricing" gives an amount for each product. A selected-products list beats an all-products list. Read Pricing.

The three order types

Miridia has exactly three order types. Each other process is a status of one of these orders.

Order typeDirectionDoes ownership change?Financial effect
Sales orderFrom you to a customerYesRevenue
Purchase orderFrom a supplier to youYesSpend
Transfer orderFrom one of your locations to anotherNoStock moves at cost

Two rules follow from this model:

  • A branch that requests stock from a warehouse makes a transfer order with the status Requested. The request is not a separate document.
  • A franchisee that buys stock from the head office is a customer. That is a sales order, not a transfer order.

The movement ledger

Miridia does not store a stock count on the product. Each change to stock is a movement, for example a purchase, a sale, a transfer, an adjustment, or a production run. Each movement records the quantity, the balance after the change, and the document that caused it.

The ledger is append-only. You cannot edit or delete a movement. To correct an error, you add a new movement with a reason. Thus the ledger is a full audit record. Read Inventory.

Workflows and events

When something occurs in Miridia, for example an order is created, Miridia raises an event. A workflow subscribes to an event and runs in a workflow engine, for example n8n. Thus you can add behaviour to Miridia without a change to Miridia. Read Workflows.

Next steps

Quickstart in the portal

Set up a business, a location, and your first products.

Quickstart with the API

Log in, make an API key, and send your first request.