Material parameter values

Get material parameter values

get

The API gives the ability to get all material parameters values.

Authorizations
Path parameters
parameter_idstring · UUIDRequired

Parameter ID

Query parameters
namestringOptional

Parameter value name

Header parameters
x-tenant-idstring · uuidRequired

Tenant id (uuid v4)

Responses
200Success
application/json
get
/api/public/material-parameters/{parameter_id}/values
GET /api/public/material-parameters/{parameter_id}/values HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
200Success
[
  {
    "id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
    "name": "Organic Cotton",
    "order": 1
  }
]

Create material parameter values

post

The API gives the ability to create a material’s parameter value.

Authorizations
Path parameters
parameter_idstring · UUIDRequired

Parameter ID

Header parameters
x-tenant-idstring · uuidRequired

Tenant id (uuid v4)

Body
namestringRequired

Name of the material parameter value

Example: Red
ordernumberRequired

Display order of the parameter value (used for sorting in UI)

Example: 1
Responses
201Success
application/json
post
/api/public/material-parameters/{parameter_id}/values
POST /api/public/material-parameters/{parameter_id}/values HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "name": "Red",
  "order": 1
}
201Success
{
  "id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
  "name": "Organic Cotton",
  "order": 1
}

Update material parameter value

patch

The API gives the ability to update a material’s parameter value name.

Authorizations
Path parameters
value_idstring · UUIDRequired

Material parameter value ID

parameter_idstring · UUIDRequired

Parameter ID

Header parameters
x-tenant-idstring · uuidRequired

Tenant id (uuid v4)

Body
namestringOptional

Name of the material parameter value

Example: Blue
ordernumberOptional

Display order of the parameter value (used for sorting in UI)

Example: 2
Responses
200Success
application/json
patch
/api/public/material-parameters/{parameter_id}/values/{value_id}
PATCH /api/public/material-parameters/{parameter_id}/values/{value_id} HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "name": "Blue",
  "order": 2
}
200Success
{
  "message": "The operation was done successfully"
}

Last updated