Printago API
POST
/v1/filament-stock/intakes
Receive filament
Receive a filament delivery, adding weight to bulk or creating spool records Needs the filament-inventory add-on. A tracked line also needs the spool-tracking add-on and is refused with a 403 without it; it creates one spool record per unit, returned in `createdInstanceIds`. New spools get their label code when their QR tag is made; `generateLabelCodes` is accepted and ignored. `orderNumber` is saved on the delivery.
Request Body
The delivery: supplier, pricing, and one line per filament
ReceiveFilamentRequest
linesrequired
object[]
formrequired
"spool" | "refill"
spoolrefill
generateLabelCodesoptional
boolean
Accepted and ignored. A new spool gets its label code when its QR tag is
made.
gramsEachrequired
number
min: 1
priceCentsEachoptionalnullable
integer
What one unit cost, in cents. Omitted when the lot is priced as a whole.
min: 0
qtyrequired
integer
min: 1max: 500
trackedoptional
boolean
Create a spool record per unit instead of adding weight to the bucket.
variantIdrequired
string
pattern: ^[a-z0-9]{24}$
orderNumberoptionalnullable
string
The supplier's order number for the delivery.
receivedAtoptionalnullable
string
When the delivery arrived: an ISO 8601 timestamp, or a calendar day as
`YYYY-MM-DD`, which is taken as that day in the store's timezone (noon UTC
when the store has none set). Now when left out.
supplieroptionalnullable
string
totalCentsoptionalnullable
integer
Price for the whole delivery, when lines carry no per-unit price.
min: 0
updateBasePriceoptional
boolean
Write what was paid back onto each line's variant base price.
Example Request
application/json
{
"receivedAt": "string",
"supplier": "string",
"orderNumber": "string",
"totalCents": 0,
"updateBasePrice": true,
"lines": [
{
"variantId": "string",
"qty": 1,
"gramsEach": 1,
"form": "spool",
"priceCentsEach": 0,
"tracked": true,
"generateLabelCodes": true
}
]
}
Response Schema
ReceiveFilamentResponse
bulkGramsrequired
number
createdInstanceIdsrequired
string[]
intakeIdrequired
string
pattern: ^[a-z0-9]{24}$
totalGramsrequired
number
Example Response
201 OK — application/json
{
"intakeId": "string",
"totalGrams": 1,
"bulkGrams": 1,
"createdInstanceIds": [
"string"
]
}