Near Misses

GET /rest/v1.0/projects/{project_id}/incidents/near_misses

Description

Returns a list of Near Misses for a given project.

Header Parameters

Procore-Company-Idinteger*

Unique company identifier associated with the Procore User Account.

Path Parameters

project_idinteger*

Unique identifier for the project.

Query Parameters

incident_idinteger

Incident ID. When provided, the list will be scoped to only the Near Misses for a given Incident.

pageinteger

Page

per_pageinteger

Elements per page

filters[created_at]string

Return item(s) created within the specified ISO 8601 datetime range.
Formats:
YYYY-MM-DD...YYYY-MM-DD - Date
YYYY-MM-DDTHH:MM:SSZ...YYYY-MM-DDTHH:MM:SSZ - DateTime with UTC Offset
YYYY-MM-DDTHH:MM:SS+XX:00...YYYY-MM-DDTHH:MM:SS+XX:00` - Datetime with Custom Offset

filters[affected_company_id]array[integer]

Array of Company IDs. Returns item(s) with the specified affected Company IDs.

filters[affected_party_id]array[integer]

Array of Affected Party IDs. Returns item(s) with the specified Affected Party IDs.

filters[affected_person_id]array[integer]

Array of Person IDs. Returns item(s) with the specified affected Person IDs.

filters[harm_source_id]array[integer]

Array of Harm Source IDs. Returns item(s) with the specified Harm Source IDs.

filters[work_activity_id]array[integer]

Array of Work Activity IDs. Returns item(s) with the specified Work Activity IDs.

filters[managed_equipment_id]integer

Return item(s) with the specified Managed Equipment ID.

filters[query]string

Return item(s) containing query

sortstring

Allowed values:
affected_company
affected_person
created_at
managed_equipment
full_number
harm_source
number
work_activity
Example Requests
1const request = require('request');
2
3const options = {
4 method: 'GET',
5 url: 'https://api.procore.com/rest/v1.0/projects/%7Bproject_id%7D/incidents/near_misses',
6 qs: {
7 incident_id: 'SOME_INTEGER_VALUE',
8 page: 'SOME_INTEGER_VALUE',
9 per_page: 'SOME_INTEGER_VALUE',
10 'filters[created_at]': 'SOME_STRING_VALUE',
11 'filters[affected_company_id]': 'SOME_ARRAY_VALUE',
12 'filters[affected_party_id]': 'SOME_ARRAY_VALUE',
13 'filters[affected_person_id]': 'SOME_ARRAY_VALUE',
14 'filters[harm_source_id]': 'SOME_ARRAY_VALUE',
15 'filters[work_activity_id]': 'SOME_ARRAY_VALUE',
16 'filters[managed_equipment_id]': 'SOME_INTEGER_VALUE',
17 'filters[query]': 'SOME_STRING_VALUE',
18 sort: 'SOME_STRING_VALUE'
19 },
20 headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}
21};
22
23request(options, function (error, response, body) {
24 if (error) throw new Error(error);
25
26 console.log(body);
27});
28

Responses

Body

idinteger

Incident Record ID

numberinteger

The number of the Record

full_numberstring

The Incident Number combined with the Record Number

incident_idinteger

The id of the Incident to which the record belongs

recordableboolean

Indicates whether the Incident Record is recordable

typestring

The type of incident record (environmental, injury, near_miss, property_damage)

incident_titlestring

The title of the Incident to which the record belongs

incident_privateboolean

Indicates whether the Incident to which the record belongs is private

summarystring

Summary combining the affliction type, body part affected, and source of harm.

description_plain_textstring

Description of event

descriptionstring

Description of event in Rich Text format

affected_companyobject

created_atstring(format: date-time)

Timestamp of creation

deleted_atstring(format: date-time)

Timestamp of deletion

managed_equipmentobject

incident_created_byobject

updated_atstring(format: date-time)

Timestamp of last update

work_activityobject

affected_partyobject

affected_personobject

harm_sourceobject

custom_fieldsobject

Response Headers

Per-Pageinteger

Number of items retrieved per page

Totalinteger

Total number of items to be retrieved

Linkstring

Link headers for the first, prev, next, and last link

Example Response
1[
2 {
3 "id": 9,
4 "number": 4,
5 "full_number": 16.4,
6 "incident_id": 16,
7 "recordable": true,
8 "type": "injury",
9 "incident_title": "HAZMAT Spill",
10 "incident_private": false,
11 "summary": "Sprain to Hand by Ground / Floor. Note: This key has been deprecated.",
12 "description_plain_text": "Sprain to Hand by Ground",
13 "description": "<p>Sprain to <b>Hand</b> by Ground</p>",
14 "affected_company": {
15 "id": 161072,
16 "name": "SID Architecture"
17 },
18 "created_at": "2016-10-25T17:53:35Z",
19 "deleted_at": "2016-10-25T17:53:35Z",
20 "managed_equipment": {
21 "id": 15504,
22 "name": "Jackhammer"
23 },
24 "incident_created_by": {
25 "login": "carl.contractor@example.com",
26 "id": 161072,
27 "name": "Carl the Contractor"
28 },
29 "updated_at": "2016-10-25T17:53:35Z",
30 "work_activity": {
31 "id": 999,
32 "name": "Earthwork",
33 "active": true,
34 "global": true,
35 "created_at": "2016-10-25T17:53:35Z",
36 "updated_at": "2015-11-12T21:26:28Z"
37 },
38 "affected_party": {
39 "id": 1,
40 "name": "Dolores Umbridge"
41 },
42 "affected_person": {
43 "login": "exampleuser@example.com",
44 "id": 161072,
45 "name": "Carl the Contractor"
46 },
47 "harm_source": {
48 "id": 999,
49 "name": "Material",
50 "active": true,
51 "global": true,
52 "created_at": "2016-10-25T17:53:35Z",
53 "updated_at": "2016-10-25T17:53:35Z"
54 },
POST /rest/v1.0/projects/{project_id}/incidents/near_misses

Description

Creates a Near Miss record.

Header Parameters

Procore-Company-Idinteger*

Unique company identifier associated with the Procore User Account.

Path Parameters

project_idinteger*

Unique identifier for the project.

Example Requests
1const request = require('request');
2
3const options = {
4 method: 'POST',
5 url: 'https://api.procore.com/rest/v1.0/projects/%7Bproject_id%7D/incidents/near_misses',
6 headers: {
7 Authorization: 'Bearer REPLACE_BEARER_TOKEN',
8 'content-type': 'application/json'
9 },
10 body: {
11 near_miss: {
12 incident_id: 0,
13 description: '<p>Sprain to <b>Hand</b> by Ground</p>',
14 affected_person_id: 0,
15 affected_party_id: 0,
16 harm_source_id: 0,
17 affected_company_id: 0,
18 managed_equipment_id: 0,
19 work_activity_id: 0,
20 'custom_field_%{custom_field_definition_id}': 'custom field value'
21 }
22 },
23 json: true
24};
25
26request(options, function (error, response, body) {
27 if (error) throw new Error(error);
28
29 console.log(body);
30});
31

Body Parameters

Body

near_missobject*

Required properties:
incident_id
Example Request Body
1{
2 "near_miss": {
3 "incident_id": 42,
4 "description": "<p>Sprain to <b>Hand</b> by Ground</p>",
5 "affected_person_id": 42,
6 "affected_party_id": 42,
7 "harm_source_id": 42,
8 "affected_company_id": 42,
9 "managed_equipment_id": 42,
10 "work_activity_id": 42,
11 "custom_field_%{custom_field_definition_id}": "string"
12 }
13}

Responses

Body

idinteger

Incident Record ID

numberinteger

The number of the Record

full_numberstring

The Incident Number combined with the Record Number

incident_idinteger

The id of the Incident to which the record belongs

recordableboolean

Indicates whether the Incident Record is recordable

typestring

The type of incident record (environmental, injury, near_miss, property_damage)

incident_titlestring

The title of the Incident to which the record belongs

incident_privateboolean

Indicates whether the Incident to which the record belongs is private

summarystring

Summary combining the affliction type, body part affected, and source of harm.

description_plain_textstring

Description of event

descriptionstring

Description of event in Rich Text format

affected_companyobject

created_atstring(format: date-time)

Timestamp of creation

deleted_atstring(format: date-time)

Timestamp of deletion

managed_equipmentobject

incident_created_byobject

updated_atstring(format: date-time)

Timestamp of last update

work_activityobject

affected_partyobject

affected_personobject

harm_sourceobject

custom_fieldsobject

Example Response
1{
2 "id": 9,
3 "number": 4,
4 "full_number": 16.4,
5 "incident_id": 16,
6 "recordable": true,
7 "type": "injury",
8 "incident_title": "HAZMAT Spill",
9 "incident_private": false,
10 "summary": "Sprain to Hand by Ground / Floor. Note: This key has been deprecated.",
11 "description_plain_text": "Sprain to Hand by Ground",
12 "description": "<p>Sprain to <b>Hand</b> by Ground</p>",
13 "affected_company": {
14 "id": 161072,
15 "name": "SID Architecture"
16 },
17 "created_at": "2016-10-25T17:53:35Z",
18 "deleted_at": "2016-10-25T17:53:35Z",
19 "managed_equipment": {
20 "id": 15504,
21 "name": "Jackhammer"
22 },
23 "incident_created_by": {
24 "login": "carl.contractor@example.com",
25 "id": 161072,
26 "name": "Carl the Contractor"
27 },
28 "updated_at": "2016-10-25T17:53:35Z",
29 "work_activity": {
30 "id": 999,
31 "name": "Earthwork",
32 "active": true,
33 "global": true,
34 "created_at": "2016-10-25T17:53:35Z",
35 "updated_at": "2015-11-12T21:26:28Z"
36 },
37 "affected_party": {
38 "id": 1,
39 "name": "Dolores Umbridge"
40 },
41 "affected_person": {
42 "login": "exampleuser@example.com",
43 "id": 161072,
44 "name": "Carl the Contractor"
45 },
46 "harm_source": {
47 "id": 999,
48 "name": "Material",
49 "active": true,
50 "global": true,
51 "created_at": "2016-10-25T17:53:35Z",
52 "updated_at": "2016-10-25T17:53:35Z"
53 },
54 "custom_fields": {
GET /rest/v1.0/projects/{project_id}/incidents/near_misses/{id}

Description

Returns specific Near Miss

Header Parameters

Procore-Company-Idinteger*

Unique company identifier associated with the Procore User Account.

Path Parameters

project_idinteger*

Unique identifier for the project.

idinteger*

Near Miss ID

Query Parameters

incident_idinteger

Incident ID

Example Requests
1const request = require('request');
2
3const options = {
4 method: 'GET',
5 url: 'https://api.procore.com/rest/v1.0/projects/%7Bproject_id%7D/incidents/near_misses/%7Bid%7D',
6 qs: {incident_id: 'SOME_INTEGER_VALUE'},
7 headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}
8};
9
10request(options, function (error, response, body) {
11 if (error) throw new Error(error);
12
13 console.log(body);
14});
15

Responses

Body

idinteger

Incident Record ID

numberinteger

The number of the Record

full_numberstring

The Incident Number combined with the Record Number

incident_idinteger

The id of the Incident to which the record belongs

recordableboolean

Indicates whether the Incident Record is recordable

typestring

The type of incident record (environmental, injury, near_miss, property_damage)

incident_titlestring

The title of the Incident to which the record belongs

incident_privateboolean

Indicates whether the Incident to which the record belongs is private

summarystring

Summary combining the affliction type, body part affected, and source of harm.

description_plain_textstring

Description of event

descriptionstring

Description of event in Rich Text format

affected_companyobject

created_atstring(format: date-time)

Timestamp of creation

deleted_atstring(format: date-time)

Timestamp of deletion

managed_equipmentobject

incident_created_byobject

updated_atstring(format: date-time)

Timestamp of last update

work_activityobject

affected_partyobject

affected_personobject

harm_sourceobject

custom_fieldsobject

Example Response
1{
2 "id": 9,
3 "number": 4,
4 "full_number": 16.4,
5 "incident_id": 16,
6 "recordable": true,
7 "type": "injury",
8 "incident_title": "HAZMAT Spill",
9 "incident_private": false,
10 "summary": "Sprain to Hand by Ground / Floor. Note: This key has been deprecated.",
11 "description_plain_text": "Sprain to Hand by Ground",
12 "description": "<p>Sprain to <b>Hand</b> by Ground</p>",
13 "affected_company": {
14 "id": 161072,
15 "name": "SID Architecture"
16 },
17 "created_at": "2016-10-25T17:53:35Z",
18 "deleted_at": "2016-10-25T17:53:35Z",
19 "managed_equipment": {
20 "id": 15504,
21 "name": "Jackhammer"
22 },
23 "incident_created_by": {
24 "login": "carl.contractor@example.com",
25 "id": 161072,
26 "name": "Carl the Contractor"
27 },
28 "updated_at": "2016-10-25T17:53:35Z",
29 "work_activity": {
30 "id": 999,
31 "name": "Earthwork",
32 "active": true,
33 "global": true,
34 "created_at": "2016-10-25T17:53:35Z",
35 "updated_at": "2015-11-12T21:26:28Z"
36 },
37 "affected_party": {
38 "id": 1,
39 "name": "Dolores Umbridge"
40 },
41 "affected_person": {
42 "login": "exampleuser@example.com",
43 "id": 161072,
44 "name": "Carl the Contractor"
45 },
46 "harm_source": {
47 "id": 999,
48 "name": "Material",
49 "active": true,
50 "global": true,
51 "created_at": "2016-10-25T17:53:35Z",
52 "updated_at": "2016-10-25T17:53:35Z"
53 },
54 "custom_fields": {
PATCH /rest/v1.0/projects/{project_id}/incidents/near_misses/{id}

Description

Update a Near Miss' attributes

Header Parameters

Procore-Company-Idinteger*

Unique company identifier associated with the Procore User Account.

Path Parameters

project_idinteger*

Unique identifier for the project.

idinteger*

Near Miss ID

Query Parameters

incident_idinteger

Incident ID

Example Requests
1const request = require('request');
2
3const options = {
4 method: 'PATCH',
5 url: 'https://api.procore.com/rest/v1.0/projects/%7Bproject_id%7D/incidents/near_misses/%7Bid%7D',
6 qs: {incident_id: 'SOME_INTEGER_VALUE'},
7 headers: {
8 Authorization: 'Bearer REPLACE_BEARER_TOKEN',
9 'content-type': 'application/json'
10 },
11 body: {
12 near_miss: {
13 description: '<p>Sprain to <b>Hand</b> by Ground</p>',
14 affected_person_id: 0,
15 affected_party_id: 0,
16 harm_source_id: 0,
17 affected_company_id: 0,
18 managed_equipment_id: 0,
19 work_activity_id: 0,
20 'custom_field_%{custom_field_definition_id}': 'custom field value'
21 }
22 },
23 json: true
24};
25
26request(options, function (error, response, body) {
27 if (error) throw new Error(error);
28
29 console.log(body);
30});
31

Body Parameters

Body

near_missobject*

Example Request Body
1{
2 "near_miss": {
3 "description": "<p>Sprain to <b>Hand</b> by Ground</p>",
4 "affected_person_id": 42,
5 "affected_party_id": 42,
6 "harm_source_id": 42,
7 "affected_company_id": 42,
8 "managed_equipment_id": 42,
9 "work_activity_id": 42,
10 "custom_field_%{custom_field_definition_id}": "string"
11 }
12}

Responses

Body

idinteger

Incident Record ID

numberinteger

The number of the Record

full_numberstring

The Incident Number combined with the Record Number

incident_idinteger

The id of the Incident to which the record belongs

recordableboolean

Indicates whether the Incident Record is recordable

typestring

The type of incident record (environmental, injury, near_miss, property_damage)

incident_titlestring

The title of the Incident to which the record belongs

incident_privateboolean

Indicates whether the Incident to which the record belongs is private

summarystring

Summary combining the affliction type, body part affected, and source of harm.

description_plain_textstring

Description of event

descriptionstring

Description of event in Rich Text format

affected_companyobject

created_atstring(format: date-time)

Timestamp of creation

deleted_atstring(format: date-time)

Timestamp of deletion

managed_equipmentobject

incident_created_byobject

updated_atstring(format: date-time)

Timestamp of last update

work_activityobject

affected_partyobject

affected_personobject

harm_sourceobject

custom_fieldsobject

Example Response
1{
2 "id": 9,
3 "number": 4,
4 "full_number": 16.4,
5 "incident_id": 16,
6 "recordable": true,
7 "type": "injury",
8 "incident_title": "HAZMAT Spill",
9 "incident_private": false,
10 "summary": "Sprain to Hand by Ground / Floor. Note: This key has been deprecated.",
11 "description_plain_text": "Sprain to Hand by Ground",
12 "description": "<p>Sprain to <b>Hand</b> by Ground</p>",
13 "affected_company": {
14 "id": 161072,
15 "name": "SID Architecture"
16 },
17 "created_at": "2016-10-25T17:53:35Z",
18 "deleted_at": "2016-10-25T17:53:35Z",
19 "managed_equipment": {
20 "id": 15504,
21 "name": "Jackhammer"
22 },
23 "incident_created_by": {
24 "login": "carl.contractor@example.com",
25 "id": 161072,
26 "name": "Carl the Contractor"
27 },
28 "updated_at": "2016-10-25T17:53:35Z",
29 "work_activity": {
30 "id": 999,
31 "name": "Earthwork",
32 "active": true,
33 "global": true,
34 "created_at": "2016-10-25T17:53:35Z",
35 "updated_at": "2015-11-12T21:26:28Z"
36 },
37 "affected_party": {
38 "id": 1,
39 "name": "Dolores Umbridge"
40 },
41 "affected_person": {
42 "login": "exampleuser@example.com",
43 "id": 161072,
44 "name": "Carl the Contractor"
45 },
46 "harm_source": {
47 "id": 999,
48 "name": "Material",
49 "active": true,
50 "global": true,
51 "created_at": "2016-10-25T17:53:35Z",
52 "updated_at": "2016-10-25T17:53:35Z"
53 },
54 "custom_fields": {
DELETE /rest/v1.0/projects/{project_id}/incidents/near_misses/{id}

Description

Sends Near Miss to the recycle bin

Header Parameters

Procore-Company-Idinteger*

Unique company identifier associated with the Procore User Account.

Path Parameters

project_idinteger*

Unique identifier for the project.

idinteger*

Near Miss ID

Query Parameters

incident_idinteger

Incident ID

Example Requests
1const request = require('request');
2
3const options = {
4 method: 'DELETE',
5 url: 'https://api.procore.com/rest/v1.0/projects/%7Bproject_id%7D/incidents/near_misses/%7Bid%7D',
6 qs: {incident_id: 'SOME_INTEGER_VALUE'},
7 headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}
8};
9
10request(options, function (error, response, body) {
11 if (error) throw new Error(error);
12
13 console.log(body);
14});
15

Responses

204(No Content)

GET /rest/v1.0/projects/{project_id}/recycle_bin/incidents/near_misses

Description

Returns a list of Recycled Near Misses for a given project (or Incident, if incident_id is present).

Header Parameters

Procore-Company-Idinteger*

Unique company identifier associated with the Procore User Account.

Path Parameters

project_idinteger*

Unique identifier for the project.

Query Parameters

incident_idinteger

Incident ID. When provided, the list will be scoped to only the Recycled Near Misses for a given Incident.

filters[created_at]string

Return item(s) created within the specified ISO 8601 datetime range.
Formats:
YYYY-MM-DD...YYYY-MM-DD - Date
YYYY-MM-DDTHH:MM:SSZ...YYYY-MM-DDTHH:MM:SSZ - DateTime with UTC Offset
YYYY-MM-DDTHH:MM:SS+XX:00...YYYY-MM-DDTHH:MM:SS+XX:00` - Datetime with Custom Offset

filters[affected_company_id]array[integer]

Array of Company IDs. Returns item(s) with the specified affected Company IDs.

filters[affected_party_id]array[integer]

Array of Affected Party IDs. Returns item(s) with the specified Affected Party IDs.

filters[affected_person_id]array[integer]

Array of Person IDs. Returns item(s) with the specified affected Person IDs.

filters[harm_source_id]array[integer]

Array of Harm Source IDs. Returns item(s) with the specified Harm Source IDs.

filters[work_activity_id]array[integer]

Array of Work Activity IDs. Returns item(s) with the specified Work Activity IDs.

filters[managed_equipment_id]integer

Return item(s) with the specified Managed Equipment ID.

filters[query]string

Return item(s) containing query

sortstring

Allowed values:
affected_company
affected_person
created_at
managed_equipment
full_number
harm_source
number
work_activity

pageinteger

Page

per_pageinteger

Elements per page

Example Requests
1const request = require('request');
2
3const options = {
4 method: 'GET',
5 url: 'https://api.procore.com/rest/v1.0/projects/%7Bproject_id%7D/recycle_bin/incidents/near_misses',
6 qs: {
7 incident_id: 'SOME_INTEGER_VALUE',
8 'filters[created_at]': 'SOME_STRING_VALUE',
9 'filters[affected_company_id]': 'SOME_ARRAY_VALUE',
10 'filters[affected_party_id]': 'SOME_ARRAY_VALUE',
11 'filters[affected_person_id]': 'SOME_ARRAY_VALUE',
12 'filters[harm_source_id]': 'SOME_ARRAY_VALUE',
13 'filters[work_activity_id]': 'SOME_ARRAY_VALUE',
14 'filters[managed_equipment_id]': 'SOME_INTEGER_VALUE',
15 'filters[query]': 'SOME_STRING_VALUE',
16 sort: 'SOME_STRING_VALUE',
17 page: 'SOME_INTEGER_VALUE',
18 per_page: 'SOME_INTEGER_VALUE'
19 },
20 headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}
21};
22
23request(options, function (error, response, body) {
24 if (error) throw new Error(error);
25
26 console.log(body);
27});
28

Responses

Body

idinteger

Incident Record ID

numberinteger

The number of the Record

full_numberstring

The Incident Number combined with the Record Number

incident_idinteger

The id of the Incident to which the record belongs

recordableboolean

Indicates whether the Incident Record is recordable

typestring

The type of incident record (environmental, injury, near_miss, property_damage)

incident_titlestring

The title of the Incident to which the record belongs

incident_privateboolean

Indicates whether the Incident to which the record belongs is private

summarystring

Summary combining the affliction type, body part affected, and source of harm.

description_plain_textstring

Description of event

descriptionstring

Description of event in Rich Text format

affected_companyobject

created_atstring(format: date-time)

Timestamp of creation

deleted_atstring(format: date-time)

Timestamp of deletion

managed_equipmentobject

incident_created_byobject

updated_atstring(format: date-time)

Timestamp of last update

work_activityobject

affected_partyobject

affected_personobject

harm_sourceobject

custom_fieldsobject

Response Headers

Per-Pageinteger

Number of items retrieved per page

Totalinteger

Total number of items to be retrieved

Example Response
1[
2 {
3 "id": 9,
4 "number": 4,
5 "full_number": 16.4,
6 "incident_id": 16,
7 "recordable": true,
8 "type": "injury",
9 "incident_title": "HAZMAT Spill",
10 "incident_private": false,
11 "summary": "Sprain to Hand by Ground / Floor. Note: This key has been deprecated.",
12 "description_plain_text": "Sprain to Hand by Ground",
13 "description": "<p>Sprain to <b>Hand</b> by Ground</p>",
14 "affected_company": {
15 "id": 161072,
16 "name": "SID Architecture"
17 },
18 "created_at": "2016-10-25T17:53:35Z",
19 "deleted_at": "2016-10-25T17:53:35Z",
20 "managed_equipment": {
21 "id": 15504,
22 "name": "Jackhammer"
23 },
24 "incident_created_by": {
25 "login": "carl.contractor@example.com",
26 "id": 161072,
27 "name": "Carl the Contractor"
28 },
29 "updated_at": "2016-10-25T17:53:35Z",
30 "work_activity": {
31 "id": 999,
32 "name": "Earthwork",
33 "active": true,
34 "global": true,
35 "created_at": "2016-10-25T17:53:35Z",
36 "updated_at": "2015-11-12T21:26:28Z"
37 },
38 "affected_party": {
39 "id": 1,
40 "name": "Dolores Umbridge"
41 },
42 "affected_person": {
43 "login": "exampleuser@example.com",
44 "id": 161072,
45 "name": "Carl the Contractor"
46 },
47 "harm_source": {
48 "id": 999,
49 "name": "Material",
50 "active": true,
51 "global": true,
52 "created_at": "2016-10-25T17:53:35Z",
53 "updated_at": "2016-10-25T17:53:35Z"
54 },
GET /rest/v1.0/projects/{project_id}/recycle_bin/incidents/near_misses/{id}

Description

Returns a specific Recycled Near Miss

Header Parameters

Procore-Company-Idinteger*

Unique company identifier associated with the Procore User Account.

Path Parameters

project_idinteger*

Unique identifier for the project.

idinteger*

Near Miss ID

Query Parameters

incident_idinteger

Incident ID

Example Requests
1const request = require('request');
2
3const options = {
4 method: 'GET',
5 url: 'https://api.procore.com/rest/v1.0/projects/%7Bproject_id%7D/recycle_bin/incidents/near_misses/%7Bid%7D',
6 qs: {incident_id: 'SOME_INTEGER_VALUE'},
7 headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}
8};
9
10request(options, function (error, response, body) {
11 if (error) throw new Error(error);
12
13 console.log(body);
14});
15

Responses

Body

idinteger

Incident Record ID

numberinteger

The number of the Record

full_numberstring

The Incident Number combined with the Record Number

incident_idinteger

The id of the Incident to which the record belongs

recordableboolean

Indicates whether the Incident Record is recordable

typestring

The type of incident record (environmental, injury, near_miss, property_damage)

incident_titlestring

The title of the Incident to which the record belongs

incident_privateboolean

Indicates whether the Incident to which the record belongs is private

summarystring

Summary combining the affliction type, body part affected, and source of harm.

description_plain_textstring

Description of event

descriptionstring

Description of event in Rich Text format

affected_companyobject

created_atstring(format: date-time)

Timestamp of creation

deleted_atstring(format: date-time)

Timestamp of deletion

managed_equipmentobject

incident_created_byobject

updated_atstring(format: date-time)

Timestamp of last update

work_activityobject

affected_partyobject

affected_personobject

harm_sourceobject

custom_fieldsobject

Example Response
1{
2 "id": 9,
3 "number": 4,
4 "full_number": 16.4,
5 "incident_id": 16,
6 "recordable": true,
7 "type": "injury",
8 "incident_title": "HAZMAT Spill",
9 "incident_private": false,
10 "summary": "Sprain to Hand by Ground / Floor. Note: This key has been deprecated.",
11 "description_plain_text": "Sprain to Hand by Ground",
12 "description": "<p>Sprain to <b>Hand</b> by Ground</p>",
13 "affected_company": {
14 "id": 161072,
15 "name": "SID Architecture"
16 },
17 "created_at": "2016-10-25T17:53:35Z",
18 "deleted_at": "2016-10-25T17:53:35Z",
19 "managed_equipment": {
20 "id": 15504,
21 "name": "Jackhammer"
22 },
23 "incident_created_by": {
24 "login": "carl.contractor@example.com",
25 "id": 161072,
26 "name": "Carl the Contractor"
27 },
28 "updated_at": "2016-10-25T17:53:35Z",
29 "work_activity": {
30 "id": 999,
31 "name": "Earthwork",
32 "active": true,
33 "global": true,
34 "created_at": "2016-10-25T17:53:35Z",
35 "updated_at": "2015-11-12T21:26:28Z"
36 },
37 "affected_party": {
38 "id": 1,
39 "name": "Dolores Umbridge"
40 },
41 "affected_person": {
42 "login": "exampleuser@example.com",
43 "id": 161072,
44 "name": "Carl the Contractor"
45 },
46 "harm_source": {
47 "id": 999,
48 "name": "Material",
49 "active": true,
50 "global": true,
51 "created_at": "2016-10-25T17:53:35Z",
52 "updated_at": "2016-10-25T17:53:35Z"
53 },
54 "custom_fields": {
PATCH /rest/v1.0/projects/{project_id}/recycle_bin/incidents/near_misses/{id}/restore

Description

Retrieves a specific Recycled Near Miss from the recycle bin

Header Parameters

Procore-Company-Idinteger*

Unique company identifier associated with the Procore User Account.

Path Parameters

project_idinteger*

Unique identifier for the project.

idinteger*

Near Miss ID

Query Parameters

incident_idinteger

Incident ID

Example Requests
1const request = require('request');
2
3const options = {
4 method: 'PATCH',
5 url: 'https://api.procore.com/rest/v1.0/projects/%7Bproject_id%7D/recycle_bin/incidents/near_misses/%7Bid%7D/restore',
6 qs: {incident_id: 'SOME_INTEGER_VALUE'},
7 headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}
8};
9
10request(options, function (error, response, body) {
11 if (error) throw new Error(error);
12
13 console.log(body);
14});
15

Responses

200(OK)