POST public/updateLocationNote
Changes a note's title and text.
Request syntax
curl https://apiv2.acumera.net/public/updateLocationNote \
--cookie av_session.txt \
--data-urlencode "location_note_id=<location_note_id>" \
--data-urlencode "topic=<topic>" \
--data-urlencode "note=<note_text>"
The username, password, and tfa_token parameters are also accepted, and are required only if the client hasn't already signed in with login. See Getting started with the SC//AcuVigil API.
Request parameters
The request accepts the following parameters in a form-encoded body.
| Parameter | Type | Description | Required | Default value |
|---|---|---|---|---|
location_note_id |
Integer | The ID of the note. To find note IDs, use getLocationNotes. | Yes | |
topic |
String | The note's new title. | Yes | |
note |
String | The note's new text. | Yes |
topic and note both replace the existing values, so send both even if you change only one. They can contain letters, numbers, spaces, line breaks, and these characters: # & ' " ( ) * + , - . / : @ _ < > ! ?
Response syntax
{
"success": "string",
"returnCode": "string",
"returnMessage": "string"
}
Response parameters
| Field | Description |
|---|---|
success |
"1" if the note was updated. |
returnCode |
NOTE_UPDATED when the note was updated. |
returnMessage |
A description of the result. |
Errors
If the call fails, success is "0", and returnCode and returnMessage describe the problem. The HTTP status is still 200.
| Return code | Message | Cause |
|---|---|---|
NO_NOTE_SELECTED |
No note was selected. | location_note_id is missing or isn't a number. |
NOTE_NOT_FOUND |
The note was not found. | No note has that ID. |
AUTH_FAILED_FUNC_NOT_ALLOWED |
Authorization failed because you are not permitted to access the requested function. | You aren't allowed to edit this note. |
NO_NOTE_TOPIC |
The note requires a topic. | topic is missing or empty. |
INVALID_NOTE_TOPIC |
The topic contains invalid characters. | topic contains a character that isn't allowed. |
NO_NOTE_NOTE |
The note cannot be empty. | note is missing or empty. |
INVALID_NOTE_NOTE |
The note contains invalid characters. | note contains a character that isn't allowed. |
FORM_ERRORS |
There were a few errors in your input | The update didn't pass the note's other checks. |
INVALID_LOGIN |
We were unable to log you in. Make sure you entered the correct username, password and 2FA code. | You haven't signed in, your session has ended, or the credentials sent with the call are wrong. |
Examples
Example: Update a note
curl https://apiv2.acumera.net/public/updateLocationNote \
--cookie av_session.txt \
--data-urlencode "location_note_id=123457" \
--data-urlencode "topic=Router replaced (updated)" \
--data-urlencode "note=The ISP replaced the router on Monday morning."
Response:
{
"success": "1",
"returnCode": "NOTE_UPDATED",
"returnMessage": "The note has been updated."
}
Example: Leave out the note text
If you send only topic, the call fails and the note isn't changed:
{
"success": "0",
"returnCode": "NO_NOTE_NOTE",
"returnMessage": "The note cannot be empty."
}