Miridia
Portal
Insights

Supplier insights

Aggregated purchase-order performance metrics for suppliers.

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

MethodPathOperation
GET/api/v1/insights/suppliersGet all supplier insights
GET/api/v1/insights/suppliers/{supplierId}Get supplier insight

Get all supplier insights

GET/api/v1/insights/suppliers

Returns aggregated purchase-order performance metrics for every supplier in the business, in one round trip. Defaults to the trailing 90 days 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 SupplierMetricsResponse.

Request
curl -X GET "https://api.miridia.io/api/v1/insights/suppliers" \
  -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": [
    {
      "supplierId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "avgLeadTimeDays": 0,
      "onTimeRate": 0,
      "fillRate": 0,
      "defectRate": 0,
      "totalSpend": 0,
      "activePurchaseOrders": 0,
      "periodFrom": "2026-09-29T08:00:00Z",
      "periodTo": "2026-09-29T08:00:00Z"
    }
  ],
  "messages": [
    {
      "title": "string",
      "message": "string",
      "level": "Standard",
      "icon": "SyncAlert",
      "code": "string"
    }
  ]
}

Get supplier insight

GET/api/v1/insights/suppliers/{supplierId}

Returns aggregated purchase-order performance metrics for one supplier. Defaults to the trailing 90 days when from/to are not supplied.

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

Parameters

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

Response

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

Request
curl -X GET "https://api.miridia.io/api/v1/insights/suppliers/{supplierId}" \
  -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": {
    "supplierId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "avgLeadTimeDays": 0,
    "onTimeRate": 0,
    "fillRate": 0,
    "defectRate": 0,
    "totalSpend": 0,
    "activePurchaseOrders": 0,
    "periodFrom": "2026-09-29T08:00:00Z",
    "periodTo": "2026-09-29T08:00:00Z"
  },
  "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.

SupplierMetricsResponse

Aggregated purchase-order performance metrics for a single supplier over a period.

FieldTypeDescription
supplierIdstring (uuid)
avgLeadTimeDaysnumber (double)Average days from PO placement to receipt completion. Null with no completed receipts.
onTimeRatenumber (double)Share (0..1) of received POs with a known expected delivery date that arrived on time.
fillRatenumber (double)Units received / units ordered across received POs (0..1 typically).
defectRatenumber (double)Units rejected / units received+rejected across received POs.
totalSpendnumber (double)Total spend across non-cancelled POs in the period.
activePurchaseOrdersinteger (int32)Live count of POs currently Ordered/Confirmed/PartiallyReceived.
periodFromstring (date-time)
periodTostring (date-time)