---
title: "Incident"
url: "https://dev.4hse.com/api/incident"
---

# Incident

An **Incident** represents an event or report registered in an office: an accident, a near-miss, a non-compliance, a malfunction report, or an intervention request.

Belongs to an office (via `subtenant_id` = office\_id) and has a workflow status:

-   `new`: just reported
-   `open`: being handled
-   `closed`: resolved (with closing date)

An incident can have:

-   Involved people (IncidentPerson)
-   Involved resources (IncidentResource): equipment, environments, substances, work groups, materials
-   Linked corrective actions (IncidentAction)

Use this API to:

-   Report a new incident in an office
-   Browse incidents for an office (filter by `subtenant_id`)
-   Filter by category or status
-   Manage the incident lifecycle (new → open → closed)

Version

2.0.0

OpenAPI version

3.0.0

## Authentication

[Section titled “ Authentication ”](#authentication)

### OAuth2

[Section titled “OAuth2 ”](#oauth2)

**Security scheme type:** oauth2

**Flow type:** password

**Token URL:** [https://auth.4hse.com/realms/4hse/protocol/openid-connect/token](https://auth.4hse.com/realms/4hse/protocol/openid-connect/token)

### AccessToken

[Section titled “AccessToken ”](#accesstoken)

**Security scheme type:** apiKey

**Query parameter name:** access-token

## Operations

[Section titled “Operations”](#operations)

### index

[Section titled “index”](#operation-indexIncident-post)

POST

/v2/incident/index

-   

Returns a paginated list of incidents.

Most useful filters:

-   `subtenant_id` (office\_id): all incidents in an office
-   `status`: filter by workflow status (`new`, `open`, `closed`)
-   `category`: filter by incident type
-   `tenant_id` (project\_id): all incidents in a company

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incident/#oauth2)**
-   **[AccessToken](/api/incident/#accesstoken)**

#### Request Body

[Section titled “Request Body ”](#request-body)

Parameters for searching incidents

Select media typeapplication/json

object

**filter**

object

**office\_incident\_id**

string format: uuid

**code**

string

**name**

string

**date\_incident**

string format: date

**category**

string

Allowed values: NON\_COMPLIANCE ACCIDENTS ACCIDENTS\_AND\_MISSED\_INJURIES REPORT\_MALFUNCTION REPORT\_FAILURE REQUEST\_INSPECTION REQUEST\_MAINTENANCE REQUEST\_REPLACEMENT REQUEST\_INTERVENTION

**description\_event**

string

**description\_actions\_involved**

string

**deponent**

string

**manager**

string format: json

**assignee**

string format: json

**watcher**

string format: json

**to**

object

**status**

string

Allowed values: new open closed

**external\_reference\_id**

string

**date\_closed**

string format: date

**creator**

string

**created\_at**

string

**tenant\_id**

string format: uuid

**subtenant\_id**

string format: uuid

**office\_name**

Name of the office.

string

**project\_name**

Name of the project.

string

**project\_type**

string

Allowed values: safety template

**totInvolvedPerson**

Total number of people involved in the incident.

integer

**totSicknessDays**

Total sickness days across all involved people.

integer

**per-page**

integer

default: 100 \>= 1

**page**

integer

default: 1 \>= 1

**sort**

string

Allowed values: name code date\_incident status category office\_name project\_name

##### Example

```
{  "filter": {    "subtenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",    "status": "open"  },  "per-page": 20,  "page": 1,  "sort": "-date_incident"}
```

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

List of incidents

Select media typeapplication/json

Array<object>

object

**office\_incident\_id**

string format: uuid

**code**

string

**name**

string

**date\_incident**

string format: date

**category**

string

Allowed values: NON\_COMPLIANCE ACCIDENTS ACCIDENTS\_AND\_MISSED\_INJURIES REPORT\_MALFUNCTION REPORT\_FAILURE REQUEST\_INSPECTION REQUEST\_MAINTENANCE REQUEST\_REPLACEMENT REQUEST\_INTERVENTION

**description\_event**

string

**description\_actions\_involved**

string

**deponent**

string

**manager**

string format: json

**assignee**

string format: json

**watcher**

string format: json

**to**

object

**status**

string

Allowed values: new open closed

**external\_reference\_id**

string

**date\_closed**

string format: date

**creator**

string

**created\_at**

string

**tenant\_id**

string format: uuid

**subtenant\_id**

string format: uuid

**office\_name**

Name of the office.

string

**project\_name**

Name of the project.

string

**project\_type**

string

Allowed values: safety template

**totInvolvedPerson**

Total number of people involved in the incident.

integer

**totSicknessDays**

Total sickness days across all involved people.

integer

#### Headers

[Section titled “Headers ”](#headers)

**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

### create

[Section titled “create”](#operation-createIncident-post)

POST

/v2/incident/create

-   

Reports a new incident.

Requires `name`, `date_incident`, `subtenant_id` (office\_id), and `tenant_id` (project\_id). The `office_incident_id` is auto-generated if not provided.

After creation, add involved people via IncidentPerson, involved resources via IncidentResource, and corrective actions via IncidentAction.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incident/#oauth2)**
-   **[AccessToken](/api/incident/#accesstoken)**

#### Request Body required

[Section titled “Request Body required ”](#request-body)

Incident to report

Select media typeapplication/json

object

**office\_incident\_id**

Unique identifier. Auto-generated if not provided.

string format: uuid

**code**

Identifier code.

string

<= 50 characters

**name**

required

Title/name of the incident.

string

**date\_incident**

required

Date when the incident occurred.

string format: date

**category**

Incident category:

-   `NON_COMPLIANCE`: non-compliance
-   `ACCIDENTS`: accident
-   `ACCIDENTS_AND_MISSED_INJURIES`: accident and near-miss
-   `REPORT_MALFUNCTION`: malfunction report
-   `REPORT_FAILURE`: failure report
-   `REQUEST_INSPECTION`: inspection request
-   `REQUEST_MAINTENANCE`: maintenance request
-   `REQUEST_REPLACEMENT`: replacement request
-   `REQUEST_INTERVENTION`: intervention request

string

<= 50 characters

Allowed values: NON\_COMPLIANCE ACCIDENTS ACCIDENTS\_AND\_MISSED\_INJURIES REPORT\_MALFUNCTION REPORT\_FAILURE REQUEST\_INSPECTION REQUEST\_MAINTENANCE REQUEST\_REPLACEMENT REQUEST\_INTERVENTION

**description\_event**

Description of what happened.

string

**description\_actions\_involved**

Description of actions taken.

string

**deponent**

Name of the person who reported the incident.

string

**manager**

Incident managers (JSON).

string format: json

**assignee**

Incident assignees (JSON).

string format: json

**watcher**

Incident watchers (JSON).

string format: json

**to**

Notification recipients (JSON).

object

**status**

Workflow status:

-   `new`: just reported
-   `open`: being handled
-   `closed`: resolved (requires `date_closed`)

string

<= 50 characters

Allowed values: new open closed

**external\_reference\_id**

External reference number (e.g. INAIL, OSHA, CPAM case number).

string

<= 50 characters

**date\_closed**

Closing date. Required when `status` is `closed`.

string format: date

**creator**

Username of the person who created the incident. Auto-set on creation.

string

**created\_at**

Creation timestamp. Auto-set on creation.

string

**tenant\_id**

required

The project (company). Pass the `project_id`.

string format: uuid

**subtenant\_id**

required

The office where the incident occurred. Pass the `office_id`.

string format: uuid

#### Responses

[Section titled “ Responses ”](#responses)

##### 201

[Section titled “201 ”](#201)

Incident reported successfully

Select media typeapplication/json

object

**office\_incident\_id**

Unique identifier. Auto-generated if not provided.

string format: uuid

**code**

Identifier code.

string

<= 50 characters

**name**

required

Title/name of the incident.

string

**date\_incident**

required

Date when the incident occurred.

string format: date

**category**

Incident category:

-   `NON_COMPLIANCE`: non-compliance
-   `ACCIDENTS`: accident
-   `ACCIDENTS_AND_MISSED_INJURIES`: accident and near-miss
-   `REPORT_MALFUNCTION`: malfunction report
-   `REPORT_FAILURE`: failure report
-   `REQUEST_INSPECTION`: inspection request
-   `REQUEST_MAINTENANCE`: maintenance request
-   `REQUEST_REPLACEMENT`: replacement request
-   `REQUEST_INTERVENTION`: intervention request

string

<= 50 characters

Allowed values: NON\_COMPLIANCE ACCIDENTS ACCIDENTS\_AND\_MISSED\_INJURIES REPORT\_MALFUNCTION REPORT\_FAILURE REQUEST\_INSPECTION REQUEST\_MAINTENANCE REQUEST\_REPLACEMENT REQUEST\_INTERVENTION

**description\_event**

Description of what happened.

string

**description\_actions\_involved**

Description of actions taken.

string

**deponent**

Name of the person who reported the incident.

string

**manager**

Incident managers (JSON).

string format: json

**assignee**

Incident assignees (JSON).

string format: json

**watcher**

Incident watchers (JSON).

string format: json

**to**

Notification recipients (JSON).

object

**status**

Workflow status:

-   `new`: just reported
-   `open`: being handled
-   `closed`: resolved (requires `date_closed`)

string

<= 50 characters

Allowed values: new open closed

**external\_reference\_id**

External reference number (e.g. INAIL, OSHA, CPAM case number).

string

<= 50 characters

**date\_closed**

Closing date. Required when `status` is `closed`.

string format: date

**creator**

Username of the person who created the incident. Auto-set on creation.

string

**created\_at**

Creation timestamp. Auto-set on creation.

string

**tenant\_id**

required

The project (company). Pass the `project_id`.

string format: uuid

**subtenant\_id**

required

The office where the incident occurred. Pass the `office_id`.

string format: uuid

### view

[Section titled “view”](#operation-viewIncident-get)

GET

/v2/incident/view/{id}

-   

Retrieves a single incident by its ID.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incident/#oauth2)**
-   **[AccessToken](/api/incident/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The office\_incident\_id to retrieve.

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

Incident found

Select media typeapplication/json

object

**office\_incident\_id**

string format: uuid

**code**

string

**name**

string

**date\_incident**

string format: date

**category**

string

Allowed values: NON\_COMPLIANCE ACCIDENTS ACCIDENTS\_AND\_MISSED\_INJURIES REPORT\_MALFUNCTION REPORT\_FAILURE REQUEST\_INSPECTION REQUEST\_MAINTENANCE REQUEST\_REPLACEMENT REQUEST\_INTERVENTION

**description\_event**

string

**description\_actions\_involved**

string

**deponent**

string

**manager**

string format: json

**assignee**

string format: json

**watcher**

string format: json

**to**

object

**status**

string

Allowed values: new open closed

**external\_reference\_id**

string

**date\_closed**

string format: date

**creator**

string

**created\_at**

string

**tenant\_id**

string format: uuid

**subtenant\_id**

string format: uuid

**office\_name**

Name of the office.

string

**project\_name**

Name of the project.

string

**project\_type**

string

Allowed values: safety template

**totInvolvedPerson**

Total number of people involved in the incident.

integer

**totSicknessDays**

Total sickness days across all involved people.

integer

##### 404

[Section titled “404 ”](#404)

Incident not found

### update

[Section titled “update”](#operation-updateIncident-put)

PUT

/v2/incident/update/{id}

-   

Updates an existing incident.

Common use case: changing status to `open` (being handled) or `closed` (resolved). When setting `status` to `closed`, the `date_closed` field is required.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incident/#oauth2)**
-   **[AccessToken](/api/incident/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The office\_incident\_id to update.

#### Request Body required

[Section titled “Request Body required ”](#request-body)

Fields to update

Select media typeapplication/json

object

**office\_incident\_id**

Unique identifier. Auto-generated if not provided.

string format: uuid

**code**

Identifier code.

string

<= 50 characters

**name**

required

Title/name of the incident.

string

**date\_incident**

required

Date when the incident occurred.

string format: date

**category**

Incident category:

-   `NON_COMPLIANCE`: non-compliance
-   `ACCIDENTS`: accident
-   `ACCIDENTS_AND_MISSED_INJURIES`: accident and near-miss
-   `REPORT_MALFUNCTION`: malfunction report
-   `REPORT_FAILURE`: failure report
-   `REQUEST_INSPECTION`: inspection request
-   `REQUEST_MAINTENANCE`: maintenance request
-   `REQUEST_REPLACEMENT`: replacement request
-   `REQUEST_INTERVENTION`: intervention request

string

<= 50 characters

Allowed values: NON\_COMPLIANCE ACCIDENTS ACCIDENTS\_AND\_MISSED\_INJURIES REPORT\_MALFUNCTION REPORT\_FAILURE REQUEST\_INSPECTION REQUEST\_MAINTENANCE REQUEST\_REPLACEMENT REQUEST\_INTERVENTION

**description\_event**

Description of what happened.

string

**description\_actions\_involved**

Description of actions taken.

string

**deponent**

Name of the person who reported the incident.

string

**manager**

Incident managers (JSON).

string format: json

**assignee**

Incident assignees (JSON).

string format: json

**watcher**

Incident watchers (JSON).

string format: json

**to**

Notification recipients (JSON).

object

**status**

Workflow status:

-   `new`: just reported
-   `open`: being handled
-   `closed`: resolved (requires `date_closed`)

string

<= 50 characters

Allowed values: new open closed

**external\_reference\_id**

External reference number (e.g. INAIL, OSHA, CPAM case number).

string

<= 50 characters

**date\_closed**

Closing date. Required when `status` is `closed`.

string format: date

**creator**

Username of the person who created the incident. Auto-set on creation.

string

**created\_at**

Creation timestamp. Auto-set on creation.

string

**tenant\_id**

required

The project (company). Pass the `project_id`.

string format: uuid

**subtenant\_id**

required

The office where the incident occurred. Pass the `office_id`.

string format: uuid

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

Incident updated successfully

Select media typeapplication/json

object

**office\_incident\_id**

Unique identifier. Auto-generated if not provided.

string format: uuid

**code**

Identifier code.

string

<= 50 characters

**name**

required

Title/name of the incident.

string

**date\_incident**

required

Date when the incident occurred.

string format: date

**category**

Incident category:

-   `NON_COMPLIANCE`: non-compliance
-   `ACCIDENTS`: accident
-   `ACCIDENTS_AND_MISSED_INJURIES`: accident and near-miss
-   `REPORT_MALFUNCTION`: malfunction report
-   `REPORT_FAILURE`: failure report
-   `REQUEST_INSPECTION`: inspection request
-   `REQUEST_MAINTENANCE`: maintenance request
-   `REQUEST_REPLACEMENT`: replacement request
-   `REQUEST_INTERVENTION`: intervention request

string

<= 50 characters

Allowed values: NON\_COMPLIANCE ACCIDENTS ACCIDENTS\_AND\_MISSED\_INJURIES REPORT\_MALFUNCTION REPORT\_FAILURE REQUEST\_INSPECTION REQUEST\_MAINTENANCE REQUEST\_REPLACEMENT REQUEST\_INTERVENTION

**description\_event**

Description of what happened.

string

**description\_actions\_involved**

Description of actions taken.

string

**deponent**

Name of the person who reported the incident.

string

**manager**

Incident managers (JSON).

string format: json

**assignee**

Incident assignees (JSON).

string format: json

**watcher**

Incident watchers (JSON).

string format: json

**to**

Notification recipients (JSON).

object

**status**

Workflow status:

-   `new`: just reported
-   `open`: being handled
-   `closed`: resolved (requires `date_closed`)

string

<= 50 characters

Allowed values: new open closed

**external\_reference\_id**

External reference number (e.g. INAIL, OSHA, CPAM case number).

string

<= 50 characters

**date\_closed**

Closing date. Required when `status` is `closed`.

string format: date

**creator**

Username of the person who created the incident. Auto-set on creation.

string

**created\_at**

Creation timestamp. Auto-set on creation.

string

**tenant\_id**

required

The project (company). Pass the `project_id`.

string format: uuid

**subtenant\_id**

required

The office where the incident occurred. Pass the `office_id`.

string format: uuid

##### 404

[Section titled “404 ”](#404)

Incident not found

### delete

[Section titled “delete”](#operation-deleteIncident-delete)

DELETE

/v2/incident/delete/{id}

-   

Deletes an incident.

If `force=false` (default), the response lists child entities (people, resources, actions). If `force=true`, the incident and all related entities are deleted.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incident/#oauth2)**
-   **[AccessToken](/api/incident/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The office\_incident\_id to delete.

#### Query Parameters

[Section titled “Query Parameters ”](#query-parameters)

**force**

boolean

If true, deletes the incident and all child entities.

#### Responses

[Section titled “ Responses ”](#responses)

##### 204

[Section titled “204 ”](#204)

Incident deleted successfully

##### 400

[Section titled “400 ”](#400)

Preview of entities that would be deleted (returned when force=false)

This site is protected by reCAPTCHA and the Google [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms) apply.