Substance
Questi contenuti non sono ancora disponibili nella tua lingua.
Manage substances, including registration, update, deletion, and advanced search.
Substances can be linked to offices and projects, and support metadata and filtering.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Operations
Sezione intitolata “Operations” POST /v2/substance/index
Returns a paginated and filterable list of substances.
Use POST to allow complex filters via JSON payload.
Request Body
Sezione intitolata “Request Body ”Parameters for searching substances
object
object
The unique identifier for the office substance.
The code of the office substance, if available.
The name of the office substance.
A description of the office substance, if available.
The unique identifier of the office where the substance is used.
The unique identifier of the project associated with the office substance.
The name of the project associated with the office substance.
The type of the project associated with the office substance.
The name of the office where the substance is used.
Indicates if the office substance is actively owned.
Indicates if the parent entity is active.
The field of the model to sort the list for, use a minus to revert the sort. Es -name is to require the sort in reverse order
The field establishes whether to also include historized elements that are no longer active in the results. If you leave this parameter empty the response returns only actual entries.
Example
{ "filter": { "name": "Acetone", "office_id": "off-1" }, "per-page": 10, "page": 1, "sort": "name"}
Responses
Sezione intitolata “ Responses ”List of substances
object
The unique identifier for the office substance.
The code of the office substance, if available.
The name of the office substance.
A description of the office substance, if available.
The unique identifier of the office where the substance is used.
The unique identifier of the project associated with the office substance.
The name of the project associated with the office substance.
The type of the project associated with the office substance.
The name of the office where the substance is used.
Indicates if the office substance is actively owned.
Indicates if the parent entity is active.
Example
{ "office_substance_id": "sub-1", "code": "S001", "name": "Acetone", "description": "Solvent", "office_id": "off-1", "project_id": "proj-1", "office_name": "Main Office", "project_name": "Project X"}
Headers
Sezione intitolata “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
POST /v2/substance/create
Create a new substance by providing the required details.
Request Body required
Sezione intitolata “Request Body required ”Substance object to be created
object
The unique identifier for the office substance.
The code of the office substance, if available.
The name of the office substance.
A description of the office substance, if available.
The unique identifier of the office where the substance is used.
The unique identifier of the project associated with the office substance.
Example
{ "code": "S002", "name": "Ethanol", "description": "Alcohol", "office_id": "off-2", "project_id": "proj-2"}
Responses
Sezione intitolata “ Responses ”Substance created successfully
object
The unique identifier for the office substance.
The code of the office substance, if available.
The name of the office substance.
A description of the office substance, if available.
The unique identifier of the office where the substance is used.
The unique identifier of the project associated with the office substance.
Example
{ "office_substance_id": "sub-2", "code": "S002", "name": "Ethanol", "description": "Alcohol", "office_id": "off-2", "project_id": "proj-2"}
GET /v2/substance/view/{id}
Retrieve a substance by its unique ID.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the substance to retrieve
Responses
Sezione intitolata “ Responses ”Substance found
object
The unique identifier for the office substance.
The code of the office substance, if available.
The name of the office substance.
A description of the office substance, if available.
The unique identifier of the office where the substance is used.
The unique identifier of the project associated with the office substance.
The name of the project associated with the office substance.
The type of the project associated with the office substance.
The name of the office where the substance is used.
Indicates if the office substance is actively owned.
Indicates if the parent entity is active.
Example
{ "office_substance_id": "sub-1", "code": "S001", "name": "Acetone", "description": "Solvent", "office_id": "off-1", "project_id": "proj-1", "office_name": "Main Office", "project_name": "Project X"}
Substance not found
DELETE /v2/substance/delete/{id}
Delete a substance by its unique ID.
If force=true, all related entities will also be deleted.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the substance to delete
Query Parameters
Sezione intitolata “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Sezione intitolata “ Responses ”Substance deleted successfully
If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned
PUT /v2/substance/update/{id}
Update an existing substance by its unique ID.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the substance to update
Request Body required
Sezione intitolata “Request Body required ”Substance object with updated data
object
The unique identifier for the office substance.
The code of the office substance, if available.
The name of the office substance.
A description of the office substance, if available.
The unique identifier of the office where the substance is used.
The unique identifier of the project associated with the office substance.
Example
{ "name": "Updated Substance", "description": "Updated description"}
Responses
Sezione intitolata “ Responses ”Substance updated successfully
object
The unique identifier for the office substance.
The code of the office substance, if available.
The name of the office substance.
A description of the office substance, if available.
The unique identifier of the office where the substance is used.
The unique identifier of the project associated with the office substance.
Example
{ "office_substance_id": "sub-1", "name": "Updated Substance", "description": "Updated description"}
Substance not found