Printago API
GET /v1/filament-stock/{variantId}/activity

Get stock activity

Every gram in and out of a filament's stock, newest first Needs the filament-inventory add-on. Bulk rows have a null `instanceId`. With the spool-tracking add-on, rows for the filament's tracked rolls come back too, each naming its roll; `instanceId` narrows the list to one roll. On a print row, `consumedGrams` is what the print used and `deltaGrams` is what came off; they differ when the stock ran short.

Requires: material.view

Path Parameters

variantId required
string
Material variant ID

Query Parameters

limit optional
number
Rows per page, default 50, at most 200.
offset optional
number
Rows to skip, for the next page.
instanceId optional
string
Only this tracked roll's rows.

Response Schema

StockActivityEntry[]
Array of StockActivityEntry, each with:
actorIdrequirednullable
string
actorNamerequirednullable
string
byrequirednullable
object
Who caused the row: on a print row, whoever queued the print job; on any other row, whoever made the change. Null when nobody is recorded.
actorIdrequirednullable
string
labelrequired
string
typerequirednullable
string
`user`, `api_key`, `system`, `scheduler`, `webhook` or `fuse`.
causerequirednullable
object
attemptNumberrequirednullable
number
intakeIdrequirednullable
string
pattern: ^[a-z0-9]{24}$
partNamerequirednullable
string
printerNamerequirednullable
string
printJobIdrequirednullable
string
pattern: ^[a-z0-9]{24}$
receivedAtrequirednullable
string
The day the delivery arrived, on a row a delivery wrote; it can be earlier than `createdAt`, when the delivery was entered.
format: date-time
supplierrequirednullable
string
consumedGramsrequirednullable
number
On print rows, what the print used. Larger than `-deltaGrams` when the bucket or roll ran short, since stock never goes below zero. Null on other kinds.
createdAtrequired
string
format: date-time
deltaGramsrequired
number
What was applied to the bucket or roll.
idrequired
string
pattern: ^[a-z0-9]{24}$
instancerequirednullable
object
The roll a roll row moved, null on bucket rows. A deleted roll carries the serial and label code it had when the row was written.
deletedrequired
boolean
The roll has since been deleted; its rows stay.
labelCoderequirednullable
string
serialrequirednullable
string
instanceIdrequirednullable
string
The tracked roll this row moved; null for the variant's bulk bucket.
pattern: ^[a-z0-9]{24}$
intakeLineIdrequirednullable
string
pattern: ^[a-z0-9]{24}$
kindrequired
enum
manualintakeconvertprintopeningclosingretirerestore
materialUsageIdrequirednullable
string
pattern: ^[a-z0-9]{24}$
printHistoryIdrequirednullable
string
pattern: ^[a-z0-9]{24}$
reasonrequirednullable
string
remainingAfterGramsrequired
number
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
updatedAtrequired
string
format: date-time
variantIdrequired
string
pattern: ^[a-z0-9]{24}$

Example Response

200 OK — application/json
[
  {
    "instance": {
      "serial": "string",
      "labelCode": "string",
      "deleted": true
    },
    "cause": {
      "printJobId": "string",
      "partName": "string",
      "attemptNumber": 1,
      "printerName": "string",
      "intakeId": "string",
      "supplier": "string",
      "receivedAt": "2025-01-15T12:00:00.000Z"
    },
    "by": {
      "actorId": "string",
      "label": "string",
      "type": "string"
    },
    "variantId": "string",
    "instanceId": "string",
    "deltaGrams": 1,
    "consumedGrams": 1,
    "remainingAfterGrams": 1,
    "kind": "manual",
    "reason": "string",
    "actorId": "string",
    "actorName": "string",
    "materialUsageId": "string",
    "printHistoryId": "string",
    "intakeLineId": "string",
    "id": "string",
    "storeId": "string",
    "createdAt": "2025-01-15T12:00:00.000Z",
    "updatedAt": "2025-01-15T12:00:00.000Z"
  }
]