Printago API
PATCH
/v1/materials/variants/{id}
Update variant
Update a variant's properties Renaming onto another variant of the same material returns 409 Conflict. A changed `pricePer1000g` is added to the material's price history, naming who changed it.
Path Parameters
id
required
string
Variant ID
Request Body
Fields to update
PartialMaterialVariant
coloroptionalnullable
string
pattern: ^#([A-Fa-f0-9]{8})(;#([A-Fa-f0-9]{8}))*$
createdAtoptional
string
format: date-time
customMetadataoptional
Record<string, any>
Construct a type with a set of properties K of type T
externalIdoptionalnullable
string
filamentSystemProfileIdoptionalnullable
number
filamentUserProfileIdoptionalnullable
string
pattern: ^[a-z0-9]{24}$
idoptional
string
pattern: ^[a-z0-9]{24}$
materialIdoptional
string
pattern: ^[a-z0-9]{24}$
nameoptional
string
pressureAdvanceoptionalnullable
number
min: 0max: 2
pricePer1000goptionalnullable
integer
Price per kg, in cents. Overrides the material's price when set.
sourceoptionalnullable
string
storeIdoptional
string
pattern: ^[a-z0-9]{24}$
tagsoptional
string[]
updatedAtoptional
string
format: date-time
Example Request
application/json
{
"name": "string",
"materialId": "string",
"color": "string",
"tags": [
"string"
],
"filamentUserProfileId": "string",
"filamentSystemProfileId": 1,
"pricePer1000g": 1,
"pressureAdvance": 0,
"source": "string",
"externalId": "string",
"customMetadata": {},
"id": "string",
"storeId": "string",
"createdAt": "2025-01-15T12:00:00.000Z",
"updatedAt": "2025-01-15T12:00:00.000Z"
}
Response Schema
MaterialVariant
colorrequirednullable
string
pattern: ^#([A-Fa-f0-9]{8})(;#([A-Fa-f0-9]{8}))*$
createdAtrequired
string
format: date-time
customMetadataoptional
Record<string, any>
Construct a type with a set of properties K of type T
externalIdoptionalnullable
string
filamentSystemProfileIdrequirednullable
number
filamentUserProfileIdrequirednullable
string
pattern: ^[a-z0-9]{24}$
idrequired
string
pattern: ^[a-z0-9]{24}$
materialIdrequired
string
pattern: ^[a-z0-9]{24}$
namerequired
string
pressureAdvanceoptionalnullable
number
min: 0max: 2
pricePer1000goptionalnullable
integer
Price per kg, in cents. Overrides the material's price when set.
sourceoptionalnullable
string
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
tagsrequired
string[]
updatedAtrequired
string
format: date-time
Example Response
200 OK — application/json
{
"name": "string",
"materialId": "string",
"color": "string",
"tags": [
"string"
],
"filamentUserProfileId": "string",
"filamentSystemProfileId": 1,
"pricePer1000g": 1,
"pressureAdvance": 0,
"source": "string",
"externalId": "string",
"customMetadata": {},
"id": "string",
"storeId": "string",
"createdAt": "2025-01-15T12:00:00.000Z",
"updatedAt": "2025-01-15T12:00:00.000Z"
}