Printago API
POST
/v1/materials/instances
Create material instance
Add a new spool to your inventory
Request Body
Spool data with variant and remaining weight
MaterialInstanceInsert
customMetadataoptional
Record<string, any>
Construct a type with a set of properties K of type T
externalIdoptionalnullable
string
formoptionalnullable
"spool" | "refill"
spoolrefill
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
variantIdrequired
string
pattern: ^[a-z0-9]{24}$
Example Request
application/json
{
"externalId": "string",
"source": "string",
"customMetadata": {},
"pricePer1000g": 1,
"materialId": "string",
"variantId": "string",
"materialType": "string",
"remainingMaterial": 0,
"serial": "string",
"serialSource": "tag",
"form": "spool",
"nominalGrams": 1,
"labelCode": "string",
"intakeLineId": "string"
}
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
201 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"
}