The material api endpoint is used to manage materials in the system. The following operations are supported:
{
"id": 145,
"prefix_id": 2,
"brand_id": 3,
"type_id": 2,
"item_code": null,
"name": "Artisan Oak",
"image": "Polytec/Artisan Oak.jpg",
"finish": "TimberPrintMatt",
"substrate": "MR MDF",
"thickness": 16.5,
"prefix_name": "PT",
"door_filter": "Flat Panel",
"is_grained": true,
"is_double_sided": false,
"double_sided_cost": 0,
"handling_cost": 1.45,
"area_cost": 64.152,
"area_assembly_cost": 3.15,
"min_job_area": null,
"length": null,
"width": null,
"minimum_usage_rollover": null,
"expected_yield_factor": null,
"prefix": {
"id": 2,
"name": "PT",
"description": "Texture"
},
"brand": {
"id": 3,
"name": "Polytec"
},
"type": {
"id": 2,
"name": "Melamine",
"is_vinyl": false
},
"horizontal_grain_surcharge": null,
"is_hidden": false,
"defaults": {
"handling_cost": 1.45,
"double_sided_cost": 0,
"area_assembly_cost": 3.15,
"area_cost": 53.02,
"min_job_area": 2.88,
"minimum_usage_rollover": 1,
"expected_yield_factor": 100,
"width": 1200,
"length": 2400
}
}
| Field | Type | Description |
|---|---|---|
id |
ID | Unique identifier |
prefix_id |
ID | Identifier of the prefix |
brand_id |
ID | Identifier of the brand |
type_id |
ID | Identifier of the type |
item_code |
string | Code specific to the material |
name |
string | Name of the material |
image |
string | Image of the material |
finish |
string | Material's Finish |
substrate |
string | Material's Substrate |
thickness |
decimal | Material's Thickness |
prefix_name |
string | Name of the prefix |
door_filter |
string | Door filter to which the material belongs to |
is_grained |
boolean | Shows if the material is grained |
is_double_sided |
boolean | Shows if the material is double sided |
double_sided_cost |
decimal | Cost for the double sided |
handling_cost |
decimal | Handling cost of the material |
area_cost |
decimal | Area cost of the material |
area_assembly_cost |
decimal | Area Assembly cost of the material |
min_job_area |
decimal | Minimum job area for the material |
length |
number | Length of the material |
width |
number | Width of the material |
minimum_usage_rollover |
number | Minimum usage rollover for the material |
expected_yield_factor |
number | Expected yield factor for the material |
prefix |
Prefix |
Material's Prefix information |
brand |
Brand |
Material's Brand information |
type |
Type |
Material's Type information |
horizontal_grain_surcharge |
decimal | Horizontal grain surcharge for the material |
is_hidden |
boolean | Hidden status of the material |
defaults |
MaterialDefaults |
Admin defaults for the material |
{
"id": 2,
"name": "PT",
"description": "Texture"
}
| Field | Type | Description |
|---|---|---|
id |
ID | Unique identifier |
name |
string | Name of the prefix |
description |
string | Description of the prefix |
{
"id": 3,
"name": "Polytec"
}
| Field | Type | Description |
|---|---|---|
id |
ID | Unique identifier |
name |
string | Name of the brand |
{
"id": 2,
"name": "Melamine",
"is_vinyl": false
}
| Field | Type | Description |
|---|---|---|
id |
ID | Unique identifier |
name |
string | Name of the type |
is_vinyl |
boolean | Shows if the type is vinyl |
{
"handling_cost": 2,
"double_sided_cost": 2,
"area_assembly_cost": 2,
"area_cost": 80.02,
"min_job_area": 2.88,
"minimum_usage_rollover": 1,
"expected_yield_factor": 100,
"width": 1200,
"length": 2400
}
| Field | Type | Description |
|---|---|---|
handling_cost |
decimal | Handling cost for the material |
double_sided_cost |
decimal | Cost for the double sided material |
area_assembly_cost |
decimal | Area Assembly cost for the material |
area_cost |
decimal | Area cost for the material |
min_job_area |
decimal | Minimum job area for the material |
minimum_usage_rollover |
number | Minimum usage rollover for the material |
expected_yield_factor |
number | Expected yield factor for the material |
width |
number | Width of the material |
length |
number | Length of the material |
The request endpoints are as follows:
GET /api/product/materials
The material listing api endpoint is used to list all materials in the system. The response will be a paginated list of materials. See search criteria for more information on how to paginate and filter records.
GET /api/product/materials/{id}
The material view api endpoint is used to view a single material in the system. The response will be a single material. The id parameter is the id of the material to view.
PUT /api/product/materials/{id}
The material update api endpoint is used to update a single material in the system. The id parameter is the id of the material to update. The request body should contain the updated material.
DELETE /api/product/materials/{id}
The material delete api endpoint is used to delete a single material in the system. The id parameter is the id of the material to delete.