Printago API
GET
/v1/materials/{id}/activity
Get material stock activity
Every gram in and out of a material's stock, across all of its variants, newest first Needs the filament-inventory add-on. Rows are the same as a variant's stock activity: bulk rows have a null `instanceId`, and rows for tracked rolls come back only with the spool-tracking add-on. `by` names who caused each row: whoever queued the print on a print row, whoever made the change on any other. Filter by `variantId`, by `actorId` (matched against `by.actorId`), and by `kind`: `print` for draw-downs by prints, `stock` for everything else. `total` counts the rows matching the filters, and `actors` lists everyone behind one of the material's rows, whatever the filters.
Path Parameters
id
required
string
Material ID
Query Parameters
variantId
optional
string
Only this variant's rows.
actorId
optional
string
Only rows caused by this actor, matched against `by.actorId`.
kind
optional
"print" | "stock"
`print` for draw-downs by prints, `stock` for every other row.
limit
optional
integer
Rows per page, default 50.
offset
optional
integer
Rows to skip, for the next page.
Response Schema
MaterialActivityResponse
actorsrequired
object[]
Everyone who caused one of the material's rows, by label: the actor filter's choices.
idrequired
string
labelrequired
string
rowsrequired
object[]
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
manualintakeconvertprintopeningclosingretirerestoreprinter_reading
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}$
totalrequired
number
Rows matching the filters, ignoring `limit` and `offset`.
Example Response
200 OK — application/json
{
"rows": [
{
"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"
}
],
"total": 1,
"actors": [
{
"id": "string",
"label": "string"
}
]
}