Locations
A location is a physical site where the business operates. Warehouses, stores, factories, and offices are all locations. Miridia uses one concept for all of them.
Many records refer to a location:
- Stock is held for each product at each location.
- A purchase order has a destination location.
- A transfer order moves stock from one location to another.
- A work order has a production location.
- A price list can apply to a location.
Location types
Each location has a type:
| Type | Typical use |
|---|---|
Headquarters | The head office. |
Office | An office with no stock. |
Warehouse | A warehouse or a distribution centre. |
Storefront | A shop or a branch that sells to customers. |
Factory | A site that produces goods. |
Remote | A remote site, for example a pickup point. |
Other | Any other site. |
Location codes
Give each location a short code. Use the code on documents, in reports, and in conversation. Examples:
CPT-WH1for the first warehouse in Cape TownJHB-STOREfor the Johannesburg storeDBN-FACTORYfor the Durban factory
The default location
One location is the default location of the business. Miridia uses it in two situations:
- An order has no origin location. The order starts at the default location.
- A connected sales channel syncs stock. The default location is the fallback.
Add a location
Open the locations page
In the portal, go to the settings of the business and open Locations.
Add the location
Give the location a title, a type, a code, and an address. Select the country of the address from the list of countries. Miridia stores the ISO 3166-1 alpha-2 code, for example ZA.
Set the capabilities
Optionally, set what the location can do. Read the next section.
Capabilities
Each location has a set of capability flags. The flags tell what the location can do:
A location with no saved capabilities has no restrictions.
Miridia enforces the capability flags. For example, a location that cannot buy does not appear as the destination of a purchase order. Read Business hierarchy.
A typical set-up for a franchise has two kinds of location:
| Flag | Branch | Distribution centre |
|---|---|---|
mayCreatePurchaseOrders | No | Yes |
mayRequestTransferOrders | Yes | No |
mayFulfillTransferOrders | No | Yes |
mayCreateSalesOrders | Yes | Yes |
defaultFulfillmentLocationId | The distribution centre | Not set |
Location insights
The location insights give metrics for each location over a period. For one location, you can also get the top-selling products by revenue and the monthly inventory turnover history.
The location insights are reports on the query service, at https://qi.miridia.io. Send the same token or API key and the same X-Business-Id header as to the Core API. The user needs the View permission on the Insights module.
| Report | What it gives |
|---|---|
GET /reports/locations/summary | The sales, inbound, outbound, and inventory metrics of each location. Send locationId to get one location. |
GET /reports/locations/top-products | The products that sold the most at one location, by revenue. Send locationId. take sets the number of products, from 1 to 50. The default is 10. |
GET /reports/locations/turnover-history | The stock that came in and went out at one location, for each month. Send locationId. |
Each report needs a period. Send from and to in the form yyyy-MM-dd. Both dates are inclusive. On the summary, compare=previous or compare=yoy adds the revenue and the orders of a comparison period to each row. The default is compare=none.
curl "https://qi.miridia.io/reports/locations/summary?from=2026-10-01&to=2026-10-31" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
The response has the form { "data": [ ... ], "statusCode": "OK", "messages": [] }.
API reference
Pricing
Use the price history for the default price, and use price lists to set a different price for a channel, a location, a zone, a customer group, or a customer.
Inventory
Track stock for each product at each location with an append-only movement ledger. Adjust, count, transfer, trace, and set reorder points.