Miridia
Portal
Insights

Inventory insights

Inventory coverage metrics: on-hand quantity against trailing demand, per product and location.

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

MethodPathOperation
GET/api/v1/insights/inventory/days-of-coverGet days of cover

Get days of cover

GET/api/v1/insights/inventory/days-of-cover

Returns the days-of-cover grid for the business: the on-hand quantity, the trailing demand, and the resulting days of cover, for every (product, location) inventory record. Defaults to the current day and a 28-day window when asOf/windowDays are not supplied.

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

Parameters

NameInTypeRequiredDescription
asOfquerystring (date-time)No
windowDaysqueryinteger (int32)NoDefault: 28.

Response

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

Request
curl -X GET "https://api.miridia.io/api/v1/insights/inventory/days-of-cover" \
  -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": {
    "asOf": "2026-09-29T08:00:00Z",
    "windowDays": 0,
    "products": [
      {}
    ],
    "locations": [
      {}
    ],
    "cells": [
      {}
    ]
  },
  "statusCode": "OK",
  "canRead": true,
  "canEdit": true,
  "canDelete": true
}

Models

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

DaysOfCoverCellResponse

One cell of the days-of-cover grid: the on-hand quantity, the trailing demand, and the days of cover for one product at one location.

FieldTypeDescription
productIdstring (uuid)
locationIdstring (uuid)
quantityOnHandnumber (double)
averageDailyDemandnumber (double)Units of the product ordered from this origin location per day, over the trailing window.
daysOfCovernumber (double)QuantityOnHand divided by AverageDailyDemand. Null when AverageDailyDemand is zero.
previousDaysOfCovernumber (double)The same calculation with demand from the window directly before the current one, and the same QuantityOnHand. Null when the previous window's demand is zero.
reorderPointnumber (double)
DaysOfCoverLocationResponse

One location on the days-of-cover location axis.

FieldTypeDescription
locationIdstring (uuid)
titlestring
locationTypeenum BusinessLocationTypeOne of: Office, Warehouse, Storefront, Remote, Other, Headquarters, Factory.
DaysOfCoverProductResponse

One product on the days-of-cover product axis.

FieldTypeDescription
productIdstring (uuid)
titlestring
skustring
DaysOfCoverResponse

The days-of-cover projection for a business: the on-hand quantity, the trailing demand, and the resulting days of cover, for every (product, location) inventory record.

FieldTypeDescription
asOfstring (date-time)
windowDaysinteger (int32)
productsDaysOfCoverProductResponse[]
locationsDaysOfCoverLocationResponse[]
cellsDaysOfCoverCellResponse[]