Material
A Material represents a type of material managed in an office. Each Material is a model/type, not a single physical item — individual items are tracked as MaterialItem entries.
Currently materials are only PPE (personal protective equipment, material_type: PPE),
but other types may be added in the future.
Examples: “Safety Helmet Model X”, “Heat-Resistant Gloves Type Y”, “Fall Protection Harness”.
Belongs to an office (via subtenant_id = office_id).
Use this API to:
- Register types of PPE available in an office
- Get the
material_idneeded to create individual items (MaterialItem) - Browse the material inventory for an office (filter by
subtenant_id)
Supports historicization.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Authentication
Section titled “ Authentication ”OAuth2
Section titled “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
AccessToken
Section titled “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Section titled “Operations” POST /v2/material/index
Returns a paginated list of materials.
Most useful filters:
subtenant_id(office_id): all materials in a specific officematerial_type: filter by type (currently onlyPPE)name: search by name
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching materials
object
object
object
Name of the office.
Name of the project.
Number of available items (total minus items already assigned via certificates).
Whether this material is currently active.
Whether the parent office is currently active.
If true, includes historicized entries.
Example
{ "filter": { "subtenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "material_type": "PPE" }, "per-page": 20, "page": 1, "sort": "name"}Responses
Section titled “ Responses ”List of materials
object
object
Name of the office.
Name of the project.
Number of available items (total minus items already assigned via certificates).
Whether this material is currently active.
Whether the parent office is currently active.
Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
create
Section titled “create” POST /v2/material/create
Registers a new material type in an office.
Requires material_type, subtenant_id (office_id), tenant_id (project_id), and name.
The material_id is auto-generated if not provided.
After creating the material type, create MaterialItem entries for individual items or batches.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Material to register
object
Unique identifier of the material type. Auto-generated if not provided.
Type of material. Currently only PPE (personal protective equipment). Other types may be added in the future.
Identifier code.
Name of the material type.
Optional description.
Material category.
Additional structured data in JSON format.
object
The office this material belongs to. Pass the office_id.
The project (company). Pass the project_id.
Responses
Section titled “ Responses ”Material registered successfully
object
Unique identifier of the material type. Auto-generated if not provided.
Type of material. Currently only PPE (personal protective equipment). Other types may be added in the future.
Identifier code.
Name of the material type.
Optional description.
Material category.
Additional structured data in JSON format.
object
The office this material belongs to. Pass the office_id.
The project (company). Pass the project_id.
GET /v2/material/view/{id}
Retrieves a single material type by its ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The material_id to retrieve.
Responses
Section titled “ Responses ”Material found
object
object
Name of the office.
Name of the project.
Number of available items (total minus items already assigned via certificates).
Whether this material is currently active.
Whether the parent office is currently active.
Material not found
update
Section titled “update” PUT /v2/material/update/{id}
Updates an existing material type.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The material_id to update.
Request Body required
Section titled “Request Body required ”Fields to update
object
Unique identifier of the material type. Auto-generated if not provided.
Type of material. Currently only PPE (personal protective equipment). Other types may be added in the future.
Identifier code.
Name of the material type.
Optional description.
Material category.
Additional structured data in JSON format.
object
The office this material belongs to. Pass the office_id.
The project (company). Pass the project_id.
Responses
Section titled “ Responses ”Material updated successfully
object
Unique identifier of the material type. Auto-generated if not provided.
Type of material. Currently only PPE (personal protective equipment). Other types may be added in the future.
Identifier code.
Name of the material type.
Optional description.
Material category.
Additional structured data in JSON format.
object
The office this material belongs to. Pass the office_id.
The project (company). Pass the project_id.
Material not found
delete
Section titled “delete” DELETE /v2/material/delete/{id}
Deletes a material type.
If force=false (default), the response lists child entities (MaterialItem entries).
If force=true, the material and all items are deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The material_id to delete.
Query Parameters
Section titled “Query Parameters ”If true, deletes the material and all child entities.
Responses
Section titled “ Responses ”Material deleted successfully
Preview of entities that would be deleted (returned when force=false)