Miridia
Portal
Insights

Location insights

Aggregated sales, inbound, outbound and inventory insight metrics for business locations.

Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.

MethodPathOperation
GET/api/v1/insights/locationsGet location insights
GET/api/v1/insights/locations/{locationId}Get location insight
GET/api/v1/insights/locations/{locationId}/top-productsGet top products
GET/api/v1/insights/locations/{locationId}/turnover-historyGet turnover history

Get location insights

GET/api/v1/insights/locations

Returns aggregated insight metrics for every location in the business over the period. Defaults to the current calendar month when from/to are not supplied.

Access. Send a bearer token or an API key. The caller needs the Insights view permission.

Parameters

NameInTypeRequiredDescription
fromquerystring (date-time)No
toquerystring (date-time)No

Response

200. Returns a PagedResult envelope. Each item in data is LocationInsightResponse.

Request
curl -X GET "https://api.miridia.io/api/v1/insights/locations" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "count": 0,
  "totalCount": 0,
  "page": 0,
  "finalPage": 0,
  "pageSize": 0,
  "hasMore": true,
  "statusCode": "OK",
  "data": [
    {
      "locationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "title": "string",
      "locationType": "Office",
      "currency": "string",
      "totalRevenue": 0,
      "totalCost": 0,
      "profit": 0,
      "orders": 0,
      "averageOrderValue": 0,
      "previousOrders": 0,
      "previousRevenue": 0,
      "inboundPurchaseOrders": 0,
      "inboundPurchaseValue": 0,
      "inboundTransfers": 0,
      "outboundTransfers": 0,
      "inventoryValue": 0,
      "activeProducts": 0,
      "channels": [
        {}
      ],
      "periodFrom": "2026-09-29T08:00:00Z",
      "periodTo": "2026-09-29T08:00:00Z"
    }
  ],
  "messages": [
    {
      "title": "string",
      "message": "string",
      "level": "Standard",
      "icon": "SyncAlert",
      "code": "string"
    }
  ]
}

Get location insight

GET/api/v1/insights/locations/{locationId}

Returns aggregated insight metrics for one location over the period. Defaults to the current calendar month when from/to are not supplied.

Access. Send a bearer token or an API key. The caller needs the Insights view permission.

Parameters

NameInTypeRequiredDescription
locationIdpathstring (uuid)Yes
fromquerystring (date-time)No
toquerystring (date-time)No

Response

200. Returns a SingleResult envelope. The data field is LocationInsightResponse.

Request
curl -X GET "https://api.miridia.io/api/v1/insights/locations/{locationId}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "message": "string",
  "messages": [
    {
      "title": "string",
      "message": "string",
      "level": "Standard",
      "icon": "SyncAlert",
      "code": "string"
    }
  ],
  "data": {
    "locationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "title": "string",
    "locationType": "Office",
    "currency": "string",
    "totalRevenue": 0,
    "totalCost": 0,
    "profit": 0,
    "orders": 0,
    "averageOrderValue": 0,
    "previousOrders": 0,
    "previousRevenue": 0,
    "inboundPurchaseOrders": 0,
    "inboundPurchaseValue": 0,
    "inboundTransfers": 0,
    "outboundTransfers": 0,
    "inventoryValue": 0,
    "activeProducts": 0,
    "channels": [
      {}
    ],
    "periodFrom": "2026-09-29T08:00:00Z",
    "periodTo": "2026-09-29T08:00:00Z"
  },
  "statusCode": "OK",
  "canRead": true,
  "canEdit": true,
  "canDelete": true
}

Get top products

GET/api/v1/insights/locations/{locationId}/top-products

Returns the top-selling products at one location over the period, ordered by revenue.

Access. Send a bearer token or an API key. The caller needs the Insights view permission.

Parameters

NameInTypeRequiredDescription
locationIdpathstring (uuid)Yes
fromquerystring (date-time)No
toquerystring (date-time)No
takequeryinteger (int32)NoDefault: 10.

Response

200. Returns a JSON array. Each item is LocationTopProductResponse.

Request
curl -X GET "https://api.miridia.io/api/v1/insights/locations/{locationId}/top-products" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
[
  {
    "productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "title": "string",
    "sku": "string",
    "totalSold": 0,
    "totalRevenue": 0
  }
]

Get turnover history

GET/api/v1/insights/locations/{locationId}/turnover-history

Returns the monthly inventory turnover history for one location over the period.

Access. Send a bearer token or an API key. The caller needs the Insights view permission.

Parameters

NameInTypeRequiredDescription
locationIdpathstring (uuid)Yes
fromquerystring (date-time)No
toquerystring (date-time)No

Response

200. Returns a JSON array. Each item is LocationTurnoverRowResponse.

Request
curl -X GET "https://api.miridia.io/api/v1/insights/locations/{locationId}/turnover-history" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
[
  {
    "period": "string",
    "totalIn": 0,
    "totalOut": 0,
    "netChange": 0
  }
]

Models

The operations on this page use these object types. Select a type to see its fields.

LocationChannelSalesResponse

Sales for one sales channel at one location over a period.

FieldTypeDescription
salesChannelIdstring (uuid)
titlestring
ordersinteger (int32)
revenuenumber (double)
LocationInsightResponse

Aggregated sales, inbound, outbound and inventory metrics for one business location over a period.

FieldTypeDescription
locationIdstring (uuid)
titlestring
locationTypeenum BusinessLocationTypeOne of: Office, Warehouse, Storefront, Remote, Other, Headquarters, Factory.
currencystringThe most common sale currency in the period. Null with no sales.
totalRevenuenumber (double)
totalCostnumber (double)
profitnumber (double)Total revenue minus total cost.
ordersinteger (int32)
averageOrderValuenumber (double)Total revenue divided by the order count. Null when the order count is zero.
previousOrdersinteger (int32)
previousRevenuenumber (double)
inboundPurchaseOrdersinteger (int32)
inboundPurchaseValuenumber (double)
inboundTransfersinteger (int32)
outboundTransfersinteger (int32)
inventoryValuenumber (double)Current inventory value at the location. This value is not scoped to the period.
activeProductsinteger (int32)Count of products with quantity on hand above zero. This value is not scoped to the period.
channelsLocationChannelSalesResponse[]
periodFromstring (date-time)
periodTostring (date-time)
LocationTopProductResponse

A top-selling product at one location over a period.

FieldTypeDescription
productIdstring (uuid)
titlestring
skustring
totalSoldnumber (double)
totalRevenuenumber (double)
LocationTurnoverRowResponse

One month of inventory turnover at one location. period has the form "2026-08".

FieldTypeDescription
periodstring
totalInnumber (double)
totalOutnumber (double)
netChangenumber (double)