NAV -image
bash javascript php python

Introduction

Account

In order to use FOTA system You must be invited by an existing user. If You are a new customer, please contact our sales or support in order to obtain a new company and user account.

Once You can login to https://fm.teltonika.lt You shall be able to create API tokens for access to this API.

Throttling

All HTTP API requests will be throttled if used frequently in order to reduce misuse and the load on our servers. We think that 100 request per minute should be enough for most. Should You need to control a large amount of resources at once, we recommend using endpoints like 'bulkUpdate', 'bulkCreate' or similar.

User-Agent

We require all API requests to have User-Agent header containing company, application name and version. We are monitoring our API performance and this header helps us to detect, trace and map Your application behaviour and our API performance. Failing to include user agent information may result permanent related user/or company removal from the system.

Content headers

Most of the requests (except file uploads or downloads) must have headers defining JSON content type of the transaction. Accept: application/json Content-Type: application/json

More information

Full documentation regarding FOTA system can be found here Teltonika WIKI.

Authenticating requests

Authenticate requests to this API's endpoints by sending an Authorization header with the value "Bearer {your-token}".

You can retrieve your token by visiting FOTA website and clicking API tokens in settings menu.

Accessory controller

API for managing device accessories

accessories

Example request:

curl -X POST \
    "https://api.teltonika.lt/accessories" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/accessories"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/accessories',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/accessories'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request

POST accessories

accessories/{accessory}

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/accessories/{accessory}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/accessories/{accessory}"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/accessories/{accessory}',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/accessories/{accessory}'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET accessories/{accessory}

accessories/{accessory}

Example request:

curl -X PUT \
    "https://api.teltonika.lt/accessories/{accessory}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/accessories/{accessory}"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.teltonika.lt/accessories/{accessory}',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/accessories/{accessory}'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('PUT', url, headers=headers)
response.json()

Request

PUT accessories/{accessory}

PATCH accessories/{accessory}

accessories/{accessory}

Example request:

curl -X DELETE \
    "https://api.teltonika.lt/accessories/{accessory}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/accessories/{accessory}"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.teltonika.lt/accessories/{accessory}',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/accessories/{accessory}'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request

DELETE accessories/{accessory}

Companies

This is Company resource

Filter List

Get all available values for filtering

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/companies/filterList?field=company_id" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/companies/filterList"
);

let params = {
    "field": "company_id",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/companies/filterList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'field'=> 'company_id',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies/filterList'
params = {
  'field': 'company_id',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET companies/filterList

Query Parameters

field  string
Field name to retrieve possible distinct values.

Company merge

Merge one company with all relationships to another company

Example request:

curl -X POST \
    "https://api.teltonika.lt/companies/merge" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"source":1312,"target":413452}'
const url = new URL(
    "https://api.teltonika.lt/companies/merge"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "source": 1312,
    "target": 413452
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/companies/merge',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'source' => 1312,
            'target' => 413452,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies/merge'
payload = {
    "source": 1312,
    "target": 413452
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST companies/merge

Body Parameters

source  integer
Source company ID with resources.

target  integer
Company ID where to merge to.

Bulk delete

Endpoint for deleting Companies in batch

Example request:

curl -X POST \
    "https://api.teltonika.lt/companies/bulkDelete" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "source=id_list" \
    -F "id_list[]=75378" \
    -F "filter[][company_id]=22" \
    -F "file=@/tmp/phpaDDMvE" 
const url = new URL(
    "https://api.teltonika.lt/companies/bulkDelete"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('source', 'id_list');
body.append('id_list[]', '75378');
body.append('filter[][company_id]', '22');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/companies/bulkDelete',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'source',
                'contents' => 'id_list'
            ],
            [
                'name' => 'id_list[]',
                'contents' => '75378'
            ],
            [
                'name' => 'filter[][company_id]',
                'contents' => '22'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpaDDMvE', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies/bulkDelete'
files = {
  'file': open('/tmp/phpaDDMvE', 'rb')
}
payload = {
    "source": "id_list",
    "id_list": [
        75378,
        453
    ],
    "filter": [
        {
            "company_id": 22
        },
        {
            "model": "XXXAAA"
        }
    ]
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST companies/bulkDelete

Body Parameters

source  string
Type of bulk job source (id_list, filter or file)

id_list  array optional
optional Id list of resources to be affected.

filter  array optional
optional JSON with filters to affect only specific resources.

file  file optional
optional CSV file containing Id of resources to be modified.

Company inheritance

Get all parent companies

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/companies/{id}/inheritance" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/companies/{id}/inheritance"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/companies/{id}/inheritance',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies/{id}/inheritance'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET companies/{id}/inheritance

Get by code

Get all companies with provided company code

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/companies/getByCode/{code}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/companies/getByCode/{code}"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/companies/getByCode/{code}',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies/getByCode/{code}'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET companies/getByCode/{code}

INDEX

Index of all your companies

Here You can find all companies that can be controlled by You

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/companies" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/companies"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/companies',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET companies

URL Parameters

sort  string optional
Sort by a column of this resource type

order  string optional
ASC or DESC

CREATE

Create a new Company

Example request:

curl -X POST \
    "https://api.teltonika.lt/companies" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"name":"BigCompany Ltd.","company_id":133}'
const url = new URL(
    "https://api.teltonika.lt/companies"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "name": "BigCompany Ltd.",
    "company_id": 133
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/companies',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'name' => 'BigCompany Ltd.',
            'company_id' => 133,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies'
payload = {
    "name": "BigCompany Ltd.",
    "company_id": 133
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST companies

Body Parameters

name  string
Name of the Company.

company_id  integer
ID of the parent company. This can be Your company ID or ID of one of the companies You control.

SHOW

Show the specified company.

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/companies/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/companies/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/companies/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET companies/{company}

URL Parameters

Company  string
ID of the Company.

UPDATE

Update the specific Company.

Example request:

curl -X PUT \
    "https://api.teltonika.lt/companies/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"name":"BigCompany Ltd.","company_id":7488}'
const url = new URL(
    "https://api.teltonika.lt/companies/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "name": "BigCompany Ltd.",
    "company_id": 7488
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.teltonika.lt/companies/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'name' => 'BigCompany Ltd.',
            'company_id' => 7488,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies/1'
payload = {
    "name": "BigCompany Ltd.",
    "company_id": 7488
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request

PUT companies/{company}

PATCH companies/{company}

URL Parameters

Company  string
ID of the Company.

Body Parameters

name  string
Name of the Company.

company_id  integer
ID of the parent company. This can be Your company ID or ID of one of Your controlled companies.

DELETE

Delete the specific Company. Can only be deleted if is_empty attribute is true (no files, devices, groups, users are assigned to it)

Example request:

curl -X DELETE \
    "https://api.teltonika.lt/companies/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/companies/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.teltonika.lt/companies/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/companies/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request

DELETE companies/{company}

URL Parameters

Company  string
Id of the Company.

Devices

For managing devices

Stats

Stats for devices. Supports same filtering as INDEX endpoint

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/devices/stats?field=status_id" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/devices/stats"
);

let params = {
    "field": "status_id",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/devices/stats',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'field'=> 'status_id',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/stats'
params = {
  'field': 'status_id',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET devices/stats

Query Parameters

field  string optional
string required Field for status report. Can be one of status_id, current_configuration, current_firmware or model.

Filter List

Get all available values for filtering

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/devices/filterList?field=current_firmware" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/devices/filterList"
);

let params = {
    "field": "current_firmware",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/devices/filterList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'field'=> 'current_firmware',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/filterList'
params = {
  'field': 'current_firmware',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET devices/filterList

Query Parameters

field  string optional
Field name to retrieve distinct values.

Bulk create

This endpoint is used by system for device importing to the FOTA WEB

Example request:

curl -X POST \
    "https://api.teltonika.lt/devices/bulkCreate" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"data":[{"company_id":5555,"imei":3561438138428232,"model":"FMB111"}]}'
const url = new URL(
    "https://api.teltonika.lt/devices/bulkCreate"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "data": [
        {
            "company_id": 5555,
            "imei": 3561438138428232,
            "model": "FMB111"
        }
    ]
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/devices/bulkCreate',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'data' => [
                [
                    'company_id' => 5555,
                    'imei' => 3561438138428232,
                    'model' => 'FMB111',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/bulkCreate'
payload = {
    "data": [
        {
            "company_id": 5555,
            "imei": 3561438138428232,
            "model": "FMB111"
        }
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST devices/bulkCreate

Body Parameters

data  array
List of devices to add

data[].company_id  integer
Company ID

data[].imei  integer
Device IMEI

data[].model  string
Device model

Bulk update

Endpoint for updating Devices in batch

Example request:

curl -X POST \
    "https://api.teltonika.lt/devices/bulkUpdate" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "data[][company_id]=5555" \
    -F "data[][description]=Newly purchased devices" \
    -F "source=id_list" \
    -F "id_list[]=3500000000001" \
    -F "file=@/tmp/phpBU3XdC" 
const url = new URL(
    "https://api.teltonika.lt/devices/bulkUpdate"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('data[][company_id]', '5555');
body.append('data[][description]', 'Newly purchased devices');
body.append('source', 'id_list');
body.append('id_list[]', '3500000000001');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/devices/bulkUpdate',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'data[][company_id]',
                'contents' => '5555'
            ],
            [
                'name' => 'data[][description]',
                'contents' => 'Newly purchased devices'
            ],
            [
                'name' => 'source',
                'contents' => 'id_list'
            ],
            [
                'name' => 'id_list[]',
                'contents' => '3500000000001'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpBU3XdC', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/bulkUpdate'
files = {
  'file': open('/tmp/phpBU3XdC', 'rb')
}
payload = {
    "data": [
        {
            "company_id": 5555,
            "description": "Newly purchased devices"
        }
    ],
    "source": "id_list",
    "id_list": [
        3500000000001,
        360000000000001
    ],
    "filter": []
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST devices/bulkUpdate

Body Parameters

data  array
Data to be updated

data[].company_id  integer optional
Company ID if You would like to move device to another company

data[].description  string optional
Device description

source  required optional
Type of bulk job source (id_list, filter or file).

id_list  array optional
Id list of resources to be affected.

filter  array optional
JSON with filters to affect only specific resources

file  file optional
CSV file containing Id of resources to be modified.

Bulk delete

Endpoint for deleting Devices in batch

Example request:

curl -X POST \
    "https://api.teltonika.lt/devices/bulkDelete" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "source=id_list" \
    -F "id_list[]=3500000000001" \
    -F "file=@/tmp/phpGIDTwC" 
const url = new URL(
    "https://api.teltonika.lt/devices/bulkDelete"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('source', 'id_list');
body.append('id_list[]', '3500000000001');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/devices/bulkDelete',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'source',
                'contents' => 'id_list'
            ],
            [
                'name' => 'id_list[]',
                'contents' => '3500000000001'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpGIDTwC', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/bulkDelete'
files = {
  'file': open('/tmp/phpGIDTwC', 'rb')
}
payload = {
    "source": "id_list",
    "id_list": [
        3500000000001,
        360000000000001
    ],
    "filter": []
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST devices/bulkDelete

Body Parameters

source  required optional
Type of bulk job source (id_list, filter or file)

id_list  array optional
ID list of resources to be affected.

filter  array optional
JSON with filters to affect only specific resources

file  file optional
CSV file containing Id of resources to be modified.

Import file (.csv/.xlsx)

Import csv file with IMEI,S/N and description columns or Teltonika Logistics Journal .xlsx file.

Example request:

curl -X POST \
    "https://api.teltonika.lt/devices/import" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "company_id=2523" \
    -F "file=@/tmp/phpOM3stD" 
const url = new URL(
    "https://api.teltonika.lt/devices/import"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('company_id', '2523');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/devices/import',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'company_id',
                'contents' => '2523'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpOM3stD', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/import'
files = {
  'file': open('/tmp/phpOM3stD', 'rb')
}
payload = {
    "company_id": 2523
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST devices/import

Body Parameters

company_id  integer
Company ID to assign devices to.

file  file
CSV or XLSX file

Export to file (.csv / .xlsx)

Generate file containing selected devices. File will be created and placed in /files asynchronously.

Example request:

curl -X POST \
    "https://api.teltonika.lt/devices/export" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "source=id_list" \
    -F "id_list[]=3500000000001" \
    -F "filter[][company_id]=22" \
    -F "format="xlsx"" \
    -F "file=@/tmp/phpHRbzDC" 
const url = new URL(
    "https://api.teltonika.lt/devices/export"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('source', 'id_list');
body.append('id_list[]', '3500000000001');
body.append('filter[][company_id]', '22');
body.append('format', '"xlsx"');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/devices/export',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'source',
                'contents' => 'id_list'
            ],
            [
                'name' => 'id_list[]',
                'contents' => '3500000000001'
            ],
            [
                'name' => 'filter[][company_id]',
                'contents' => '22'
            ],
            [
                'name' => 'format',
                'contents' => '"xlsx"'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpHRbzDC', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/export'
files = {
  'file': open('/tmp/phpHRbzDC', 'rb')
}
payload = {
    "source": "id_list",
    "id_list": [
        3500000000001,
        360000000000001
    ],
    "filter": [
        {
            "company_id": 22
        }
    ],
    "format": "\"xlsx\""
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST devices/export

Body Parameters

source  required optional
Type of bulk job source (id_list, filter or file)

id_list  array optional
ID list of resources to be collected.

filter  array optional
JSON with filters to collect only specific resources

file  file optional
CSV file containing Id of resources to be collected.

format  required optional
string Output format - CSV or XLSX file.

Changes

List of changes detected on the device. Like Firmware of Configuration updates.

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/devices/{device}/changes" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/devices/{device}/changes"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/devices/{device}/changes',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/{device}/changes'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET devices/{device}/changes

INDEX

Index of all Your devices

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/devices?company_id=1&group_id=22&model=FMB140&firmware=04.01.02.Rev00&status_id=1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/devices"
);

let params = {
    "company_id": "1",
    "group_id": "22",
    "model": "FMB140",
    "firmware": "04.01.02.Rev00",
    "status_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/devices',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'company_id'=> '1',
            'group_id'=> '22',
            'model'=> 'FMB140',
            'firmware'=> '04.01.02.Rev00',
            'status_id'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices'
params = {
  'company_id': '1',
  'group_id': '22',
  'model': 'FMB140',
  'firmware': '04.01.02.Rev00',
  'status_id': '1',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET devices

URL Parameters

sort  string optional
Sort by a column of this resource type [id,name,group_id,company_id,...]

order  string optional
ASC or DESCs

Query Parameters

company_id  string optional
integer Filter: Company ID.

group_id  string optional
integer Filter: Group ID.

model  string optional
string Filter: Device model.

firmware  string optional
string Filter: Firmware version.

status_id  string optional
integer Filter: Device status.

CREATE

Create a new device

Example request:

curl -X POST \
    "https://api.teltonika.lt/devices" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"imei":350000000000001,"serial":112154,"model":"FMB001","description":"Petes truck","company_id":133}'
const url = new URL(
    "https://api.teltonika.lt/devices"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "imei": 350000000000001,
    "serial": 112154,
    "model": "FMB001",
    "description": "Petes truck",
    "company_id": 133
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/devices',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'imei' => 350000000000001,
            'serial' => 112154,
            'model' => 'FMB001',
            'description' => 'Petes truck',
            'company_id' => 133,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices'
payload = {
    "imei": 350000000000001,
    "serial": 112154,
    "model": "FMB001",
    "description": "Petes truck",
    "company_id": 133
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST devices

Body Parameters

imei  integer
Device IMEI.

serial  integer optional
Device serial number.

model  string
Device model.

description  string optional
Device description/User field.

company_id  integer
Owner Company Id.

SHOW

Show the specific device

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/devices/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/devices/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/devices/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET devices/{device}

URL Parameters

Device  string
IMEI of the device.

UPDATE

Update the specific device

Example request:

curl -X PUT \
    "https://api.teltonika.lt/devices/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"description":"Petes truck","company_id":133,"group_id":143}'
const url = new URL(
    "https://api.teltonika.lt/devices/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "description": "Petes truck",
    "company_id": 133,
    "group_id": 143
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.teltonika.lt/devices/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'description' => 'Petes truck',
            'company_id' => 133,
            'group_id' => 143,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/1'
payload = {
    "description": "Petes truck",
    "company_id": 133,
    "group_id": 143
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request

PUT devices/{device}

PATCH devices/{device}

URL Parameters

Device  string
IMEI of the Device.

Body Parameters

description  string optional
Optional description/User field.

company_id  integer optional
Owner Company Id.

group_id  integer optional
Group Id.

DELETE

Delete the specific device

Example request:

curl -X DELETE \
    "https://api.teltonika.lt/devices/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/devices/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.teltonika.lt/devices/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/devices/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request

DELETE devices/{device}

URL Parameters

Device  string
IMEI of the Device

Files

For managing Files

Filter List

Get all available values for filtering

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/files/filterList?field=type" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/files/filterList"
);

let params = {
    "field": "type",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/files/filterList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'field'=> 'type',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/files/filterList'
params = {
  'field': 'type',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET files/filterList

Query Parameters

field  string optional
Field name to retrieve distinct values.

Bulk delete

Endpoint for deleting Files in batch

Example request:

curl -X POST \
    "https://api.teltonika.lt/files/bulkDelete" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "source=id_list" \
    -F "id_list=75378, 453" \
    -F "file=@/tmp/phpd2IXbE" 
const url = new URL(
    "https://api.teltonika.lt/files/bulkDelete"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('source', 'id_list');
body.append('id_list', '75378, 453');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/files/bulkDelete',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'source',
                'contents' => 'id_list'
            ],
            [
                'name' => 'id_list',
                'contents' => '75378, 453'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpd2IXbE', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/files/bulkDelete'
files = {
  'file': open('/tmp/phpd2IXbE', 'rb')
}
payload = {
    "source": "id_list",
    "id_list": "75378, 453",
    "filter": []
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST files/bulkDelete

Body Parameters

source  required optional
Type of bulk job source (id_list, filter or file)

id_list  array optional
Id list of resources to be affected.

filter  array optional
JSON with filters to affect only specific resources.

file  file optional
CSV file containing Id of resources to be modified.

Download file

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/files/download/{file}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/files/download/{file}"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/files/download/{file}',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/files/download/{file}'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET files/download/{file}

INDEX

File index

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/files" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/files"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/files',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/files'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET files

CREATE

Upload a file (configuration, firmware)

Example request:

curl -X POST \
    "https://api.teltonika.lt/files" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "company_ids[]=1" \
    -F "type=configuration" \
    -F "file=@/tmp/phpJhSOWB" 
const url = new URL(
    "https://api.teltonika.lt/files"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('company_ids[]', '1');
body.append('type', 'configuration');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/files',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'company_ids[]',
                'contents' => '1'
            ],
            [
                'name' => 'type',
                'contents' => 'configuration'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpJhSOWB', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/files'
files = {
  'file': open('/tmp/phpJhSOWB', 'rb')
}
payload = {
    "company_ids": [
        1,
        152,
        300,
        787,
        42
    ],
    "type": "configuration"
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST files

Body Parameters

company_ids  array
Company Id array.

type  string
File type.

file  file
File to be uploaded.

SHOW

Display the specific file record.

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/files/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/files/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/files/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/files/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET files/{file}

URL Parameters

File  string
Id of the file.

UPDATE

Update the specified resource in storage.

Example request:

curl -X PUT \
    "https://api.teltonika.lt/files/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"company_id":42,"description":"Latest config created by Peter"}'
const url = new URL(
    "https://api.teltonika.lt/files/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "company_id": 42,
    "description": "Latest config created by Peter"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.teltonika.lt/files/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'company_id' => 42,
            'description' => 'Latest config created by Peter',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/files/1'
payload = {
    "company_id": 42,
    "description": "Latest config created by Peter"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request

PUT files/{file}

PATCH files/{file}

URL Parameters

Task  string
Id of the task.

Body Parameters

company_id  integer optional
Company Id.

description  string optional
Description for the file.

DELETE

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "https://api.teltonika.lt/files/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/files/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.teltonika.lt/files/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/files/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request

DELETE files/{file}

URL Parameters

Task  string
Id of the task to be deleted.

Groups

APIs for managing Groups

Filter List

Get all available values for filtering

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/groups/filterList?field=configuration_file_id" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/groups/filterList"
);

let params = {
    "field": "configuration_file_id",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/groups/filterList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'field'=> 'configuration_file_id',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/groups/filterList'
params = {
  'field': 'configuration_file_id',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET groups/filterList

Query Parameters

field  string optional
Field name to retrieve distinct values.

Bulk delete

Endpoint for deleting Groups in batch

Example request:

curl -X POST \
    "https://api.teltonika.lt/groups/bulkDelete" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "source=id_list" \
    -F "id_list=75378, 453" \
    -F "filter={"company_id" : 22}" \
    -F "file=@/tmp/phpmz2i3C" 
const url = new URL(
    "https://api.teltonika.lt/groups/bulkDelete"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('source', 'id_list');
body.append('id_list', '75378, 453');
body.append('filter', '{"company_id" : 22}');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/groups/bulkDelete',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'source',
                'contents' => 'id_list'
            ],
            [
                'name' => 'id_list',
                'contents' => '75378, 453'
            ],
            [
                'name' => 'filter',
                'contents' => '{"company_id" : 22}'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpmz2i3C', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/groups/bulkDelete'
files = {
  'file': open('/tmp/phpmz2i3C', 'rb')
}
payload = {
    "source": "id_list",
    "id_list": "75378, 453",
    "filter": "{\"company_id\" : 22}"
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST groups/bulkDelete

Body Parameters

source  required optional
Type of bulk job source (id_list, filter or file)

id_list  array optional
Id list of resources to be affected.

filter  array optional
Json with filters to affect only specific resources

file  file optional
Csv file containing Id of resources to be modified.

INDEX

Display a listing of the resource.

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/groups?company_id=1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/groups"
);

let params = {
    "company_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/groups',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'company_id'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/groups'
params = {
  'company_id': '1',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET groups

URL Parameters

sort  string optional
Sort by a column of this resource type [id,name,..]

order  string optional
ASC or DESCs

Query Parameters

company_id  string optional
Filter: Company ID.

CREATE

Store a newly created group.

Example request:

curl -X POST \
    "https://api.teltonika.lt/groups" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"name":"Technician cars","company_id":133,"firmware_file_id":7578,"configuration_file_id":4678}'
const url = new URL(
    "https://api.teltonika.lt/groups"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "name": "Technician cars",
    "company_id": 133,
    "firmware_file_id": 7578,
    "configuration_file_id": 4678
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/groups',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'name' => 'Technician cars',
            'company_id' => 133,
            'firmware_file_id' => 7578,
            'configuration_file_id' => 4678,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/groups'
payload = {
    "name": "Technician cars",
    "company_id": 133,
    "firmware_file_id": 7578,
    "configuration_file_id": 4678
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST groups

Body Parameters

name  string
Group name.

company_id  integer
Owner Company Id.

firmware_file_id  integer optional
Group wide assigned firmware file Id.

configuration_file_id  integer optional
Group wide assigned configuration file Id.

SHOW

Display the group.

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/groups/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/groups/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/groups/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/groups/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET groups/{group}

URL Parameters

Group  string
Id of the group.

UPDATE

Update the group.

Example request:

curl -X PUT \
    "https://api.teltonika.lt/groups/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"name":"Technician cars","firmware_file_id":7578,"configuration_file_id":4678}'
const url = new URL(
    "https://api.teltonika.lt/groups/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "name": "Technician cars",
    "firmware_file_id": 7578,
    "configuration_file_id": 4678
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.teltonika.lt/groups/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'name' => 'Technician cars',
            'firmware_file_id' => 7578,
            'configuration_file_id' => 4678,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/groups/1'
payload = {
    "name": "Technician cars",
    "firmware_file_id": 7578,
    "configuration_file_id": 4678
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request

PUT groups/{group}

PATCH groups/{group}

URL Parameters

Group  string
Id of the group.

Body Parameters

name  string
Group name.

firmware_file_id  integer optional
Group wide assigned firmware file Id.

configuration_file_id  integer optional
Group wide assigned configuration file Id.

DELETE

Remove the group.

Example request:

curl -X DELETE \
    "https://api.teltonika.lt/groups/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/groups/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.teltonika.lt/groups/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/groups/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request

DELETE groups/{group}

URL Parameters

Group  string
Id of the group.

OTH

batches

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/batches" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/batches"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/batches',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/batches'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET batches

Tasks

Stats

Stats for tasks. Supports same filtering as INDEX endpoint

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/tasks/stats?field=nobis" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/tasks/stats"
);

let params = {
    "field": "nobis",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/tasks/stats',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'field'=> 'nobis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks/stats'
params = {
  'field': 'nobis',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET tasks/stats

Query Parameters

field  string
Field for status report.

Filter List

Get all available values for filtering

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/tasks/filterList?field=device_imei" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/tasks/filterList"
);

let params = {
    "field": "device_imei",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/tasks/filterList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'field'=> 'device_imei',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks/filterList'
params = {
  'field': 'device_imei',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET tasks/filterList

Query Parameters

field  string optional
Field name to retrieve distinct values.

Bulk create

Endpoint for creating tasks in batch

Example request:

curl -X POST \
    "https://api.teltonika.lt/tasks/bulkCreate" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "source=id_list" \
    -F "id_list[]=320404504075378" \
    -F "filter={company_id : 22}" \
    -F "data[type]=TxFirmware, TxConfiguration, RxConfiguration" \
    -F "data[file_id]=123" \
    -F "data[attributes]={"count": 9}" \
    -F "file=@/tmp/phpmxvdxA" 
const url = new URL(
    "https://api.teltonika.lt/tasks/bulkCreate"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('source', 'id_list');
body.append('id_list[]', '320404504075378');
body.append('filter', '{company_id : 22}');
body.append('data[type]', 'TxFirmware, TxConfiguration, RxConfiguration');
body.append('data[file_id]', '123');
body.append('data[attributes]', '{"count": 9}');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/tasks/bulkCreate',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'source',
                'contents' => 'id_list'
            ],
            [
                'name' => 'id_list[]',
                'contents' => '320404504075378'
            ],
            [
                'name' => 'filter',
                'contents' => '{company_id : 22}'
            ],
            [
                'name' => 'data[type]',
                'contents' => 'TxFirmware, TxConfiguration, RxConfiguration'
            ],
            [
                'name' => 'data[file_id]',
                'contents' => '123'
            ],
            [
                'name' => 'data[attributes]',
                'contents' => '{"count": 9}'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpmxvdxA', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks/bulkCreate'
files = {
  'file': open('/tmp/phpmxvdxA', 'rb')
}
payload = {
    "source": "id_list",
    "id_list": [
        320404504075378,
        320404504075377
    ],
    "filter": "{company_id : 22}",
    "data": {
        "type": "TxFirmware, TxConfiguration, RxConfiguration",
        "file_id": 123,
        "attributes": "{\"count\": 9}"
    }
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST tasks/bulkCreate

Body Parameters

source  string
Type of bulk job source (id_list, filter or file)

id_list  array optional
Id list of resources to be affected.

filter  array optional
JSON with filters to affect only specific resources.

file  file optional
CSV file containing Id of resources to be modified.

data.type  string
Task type.

data.file_id  integer optional
Related file id (e.g. configuration or firmware).

data.attributes  array optional
JSON Task related attributes.

Bulk update

Endpoint for updating Tasks in batch

Example request:

curl -X POST \
    "https://api.teltonika.lt/tasks/bulkUpdate" \
    -H "Content-Type: multipart/form-data" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -F "source=id_list" \
    -F "id_list[]=3500000000001" \
    -F "file=@/tmp/phpJC4SYD" 
const url = new URL(
    "https://api.teltonika.lt/tasks/bulkUpdate"
);

let headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

const body = new FormData();
body.append('source', 'id_list');
body.append('id_list[]', '3500000000001');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/tasks/bulkUpdate',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'multipart' => [
            [
                'name' => 'source',
                'contents' => 'id_list'
            ],
            [
                'name' => 'id_list[]',
                'contents' => '3500000000001'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpJC4SYD', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks/bulkUpdate'
files = {
  'file': open('/tmp/phpJC4SYD', 'rb')
}
payload = {
    "data": [],
    "source": "id_list",
    "id_list": [
        3500000000001,
        360000000000001
    ],
    "filter": []
}
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, files=files, data=payload)
response.json()

Request

POST tasks/bulkUpdate

Body Parameters

data  array
Data to be updated e.g. {"status_id" : 3}

source  required optional
Type of bulk job source (id_list, filter or file).

id_list  array optional
Id list of resources to be affected.

filter  array optional
JSON with filters to affect only specific resources

file  file optional
CSV file containing Id of resources to be modified.

Cancel

Cancel the specific task

Example request:

curl -X POST \
    "https://api.teltonika.lt/tasks/1/cancel" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/tasks/1/cancel"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/tasks/1/cancel',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks/1/cancel'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request

POST tasks/{id}/cancel

URL Parameters

Task  string
Id of the task.

INDEX

All tasks

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/tasks" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/tasks"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/tasks',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET tasks

CREATE

Endpoint for creating tasks.

Example request:

curl -X POST \
    "https://api.teltonika.lt/tasks" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"device_imei":350000000000001,"type":"TxFirmware, TxConfiguration, RxConfiguration","file_id":257,"attributes":"{\"count\":10}"}'
const url = new URL(
    "https://api.teltonika.lt/tasks"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "device_imei": 350000000000001,
    "type": "TxFirmware, TxConfiguration, RxConfiguration",
    "file_id": 257,
    "attributes": "{\"count\":10}"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/tasks',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'device_imei' => 350000000000001,
            'type' => 'TxFirmware, TxConfiguration, RxConfiguration',
            'file_id' => 257,
            'attributes' => '{"count":10}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks'
payload = {
    "device_imei": 350000000000001,
    "type": "TxFirmware, TxConfiguration, RxConfiguration",
    "file_id": 257,
    "attributes": "{\"count\":10}"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST tasks

Body Parameters

device_imei  integer
Device IMEI.

type  string
Task type.

file_id  integer optional
Id of the related file (Configuration, firmware etc.).

attributes  string optional
Additional attributes of the task.

SHOW

SHOW the specific task

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/tasks/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/tasks/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/tasks/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET tasks/{task}

URL Parameters

Task  string
Id of the task.

UPDATE

UPDATE the specific task (Teltonika internal use only)

Example request:

curl -X PUT \
    "https://api.teltonika.lt/tasks/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"file_id":257,"status":2,"attempt_count":2}'
const url = new URL(
    "https://api.teltonika.lt/tasks/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "file_id": 257,
    "status": 2,
    "attempt_count": 2
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.teltonika.lt/tasks/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'file_id' => 257,
            'status' => 2,
            'attempt_count' => 2,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/tasks/1'
payload = {
    "file_id": 257,
    "status": 2,
    "attempt_count": 2
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request

PUT tasks/{task}

PATCH tasks/{task}

URL Parameters

Task  string
Id of the task.

Body Parameters

file_id  integer optional
Id of the related file (Configuration, firmware etc.).

status  integer
Task status id. This

attempt_count  integer optional
Count of times device restarted this task. This

User Invite

Invite users to join companies controlled by You

INDEX

All invitations

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/userInvite" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/userInvite"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/userInvite',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/userInvite'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET userInvite

Users

APIs for managing Users

Password reset token

Request password reset Reset token is valid for 7 days.

Example request:

curl -X POST \
    "https://api.teltonika.lt/requestResetPassword" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"email":"petes.son@peterson.co.uk"}'
const url = new URL(
    "https://api.teltonika.lt/requestResetPassword"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "email": "petes.son@peterson.co.uk"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/requestResetPassword',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'email' => 'petes.son@peterson.co.uk',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/requestResetPassword'
payload = {
    "email": "petes.son@peterson.co.uk"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST requestResetPassword

Body Parameters

email  string
Email of the user for password reset.

Password reset

Set new user password with reset token

Example request:

curl -X POST \
    "https://api.teltonika.lt/resetPassword" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"reset_token":"blanditiis","password":"sint"}'
const url = new URL(
    "https://api.teltonika.lt/resetPassword"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "reset_token": "blanditiis",
    "password": "sint"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/resetPassword',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'reset_token' => 'blanditiis',
            'password' => 'sint',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/resetPassword'
payload = {
    "reset_token": "blanditiis",
    "password": "sint"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST resetPassword

Body Parameters

reset_token  string
Reset token provided in email

password  string
New password set by user in the form

Me

Information about the current user

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/users/me" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/users/me"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/users/me',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/users/me'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET users/me

Filter List

Get all available values for filtering

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/users/filterList?field=company_id" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/users/filterList"
);

let params = {
    "field": "company_id",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/users/filterList',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'query' => [
            'field'=> 'company_id',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/users/filterList'
params = {
  'field': 'company_id',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Request

GET users/filterList

Query Parameters

field  string optional
Field name to retrieve distinct values.

Bulk delete

Endpoint for deleting Users in batch

requires authentication

Example request:

curl -X POST \
    "https://api.teltonika.lt/users/bulkDelete" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/users/bulkDelete"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/users/bulkDelete',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/users/bulkDelete'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request

POST users/bulkDelete

Password change

Change the password for the current user

Example request:

curl -X POST \
    "https://api.teltonika.lt/users/changePassword" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"old_password":"ullam","password":"veritatis"}'
const url = new URL(
    "https://api.teltonika.lt/users/changePassword"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "old_password": "ullam",
    "password": "veritatis"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.teltonika.lt/users/changePassword',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'old_password' => 'ullam',
            'password' => 'veritatis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/users/changePassword'
payload = {
    "old_password": "ullam",
    "password": "veritatis"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request

POST users/changePassword

Body Parameters

old_password  string
Set by user

password  string
Set by user

INDEX

Index of all users

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/users" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/users"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/users',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/users'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET users

SHOW

Show the specified user data

Example request:

curl -X GET \
    -G "https://api.teltonika.lt/users/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/users/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.teltonika.lt/users/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/users/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request

GET users/{user}

URL Parameters

User  string
Id of the user.

UPDATE

Update the user object.

Example request:

curl -X PUT \
    "https://api.teltonika.lt/users/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5" \
    -d '{"company_id":133,"language":"LT_lt"}'
const url = new URL(
    "https://api.teltonika.lt/users/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

let body = {
    "company_id": 133,
    "language": "LT_lt"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://api.teltonika.lt/users/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
        'json' => [
            'company_id' => 133,
            'language' => 'LT_lt',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/users/1'
payload = {
    "company_id": 133,
    "language": "LT_lt"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request

PUT users/{user}

PATCH users/{user}

URL Parameters

User  string
Id of the user.

Body Parameters

company_id  integer optional
Owner company Id.

language  string optional
Preferred user language for front-end application.

DELETE

Delete the specified resource from storage.

Example request:

curl -X DELETE \
    "https://api.teltonika.lt/users/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "User-Agent: MyCompany Ltd., MyApplication v0.5"
const url = new URL(
    "https://api.teltonika.lt/users/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "User-Agent": "MyCompany Ltd., MyApplication v0.5",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://api.teltonika.lt/users/1',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' => 'MyCompany Ltd., MyApplication v0.5',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.teltonika.lt/users/1'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'MyCompany Ltd., MyApplication v0.5'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request

DELETE users/{user}

URL Parameters

User  string
Id of the user.