Notes
This API enables the maintenance of notes on a policy, a claim or an authorization.
Operations
|
|
|
|
|
|
|
|
|
|
|
|
The {subject} is the technical id of the claim, the gid of the policy or the code of the authorization.
Retrieve Notes
To retrieve the notes of a claim, policy or authorization send a GET request to http://[hostName]:[portNumber]/[api-context-root]/generic/notes/{subject}.
The response payload contains a list of the last versions of all notes of a claim, policy or authorization.
Consider a situation that a policy, claim or authorization has three notes. The first note has only one version, the second note has two versions, the third has three versions.
| Subject | Note Id | Note Version | Note Version Id | Note Text |
|---|---|---|---|---|
123456789 |
2100 |
1 |
9000 |
Text for note 2100 version 1 |
123456789 |
2101 |
1 |
9001 |
Text for note 2101 version 1 |
123456789 |
2101 |
2 |
9002 |
Text for note 2101 version 2 |
123456789 |
2102 |
1 |
9003 |
Text for note 2102 version 1 |
123456789 |
2102 |
2 |
9004 |
Text for note 2102 version 2 |
123456789 |
2102 |
3 |
9005 |
Text for note 2102 version 3 |
-
The
GETrequest onhttp://[hostName]:[portNumber]/[api-context-root]/generic/notes/123456789returns three items: version 1 of note 2100, version 2 of note 2101, and version 3 of note 2102. -
The
GETrequest onhttp://[hostName]:[portNumber]/[api-context-root]/generic/notes/123456789/9004returns version 2 of note 2103. -
The
GETrequest onhttp://[hostName]:[portNumber]/[api-context-root]/generic/notes/123456789/2102/auditreturns version 1, 2, and 3 of note 2102. -
The
POSTrequest onhttp://[hostName]:[portNumber]/[api-context-root]/notes/123456789creates a new note for subject 123456789. -
The
POSTrequest onhttp://[hostName]:[portNumber]/[api-context-root]/notes/123456789/2102creates a new version of note 2102 (version 4).
An example response message payload for the GET request on http://[hostName]:[portNumber]/[api-context-root]/generic/notes/123456789/9004 (click to open)
{
...
"items": [
{
"id": "9004",
"createdBy": "2",
"lastVersion": false,
"noteText": "Text for note 2102 version 2",
"version": 2,
"lastUpdatedBy": "2",
"links": [
{
"href": "{apiurl}/generic/notes/123456789/9004",
"rel": "self"
},
{
"href": "{apiurl}/notes/123456789/2102",
"rel": "note:edit",
"httpMethod": "POST"
},
{
"href": "{apiurl}/notes/123456789/2102/audit",
"rel": "note:audit",
"httpMethod": "GET"
}
],
"creationDate": {
"value": "2018-10-26T17:22:53.468+02:00"
},
"lastUpdatedDate": {
"value": "2018-10-26T17:26:17.014+02:00"
}
}
],
"links": [
{
"rel": "self",
"href": "{apiurl}/generic/notes/123456789/9004",
"httpMethod": "GET"
}
]
}
Create Note
To create a new note for a claim, policy or authorization, send a POST request to the following http://[hostName]:[portNumber]/[api-context-root]/notes/\{subjectId.
Provide the note text in the request payload. It is also possible to provide values for dynamic fields. The payload looks like this:
{
"noteText": "",
"customerField1": "",
"customerField2": ""
}
Update Note
To update a particular note send a POST request to http://[hostName]:[portNumber]/[api-context-root]/notes/{subject}/{id}.
The update creates a new version of that note; existing records of notes are never updated.
The payload has the same structure as in the Create Note request specified above.
Authorization
This API requires a grant for access restriction 'notes API'. For the GET operations a grant must be provided with the Read flag set. For the POST operations a grant must be provided with the Create flag set. If the access to the claim, policy or authorization that the note belongs to is restricted by a data access group restriction, then to perform this operation on that note also a grant for that data access group restriction must be provided with the Read (for the GET operations) and Update (for the POST operations) flags set.