Printago API
POST /v1/materials/billing-rates

Set billable rates

Set a billable rate on several materials at once `ratePer1000g` is in cents per kg, so $0.05 per gram is 5000. The rate starts at `effectiveFrom`; a date starts at midnight in the store's timezone. Whatever rate each material had in effect from then on ends there and stays in its history. A start before a material's latest rate is a 400 (a rate that was ended before it began doesn't count); a start equal to it replaces that rate, which is kept in the history with no time in effect. An unknown material is a 404 and sets nothing. Billable rates price prints in the Usage by user report. Needs the filament-inventory add-on.

Requires: material.edit

Request Body

Up to 500 material IDs, the rate and its start

SetBillingRatesRequest
effectiveFromrequired
string
When the rate starts. A date (`2026-10-02`) starts at midnight in the store's timezone. It can be in the past, but not before the start of a material's latest rate.
materialIdsrequired
string[]
min items: 1max items: 500
ratePer1000grequired
integer
Cents per kg, so $0.05 per gram is 5000.
min: 0

Example Request

application/json
{
  "materialIds": [
    "string"
  ],
  "ratePer1000g": 0,
  "effectiveFrom": "2025-01-15"
}

Response Schema

MaterialBillingRate[]
Array of MaterialBillingRate, each with:
actorNamerequirednullable
string
Who set the rate.
effectiveFromrequired
string
format: date-time
effectiveTorequirednullable
string
When the rate stopped applying, exclusive; null while it is the material's current rate.
format: date-time
idrequired
string
pattern: ^[a-z0-9]{24}$
materialIdrequired
string
pattern: ^[a-z0-9]{24}$
ratePer1000grequired
number
Cents per kg, so $0.05 per gram is 5000.

Example Response

201 OK — application/json
[
  {
    "id": "string",
    "materialId": "string",
    "ratePer1000g": 1,
    "effectiveFrom": "2025-01-15T12:00:00.000Z",
    "effectiveTo": "2025-01-15T12:00:00.000Z",
    "actorName": "string"
  }
]