Miridia
Portal
Inventory

Inventory lots

The inventory lots operations of the Core API.

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

MethodPathOperation
GET/api/v1/inventory/lotsGet inventory lots
GET/api/v1/inventory/lots/{lotId}Get inventory lot
GET/api/v1/inventory/lots/{lotId}/movementsGet inventory lot movements
PUT/api/v1/inventory/lots/{lotId}/notesUpdate inventory lot notes
POST/api/v1/inventory/lots/{lotId}/attachmentsAdd 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

NameInTypeRequiredDescription
Pagequeryinteger (int32)NoLimits: minimum 1.
PageSizequeryinteger (int32)NoLimits: minimum 1, maximum 100.
$orderbyquerystringNoExample: "created_at desc" or "name asc"
$filterquerystringNoApply 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'".
$searchquerystringNoProvide a search value which would inherit the 'CONTAINS' behaviour.
productIdquerystring (uuid)No

Response

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

Request
curl -X GET "https://api.miridia.io/api/v1/inventory/lots" \
  -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": [
    {
      "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

NameInTypeRequiredDescription
lotIdpathstring (uuid)Yes

Response

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

Request
curl -X GET "https://api.miridia.io/api/v1/inventory/lots/{lotId}" \
  -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": {
    "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

NameInTypeRequiredDescription
lotIdpathstring (uuid)Yes

Response

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

Request
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"
Response
{
  "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

NameInTypeRequiredDescription
lotIdpathstring (uuid)Yes

Request body

Send JSON with the shape UpdateInventoryLotNotesRequest. Payload to replace the notes on one inventory lot.

FieldTypeRequiredDescription
notesstringNo

Response

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

Request
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"
}'
Response
{
  "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

NameInTypeRequiredDescription
lotIdpathstring (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.

FieldTypeRequiredDescription
typeenum MetadataAttachmentTypeNoOne of: File, Link.
fileIdstring (uuid)NoRequired when Type is File.
titlestringNoRequired when Type is Link. Ignored for File.
urlstringNoRequired when Type is Link. Ignored for File.
descriptionstringNo

Response

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

Request
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"
}'
Response
{
  "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

NameInTypeRequiredDescription
lotIdpathstring (uuid)Yes
attachmentIdpathstring (uuid)Yes

Response

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

Request
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"
Response
{
  "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
FieldTypeDescription
idstring (uuid)
productIdstring (uuid)
productTitlestring
productCodestring
lotNumberstring
expiryDatestring (date-time)
workOrderIdstring (uuid)
notesstring
serialNumbersInventorySerialNumberResponse[]
serialCountinteger (int32)
attachmentsMetadataFileAttachment[]
dateModifiedstring (date-time)
dateCreatedstring (date-time)
InventoryMovementResponse
FieldTypeDescription
idstring (uuid)
movementTypeenum InventoryMovementTypeOne of: Purchase, Sale, TransferIn, TransferOut, Adjustment, AssemblyConsumption, AssemblyProduction, Return, WriteOff.
quantitynumber (double)
balanceAfternumber (double)
referenceTypestring
referenceIdstring (uuid)
notesstring
unitCostnumber (double)
totalCostnumber (double)
averageCostAfternumber (double)Running weighted-average cost after this movement.
dateCreatedstring (date-time)
effectiveDatestring (date-time)
InventorySerialNumberResponse
FieldTypeDescription
idstring (uuid)
serialNumberstring
lotIdstring (uuid)
workOrderIdstring (uuid)
statusenum SerialNumberStatusOne of: Available, Consumed, Shipped, Scrapped.
MetadataFileAttachment

Not quite as complete as the normal FileAttachment aggregate.

FieldTypeDescription
idstring (uuid)
typeenum MetadataAttachmentTypeOne of: File, Link.
fileAttachmentIdstring (uuid)Left as Guid.Empty for Link entries.
titlestring
urlstring
contentTypestring
descriptionstring