Substance
Questi contenuti non sono ancora disponibili nella tua lingua.
A Substance represents a hazardous or chemical substance registered in an office. Examples: solvents, acids, powders, compressed gases.
Belongs to an office and can be subject to check actions on the compliance schedule
(ActionSubscription with subscriber_type: SUBSTANCE).
Use this API to:
- Register substances present in an office
- Get the
office_substance_idneeded to create compliance schedule entries or certificates - Browse the substance inventory for an office (filter by
office_id)
Supports historicization.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Authentication
Sezione intitolata “ Authentication ”OAuth2
Sezione intitolata “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
AccessToken
Sezione intitolata “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Sezione intitolata “Operations” POST /v2/substance/index
Returns a paginated list of substances.
Most useful filters:
office_id: all substances in a specific officename: search by name
Authorizations
Sezione intitolata “Authorizations ”Request Body
Sezione intitolata “Request Body ”Parameters for searching substances
object
object
Unique identifier. Used as subscriber_id (SUBSTANCE) or resource_id.
Name of the office.
Name of the project.
Whether this substance is currently active.
Whether the parent office is currently active.
If true, includes historicized entries.
Example
{ "filter": { "office_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "per-page": 20, "page": 1, "sort": "name"}Responses
Sezione intitolata “ Responses ”List of substances
object
Unique identifier. Used as subscriber_id (SUBSTANCE) or resource_id.
Name of the office.
Name of the project.
Whether this substance is currently active.
Whether the parent office is currently active.
Headers
Sezione intitolata “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
POST /v2/substance/create
Registers a new substance in an office.
Requires office_id, project_id, and name.
The office_substance_id is auto-generated if not provided.
Authorizations
Sezione intitolata “Authorizations ”Request Body required
Sezione intitolata “Request Body required ”Substance to register
object
Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: SUBSTANCE) in the compliance schedule and as resource_id in certificates.
The office this substance belongs to. Pass the office_id.
Identifier code.
Name of the substance.
Optional description.
The project (company). Pass the project_id.
Responses
Sezione intitolata “ Responses ”Substance registered successfully
object
Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: SUBSTANCE) in the compliance schedule and as resource_id in certificates.
The office this substance belongs to. Pass the office_id.
Identifier code.
Name of the substance.
Optional description.
The project (company). Pass the project_id.
GET /v2/substance/view/{id}
Retrieves a single substance by its ID.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”The office_substance_id to retrieve.
Responses
Sezione intitolata “ Responses ”Substance found
object
Unique identifier. Used as subscriber_id (SUBSTANCE) or resource_id.
Name of the office.
Name of the project.
Whether this substance is currently active.
Whether the parent office is currently active.
Substance not found
PUT /v2/substance/update/{id}
Updates an existing substance.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”The office_substance_id to update.
Request Body required
Sezione intitolata “Request Body required ”Fields to update
object
Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: SUBSTANCE) in the compliance schedule and as resource_id in certificates.
The office this substance belongs to. Pass the office_id.
Identifier code.
Name of the substance.
Optional description.
The project (company). Pass the project_id.
Responses
Sezione intitolata “ Responses ”Substance updated successfully
object
Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: SUBSTANCE) in the compliance schedule and as resource_id in certificates.
The office this substance belongs to. Pass the office_id.
Identifier code.
Name of the substance.
Optional description.
The project (company). Pass the project_id.
Substance not found
DELETE /v2/substance/delete/{id}
Deletes a substance.
If force=false (default), the response lists child entities.
If force=true, the substance and all related entities are deleted.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”The office_substance_id to delete.
Query Parameters
Sezione intitolata “Query Parameters ”If true, deletes the substance and all child entities.
Responses
Sezione intitolata “ Responses ”Substance deleted successfully
Preview of entities that would be deleted (returned when force=false)