Supplier insights
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| GET | /api/v1/insights/suppliers | Get 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string (date-time) | No | |
to | query | string (date-time) | No |
Response
200. Returns a PagedResult envelope. Each item in data is SupplierMetricsResponse.
curl -X GET "https://api.miridia.io/api/v1/insights/suppliers" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
supplierId | path | string (uuid) | Yes | |
from | query | string (date-time) | No | |
to | query | string (date-time) | No |
Response
200. Returns a SingleResult envelope. The data field is SupplierMetricsResponse.
curl -X GET "https://api.miridia.io/api/v1/insights/suppliers/{supplierId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"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.
| Field | Type | Description |
|---|---|---|
supplierId | string (uuid) | |
avgLeadTimeDays | number (double) | Average days from PO placement to receipt completion. Null with no completed receipts. |
onTimeRate | number (double) | Share (0..1) of received POs with a known expected delivery date that arrived on time. |
fillRate | number (double) | Units received / units ordered across received POs (0..1 typically). |
defectRate | number (double) | Units rejected / units received+rejected across received POs. |
totalSpend | number (double) | Total spend across non-cancelled POs in the period. |
activePurchaseOrders | integer (int32) | Live count of POs currently Ordered/Confirmed/PartiallyReceived. |
periodFrom | string (date-time) | |
periodTo | string (date-time) |