getLocationNote

POST public/getLocationNote

Returns one note.

Request syntax

curl https://apiv2.acumera.net/public/getLocationNote \
  --cookie av_session.txt \
  --data-urlencode "location_note_id=<location_note_id>"

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

Response syntax

{
    "success": "string",
    "data": {
        "location_note": {
            "id": "string",
            "topic": "string",
            "note": "string",
            "category": "string",
            "category_name": "string",
            "created": "string",
            "created_by": "string",
            "created_by_name": "string",
            "pinned": "string",
            "editable": "string",
            "shipping_provider": "string",
            "tracking_number": "string",
            "location_id": "string",
            "filename": "string",
            "file_description": "string",
            "file_created": "string"
        }
    }
}

Response parameters

If the call succeeds, success is "1" and location_note is returned. Its fields are the same as each note in getLocationNotes:

Field Description
id, topic, note The note's ID, title, and text.
category, category_name The note's category, for example 5 and General.
created, created_by, created_by_name When the note was created (Unix timestamp), and the user ID and name of the person who created it.
pinned, editable "1" if the note is pinned, and "1" if you can edit or delete it.
shipping_provider, tracking_number Shipment details, for notes that track a shipment. Otherwise empty.
location_id The location the note belongs to. A company-level note has company_id instead.
filename, file_description, file_created Only for notes with an attachment: the stored filename, description, and when it was attached. To download the attachment, use getLocationNoteAttachment.

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. The note is private, or your account doesn't have access to its location or company.
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: Get a note that has an attachment

curl https://apiv2.acumera.net/public/getLocationNote \
  --cookie av_session.txt \
  --data-urlencode "location_note_id=123457"

Response:

{
    "success": "1",
    "data": {
        "location_note": {
            "id": "123457",
            "topic": "Router replaced",
            "note": "The ISP replaced the router on Monday.",
            "category": "5",
            "category_name": "General",
            "created": "1793398094",
            "created_by": "1001",
            "created_by_name": "Pat Example",
            "pinned": "0",
            "editable": "1",
            "shipping_provider": "",
            "tracking_number": "",
            "location_id": "4510",
            "filename": "rack_1793398094.png",
            "file_description": "Network rack",
            "file_created": "1793398094"
        }
    }
}

Example: Get a note that doesn't exist

{
    "success": "0",
    "returnCode": "NOTE_NOT_FOUND",
    "returnMessage": "The note was not found."
}