API v2: Account notes

Account notes related endpoints enable managing messages displayed to users in the User Portal (Access Gateway).


Data structures

AccountNoteModel
Attribute Type Required Description
id string   Unique, read-only, protected account note identifier.
account_id string yes Immutable. ID of the account to which the note is assigned.
note string   Note content.
created_at datetime   Read-only. Timestamp of creation.
modified_at datetime   Read-only. Timestamp of modification.
removed boolean   Read-only.

Request for retrieving available attributes of the AccountNoteModel

Method
GET
Path
/api/v2/objspec/account_note

Note

To check allowed methods, available URL parameters and possible responses please refer to the API overview section.

The next chapter describes procedures for creating separate requests.


Retrieving a note from account

Request

Method
GET
Path
/api/v2/account/<account_id>/note

Example request

Sending GET https://10.0.0.0/api/v2/account/9124292845052624908/note

curl -s -k -X GET -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' https://10.0.214.98/api/v2/account/9124292845052624908/note

Response

{
    "note": "Note content.",
    "result": "success"
}

Assign note to an account

Request

Method
POST
Path
/api/v2/account/<account_id>/note
Headers
Content-Type: Application/HTML
Body
AccountNoteModel

Example request

Sending POST https://10.0.0.0/api/v2/account/9124292845052624908/note

curl -s -k -X POST -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' 'https://10.0.214.98/api/v2/account/9124292845052624908/note' -H 'Content-Type: application/HTML' -d'{"note":"Note content."}'

Response

{
    "result": "success"
}

Modifying a note

Request

Method
PATCH
Path
/api/v2/account/<account_id>/note
Headers
Content-Type: Application/HTML
Body
AccountNoteModel

Example request

Sending PATCH https://10.0.0.0/api/v2/account/9124292845052624908/note

curl -s -k -X PATCH -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' 'https://10.0.214.98/api/v2/account/9124292845052624908/note' -H 'Content-Type: application/HTML' -d'{"note":"Note modified content."}'

Response

{
    "result": "success"
}

Deleting a note

Request

Method
DELETE
Path
/api/v2/account/<account_id>/note

Example request

Sending DELETE https://10.0.0.0/api/v2/account/9124292845052624908/note

curl -s -k -X DELETE -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' 'https://10.0.214.98/api/v2/account/9124292845052624908/note'

Response

{
    "result": "success"
}