1. General

API calls format

Notation used in this doc:

/resource/sub_resource/action(parameter1,parameter2,[parameter3])

Which means that you should use the following URL:

http(s)://api.navixy.com/v2/resource/sub_resource/action

with named parameters:

  • parameter1
  • parameter2
  • parameter3 is optional

Parameters can be passed in HTTP POST (application/x-www-form-urlencoded) or GET requests (POST is highly recommended):

parameter1=value1&meter2=value2&hash=a6aa75587e5c59c32d347da438505fc3

(hash is required for most API calls to identify user session)

Typical actions:

  • list – list all resource entities with id-s and minimum additional info
  • read – read one entity by id
  • update – update one entity by id
  • delete – delete one entity by id

Errors

Common errors (should be handled for all API calls): 1-100

Resource or action specific errors: 101-200

Request and response format

To execute resource/action() send http GET or POST request to http://${API_URL}/${RESOURCE}/${ACTION}/

Response is (almost) always application/json.

On errors response will be in form:

{
    "success": false,
    "status": {
        "code": 1, // error code
        "description": "Database error" // error description
    }
}

See error codes.

For example to read all user’s notify methods use http://api.navixy.com/v2/notify_methods/list/?hash=a6aa75587e5c59c32d347da438505fc3 and get response:

{
    "success": true,
    "notifies": [
        {
            "id": 1,
            "notify_name": "test",
            "phones": "+493514223894,+493514222180",
            "emails": "test@gmail.com",
            "sms_numbers": "+493514223894"
        },
        {
            "id": 2,
            "notify_name": null,
            "phones": "+493514222180",
            "emails": "",
            "sms_numbers": null
        }
    ]
}

Or error if hash is wrong:

{
    "success": false,
    "status": {
        "code": 4,
        "description": "User not found or session ended"
    }
}

HTTP codes

If “success” is true, HTTP code is always 200 OK (unless otherwise stated).

If there is an error, HTTP code is 400 BAD REQUEST (may vary depending on error type).

Authorization and access levels

Unless otherwise noted, every API call requires a valid user session hash (A String containing 32 hexademical characters) as “hash” parameter (see example above).

Session hash can be obtained via user/auth(login, password, [dealer_id]) API call.

Example: http://api.navixy.com/v2/user/auth?login=demo&password=demo (GET method is used for demonstration purposes only!)

Custom types

  • date/time – is a string containing date/time in “yyyy-MM-dd HH:mm:ss” format (in user’s timezone).
  • local_time – is a string containing local time in “HH:mm:ss” format.
  • location – is json object contains geographical coordinates
{
    "lat": 56.827, // latitude
    "lng": 60.594296 // longitude
}
  • locale – string in format “language[_country]”, where language is ISO 639 alpha-2 language code, and country is ISO 3166 alpha-2 country code, e.g. en_US or ru. User interface support only language codes: ‘ru’, ‘en’, ‘es’, ‘ar’, ‘de’, ‘pt’, ‘ro’ and ‘uk’.

If you have more questions please contact our support team

Contacts

USA: +1 858 815 9045

Mexico: +52 334 1642158

UK: +44 808 1641499

Germany: +49 1573 5988250

Russia: +7 495 223 0427

Log in

Login

[clean-login]

CLOSE
Register

[clean-login-register]

CLOSE
Loading...