Printago API
PATCH
/v1/materials/billing-rates/{rateId}
Update a billable rate
Change one billable rate Changes the rate's charge (`ratePer1000g`, cents per kg), its start, or its end; fields left out stay as they are. Dates start at midnight in the store's timezone, and `effectiveTo` is exclusive: the rate's last day is the one before. Null `effectiveTo` keeps the rate going. A rate whose days would run into another of the material's rates is a 400 naming that rate, and nothing changes; so is an end on or before the start. An unknown rate is a 404. Needs the filament-inventory add-on.
Path Parameters
rateId
required
string
Billable rate ID
Request Body
The charge, start or end to change
UpdateBillingRateRequest
effectiveFromoptional
string
When the rate starts. A date (`2026-10-02`) starts at midnight in the store's timezone.
effectiveTooptionalnullable
string
When the rate stops applying, exclusive: a date (`2026-10-02`) ends at
midnight starting that day in the store's timezone. Null keeps it going.
ratePer1000goptional
integer
Cents per kg, so $0.05 per gram is 5000.
min: 0
Example Request
application/json
{
"ratePer1000g": 0,
"effectiveFrom": "2025-01-15",
"effectiveTo": "2025-01-15"
}
Response Schema
MaterialBillingRate
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
200 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"
}