Updates a material record.
The following fields are non-editable.
| Field | Description |
|---|---|
id |
Unique identifier |
prefix_id |
Identifier of the prefix |
brand_id |
Identifier of the brand |
type_id |
Identifier of the type |
item_code |
Code specific to the material |
name |
Name of the material |
image |
Image of the material |
finish |
Material's Finish |
substrate |
Material's Substrate |
thickness |
Material's Thickness |
prefix_name |
Name of the prefix |
door_filter |
Door filter to which the material belongs to |
is_grained |
Shows if the material is grained |
is_double_sided |
Shows if the material is double sided |
prefix |
Material's Prefix information |
brand |
Material's Brand information |
type |
Material's Type information |
horizontal_grain_surcharge |
Horizontal grain surcharge for the material |
is_hidden |
Hidden status of the material |
defaults |
Admin defaults for the material |
The following fields are editable through the update api.
| Field | Description |
|---|---|
item_code |
Code specific to the material |
horizontal_grain_surcharge |
Horizontal Grain Surcharge of the material |
double_sided_cost |
Double Sided Cost of the material |
handling_cost |
Handling cost for the material |
area_cost |
Area cost for the material |
area_assembly_cost |
Area Assembly cost for the material |
min_job_area |
Minimum job area for the material |
length |
Length of the material |
width |
Width of the material |
minimum_usage_rollover |
Minimum usage rollover for the material |
expected_yield_factor |
Expected yield factor for the material |
is_hidden |
Hidden status of the material |
This returns an updated Material record.
Request
curl -X PUT 'https://cabinetry.online/api/product/materials/22567' -H 'X-GC-API-KEY: xxxxxxxxxxxx'
Body
{
"area_cost": 53.02,
"is_hidden": false,
"length": 2400,
"width": 1200,
"length_cost": 10.25
}
Successful Response
{
"data": {
"id": 22567,
"prefix_id": 3,
"brand_id": 25,
"type_id": 6,
"item_code": null,
"name": "Whisper White",
"image": "StyleLite/Whisper White.jpg",
"finish": "TruGloss",
"substrate": "MR MDF",
"thickness": 19,
"prefix_name": "PG",
"door_filter": "Flat Panel",
"is_grained": false,
"is_double_sided": false,
"double_sided_cost": null,
"handling_cost": null,
"area_cost": 53.02,
"area_assembly_cost": null,
"min_job_area": null,
"length": 2400,
"width": 1200,
"minimum_usage_rollover": null,
"expected_yield_factor": null,
"prefix": {
"id": 3,
"name": "PG",
"description": "Gloss"
},
"brand": {
"id": 25,
"name": "StyleLite"
},
"type": {
"id": 6,
"name": "Acrylic",
"is_vinyl": false
},
"horizontal_grain_surcharge": null,
"is_hidden": false,
"defaults": {
"handling_cost": 3.5,
"double_sided_cost": 0,
"area_assembly_cost": 3.15,
"area_cost": 70,
"min_job_area": 2.88,
"minimum_usage_rollover": 1,
"expected_yield_factor": 100,
"width": 1200,
"length": 2400
}
},
"success": 1
}