Skip to content

User settings

CRUD actions for user settings.


settings object

{
    "time_zone": "Europe/Amsterdam",
    "locale": "nl_NL",
    "measurement_system": "metric",
    "geocoder": "osm",
    "route_provider": "google",
    "translit": false
}
  • time_zone - enum. ISO timezone id.
  • locale - enum. Locale code.
  • measurement_system - enum. Measurement system. Can be "metric", "imperial", "us" or "metric_gal_us".
  • geocoder - enum. Preferred geocoder type. Can be "google", "yandex", "progorod", "osm" or "locationiq".
  • route_provider - enum. Preferred route finding provider. Can be "google", "progorod" or "osrm".
  • translit - boolean. true if sms notification should be transliterated, false otherwise.

balance_alert_settings type is JSON object:

  • emails - string array. List of emails to send alert message about balance. Empty array means disclaimer of notifications.

file_storage_settings type is JSON object:

{
    "auto_overwrite": true
}
  • auto_overwrite - boolean. If true new files will replace old ones when file storage is full. Default is false.

API actions

API path: /user/settings.

read

Reads current user's settings.

parameters

Only session hash.

examples

curl -X POST 'https://api.navixy.com/v2/user/settings/read' \
    -H 'Content-Type: application/json' \ 
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b"}'
https://api.navixy.com/v2/user/settings/read?hash=a6aa75587e5c59c32d347da438505fc3

response

{
    "success": true,
    "settings": {
        "time_zone": "Europe/Amsterdam",
        "locale": "nl_NL",
        "measurement_system": "metric",
        "geocoder": "osm",
        "route_provider": "google",
        "translit": false
    },
    "file_storage_settings": {
         "auto_overwrite": true
    },
    "balance_alert_settings": {
         "emails": ["[email protected]", "[email protected]"]
    },
    "first_user_balance_warning_period": "7d",
    "second_user_balance_warning_period": "2d"
}
  • first_user_balance_warning_period - string. The first interval to send alert. "7d" means send the first alert warning 7 days before.
  • second_user_balance_warning_period - string. The second interval to send alert. Send the second alert warning n days before.
  • Where settings, balance_alert_settings and file_storage_settings described above.

required sub-user rights for balance_alert_settings and file_storage_settings fields: admin (available only to master users).


update

Update current user's settings.

required sub-user rights for balance_alert_settings and file_storage_settings: admin (available only to master users).

parameters

name description type
time_zone ISO timezone id. enum
locale Locale code. enum
measurement_system Measurement system. Can be "metric", "imperial", "us" or "metric_gal_us". enum
geocoder Preferred geocoder type. Can be "google", "yandex", "progorod", "osm" or "locationiq". enum
route_provider Preferred route finding provider. Can be "google", "progorod" or "osrm". enum
translit true if sms notification should be transliterated, false otherwise. boolean
balance_alert_settings Object containing array of emails. JSON object
file_storage_settings Object containing file storage settings. JSON object

example

curl -X POST 'https://api.navixy.com/v2/user/settings/update' \
    -H 'Content-Type: application/json' \ 
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "time_zone": "Europe/Amsterdam", "locale": "nl_NL", "measurement_system": "metric", "geocoder": "osm", "route_provider": "google", "translit": false, "balance_alert_settings": {"emails": ["[email protected]", "[email protected]"]}, "file_storage_settings": {"auto_overwrite": true}}'

response

{ "success": true }

errors


file_storage/update

Updates current user's file storage settings.

required sub-user rights: admin (available only to master users).

parameters

name description type
file_storage_settings Object containing file storage settings. JSON object

example

curl -X POST 'https://api.navixy.com/v2/user/settings/file_storage/update' \
    -H 'Content-Type: application/json' \ 
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "file_storage_settings": {"auto_overwrite": true}}'

errors

  • 13 – Operation not permitted – if user has insufficient rights.

Last update: May 27, 2021