For the complete documentation index, see llms.txt. This page is also available as Markdown.

Material Categories

Get material categories

get

The API gives the ability to get all material categories.

Authorizations
x-api-keystringRequired
Header parameters
x-tenant-idstring · uuidOptional

Tenant id (uuid v4)

Responses
200Success
application/json
idstring · uuidRequired

Unique identifier of the category

Example: b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e
namestringRequired

Category name

Example: Cotton
created_atstring · date-timeRequired

Time when the category was created

Example: 2023-12-01T10:30:00.000Z
updated_atstring · date-time · nullableRequired

Time when the category was last updated, null if never updated

Example: 2023-12-15T14:45:30.000Z
get/api/v1/public/material-categories
GET /api/v1/public/material-categories HTTP/1.1
Host: api-stage.hesh.tech
x-api-key: YOUR_API_KEY
Accept: */*
[
  {
    "id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
    "name": "Cotton",
    "created_at": "2023-12-01T10:30:00.000Z",
    "updated_at": "2023-12-15T14:45:30.000Z"
  }
]

Create material category

post

The API gives the ability to create new category.

Authorizations
x-api-keystringRequired
Header parameters
x-tenant-idstring · uuidOptional

Tenant id (uuid v4)

Body
namestringRequired

Category name

Example: Cotton
Responses
201Success
application/json
idstring · uuidRequired

Unique identifier of the category

Example: b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e
namestringRequired

Category name

Example: Cotton
created_atstring · date-timeRequired

Time when the category was created

Example: 2023-12-01T10:30:00.000Z
updated_atstring · date-time · nullableRequired

Time when the category was last updated, null if never updated

Example: 2023-12-15T14:45:30.000Z
post/api/v1/public/material-categories
POST /api/v1/public/material-categories HTTP/1.1
Host: api-stage.hesh.tech
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "name": "Cotton"
}
{
  "id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
  "name": "Cotton",
  "created_at": "2023-12-01T10:30:00.000Z",
  "updated_at": "2023-12-15T14:45:30.000Z"
}

Delete material category

delete

The API gives the ability to delete category.

Authorizations
x-api-keystringRequired
Path parameters
idstringRequired

Material category id

Header parameters
x-tenant-idstring · uuidOptional

Tenant id (uuid v4)

Responses
200Success
application/json
messagestringRequired

Message returned from API confirming the operation

Example: The operation was done successfully
delete/api/v1/public/material-categories/{id}
DELETE /api/v1/public/material-categories/{id} HTTP/1.1
Host: api-stage.hesh.tech
x-api-key: YOUR_API_KEY
Accept: */*
{
  "message": "The operation was done successfully"
}

Update material category

patch

The API gives the ability to update an existing category’s name.

Authorizations
x-api-keystringRequired
Path parameters
idstringRequired

Material category id

Header parameters
x-tenant-idstring · uuidOptional

Tenant id (uuid v4)

Body
namestringRequired

Category name

Example: Cotton
Responses
200Success
application/json
messagestringRequired

Message returned from API confirming the operation

Example: The operation was done successfully
patch/api/v1/public/material-categories/{id}
PATCH /api/v1/public/material-categories/{id} HTTP/1.1
Host: api-stage.hesh.tech
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "name": "Cotton"
}
{
  "message": "The operation was done successfully"
}

Last updated