Skip to content

Substance

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
POST
/v2/substance/index

Returns a paginated and filterable list of substances.
Use POST to allow complex filters via JSON payload.

Parameters for searching substances

object
filter
object
office_substance_id

The unique identifier for the office substance.

string format: uuid
code

The code of the office substance, if available.

string
nullable
name

The name of the office substance.

string
description

A description of the office substance, if available.

string
nullable
office_id

The unique identifier of the office where the substance is used.

string format: uuid
project_id

The unique identifier of the project associated with the office substance.

string format: uuid
project_name

The name of the project associated with the office substance.

string
project_type

The type of the project associated with the office substance.

string
office_name

The name of the office where the substance is used.

string
owned_active

Indicates if the office substance is actively owned.

boolean
parent_active

Indicates if the parent entity is active.

boolean
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort

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

string
history

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.

boolean
Example
{
"filter": {
"name": "Acetone",
"office_id": "off-1"
},
"per-page": 10,
"page": 1,
"sort": "name"
}

List of substances

Array<object>
object
office_substance_id

The unique identifier for the office substance.

string format: uuid
code

The code of the office substance, if available.

string
nullable
name

The name of the office substance.

string
description

A description of the office substance, if available.

string
nullable
office_id

The unique identifier of the office where the substance is used.

string format: uuid
project_id

The unique identifier of the project associated with the office substance.

string format: uuid
project_name

The name of the project associated with the office substance.

string
project_type

The type of the project associated with the office substance.

string
office_name

The name of the office where the substance is used.

string
owned_active

Indicates if the office substance is actively owned.

boolean
parent_active

Indicates if the parent entity is active.

boolean
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"
}
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

POST
/v2/substance/create

Create a new substance by providing the required details.

Substance object to be created

object
office_substance_id

The unique identifier for the office substance.

string format: uuid
code

The code of the office substance, if available.

string
nullable
name

The name of the office substance.

string
description

A description of the office substance, if available.

string
nullable
office_id

The unique identifier of the office where the substance is used.

string format: uuid
project_id

The unique identifier of the project associated with the office substance.

string format: uuid
Example
{
"code": "S002",
"name": "Ethanol",
"description": "Alcohol",
"office_id": "off-2",
"project_id": "proj-2"
}

Substance created successfully

object
office_substance_id

The unique identifier for the office substance.

string format: uuid
code

The code of the office substance, if available.

string
nullable
name

The name of the office substance.

string
description

A description of the office substance, if available.

string
nullable
office_id

The unique identifier of the office where the substance is used.

string format: uuid
project_id

The unique identifier of the project associated with the office substance.

string format: uuid
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.

id
required
string format: uuid

ID of the substance to retrieve

Substance found

object
office_substance_id

The unique identifier for the office substance.

string format: uuid
code

The code of the office substance, if available.

string
nullable
name

The name of the office substance.

string
description

A description of the office substance, if available.

string
nullable
office_id

The unique identifier of the office where the substance is used.

string format: uuid
project_id

The unique identifier of the project associated with the office substance.

string format: uuid
project_name

The name of the project associated with the office substance.

string
project_type

The type of the project associated with the office substance.

string
office_name

The name of the office where the substance is used.

string
owned_active

Indicates if the office substance is actively owned.

boolean
parent_active

Indicates if the parent entity is active.

boolean
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.

id
required
string format: uuid

ID of the substance to delete

force
boolean

Force the deletion of the entity and all related entities

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.

id
required
string format: uuid

ID of the substance to update

Substance object with updated data

object
office_substance_id

The unique identifier for the office substance.

string format: uuid
code

The code of the office substance, if available.

string
nullable
name

The name of the office substance.

string
description

A description of the office substance, if available.

string
nullable
office_id

The unique identifier of the office where the substance is used.

string format: uuid
project_id

The unique identifier of the project associated with the office substance.

string format: uuid
Example
{
"name": "Updated Substance",
"description": "Updated description"
}

Substance updated successfully

object
office_substance_id

The unique identifier for the office substance.

string format: uuid
code

The code of the office substance, if available.

string
nullable
name

The name of the office substance.

string
description

A description of the office substance, if available.

string
nullable
office_id

The unique identifier of the office where the substance is used.

string format: uuid
project_id

The unique identifier of the project associated with the office substance.

string format: uuid
Example
{
"office_substance_id": "sub-1",
"name": "Updated Substance",
"description": "Updated description"
}

Substance not found