Printago API
GET
/v1/materials/{id}/pricing
Get material pricing
A material's pricing: its default price, what you paid, and how both changed `pricePer1000g` is the material's default price per kg in cents. `averagePaidPer1000g` is what priced deliveries of the material in the last `days` (default 90) cost per kg, weighted by weight, over `averageSpoolCount` spools; null when there were none. A line's price per kg is the one its whole-cent price each stands for, the color's own price when it rounds to it. `history` lists the material's deliveries (`receive`) and changes to its or its colors' base prices (`default`, naming who changed it), newest first. Needs the filament-inventory add-on.
Path Parameters
id
required
string
Material ID
Query Parameters
days
optional
integer
How many days back the average reaches, default 90.
Response Schema
MaterialPricingResponse
averagePaidPer1000grequirednullable
number
What priced deliveries in the window cost per kg, weighted by weight; null with none.
averageSpoolCountrequired
number
Spools on the priced deliveries the average is taken over.
daysrequired
number
How many days back the average reaches.
historyrequired
object[]
Deliveries (one row per delivery and price per kg) and default changes, newest first.
actorNamerequirednullable
string
Who changed a default; null on a delivery row.
atrequired
string
format: date-time
orderNumberrequirednullable
string
pricePer1000grequirednullable
number
Per kg in cents. Null on a default that was cleared, or a delivery with no price.
sourcerequired
"default" | "receive"
`receive` is a delivery; `default` is a change to a base price.
defaultreceive
spoolsrequirednullable
number
Spools on a delivery row, across its colors; null on a default row.
supplierrequirednullable
string
variantIdrequirednullable
string
The color a row is for: the color whose default changed, or the one color
a delivery row bought. Null for the material's own default, and for a
delivery of several colors.
pattern: ^[a-z0-9]{24}$
variantNamerequirednullable
string
pricePer1000grequirednullable
number
The material's default price per kg in cents, null when it has none.
Example Response
200 OK — application/json
{
"pricePer1000g": 1,
"averagePaidPer1000g": 1,
"averageSpoolCount": 1,
"days": 1,
"history": [
{
"at": "2025-01-15T12:00:00.000Z",
"pricePer1000g": 1,
"source": "default",
"supplier": "string",
"orderNumber": "string",
"spools": 1,
"variantId": "string",
"variantName": "string",
"actorName": "string"
}
]
}