Material categories
The API gives the ability to get all material categories.
Authorizations
Header parameters
x-tenant-idstring · uuidRequired
Tenant id (uuid v4)
Responses
200Success
application/json
get
/api/public/material-categoriesGET /api/public/material-categories 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": "Cotton",
"created_at": "2023-12-01T10:30:00.000Z",
"updated_at": "2023-12-15T14:45:30.000Z"
}
]The API gives the ability to create new category.
Authorizations
Header parameters
x-tenant-idstring · uuidRequired
Tenant id (uuid v4)
Body
namestringRequiredExample:
Category name
CottonResponses
201Success
application/json
post
/api/public/material-categoriesPOST /api/public/material-categories 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: 17
{
"name": "Cotton"
}201Success
{
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"name": "Cotton",
"created_at": "2023-12-01T10:30:00.000Z",
"updated_at": "2023-12-15T14:45:30.000Z"
}The API gives the ability to delete category.
Authorizations
Path parameters
idstringRequired
Material category id
Header parameters
x-tenant-idstring · uuidRequired
Tenant id (uuid v4)
Responses
200Success
application/json
delete
/api/public/material-categories/{id}DELETE /api/public/material-categories/{id} HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
200Success
{
"message": "The operation was done successfully"
}The API gives the ability to update an existing category’s name.
Authorizations
Path parameters
idstringRequired
Material category id
Header parameters
x-tenant-idstring · uuidRequired
Tenant id (uuid v4)
Body
namestringRequiredExample:
Category name
CottonResponses
200Success
application/json
patch
/api/public/material-categories/{id}PATCH /api/public/material-categories/{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: 17
{
"name": "Cotton"
}200Success
{
"message": "The operation was done successfully"
}Last updated