Printago API
PUT /v1/materials/instances/{id}

Update material instance

Update spool information (e.g., remaining weight) With the filament-inventory and spool-tracking add-ons, a change to `remainingMaterial` is recorded in the filament's stock activity, naming who made it. Weights are whole grams.

Requires: material.instance.edit

Path Parameters

id required
string
Instance ID

Request Body

Fields to update

PartialMaterialInstance
createdAtoptional
string
format: date-time
customMetadataoptional
Record<string, any>
Construct a type with a set of properties K of type T
externalIdoptionalnullable
string
finishedAtoptionalnullable
string
When the spool was finished; null while it is active.
format: date-time
finishReasonoptionalnullable
"used_up" | "archived"
`used_up` or `archived`; null while the spool is active.
used_uparchived
formoptionalnullable
"spool" | "refill"
spoolrefill
idoptional
string
pattern: ^[a-z0-9]{24}$
intakeLineIdoptionalnullable
string
pattern: ^[a-z0-9]{24}$
labelCodeoptionalnullable
string
Reserved QR label code.
materialIdoptional
string
pattern: ^[a-z0-9]{24}$
materialTypeoptional
string
nominalGramsoptionalnullable
number
What the roll weighed when full.
pricePer1000goptionalnullable
integer
What was paid for this roll, per kg, in cents.
remainingMaterialoptional
number
min: 0
serialoptionalnullable
string
The roll's own identifier (RFID tag id, or one entered by hand).
serialSourceoptionalnullable
"tag" | "manual" | "integration"
tagmanualintegration
sourceoptionalnullable
string
storeIdoptional
string
pattern: ^[a-z0-9]{24}$
updatedAtoptional
string
format: date-time
variantIdoptional
string
pattern: ^[a-z0-9]{24}$
weightSourceoptionalnullable
"printer" | "manual" | "assumed" | "intake"
Where `remainingMaterial` came from; `assumed` means nothing measured it.
printermanualassumedintake

Example Request

application/json
{
  "variantId": "string",
  "materialId": "string",
  "materialType": "string",
  "remainingMaterial": 0,
  "source": "string",
  "externalId": "string",
  "customMetadata": {},
  "serial": "string",
  "serialSource": "tag",
  "form": "spool",
  "nominalGrams": 1,
  "weightSource": "printer",
  "pricePer1000g": 1,
  "labelCode": "string",
  "intakeLineId": "string",
  "finishedAt": "2025-01-15T12:00:00.000Z",
  "finishReason": "used_up",
  "id": "string",
  "storeId": "string",
  "createdAt": "2025-01-15T12:00:00.000Z",
  "updatedAt": "2025-01-15T12:00:00.000Z"
}

Response Schema

MaterialInstance
createdAtrequired
string
format: date-time
customMetadataoptional
Record<string, any>
Construct a type with a set of properties K of type T
externalIdoptionalnullable
string
finishedAtoptionalnullable
string
When the spool was finished; null while it is active.
format: date-time
finishReasonoptionalnullable
"used_up" | "archived"
`used_up` or `archived`; null while the spool is active.
used_uparchived
formoptionalnullable
"spool" | "refill"
spoolrefill
idrequired
string
pattern: ^[a-z0-9]{24}$
intakeLineIdoptionalnullable
string
pattern: ^[a-z0-9]{24}$
labelCodeoptionalnullable
string
Reserved QR label code.
materialIdrequired
string
pattern: ^[a-z0-9]{24}$
materialTyperequired
string
nominalGramsoptionalnullable
number
What the roll weighed when full.
pricePer1000goptionalnullable
integer
What was paid for this roll, per kg, in cents.
remainingMaterialrequired
number
min: 0
serialoptionalnullable
string
The roll's own identifier (RFID tag id, or one entered by hand).
serialSourceoptionalnullable
"tag" | "manual" | "integration"
tagmanualintegration
sourceoptionalnullable
string
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
updatedAtrequired
string
format: date-time
variantIdrequired
string
pattern: ^[a-z0-9]{24}$
weightSourceoptionalnullable
"printer" | "manual" | "assumed" | "intake"
Where `remainingMaterial` came from; `assumed` means nothing measured it.
printermanualassumedintake

Example Response

200 OK — application/json
{
  "variantId": "string",
  "materialId": "string",
  "materialType": "string",
  "remainingMaterial": 0,
  "source": "string",
  "externalId": "string",
  "customMetadata": {},
  "serial": "string",
  "serialSource": "tag",
  "form": "spool",
  "nominalGrams": 1,
  "weightSource": "printer",
  "pricePer1000g": 1,
  "labelCode": "string",
  "intakeLineId": "string",
  "finishedAt": "2025-01-15T12:00:00.000Z",
  "finishReason": "used_up",
  "id": "string",
  "storeId": "string",
  "createdAt": "2025-01-15T12:00:00.000Z",
  "updatedAt": "2025-01-15T12:00:00.000Z"
}