Printago API
GET /v1/reports/materials

Materials report

Filament consumption by type and brand, plus spool days-of-cover.

Requires: analytics.view

Query Parameters

start required
string
end required
string
printerIds optional
string
Comma-separated printer ids; omitted = all printers.

Response Schema

MaterialsReport
byMaterialrequired
object[]
One row per material, e.g. PLA Basic and PLA Matte apart, heaviest first.
brandrequirednullable
string
colorsrequired
object[]
The row's usage split by color, heaviest first.
colorrequirednullable
string
The color's hex, when it has one.
costrequirednullable
number
gramsrequired
number
namerequirednullable
string
The color's name; null when none was recorded or it has since been deleted.
variantIdrequirednullable
string
Null for usage recorded against the material with no color.
wastedGramsrequired
number
wasteRatiorequirednullable
number
costrequirednullable
number
gramsrequired
number
materialIdrequirednullable
string
Null for usage that resolves to no material.
namerequirednullable
string
typerequired
string
wastedGramsrequired
number
wasteRatiorequirednullable
number
coveragerequired
object
Denominators for the coverage indicator every report panel shows. print_history material/estimate fields are snapshots that can be absent; charts must state what fraction of attempts they actually cover.
attemptsrequired
number
Attempts that started printing; a job cancelled in the queue has nothing to cover.
withGramsrequired
number
withLayersrequired
number
withQueueTimesrequired
number
withTimeEstimaterequired
number
withWeightEstimaterequired
number
rangerequired
object
daysrequired
number
endrequired
string
startrequired
string
timezonerequired
string
usageByDayrequired
object[]
Stacked by material type; top types kept, tail folded into "Other".
costrequirednullable
number
daterequired
string
gramsrequired
number
typerequired
string

Example Response

200 OK — application/json
{
  "range": {
    "start": "string",
    "end": "string",
    "timezone": "string",
    "days": 1
  },
  "coverage": {
    "attempts": 1,
    "withGrams": 1,
    "withLayers": 1,
    "withTimeEstimate": 1,
    "withWeightEstimate": 1,
    "withQueueTimes": 1
  },
  "usageByDay": [
    {
      "date": "string",
      "type": "string",
      "grams": 1,
      "cost": 1
    }
  ],
  "byMaterial": [
    {
      "materialId": "string",
      "name": "string",
      "type": "string",
      "brand": "string",
      "grams": 1,
      "wastedGrams": 1,
      "wasteRatio": 1,
      "cost": 1,
      "colors": [
        {
          "variantId": "string",
          "name": "string",
          "color": "string",
          "grams": 1,
          "wastedGrams": 1,
          "wasteRatio": 1,
          "cost": 1
        }
      ]
    }
  ]
}