Add Note (Asset - Location - Result)

The Add Note API allows you to add a note to an existing ZetaSafe location, asset or result. You will need the ZetaSafe PK relating to the location, asset or result in order to add a note to them.

A valid x-Auth-token header, belonging to the user adding the note is required.


URI

Note type values:

Type NOTE_TYPE
Location Note LOCATION_NOTE
Result Note RESULT_NOTE
Asset Note ASSET_NOTE

Development

https://api.zetasafe.net/dev/ext/note/add

Production

https://api.zetasafe.net/ext/note/add

Method

POST

Content Type

application/json

Body

Required Fields:

  • Location Note clientId, locationId, newText, reportedByUser
  • Asset Note clientId, assetId, newText
  • Result Note resultId, newText, assetId

All Fields Location Note Example

 {"clientId":1019802307,"locationId":1019817126,"jobNumber":"87654","contractor":"8765","fixByDate":"2019-04-20","jobCost":"87654","immediateActionRequired":true,"newText":"87654","reportedByUser":1019779751,"listeningUsers":[1019779751],"status":0}

All Fields Asset Note Example

{"clientId":1019802307,"assetId":1019817127,"jobNumber":"4321","contractor":"5432","fixByDate":"2019-04-26","jobCost":"5432","immediateActionRequired":false,"newText":"5432.","listeningUsers":[1019779751],"status":2}

All Fields Result Note Example

{"resultId":1031634412,"jobNumber":"543","contractor":"6543","fixByDate":"2019-04-13","jobCost":654,"immediateActionRequired":true,"newText":"87654","listeningUsers":[1019779751],"status":2,"assetId":1019817127}

The status values are:

Status ENUM
Unacknowledged 0
Acknowledged 1
In Progress 2
Awaiting Feedback 3
Propose Closure 4
Closed 5

Responses:

201: Created - the record id returned

{"recordId":1031634427,"message":"HTTP 201 (Created)","breadcrumbEnabled":true}

This successful response is the ZetaSafe Note PK (Primary Key). This can be used for any documents (typically images) which need to be added to the note.

400: Bad Request - an explanation is returned

   {"message":"The Location with an ID value of 10198171268 could not be found.","title":"Record not found","breadcrumbEnabled":true,"headings":[{"key":"ok","value":"OK"}],"result":"FOREIGN_KEY_INVALID","affected":null,"offendingSlaves":null}

403: Unauthorised/Access Denied

{
"timestamp": 1555322863458,
"status": 403,
"error": "Forbidden",
"message": "Access Denied",
"path": "/v1/note/advanced/handheld/add"
}

500: Error with the internal process of adding a location.