For the complete documentation index, see llms.txt. This page is also available as Markdown.

Avatar

Upload the image shown for a tracker in the interface.

A tracker's avatar is the image the interface shows for it in lists and on the map. This operation uploads one, replacing whatever the tracker had before.

The upload is a multipart request rather than JSON, and the accepted image formats are image/jpeg, image/pjpeg, image/png, image/gif, and image/webp.

API actions

API base path: /tracker/avatar.


Required sub-user rights: tracker_update.

Upload a tracker avatar

post
/tracker/avatar/upload

Upload an avatar image for a tracker. Multipart request, with the image in a part named file.

Accepted MIME types are image/jpeg, image/pjpeg, image/png, image/gif and image/webp. Once uploaded the image is served from /[api_static_path]/tracker/avatars/<file_name>, for example https://api.eu.navixy.com/v2/static/tracker/avatars/abcdef123456789.png.

Requires the tracker_update right.

Authorizations
AuthorizationstringRequired

Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.

Body
tracker_idintegerRequired

ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked.

Example: 123456
filestring · binaryRequired

The image file.

redirect_targetstringOptional

Optional. URL to redirect to. When given, the response is a redirect to <redirect_target>?response=<urlencoded_response_json> instead of a JSON body.

Responses
200

The uploaded avatar

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
valuestringOptional

File name of the stored avatar.

post/tracker/avatar/upload
POST /v2/tracker/avatar/upload HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 62

{
  "tracker_id": 123456,
  "file": "binary",
  "redirect_target": "text"
}
{
  "success": true,
  "value": "text"
}

Errors

These errors come in addition to the general error codes:

  • 201 - No tracker with this ID belongs to the account.

  • 208 - The tracker exists but is blocked, normally because its tariff ended.

  • 233 - No file part was sent.

  • 234 - The file has an unaccepted MIME type.

  • 254 - The file could not be saved.

Last updated

Was this helpful?