Inventory lots
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| GET | /api/v1/inventory/lots | Get inventory lots |
| GET | /api/v1/inventory/lots/{lotId} | Get inventory lot |
| GET | /api/v1/inventory/lots/{lotId}/movements | Get inventory lot movements |
| PUT | /api/v1/inventory/lots/{lotId}/notes | Update inventory lot notes |
| POST | /api/v1/inventory/lots/{lotId}/attachments | Add inventory lot file attachment |
| DELETE | /api/v1/inventory/lots/{lotId}/attachments/{attachmentId} | Remove inventory lot file attachment |
Get inventory lots
GET/api/v1/inventory/lots
Access. Send a bearer token or an API key. The caller needs the Products view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Page | query | integer (int32) | No | Limits: minimum 1. |
PageSize | query | integer (int32) | No | Limits: minimum 1, maximum 100. |
$orderby | query | string | No | Example: "created_at desc" or "name asc" |
$filter | query | string | No | Apply a ODATA style filter to the query to add a fixed constraint. For example, if you want to filter by the creation date, you would set the filter to "created_at ge 2022-01-01". Or if you want to filter by a specific status, you would set the filter to "status eq 'active'". |
$search | query | string | No | Provide a search value which would inherit the 'CONTAINS' behaviour. |
productId | query | string (uuid) | No |
Response
200. Returns a PagedResult envelope. Each item in data is InventoryLotResponse.
curl -X GET "https://api.miridia.io/api/v1/inventory/lots" \
-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": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productTitle": "string",
"productCode": "string",
"lotNumber": "string",
"expiryDate": "2026-09-29T08:00:00Z",
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"notes": "string",
"serialNumbers": [
{}
],
"serialCount": 0,
"attachments": [
{}
],
"dateModified": "2026-09-29T08:00:00Z",
"dateCreated": "2026-09-29T08:00:00Z"
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Get inventory lot
GET/api/v1/inventory/lots/{lotId}
Access. Send a bearer token or an API key. The caller needs the Products view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
lotId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is InventoryLotResponse.
curl -X GET "https://api.miridia.io/api/v1/inventory/lots/{lotId}" \
-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": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productTitle": "string",
"productCode": "string",
"lotNumber": "string",
"expiryDate": "2026-09-29T08:00:00Z",
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"notes": "string",
"serialNumbers": [
{}
],
"serialCount": 0,
"attachments": [
{}
],
"dateModified": "2026-09-29T08:00:00Z",
"dateCreated": "2026-09-29T08:00:00Z"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Get inventory lot movements
GET/api/v1/inventory/lots/{lotId}/movements
Access. Send a bearer token or an API key. The caller needs the Products view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
lotId | path | string (uuid) | Yes |
Response
200. Returns a PagedResult envelope. Each item in data is InventoryMovementResponse.
curl -X GET "https://api.miridia.io/api/v1/inventory/lots/{lotId}/movements" \
-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": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"movementType": "Purchase",
"quantity": 0,
"balanceAfter": 0,
"referenceType": "string",
"referenceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"notes": "string",
"unitCost": 0,
"totalCost": 0,
"averageCostAfter": 0,
"dateCreated": "2026-09-29T08:00:00Z",
"effectiveDate": "2026-09-29T08:00:00Z"
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Update inventory lot notes
PUT/api/v1/inventory/lots/{lotId}/notes
Replaces the notes on a lot.
Access. Send a bearer token or an API key. The caller needs the Products modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
lotId | path | string (uuid) | Yes |
Request body
Send JSON with the shape UpdateInventoryLotNotesRequest. Payload to replace the notes on one inventory lot.
| Field | Type | Required | Description |
|---|---|---|---|
notes | string | No |
Response
200. Returns a SingleResult envelope. The data field is InventoryLotResponse.
curl -X PUT "https://api.miridia.io/api/v1/inventory/lots/{lotId}/notes" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"notes": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productTitle": "string",
"productCode": "string",
"lotNumber": "string",
"expiryDate": "2026-09-29T08:00:00Z",
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"notes": "string",
"serialNumbers": [
{}
],
"serialCount": 0,
"attachments": [
{}
],
"dateModified": "2026-09-29T08:00:00Z",
"dateCreated": "2026-09-29T08:00:00Z"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Add inventory lot file attachment
POST/api/v1/inventory/lots/{lotId}/attachments
Step 2 of file attachment: associates a previously uploaded file with this lot. Upload the file first via POST /api/files/single, then pass the returned FileAttachment id here.
Access. Send a bearer token or an API key. The caller needs the Products modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
lotId | path | string (uuid) | Yes |
Request body
Send JSON with the shape AddFileAttachmentRequest. Adds an attachment to an entity's metadata attachment collection. Two shapes, discriminated by Type: - File (default). title and url are required and taken as-is from the request; FileAttachmentId on the resulting metadata entry stays Guid.Empty.
| Field | Type | Required | Description |
|---|---|---|---|
type | enum MetadataAttachmentType | No | One of: File, Link. |
fileId | string (uuid) | No | Required when Type is File. |
title | string | No | Required when Type is Link. Ignored for File. |
url | string | No | Required when Type is Link. Ignored for File. |
description | string | No |
Response
200. Returns a SingleResult envelope. The data field is InventoryLotResponse.
curl -X POST "https://api.miridia.io/api/v1/inventory/lots/{lotId}/attachments" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"type": "File",
"fileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"url": "string",
"description": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productTitle": "string",
"productCode": "string",
"lotNumber": "string",
"expiryDate": "2026-09-29T08:00:00Z",
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"notes": "string",
"serialNumbers": [
{}
],
"serialCount": 0,
"attachments": [
{}
],
"dateModified": "2026-09-29T08:00:00Z",
"dateCreated": "2026-09-29T08:00:00Z"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Remove inventory lot file attachment
DELETE/api/v1/inventory/lots/{lotId}/attachments/{attachmentId}
Removes a previously associated attachment (file or link) from this lot by its metadata attachment entry id.
Access. Send a bearer token or an API key. The caller needs the Products modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
lotId | path | string (uuid) | Yes | |
attachmentId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is InventoryLotResponse.
curl -X DELETE "https://api.miridia.io/api/v1/inventory/lots/{lotId}/attachments/{attachmentId}" \
-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": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productTitle": "string",
"productCode": "string",
"lotNumber": "string",
"expiryDate": "2026-09-29T08:00:00Z",
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"notes": "string",
"serialNumbers": [
{}
],
"serialCount": 0,
"attachments": [
{}
],
"dateModified": "2026-09-29T08:00:00Z",
"dateCreated": "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.
InventoryLotResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
productId | string (uuid) | |
productTitle | string | |
productCode | string | |
lotNumber | string | |
expiryDate | string (date-time) | |
workOrderId | string (uuid) | |
notes | string | |
serialNumbers | InventorySerialNumberResponse[] | |
serialCount | integer (int32) | |
attachments | MetadataFileAttachment[] | |
dateModified | string (date-time) | |
dateCreated | string (date-time) |
InventoryMovementResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
movementType | enum InventoryMovementType | One of: Purchase, Sale, TransferIn, TransferOut, Adjustment, AssemblyConsumption, AssemblyProduction, Return, WriteOff. |
quantity | number (double) | |
balanceAfter | number (double) | |
referenceType | string | |
referenceId | string (uuid) | |
notes | string | |
unitCost | number (double) | |
totalCost | number (double) | |
averageCostAfter | number (double) | Running weighted-average cost after this movement. |
dateCreated | string (date-time) | |
effectiveDate | string (date-time) |
InventorySerialNumberResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
serialNumber | string | |
lotId | string (uuid) | |
workOrderId | string (uuid) | |
status | enum SerialNumberStatus | One of: Available, Consumed, Shipped, Scrapped. |
MetadataFileAttachment
Not quite as complete as the normal FileAttachment aggregate.
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
type | enum MetadataAttachmentType | One of: File, Link. |
fileAttachmentId | string (uuid) | Left as Guid.Empty for Link entries. |
title | string | |
url | string | |
contentType | string | |
description | string |