Note API

Create a Note for an employee

Document Manager has the concept of notes and reminders. A note is a message linked to a document or a user resource. This note is visible by everyone or a subset of managers having access to those resources. A note may also have a reminder date in which case an email is sent to the manager once the reminder date is reached.

URL

POST /api/v1/notes/employees/

POST JSON

employee_technical_id (mandatory):

Technical identifier of the employee the note is attached to.

description (mandatory):

Note content.

remind_date (optional): Formatted character string, VARCHAR(40)

At this date, a reminder email is sent to the concerned managers identified in visible_by_managers Format: Date ISO 8601, including hours and minutes. Example: 2012-07-16T19:20+01:00

visible_by_managers (optional):

List of technical ids identifying managers. Only those managers are able to see the note. If no such parameter is provided it acts as a public visibility flag and all managers who have sufficient permission to see the user resource concerned see the note and receive the reminder.

Response

Success

The response is encoded in the JSON format with the following parameters:

id:

Found if the creation of the note was successful (code HTTP 201 CREATED). Identifier of the created note.

HTTP 201 Created

  {
      "id": xx
  }

CURL

curl -X POST https://mycompany.safe-access.com/api/v1/notes/employees/" -H "Content-type: application/json" -H "x_api_key: xxxx" -d '{"description": "A note", "remind_date": "2012-07-16T19:20+01:00", "employee_technical_id": "xxx"}'

Create a Note for a document

URL

POST /api/v1/notes/documents/

POST JSON

document_id (mandatory):

Technical identifier of the document the note is attached to.

description (mandatory):

Note content.

remind_date (optional): Formatted character string, VARCHAR(40)

At this date, a reminder email is sent to the concerned managers identified in visible_by_managers Format: Date ISO 8601, including hours and minutes. Example: 2012-07-16T19:20:01:00

visible_by_managers (optional):

List of technical ids identifying managers. Only those managers are able to see the note. If no such parameter is provided it acts as a public visibility flag and all managers who have sufficient permission to see the user resource concerned see the note and receive the reminder.

Response

Success

The response is encoded in the JSON format with the following parameters:

id:

Found if the creation of the note was successful (code HTTP 201 CREATED). Identifier of the created note.

HTTP 201 Created

  {
      "id": xx
  }

CURL

curl -X POST https://mycompany.safe-access.com/api/v1/notes/documents/" -H "Content-type: application/json" -H "x_api_key: xxxx" -d '{"description": "A note", "remind_date": "2012-07-16T19:20+01:00", "document_id": "xxx"}'