Miridia
Portal
Guides

Locations

Add the physical sites of the business. Stock, transfers, production, receipts, and price lists all refer to a location.

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:

TypeTypical use
HeadquartersThe head office.
OfficeAn office with no stock.
WarehouseA warehouse or a distribution centre.
StorefrontA shop or a branch that sells to customers.
FactoryA site that produces goods.
RemoteA remote site, for example a pickup point.
OtherAny other site.

Location codes

Give each location a short code. Use the code on documents, in reports, and in conversation. Examples:

  • CPT-WH1 for the first warehouse in Cape Town
  • JHB-STORE for the Johannesburg store
  • DBN-FACTORY for 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:

mayCreatePurchaseOrders
boolean
The location can buy from a supplier.
mayRequestTransferOrders
boolean
The location can request stock from another location.
mayFulfillTransferOrders
boolean
The location can send stock to another location.
mayCreateSalesOrders
boolean
The location can sell to customers.
mayProduce
boolean
The location can run work orders.
defaultFulfillmentLocationId
uuid
The location that usually supplies this location, for example the distribution centre of a store.

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:

FlagBranchDistribution centre
mayCreatePurchaseOrdersNoYes
mayRequestTransferOrdersYesNo
mayFulfillTransferOrdersNoYes
mayCreateSalesOrdersYesYes
defaultFulfillmentLocationIdThe distribution centreNot 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.

ReportWhat it gives
GET /reports/locations/summaryThe sales, inbound, outbound, and inventory metrics of each location. Send locationId to get one location.
GET /reports/locations/top-productsThe 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-historyThe 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.

Terminal
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