Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your API key from the API Keys section in the admin panel of Metrotec GPS web application.
Files
APIs for managing files
Get all files for a pivot
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/files?pivot_type=route_tasks&pivot_id=12345" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/files"
);
const params = {
"pivot_type": "route_tasks",
"pivot_id": "12345",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/files';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'pivot_type' => 'route_tasks',
'pivot_id' => '12345',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/files'
params = {
'pivot_type': 'route_tasks',
'pivot_id': '12345',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
[
{
"id": 1,
"pivot_id": "12345",
"pivot_type": "route_tasks",
"defined_name": "document.pdf",
"mime": "application/pdf",
"file_type": "other",
"uploaded_at": "2025-11-28T10:00:00.000000Z",
"url": "https://api.example.com/cli_img/metrotec_12345_abc123.pdf"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload a new file
requires authentication
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/files" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "pivot_type=route_tasks"\
--form "pivot_id=12345"\
--form "max_files=5"\
--form "hidden="\
--form "file_type=image"\
--form "auto_crop="\
--form "auto_type=webp"\
--form "file=@/tmp/phpnmjd1hlqfi4jcIQ2ZQU" const url = new URL(
"https://api2.metrotec.ee/api/files"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('pivot_type', 'route_tasks');
body.append('pivot_id', '12345');
body.append('max_files', '5');
body.append('hidden', '');
body.append('file_type', 'image');
body.append('auto_crop', '');
body.append('auto_type', 'webp');
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/files';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'pivot_type',
'contents' => 'route_tasks'
],
[
'name' => 'pivot_id',
'contents' => '12345'
],
[
'name' => 'max_files',
'contents' => '5'
],
[
'name' => 'hidden',
'contents' => ''
],
[
'name' => 'file_type',
'contents' => 'image'
],
[
'name' => 'auto_crop',
'contents' => ''
],
[
'name' => 'auto_type',
'contents' => 'webp'
],
[
'name' => 'file',
'contents' => fopen('/tmp/phpnmjd1hlqfi4jcIQ2ZQU', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/files'
files = {
'pivot_type': (None, 'route_tasks'),
'pivot_id': (None, '12345'),
'max_files': (None, '5'),
'hidden': (None, ''),
'file_type': (None, 'image'),
'auto_crop': (None, ''),
'auto_type': (None, 'webp'),
'file': open('/tmp/phpnmjd1hlqfi4jcIQ2ZQU', 'rb')}
payload = {
"pivot_type": "route_tasks",
"pivot_id": "12345",
"max_files": 5,
"hidden": false,
"file_type": "image",
"auto_crop": false,
"auto_type": "webp"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, files=files)
response.json()Example response (201):
{
"id": 1,
"pivot_id": "12345",
"pivot_type": "route_tasks",
"defined_name": "document.pdf",
"mime": "application/pdf",
"file_type": "other",
"uploaded_at": "2025-11-28T10:00:00.000000Z",
"url": "https://api.example.com/cli_img/metrotec_12345_abc123.pdf"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a specific file
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/files/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/files/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/files/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/files/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"id": 1,
"pivot_id": "12345",
"pivot_type": "route_tasks",
"defined_name": "document.pdf",
"mime": "application/pdf",
"file_type": "other",
"uploaded_at": "2025-11-28T10:00:00.000000Z",
"url": "https://api.example.com/cli_img/metrotec_12345_abc123.pdf"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a file
requires authentication
Example request:
curl --request PUT \
"https://api2.metrotec.ee/api/files/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"file_type\": \"cmr\"
}"
const url = new URL(
"https://api2.metrotec.ee/api/files/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"file_type": "cmr"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/files/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'file_type' => 'cmr',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/files/1'
payload = {
"file_type": "cmr"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (200):
{
"id": 1,
"pivot_id": "12345",
"pivot_type": "route_tasks",
"defined_name": "document.pdf",
"mime": "application/pdf",
"file_type": "cmr",
"uploaded_at": "2025-11-28T10:00:00.000000Z",
"url": "https://api.example.com/cli_img/metrotec_12345_abc123.pdf"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a file
requires authentication
Example request:
curl --request DELETE \
"https://api2.metrotec.ee/api/files/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/files/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/files/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/files/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (204, success):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add drawing overlay to an existing image
requires authentication
Takes an existing image file and overlays a PNG drawing on top of it. The original file is replaced with the new combined image.
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/drawing/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "file=@/tmp/php2jf8kapvso9l54ceGtK" const url = new URL(
"https://api2.metrotec.ee/api/drawing/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/drawing/1';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'file',
'contents' => fopen('/tmp/php2jf8kapvso9l54ceGtK', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/drawing/1'
files = {
'file': open('/tmp/php2jf8kapvso9l54ceGtK', 'rb')}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, files=files)
response.json()Example response (201):
{
"id": 1,
"pivot_id": "12345",
"pivot_type": "route_tasks",
"defined_name": "photo.png",
"mime": "image/png",
"file_type": "image",
"uploaded_at": "2025-11-28T10:00:00.000000Z",
"url": "https://api.example.com/cli_img/metrotec_12345_abc123.png"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload signature for route tasks
requires authentication
Uploads a signature image and associates it with one or more route tasks.
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/signature" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "ids[]=16"\
--form "pivot_type=signatures"\
--form "file_type=receiver_signature"\
--form "signature=@/tmp/php88np7enjgtp14mgF4kH" const url = new URL(
"https://api2.metrotec.ee/api/signature"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('ids[]', '16');
body.append('pivot_type', 'signatures');
body.append('file_type', 'receiver_signature');
body.append('signature', document.querySelector('input[name="signature"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/signature';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'ids[]',
'contents' => '16'
],
[
'name' => 'pivot_type',
'contents' => 'signatures'
],
[
'name' => 'file_type',
'contents' => 'receiver_signature'
],
[
'name' => 'signature',
'contents' => fopen('/tmp/php88np7enjgtp14mgF4kH', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/signature'
files = {
'ids[]': (None, '16'),
'pivot_type': (None, 'signatures'),
'file_type': (None, 'receiver_signature'),
'signature': open('/tmp/php88np7enjgtp14mgF4kH', 'rb')}
payload = {
"ids": [
16
],
"pivot_type": "signatures",
"file_type": "receiver_signature"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, files=files)
response.json()Example response (201):
[
{
"id": 1,
"pivot_id": "12345",
"pivot_type": "signatures",
"defined_name": "signature.png",
"mime": "image/png",
"file_type": "receiver_signature",
"uploaded_at": "2025-11-28T10:00:00.000000Z",
"url": "https://api.example.com/signatures/metrotec_12345_abc123.png"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Fish Documents
APIs for managing fish transport documents
Get all fish documents
requires authentication
Returns documents that are not sent/finished, or sent/finished today.
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/fishdocuments" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/fishdocuments"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/fishdocuments';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/fishdocuments'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
[
{
"id": 1,
"document_number": "FD-2026-001",
"object_id": "ABC123",
"ship_name": "Aurora",
"receiver_id": 1,
"receiver": {
"id": 1,
"company_name": "Fish Processing Ltd"
},
"destination_address": "Harbor Street 1, Tallinn",
"quantity": 500.5,
"status": 0,
"created_at": "2026-01-14T10:00:00.000000Z",
"updated_at": "2026-01-14T10:00:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new fish document
requires authentication
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/fishdocuments" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"object_id\": \"ABC123\",
\"trailer_nr\": \"TRL-456\",
\"ship_id\": 1,
\"ship_name\": \"Aurora\",
\"owner_name\": \"John Smith\",
\"board_number\": \"EST-1234\",
\"license_number\": \"LIC-2026-001\",
\"voyage_number\": \"VOY-2026-005\",
\"receiver_id\": 1,
\"receiver_name\": \"Jane Doe\",
\"destination_address\": \"Harbor Street 1, Tallinn\",
\"destination_lat\": 59.437,
\"destination_lon\": 24.753,
\"products\": [
{
\"product_id\": 1,
\"quantity\": 500,
\"fishing_area\": \"IIId\"
}
],
\"category\": \"A\",
\"captain_name\": \"Captain Jack\",
\"carrier_id\": 1,
\"unloading_at\": \"2026-01-15 10:00:00\",
\"unloading_location\": \"Dock B\",
\"status\": 0
}"
const url = new URL(
"https://api2.metrotec.ee/api/fishdocuments"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"object_id": "ABC123",
"trailer_nr": "TRL-456",
"ship_id": 1,
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"license_number": "LIC-2026-001",
"voyage_number": "VOY-2026-005",
"receiver_id": 1,
"receiver_name": "Jane Doe",
"destination_address": "Harbor Street 1, Tallinn",
"destination_lat": 59.437,
"destination_lon": 24.753,
"products": [
{
"product_id": 1,
"quantity": 500,
"fishing_area": "IIId"
}
],
"category": "A",
"captain_name": "Captain Jack",
"carrier_id": 1,
"unloading_at": "2026-01-15 10:00:00",
"unloading_location": "Dock B",
"status": 0
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/fishdocuments';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'object_id' => 'ABC123',
'trailer_nr' => 'TRL-456',
'ship_id' => 1,
'ship_name' => 'Aurora',
'owner_name' => 'John Smith',
'board_number' => 'EST-1234',
'license_number' => 'LIC-2026-001',
'voyage_number' => 'VOY-2026-005',
'receiver_id' => 1,
'receiver_name' => 'Jane Doe',
'destination_address' => 'Harbor Street 1, Tallinn',
'destination_lat' => 59.437,
'destination_lon' => 24.753,
'products' => [
[
'product_id' => 1,
'quantity' => 500,
'fishing_area' => 'IIId',
],
],
'category' => 'A',
'captain_name' => 'Captain Jack',
'carrier_id' => 1,
'unloading_at' => '2026-01-15 10:00:00',
'unloading_location' => 'Dock B',
'status' => 0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/fishdocuments'
payload = {
"object_id": "ABC123",
"trailer_nr": "TRL-456",
"ship_id": 1,
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"license_number": "LIC-2026-001",
"voyage_number": "VOY-2026-005",
"receiver_id": 1,
"receiver_name": "Jane Doe",
"destination_address": "Harbor Street 1, Tallinn",
"destination_lat": 59.437,
"destination_lon": 24.753,
"products": [
{
"product_id": 1,
"quantity": 500,
"fishing_area": "IIId"
}
],
"category": "A",
"captain_name": "Captain Jack",
"carrier_id": 1,
"unloading_at": "2026-01-15 10:00:00",
"unloading_location": "Dock B",
"status": 0
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"id": 1,
"document_number": "FD-2026-001",
"object_id": "ABC123",
"ship_name": "Aurora",
"status": 0,
"created_at": "2026-01-14T10:00:00.000000Z",
"updated_at": "2026-01-14T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a specific fish document
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/fishdocuments/16" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/fishdocuments/16"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/fishdocuments/16';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/fishdocuments/16'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"id": 1,
"document_number": "FD-2026-001",
"object_id": "ABC123",
"trailer_nr": "TRL-456",
"ship_id": 1,
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"license_number": "LIC-2026-001",
"voyage_number": "VOY-2026-005",
"receiver_id": 1,
"receiver": {
"id": 1,
"company_name": "Fish Processing Ltd"
},
"receiver_name": "Jane Doe",
"destination_address": "Harbor Street 1, Tallinn",
"destination_lat": 59.437,
"destination_lon": 24.753,
"product_id": 1,
"quantity": 500.5,
"fishing_area": "IIId",
"containers": 10,
"category": "A",
"captain_name": "Captain Jack",
"carrier_name": "Transport Co",
"unloading_at": "2026-01-15T10:00:00.000000Z",
"unloading_location": "Dock B",
"status": 0,
"captain_signed": false,
"carrier_signed": false,
"receiver_signed": false,
"created_at": "2026-01-14T10:00:00.000000Z",
"updated_at": "2026-01-14T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a fish document
requires authentication
Example request:
curl --request PUT \
"https://api2.metrotec.ee/api/fishdocuments/16" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"object_id\": \"ABC123\",
\"trailer_nr\": \"TRL-456\",
\"ship_id\": 1,
\"ship_name\": \"Aurora\",
\"owner_name\": \"John Smith\",
\"board_number\": \"EST-1234\",
\"license_number\": \"LIC-2026-001\",
\"voyage_number\": \"VOY-2026-005\",
\"receiver_id\": 1,
\"receiver_name\": \"Jane Doe\",
\"destination_address\": \"Harbor Street 1, Tallinn\",
\"destination_lat\": 59.437,
\"destination_lon\": 24.753,
\"products\": [
{
\"product_id\": 1,
\"quantity\": 500,
\"fishing_area\": \"IIId\"
}
],
\"category\": \"A\",
\"captain_name\": \"Captain Jack\",
\"carrier_id\": 1,
\"unloading_at\": \"2026-01-15 10:00:00\",
\"unloading_location\": \"Dock B\",
\"status\": 0
}"
const url = new URL(
"https://api2.metrotec.ee/api/fishdocuments/16"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"object_id": "ABC123",
"trailer_nr": "TRL-456",
"ship_id": 1,
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"license_number": "LIC-2026-001",
"voyage_number": "VOY-2026-005",
"receiver_id": 1,
"receiver_name": "Jane Doe",
"destination_address": "Harbor Street 1, Tallinn",
"destination_lat": 59.437,
"destination_lon": 24.753,
"products": [
{
"product_id": 1,
"quantity": 500,
"fishing_area": "IIId"
}
],
"category": "A",
"captain_name": "Captain Jack",
"carrier_id": 1,
"unloading_at": "2026-01-15 10:00:00",
"unloading_location": "Dock B",
"status": 0
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/fishdocuments/16';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'object_id' => 'ABC123',
'trailer_nr' => 'TRL-456',
'ship_id' => 1,
'ship_name' => 'Aurora',
'owner_name' => 'John Smith',
'board_number' => 'EST-1234',
'license_number' => 'LIC-2026-001',
'voyage_number' => 'VOY-2026-005',
'receiver_id' => 1,
'receiver_name' => 'Jane Doe',
'destination_address' => 'Harbor Street 1, Tallinn',
'destination_lat' => 59.437,
'destination_lon' => 24.753,
'products' => [
[
'product_id' => 1,
'quantity' => 500,
'fishing_area' => 'IIId',
],
],
'category' => 'A',
'captain_name' => 'Captain Jack',
'carrier_id' => 1,
'unloading_at' => '2026-01-15 10:00:00',
'unloading_location' => 'Dock B',
'status' => 0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/fishdocuments/16'
payload = {
"object_id": "ABC123",
"trailer_nr": "TRL-456",
"ship_id": 1,
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"license_number": "LIC-2026-001",
"voyage_number": "VOY-2026-005",
"receiver_id": 1,
"receiver_name": "Jane Doe",
"destination_address": "Harbor Street 1, Tallinn",
"destination_lat": 59.437,
"destination_lon": 24.753,
"products": [
{
"product_id": 1,
"quantity": 500,
"fishing_area": "IIId"
}
],
"category": "A",
"captain_name": "Captain Jack",
"carrier_id": 1,
"unloading_at": "2026-01-15 10:00:00",
"unloading_location": "Dock B",
"status": 0
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (200):
{
"id": 1,
"document_number": "FD-2026-001",
"object_id": "ABC123",
"ship_name": "Aurora Updated",
"status": 1,
"created_at": "2026-01-14T10:00:00.000000Z",
"updated_at": "2026-01-14T11:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Fish Documents Report
API for fish documents report
Get fish documents report
requires authentication
Returns fish documents filtered by date range and other criteria.
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/fishdocuments/report?filter[start_time][]=2026-01-01&filter[start_time][]=2026-01-31&filter[status]=1&filter[ship_id]=1&filter[object_id]=ABC123&filter[carrier_id]=1&filter%5Bstart_time%5D[]=2026-01-01&filter%5Bstart_time%5D[]=2026-01-31&filter%5Bstatus%5D=1&filter%5Bship_id%5D=1&filter%5Bobject_id%5D=ABC123&filter%5Bcarrier_id%5D=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/fishdocuments/report"
);
const params = {
"filter[start_time][0]": "2026-01-01",
"filter[start_time][1]": "2026-01-31",
"filter[status]": "1",
"filter[ship_id]": "1",
"filter[object_id]": "ABC123",
"filter[carrier_id]": "1",
"filter[start_time][0]": "2026-01-01",
"filter[start_time][1]": "2026-01-31",
"filter[status]": "1",
"filter[ship_id]": "1",
"filter[object_id]": "ABC123",
"filter[carrier_id]": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/fishdocuments/report';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[start_time][0]' => '2026-01-01',
'filter[start_time][1]' => '2026-01-31',
'filter[status]' => '1',
'filter[ship_id]' => '1',
'filter[object_id]' => 'ABC123',
'filter[carrier_id]' => '1',
'filter[start_time][0]' => '2026-01-01',
'filter[start_time][1]' => '2026-01-31',
'filter[status]' => '1',
'filter[ship_id]' => '1',
'filter[object_id]' => 'ABC123',
'filter[carrier_id]' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/fishdocuments/report'
params = {
'filter[start_time][0]': '2026-01-01',
'filter[start_time][1]': '2026-01-31',
'filter[status]': '1',
'filter[ship_id]': '1',
'filter[object_id]': 'ABC123',
'filter[carrier_id]': '1',
'filter[start_time][0]': '2026-01-01',
'filter[start_time][1]': '2026-01-31',
'filter[status]': '1',
'filter[ship_id]': '1',
'filter[object_id]': 'ABC123',
'filter[carrier_id]': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export fish documents report to Excel
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/xls/fishdocuments?filter[start_time][]=2026-01-01&filter[start_time][]=2026-01-31&filter[status]=1&filter[ship_id]=1&filter[object_id]=ABC123&filter[carrier_id]=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/xls/fishdocuments"
);
const params = {
"filter[start_time][0]": "2026-01-01",
"filter[start_time][1]": "2026-01-31",
"filter[status]": "1",
"filter[ship_id]": "1",
"filter[object_id]": "ABC123",
"filter[carrier_id]": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/xls/fishdocuments';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[start_time][0]' => '2026-01-01',
'filter[start_time][1]' => '2026-01-31',
'filter[status]' => '1',
'filter[ship_id]' => '1',
'filter[object_id]' => 'ABC123',
'filter[carrier_id]' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/xls/fishdocuments'
params = {
'filter[start_time][0]': '2026-01-01',
'filter[start_time][1]': '2026-01-31',
'filter[status]': '1',
'filter[ship_id]': '1',
'filter[object_id]': 'ABC123',
'filter[carrier_id]': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6ImU1ZCsrRS9QZHZadVpHNGo0UEJLUHc9PSIsInZhbHVlIjoiSVZVL0grekM5Wmo3aTRCZjZJeUIwUFh6RlBNZElhcFVBZDhQaGlBNFNBdTJ0MmpUTXFPODVySFU5dUwvTjF1QkVQdGEwaW53c0l4VlVqemZNNloyVGVDcnk1d2dJM3VCNnQyVmxZZ0dlalRrYmlNcmZUMVlZUTJ6dHFxdjVlZ2EiLCJtYWMiOiI2MTNlNDgwNGU0NDgxNzVlMWFmNTUyYTM3OThhNDE1ZTY5MWY4ZDY2MjMyMTE1NDE0ZjBhYTk1YTBlNzM4NjUwIiwidGFnIjoiIn0%3D; expires=Mon, 13 Apr 2026 09:54:27 GMT; Max-Age=7200; path=/; secure; samesite=lax; metrotec_session=eyJpdiI6Iks3a2wxeVhOSHVNV2xYYTlIMGtvdGc9PSIsInZhbHVlIjoiT09ub1U4WXpwdlY0UEtSUjF6c2Z0YkdRMVBQZTIyYlBJdXU1ZjY2QVNLcHlmcjd2VWVVekZ5a3ZDUnV1dzFRVmhWVFJtNENZYVYyNEUxQklLWlJOellYdk9rSWdyRGFWY2xXOWkrYWZ6NHcrVkpXZlBkU0VORytzVUYyN2w2MGEiLCJtYWMiOiI4ZjJlMzU1MWIyNTZmZDAwZGJhYzQ1ZGNjNTk5NTFkZTI3ZTNiZmMyMjQwNWIxYWNkNzRhZmNiMGE4MTAyODE1IiwidGFnIjoiIn0%3D; expires=Mon, 13 Apr 2026 09:54:27 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export fish documents report to PDF
requires authentication
Combines all fish document PDFs into a single file.
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/pdf/fishdocuments?filter[start_time][]=2026-01-01&filter[start_time][]=2026-01-31&filter[status]=1&filter[ship_id]=1&filter[object_id]=ABC123&filter[carrier_id]=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/pdf/fishdocuments"
);
const params = {
"filter[start_time][0]": "2026-01-01",
"filter[start_time][1]": "2026-01-31",
"filter[status]": "1",
"filter[ship_id]": "1",
"filter[object_id]": "ABC123",
"filter[carrier_id]": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/pdf/fishdocuments';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[start_time][0]' => '2026-01-01',
'filter[start_time][1]' => '2026-01-31',
'filter[status]' => '1',
'filter[ship_id]' => '1',
'filter[object_id]' => 'ABC123',
'filter[carrier_id]' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/pdf/fishdocuments'
params = {
'filter[start_time][0]': '2026-01-01',
'filter[start_time][1]': '2026-01-31',
'filter[status]': '1',
'filter[ship_id]': '1',
'filter[object_id]': 'ABC123',
'filter[carrier_id]': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IncrUS9lUld3Z2JNVzBKRC9rRXNRRHc9PSIsInZhbHVlIjoiK0l4YkFJQmxNYmt1TmVpZDFTZGlRcmo3N2xCWVRGSCtFVzFjeXdQcmI3QVlmTWxyNjhzRHBSTGhRbUpsUVRwUVl0b1FwZkdLakpDYlhLVXkzcW9ocmYxeEVJVStCRlRZTVBWWDRITlZ0TGlIa0xGM1dSdFZ1czBBSENUV2cxQy8iLCJtYWMiOiJlNzVjMWE0MTU2ZDJjNTE3YzBmOGFjNWMwYmFkOWY1YzI2ZjkwNTI0OTdkMGIzOGU0NTcxYjlmYTVhZTU0ZWExIiwidGFnIjoiIn0%3D; expires=Mon, 13 Apr 2026 09:54:27 GMT; Max-Age=7200; path=/; secure; samesite=lax; metrotec_session=eyJpdiI6InNaME82SldON1ppTlkyNkxGRlk0K1E9PSIsInZhbHVlIjoiWUF4MjYrUURENm5uTkFDbXNMN0RFSXBpK0wrSkpObTBtMTE2SnU4dWpKQy9wUkdsOE1kVzZNTlJxK0NlUFk0SDIwRXV3eDc0NDJ0WVRNUDFqelFFS1ZZeGttc3kxMjRIUDcrb0k0SzBjeGpibXpBZG94R1dxNVAwaDhYSlUwK0wiLCJtYWMiOiI1YzUzNWIzYjliODQ1NTdmZDhhOTE5OWY0OTU5MTdmZjUxN2I1MDIzMzhjY2VjMTZkNzU3ODY2NjkwMDZkYmViIiwidGFnIjoiIn0%3D; expires=Mon, 13 Apr 2026 09:54:27 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Parties
APIs for managing parties
Get all parties
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/parties?filter%5Barchived%5D=1&filter%5Brole%5D=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/parties"
);
const params = {
"filter[archived]": "1",
"filter[role]": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/parties';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[archived]' => '1',
'filter[role]' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/parties'
params = {
'filter[archived]': '1',
'filter[role]': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
[
{
"id": 1,
"oid": "metrotec",
"role": [
1,
2
],
"lang": "est",
"company_name": "Example Company",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_country_code": "+372",
"company_phone_nr": "5555 5555",
"company_email": "info@example.com",
"company_address": "Example Street 1, Tallinn",
"contact_name": "John Doe",
"contact_country_code": "+372",
"contact_phone_nr": "5555 5556",
"contact_email": "john@example.com",
"active": true,
"default": false,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new party
requires authentication
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/parties" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_name\": \"Example Company\",
\"role\": [
1
],
\"lang\": \"est\",
\"company_no\": \"12345678\",
\"company_vat_no\": \"EE123456789\",
\"company_country_code\": \"+372\",
\"company_phone_nr\": \"5555 5555\",
\"company_email\": \"info@example.com\",
\"company_address\": \"Example Street 1, Tallinn\",
\"contact_name\": \"John Doe\",
\"contact_country_code\": \"+372\",
\"contact_phone_nr\": \"5555 5556\",
\"contact_email\": \"john@example.com\",
\"active\": false,
\"default\": false
}"
const url = new URL(
"https://api2.metrotec.ee/api/parties"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_name": "Example Company",
"role": [
1
],
"lang": "est",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_country_code": "+372",
"company_phone_nr": "5555 5555",
"company_email": "info@example.com",
"company_address": "Example Street 1, Tallinn",
"contact_name": "John Doe",
"contact_country_code": "+372",
"contact_phone_nr": "5555 5556",
"contact_email": "john@example.com",
"active": false,
"default": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/parties';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_name' => 'Example Company',
'role' => [
1,
],
'lang' => 'est',
'company_no' => '12345678',
'company_vat_no' => 'EE123456789',
'company_country_code' => '+372',
'company_phone_nr' => '5555 5555',
'company_email' => 'info@example.com',
'company_address' => 'Example Street 1, Tallinn',
'contact_name' => 'John Doe',
'contact_country_code' => '+372',
'contact_phone_nr' => '5555 5556',
'contact_email' => 'john@example.com',
'active' => false,
'default' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/parties'
payload = {
"company_name": "Example Company",
"role": [
1
],
"lang": "est",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_country_code": "+372",
"company_phone_nr": "5555 5555",
"company_email": "info@example.com",
"company_address": "Example Street 1, Tallinn",
"contact_name": "John Doe",
"contact_country_code": "+372",
"contact_phone_nr": "5555 5556",
"contact_email": "john@example.com",
"active": false,
"default": false
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"id": 1,
"oid": "metrotec",
"role": [
1,
2
],
"def_lang": "est",
"company_name": "Example Company",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_country_code": "+372",
"company_phone_nr": "5555 5555",
"company_email": "info@example.com",
"company_address": "Example Street 1, Tallinn",
"contact_name": "John Doe",
"contact_country_code": "+372",
"contact_phone_nr": "5555 5556",
"contact_email": "john@example.com",
"active": true,
"default": false,
"created_at": "2025-11-28T10:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a specific party
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/parties/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/parties/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/parties/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/parties/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"id": 1,
"oid": "metrotec",
"role": [
1,
2
],
"def_lang": "est",
"company_name": "Example Company",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_country_code": "+372",
"company_phone_nr": "5555 5555",
"company_email": "info@example.com",
"company_address": "Example Street 1, Tallinn",
"contact_name": "John Doe",
"contact_country_code": "+372",
"contact_phone_nr": "5555 5556",
"contact_email": "john@example.com",
"active": true,
"default": false,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a party
requires authentication
Example request:
curl --request PUT \
"https://api2.metrotec.ee/api/parties/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"company_name\": \"Example Company\",
\"role\": [
1
],
\"lang\": \"est\",
\"company_no\": \"12345678\",
\"company_vat_no\": \"EE123456789\",
\"company_country_code\": \"+372\",
\"company_phone_nr\": \"5555 5555\",
\"company_email\": \"info@example.com\",
\"company_address\": \"Example Street 1, Tallinn\",
\"contact_name\": \"John Doe\",
\"contact_country_code\": \"+372\",
\"contact_phone_nr\": \"5555 5556\",
\"contact_email\": \"john@example.com\",
\"active\": false,
\"default\": false
}"
const url = new URL(
"https://api2.metrotec.ee/api/parties/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_name": "Example Company",
"role": [
1
],
"lang": "est",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_country_code": "+372",
"company_phone_nr": "5555 5555",
"company_email": "info@example.com",
"company_address": "Example Street 1, Tallinn",
"contact_name": "John Doe",
"contact_country_code": "+372",
"contact_phone_nr": "5555 5556",
"contact_email": "john@example.com",
"active": false,
"default": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/parties/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_name' => 'Example Company',
'role' => [
1,
],
'lang' => 'est',
'company_no' => '12345678',
'company_vat_no' => 'EE123456789',
'company_country_code' => '+372',
'company_phone_nr' => '5555 5555',
'company_email' => 'info@example.com',
'company_address' => 'Example Street 1, Tallinn',
'contact_name' => 'John Doe',
'contact_country_code' => '+372',
'contact_phone_nr' => '5555 5556',
'contact_email' => 'john@example.com',
'active' => false,
'default' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/parties/1'
payload = {
"company_name": "Example Company",
"role": [
1
],
"lang": "est",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_country_code": "+372",
"company_phone_nr": "5555 5555",
"company_email": "info@example.com",
"company_address": "Example Street 1, Tallinn",
"contact_name": "John Doe",
"contact_country_code": "+372",
"contact_phone_nr": "5555 5556",
"contact_email": "john@example.com",
"active": false,
"default": false
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (200):
{
"id": 1,
"oid": "metrotec",
"role": [
1,
2
],
"def_lang": "est",
"company_name": "Updated Company",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_country_code": "+372",
"company_phone_nr": "5555 5555",
"company_email": "info@example.com",
"company_address": "Example Street 1, Tallinn",
"contact_name": "John Doe",
"contact_country_code": "+372",
"contact_phone_nr": "5555 5556",
"contact_email": "john@example.com",
"active": true,
"default": false,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a party
requires authentication
Example request:
curl --request DELETE \
"https://api2.metrotec.ee/api/parties/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/parties/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/parties/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/parties/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (204, success):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Products
APIs for managing route task products
Get all products
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/products?archived=1&show_type=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/products"
);
const params = {
"archived": "1",
"show_type": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/products';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'archived' => '1',
'show_type' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/products'
params = {
'archived': '1',
'show_type': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
[
{
"id": 1,
"oid": "metrotec",
"value": "PROD001",
"text": "Product Name",
"external_id": "EXT123",
"active": true,
"default": false,
"show_type": 1,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new product
requires authentication
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/products" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"value\": \"PROD001\",
\"text\": \"Product Name\",
\"external_id\": \"EXT123\",
\"comment\": \"Additional product information\",
\"active\": false,
\"default\": false,
\"show_type\": 1
}"
const url = new URL(
"https://api2.metrotec.ee/api/products"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"value": "PROD001",
"text": "Product Name",
"external_id": "EXT123",
"comment": "Additional product information",
"active": false,
"default": false,
"show_type": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/products';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'value' => 'PROD001',
'text' => 'Product Name',
'external_id' => 'EXT123',
'comment' => 'Additional product information',
'active' => false,
'default' => false,
'show_type' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/products'
payload = {
"value": "PROD001",
"text": "Product Name",
"external_id": "EXT123",
"comment": "Additional product information",
"active": false,
"default": false,
"show_type": 1
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"id": 1,
"oid": "metrotec",
"value": "PROD001",
"text": "Product Name",
"external_id": "EXT123",
"active": true,
"default": false,
"created_at": "2025-11-28T10:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a specific product
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/products/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/products/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/products/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/products/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"id": 1,
"oid": "metrotec",
"value": "PROD001",
"text": "Product Name",
"external_id": "EXT123",
"active": true,
"default": false,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a product
requires authentication
Example request:
curl --request PUT \
"https://api2.metrotec.ee/api/products/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"value\": \"PROD001\",
\"text\": \"Product Name\",
\"external_id\": \"EXT123\",
\"comment\": \"Additional product information\",
\"active\": false,
\"default\": false,
\"show_type\": 1
}"
const url = new URL(
"https://api2.metrotec.ee/api/products/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"value": "PROD001",
"text": "Product Name",
"external_id": "EXT123",
"comment": "Additional product information",
"active": false,
"default": false,
"show_type": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/products/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'value' => 'PROD001',
'text' => 'Product Name',
'external_id' => 'EXT123',
'comment' => 'Additional product information',
'active' => false,
'default' => false,
'show_type' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/products/1'
payload = {
"value": "PROD001",
"text": "Product Name",
"external_id": "EXT123",
"comment": "Additional product information",
"active": false,
"default": false,
"show_type": 1
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (200):
{
"id": 1,
"oid": "metrotec",
"value": "PROD001",
"text": "Updated Product Name",
"external_id": "EXT123",
"active": true,
"default": false,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a product
requires authentication
Example request:
curl --request DELETE \
"https://api2.metrotec.ee/api/products/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/products/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/products/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/products/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (204, success):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Route Tasks
APIs for managing route tasks. Route tasks support different task types based on user profile:
- Standard: Basic task type for general routing
- Rudus: Concrete delivery tasks with volume tracking
- Padapigi: Logistics tasks with CMR generation
- Directo: Delivery tasks with email notifications
- Esvika: Transport tasks with carrier information
- Olaret: Container management tasks
- LotusTimber: Timber transport tasks with customer/carrier tracking
Get all tasks
Returns a list of route tasks for the authenticated user. By default, only active tasks are returned.
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/tasks?all=&offset=0&limit=30&files=" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/tasks"
);
const params = {
"all": "0",
"offset": "0",
"limit": "30",
"files": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/tasks';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'all' => '0',
'offset' => '0',
'limit' => '30',
'files' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/tasks'
params = {
'all': '0',
'offset': '0',
'limit': '30',
'files': '0',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200, Standard Task):
[
{
"id": 12346,
"oid": "metrotec",
"object_id": "ABC123",
"lat": 59.437,
"lon": 24.754,
"start_lat": null,
"start_lon": null,
"start_address": null,
"start_time": "2025-01-20 08:00:00",
"stop_time": "2025-01-20 17:00:00",
"order_ref": "ORDER-2025-001",
"order_details": null,
"task_address": "Tallinn, Estonia",
"task_description": "Standard delivery task",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 16:00:00",
"updated_at": "2025-01-19 16:00:00",
"work_started_at": null,
"work_finished_at": null,
"sender": "DispatchSystem",
"tracking_nr": "abc123xyz789def456",
"task_notes": null,
"active": true,
"group_id": null,
"is_not_own_vehicle": false,
"products": []
}
]
Example response (200, Rudus Task):
[
{
"id": 12345,
"oid": "metrotec",
"object_id": "RUDUS-01",
"lat": 59.437,
"lon": 24.754,
"start_lat": 59.395,
"start_lon": 24.662,
"start_address": "Factory, Tallinn",
"start_time": "2025-01-20 08:00:00",
"stop_time": "2025-01-20 12:00:00",
"order_ref": "RUDUS-2025-001",
"order_details": "Client: Construction Site A",
"task_address": "Construction Site A, Tallinn",
"task_description": "Concrete delivery C30/37",
"cancel_reason": null,
"status": 2,
"created_at": "2025-01-19 15:30:00",
"updated_at": "2025-01-20 08:15:00",
"work_started_at": "2025-01-20 08:05:00",
"work_finished_at": "2025-01-20 11:45:00",
"sender": "RudusAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Special delivery",
"active": true,
"group_id": 10,
"is_not_own_vehicle": false,
"preparation_time": "2025-01-20 07:30:00",
"volume": 8.5,
"client_id": "CLIENT123",
"ordered_volume": 10,
"delivered_volume": 8.2,
"pumped_volume": 8,
"dn_trash": "0.5",
"dn_plastic": "1.2",
"dn_water": "10.5",
"categoryID": 15,
"client_emails": [
"client@example.com",
"manager@example.com"
],
"last_cargo": 0,
"geozone_entered_at": "2025-01-20 11:20:00",
"arrived_at": "2025-01-20 11:15:00",
"geozone_left_at": "2025-01-20 11:50:00",
"concrete_type": "C30/37",
"concrete_strength_class": "C30",
"environmental_class": "XC3",
"dmax": "16",
"consistency_class": "S3",
"cement_type": "CEM II/A-LL 42,5N",
"additives": "Superplasticizer",
"concrete_extra_info": "High durability",
"concrete_extra_info2": "Special finish required",
"unload_method": "Pump",
"driving_instructions": "Use back entrance",
"offer_number": "OFF-2025-123",
"work_order_number": "WO-2025-456",
"notes": "Handle with care",
"operator_name": "John Smith",
"pumper_name": "ABC Pumping Ltd",
"pump_type": "Stationary",
"factory_id": 5,
"client_address": "123 Construction Ave",
"other_object_id": "PUMP-01",
"products": []
}
]
Example response (200, Padapigi Task):
[
{
"id": 12347,
"oid": "metrotec",
"object_id": "TRUCK-05",
"lat": 59.437,
"lon": 24.754,
"start_lat": 59.395,
"start_lon": 24.662,
"start_address": "Warehouse A, Tallinn",
"start_time": "2025-01-20 06:00:00",
"stop_time": "2025-01-20 18:00:00",
"order_ref": "PAD-2025-100",
"order_details": "CMR delivery to Latvia",
"task_address": "Warehouse District, Tallinn",
"task_description": "International delivery to Latvia",
"cancel_reason": null,
"status": 2,
"created_at": "2025-01-19 14:00:00",
"updated_at": "2025-01-20 06:30:00",
"work_started_at": "2025-01-20 06:15:00",
"work_finished_at": null,
"sender": "PadapigiAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "CMR documents prepared",
"active": true,
"group_id": 15,
"is_not_own_vehicle": false,
"contact_name": "John Doe",
"contact_email": "john.doe@example.com",
"contact_sender": "SENDER123",
"contact_receiver": "ABC Logistics Ltd",
"contact_trailer": "TRL456",
"contact_order": "ORD-PAD-100",
"contact_delivery_term": "DAP",
"contact_language": "en",
"delivery_name": "ABC Logistics Ltd",
"delivery_address1": "Industrial Street 15",
"delivery_address2": "Riga, LV-1234",
"delivery_address3": "Latvia",
"start_address1": "Warehouse A",
"start_address2": "Tallinn Port",
"start_address3": "Estonia",
"weight": 15000,
"amount": 24,
"hash": "abc123def456",
"products": []
}
]
Example response (200, Directo Task):
[
{
"id": 12348,
"oid": "metrotec",
"object_id": "INT-TRUCK-02",
"lat": 54.687,
"lon": 25.279,
"start_lat": 59.437,
"start_lon": 24.754,
"start_address": "Tallinn Logistics Center",
"start_time": "2025-01-20 05:00:00",
"stop_time": "2025-01-21 18:00:00",
"order_ref": "DIR-2025-055",
"order_details": "Electronics to Lithuania",
"task_address": "Vilnius, Lithuania",
"task_description": "Electronics transport to Lithuania",
"cancel_reason": null,
"status": 2,
"created_at": "2025-01-19 12:00:00",
"updated_at": "2025-01-20 05:45:00",
"work_started_at": "2025-01-20 05:30:00",
"work_finished_at": null,
"sender": "DirectoAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Border documents ready",
"active": true,
"group_id": 20,
"is_not_own_vehicle": false,
"amount": 150,
"contact_name": "Maria Vasileva",
"contact_country_code": "+370",
"contact_phone_nr": "61234567",
"product_name": "Electronic Components",
"project_nr": "PROJ-2025-10",
"weight": 12000,
"carrier": "Baltic Express",
"receiver_email": "receiver@example.lt",
"receiver_name": "Tech Solutions UAB",
"directo_invoice": "987654",
"driver_notes": "Contact receiver 1 hour before arrival",
"own_transport": true,
"products": []
}
]
Example response (200, Esvika Task):
[
{
"id": 12349,
"oid": "metrotec",
"object_id": "ESV-TRUCK-08",
"lat": 60.169,
"lon": 24.938,
"start_lat": 59.437,
"start_lon": 24.754,
"start_address": "Tallinn Distribution Center",
"start_time": "2025-01-20 07:00:00",
"stop_time": "2025-01-20 16:00:00",
"order_ref": "ESV-2025-220",
"order_details": "Container to Helsinki Port",
"task_address": "Helsinki Port, Finland",
"task_description": "Container transport to Helsinki",
"cancel_reason": null,
"status": 2,
"created_at": "2025-01-19 13:30:00",
"updated_at": "2025-01-20 07:20:00",
"work_started_at": "2025-01-20 07:10:00",
"work_finished_at": null,
"sender": "EsvikaAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Ferry booking confirmed",
"active": true,
"group_id": 25,
"is_not_own_vehicle": false,
"contact_name": "Pekka Virtanen",
"contact_country_code": "+358",
"contact_phone_nr": "401234567",
"amount": 1,
"weight": 22000,
"vehicle_type": "Curtainsider",
"carrier": "Nordic Transport Oy",
"order_number": "ORD-FI-2025-100",
"unloading_time": 45,
"products": []
}
]
Example response (200, Olaret Task):
[
{
"id": 12350,
"oid": "metrotec",
"object_id": "CONTAINER-TRUCK-03",
"lat": 59.437,
"lon": 24.754,
"start_lat": null,
"start_lon": null,
"start_address": null,
"start_time": "2025-01-20 09:00:00",
"stop_time": "2025-01-20 15:00:00",
"order_ref": "OLA-2025-456",
"order_details": "Container pickup",
"task_address": "Container Terminal, Port of Tallinn",
"task_description": "Container pickup and delivery",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 17:00:00",
"updated_at": "2025-01-19 17:00:00",
"work_started_at": null,
"work_finished_at": null,
"sender": "OlaretAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Terminal gate code: 1234",
"active": true,
"group_id": null,
"is_not_own_vehicle": false,
"worder": "WO_2025_456",
"containerno": "MSCU1234567",
"do_send": true,
"products": []
}
]
Example response (200, LotusTimber Task):
[
{
"id": 12351,
"oid": "metrotec",
"object_id": "TIMBER-TRUCK-01",
"lat": 58.378,
"lon": 26.729,
"start_lat": 59.437,
"start_lon": 24.754,
"start_address": "Timber Yard, Tallinn",
"start_time": "2025-01-20 06:00:00",
"stop_time": "2025-01-20 14:00:00",
"order_ref": "LOTUS-2025-001",
"order_details": "Timber delivery to sawmill",
"customer_id": 1,
"carrier_id": 2,
"trailer_nr": "TRL-789",
"task_address": "Sawmill, Tartu",
"task_description": "Timber transport",
"cancel_reason": null,
"status": 2,
"created_at": "2025-01-19 15:00:00",
"updated_at": "2025-01-20 06:30:00",
"work_started_at": "2025-01-20 06:15:00",
"work_finished_at": null,
"sender": "LotusTimberAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Handle with care",
"active": true,
"group_id": null,
"is_not_own_vehicle": false,
"products": []
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new task
Creates a new route task. The available fields depend on the user's profile type. All task types share common base fields, with additional fields available per type.
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/tasks" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"object_id\": \"ABC123\",
\"lat\": 59.437,
\"lon\": 24.754,
\"start_time\": \"2025-01-20 08:00:00\",
\"stop_time\": \"2025-01-20 17:00:00\",
\"start_lat\": 59.395,
\"start_lon\": 24.662,
\"start_address\": \"Tallinn, Estonia\",
\"task_address\": \"Tartu, Estonia\",
\"order_ref\": \"ORD-2025-001\",
\"order_details\": \"Delivery of goods\",
\"task_description\": \"Deliver package\",
\"task_notes\": \"Call before arrival\",
\"cancel_reason\": \"architecto\",
\"status\": 1,
\"planned_km\": 150.5,
\"is_not_own_vehicle\": false,
\"active\": true,
\"group_id\": 1,
\"products\": [
{
\"product_id\": 1,
\"quantity\": 10.5,
\"weight\": 150
}
],
\"preparation_time\": \"2025-01-20 07:30:00\",
\"volume\": 8.5,
\"client_id\": \"CLIENT123\",
\"ordered_volume\": 10,
\"delivered_volume\": 8.2,
\"pumped_volume\": 8,
\"dn_trash\": \"0.5\",
\"dn_plastic\": \"1.2\",
\"dn_water\": \"10.5\",
\"categoryID\": 15,
\"client_emails\": [
\"client@example.com\"
],
\"last_cargo\": 0,
\"geozone_entered_at\": \"2025-01-20 11:20:00\",
\"arrived_at\": \"2025-01-20 11:15:00\",
\"geozone_left_at\": \"2025-01-20 11:50:00\",
\"work_finished_at\": \"2025-01-20 11:45:00\",
\"concrete_type\": \"C30\\/37\",
\"concrete_strength_class\": \"C30\",
\"environmental_class\": \"XC3\",
\"dmax\": \"16\",
\"consistency_class\": \"S3\",
\"cement_type\": \"CEM II\\/A-LL 42,5N\",
\"additives\": \"Superplasticizer\",
\"concrete_extra_info\": \"High durability\",
\"concrete_extra_info2\": \"Special finish\",
\"unload_method\": \"Pump\",
\"driving_instructions\": \"Use back entrance\",
\"offer_number\": \"OFF-2025-123\",
\"work_order_number\": \"WO-2025-456\",
\"notes\": \"Handle with care\",
\"operator_name\": \"John Smith\",
\"pumper_name\": \"ABC Pumping Ltd\",
\"pump_type\": \"Stationary\",
\"factory_id\": 5,
\"client_address\": \"123 Construction Ave\",
\"other_object_id\": \"PUMP-01\",
\"contact_name\": \"John Doe\",
\"contact_email\": \"john@example.com\",
\"contact_sender\": \"SENDER123\",
\"contact_receiver\": \"ABC Logistics Ltd\",
\"contact_trailer\": \"TRL456\",
\"contact_order\": \"ORD-PAD-100\",
\"contact_delivery_term\": \"DAP\",
\"contact_language\": \"en\",
\"delivery_name\": \"ABC Logistics Ltd\",
\"delivery_address1\": \"Industrial Street 15\",
\"delivery_address2\": \"Riga, LV-1234\",
\"delivery_address3\": \"Latvia\",
\"start_address1\": \"Warehouse A\",
\"start_address2\": \"Tallinn Port\",
\"start_address3\": \"Estonia\",
\"hash\": \"abc123def456\",
\"contact_country_code\": \"+372\",
\"contact_phone_nr\": \"5551234\",
\"product_name\": \"Electronic Components\",
\"project_nr\": \"PROJ-2025-10\",
\"receiver_email\": \"receiver@example.lt\",
\"receiver_name\": \"Tech Solutions UAB\",
\"directo_invoice\": \"987654\",
\"driver_notes\": \"Call 1h before\",
\"own_transport\": true,
\"weight\": 15000,
\"amount\": 24,
\"carrier\": \"Baltic Express\",
\"vehicle_type\": \"Curtainsider\",
\"order_number\": \"ORD-FI-2025-100\",
\"unloading_time\": 45,
\"worder\": \"WO_2025_456\",
\"containerno\": \"MSCU1234567\",
\"do_send\": true,
\"customer_id\": 1,
\"carrier_id\": 2,
\"trailer_nr\": \"TRL-789\"
}"
const url = new URL(
"https://api2.metrotec.ee/api/tasks"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"object_id": "ABC123",
"lat": 59.437,
"lon": 24.754,
"start_time": "2025-01-20 08:00:00",
"stop_time": "2025-01-20 17:00:00",
"start_lat": 59.395,
"start_lon": 24.662,
"start_address": "Tallinn, Estonia",
"task_address": "Tartu, Estonia",
"order_ref": "ORD-2025-001",
"order_details": "Delivery of goods",
"task_description": "Deliver package",
"task_notes": "Call before arrival",
"cancel_reason": "architecto",
"status": 1,
"planned_km": 150.5,
"is_not_own_vehicle": false,
"active": true,
"group_id": 1,
"products": [
{
"product_id": 1,
"quantity": 10.5,
"weight": 150
}
],
"preparation_time": "2025-01-20 07:30:00",
"volume": 8.5,
"client_id": "CLIENT123",
"ordered_volume": 10,
"delivered_volume": 8.2,
"pumped_volume": 8,
"dn_trash": "0.5",
"dn_plastic": "1.2",
"dn_water": "10.5",
"categoryID": 15,
"client_emails": [
"client@example.com"
],
"last_cargo": 0,
"geozone_entered_at": "2025-01-20 11:20:00",
"arrived_at": "2025-01-20 11:15:00",
"geozone_left_at": "2025-01-20 11:50:00",
"work_finished_at": "2025-01-20 11:45:00",
"concrete_type": "C30\/37",
"concrete_strength_class": "C30",
"environmental_class": "XC3",
"dmax": "16",
"consistency_class": "S3",
"cement_type": "CEM II\/A-LL 42,5N",
"additives": "Superplasticizer",
"concrete_extra_info": "High durability",
"concrete_extra_info2": "Special finish",
"unload_method": "Pump",
"driving_instructions": "Use back entrance",
"offer_number": "OFF-2025-123",
"work_order_number": "WO-2025-456",
"notes": "Handle with care",
"operator_name": "John Smith",
"pumper_name": "ABC Pumping Ltd",
"pump_type": "Stationary",
"factory_id": 5,
"client_address": "123 Construction Ave",
"other_object_id": "PUMP-01",
"contact_name": "John Doe",
"contact_email": "john@example.com",
"contact_sender": "SENDER123",
"contact_receiver": "ABC Logistics Ltd",
"contact_trailer": "TRL456",
"contact_order": "ORD-PAD-100",
"contact_delivery_term": "DAP",
"contact_language": "en",
"delivery_name": "ABC Logistics Ltd",
"delivery_address1": "Industrial Street 15",
"delivery_address2": "Riga, LV-1234",
"delivery_address3": "Latvia",
"start_address1": "Warehouse A",
"start_address2": "Tallinn Port",
"start_address3": "Estonia",
"hash": "abc123def456",
"contact_country_code": "+372",
"contact_phone_nr": "5551234",
"product_name": "Electronic Components",
"project_nr": "PROJ-2025-10",
"receiver_email": "receiver@example.lt",
"receiver_name": "Tech Solutions UAB",
"directo_invoice": "987654",
"driver_notes": "Call 1h before",
"own_transport": true,
"weight": 15000,
"amount": 24,
"carrier": "Baltic Express",
"vehicle_type": "Curtainsider",
"order_number": "ORD-FI-2025-100",
"unloading_time": 45,
"worder": "WO_2025_456",
"containerno": "MSCU1234567",
"do_send": true,
"customer_id": 1,
"carrier_id": 2,
"trailer_nr": "TRL-789"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/tasks';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'object_id' => 'ABC123',
'lat' => 59.437,
'lon' => 24.754,
'start_time' => '2025-01-20 08:00:00',
'stop_time' => '2025-01-20 17:00:00',
'start_lat' => 59.395,
'start_lon' => 24.662,
'start_address' => 'Tallinn, Estonia',
'task_address' => 'Tartu, Estonia',
'order_ref' => 'ORD-2025-001',
'order_details' => 'Delivery of goods',
'task_description' => 'Deliver package',
'task_notes' => 'Call before arrival',
'cancel_reason' => 'architecto',
'status' => 1,
'planned_km' => 150.5,
'is_not_own_vehicle' => false,
'active' => true,
'group_id' => 1,
'products' => [
[
'product_id' => 1,
'quantity' => 10.5,
'weight' => 150.0,
],
],
'preparation_time' => '2025-01-20 07:30:00',
'volume' => 8.5,
'client_id' => 'CLIENT123',
'ordered_volume' => 10.0,
'delivered_volume' => 8.2,
'pumped_volume' => 8.0,
'dn_trash' => '0.5',
'dn_plastic' => '1.2',
'dn_water' => '10.5',
'categoryID' => 15,
'client_emails' => [
'client@example.com',
],
'last_cargo' => 0,
'geozone_entered_at' => '2025-01-20 11:20:00',
'arrived_at' => '2025-01-20 11:15:00',
'geozone_left_at' => '2025-01-20 11:50:00',
'work_finished_at' => '2025-01-20 11:45:00',
'concrete_type' => 'C30/37',
'concrete_strength_class' => 'C30',
'environmental_class' => 'XC3',
'dmax' => '16',
'consistency_class' => 'S3',
'cement_type' => 'CEM II/A-LL 42,5N',
'additives' => 'Superplasticizer',
'concrete_extra_info' => 'High durability',
'concrete_extra_info2' => 'Special finish',
'unload_method' => 'Pump',
'driving_instructions' => 'Use back entrance',
'offer_number' => 'OFF-2025-123',
'work_order_number' => 'WO-2025-456',
'notes' => 'Handle with care',
'operator_name' => 'John Smith',
'pumper_name' => 'ABC Pumping Ltd',
'pump_type' => 'Stationary',
'factory_id' => 5,
'client_address' => '123 Construction Ave',
'other_object_id' => 'PUMP-01',
'contact_name' => 'John Doe',
'contact_email' => 'john@example.com',
'contact_sender' => 'SENDER123',
'contact_receiver' => 'ABC Logistics Ltd',
'contact_trailer' => 'TRL456',
'contact_order' => 'ORD-PAD-100',
'contact_delivery_term' => 'DAP',
'contact_language' => 'en',
'delivery_name' => 'ABC Logistics Ltd',
'delivery_address1' => 'Industrial Street 15',
'delivery_address2' => 'Riga, LV-1234',
'delivery_address3' => 'Latvia',
'start_address1' => 'Warehouse A',
'start_address2' => 'Tallinn Port',
'start_address3' => 'Estonia',
'hash' => 'abc123def456',
'contact_country_code' => '+372',
'contact_phone_nr' => '5551234',
'product_name' => 'Electronic Components',
'project_nr' => 'PROJ-2025-10',
'receiver_email' => 'receiver@example.lt',
'receiver_name' => 'Tech Solutions UAB',
'directo_invoice' => '987654',
'driver_notes' => 'Call 1h before',
'own_transport' => true,
'weight' => 15000,
'amount' => 24.0,
'carrier' => 'Baltic Express',
'vehicle_type' => 'Curtainsider',
'order_number' => 'ORD-FI-2025-100',
'unloading_time' => 45,
'worder' => 'WO_2025_456',
'containerno' => 'MSCU1234567',
'do_send' => true,
'customer_id' => 1,
'carrier_id' => 2,
'trailer_nr' => 'TRL-789',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/tasks'
payload = {
"object_id": "ABC123",
"lat": 59.437,
"lon": 24.754,
"start_time": "2025-01-20 08:00:00",
"stop_time": "2025-01-20 17:00:00",
"start_lat": 59.395,
"start_lon": 24.662,
"start_address": "Tallinn, Estonia",
"task_address": "Tartu, Estonia",
"order_ref": "ORD-2025-001",
"order_details": "Delivery of goods",
"task_description": "Deliver package",
"task_notes": "Call before arrival",
"cancel_reason": "architecto",
"status": 1,
"planned_km": 150.5,
"is_not_own_vehicle": false,
"active": true,
"group_id": 1,
"products": [
{
"product_id": 1,
"quantity": 10.5,
"weight": 150
}
],
"preparation_time": "2025-01-20 07:30:00",
"volume": 8.5,
"client_id": "CLIENT123",
"ordered_volume": 10,
"delivered_volume": 8.2,
"pumped_volume": 8,
"dn_trash": "0.5",
"dn_plastic": "1.2",
"dn_water": "10.5",
"categoryID": 15,
"client_emails": [
"client@example.com"
],
"last_cargo": 0,
"geozone_entered_at": "2025-01-20 11:20:00",
"arrived_at": "2025-01-20 11:15:00",
"geozone_left_at": "2025-01-20 11:50:00",
"work_finished_at": "2025-01-20 11:45:00",
"concrete_type": "C30\/37",
"concrete_strength_class": "C30",
"environmental_class": "XC3",
"dmax": "16",
"consistency_class": "S3",
"cement_type": "CEM II\/A-LL 42,5N",
"additives": "Superplasticizer",
"concrete_extra_info": "High durability",
"concrete_extra_info2": "Special finish",
"unload_method": "Pump",
"driving_instructions": "Use back entrance",
"offer_number": "OFF-2025-123",
"work_order_number": "WO-2025-456",
"notes": "Handle with care",
"operator_name": "John Smith",
"pumper_name": "ABC Pumping Ltd",
"pump_type": "Stationary",
"factory_id": 5,
"client_address": "123 Construction Ave",
"other_object_id": "PUMP-01",
"contact_name": "John Doe",
"contact_email": "john@example.com",
"contact_sender": "SENDER123",
"contact_receiver": "ABC Logistics Ltd",
"contact_trailer": "TRL456",
"contact_order": "ORD-PAD-100",
"contact_delivery_term": "DAP",
"contact_language": "en",
"delivery_name": "ABC Logistics Ltd",
"delivery_address1": "Industrial Street 15",
"delivery_address2": "Riga, LV-1234",
"delivery_address3": "Latvia",
"start_address1": "Warehouse A",
"start_address2": "Tallinn Port",
"start_address3": "Estonia",
"hash": "abc123def456",
"contact_country_code": "+372",
"contact_phone_nr": "5551234",
"product_name": "Electronic Components",
"project_nr": "PROJ-2025-10",
"receiver_email": "receiver@example.lt",
"receiver_name": "Tech Solutions UAB",
"directo_invoice": "987654",
"driver_notes": "Call 1h before",
"own_transport": true,
"weight": 15000,
"amount": 24,
"carrier": "Baltic Express",
"vehicle_type": "Curtainsider",
"order_number": "ORD-FI-2025-100",
"unloading_time": 45,
"worder": "WO_2025_456",
"containerno": "MSCU1234567",
"do_send": true,
"customer_id": 1,
"carrier_id": 2,
"trailer_nr": "TRL-789"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201, Standard Task):
{
"id": 12346,
"oid": "metrotec",
"object_id": "ABC123",
"lat": 59.437,
"lon": 24.754,
"start_lat": null,
"start_lon": null,
"start_address": null,
"start_time": "2025-01-20 08:00:00",
"stop_time": "2025-01-20 17:00:00",
"order_ref": "ORDER-2025-001",
"order_details": null,
"task_address": "Tallinn, Estonia",
"task_description": "Standard delivery task",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 16:00:00",
"updated_at": "2025-01-19 16:00:00",
"sender": "DispatchSystem",
"tracking_nr": "abc123xyz789def456",
"task_notes": null,
"active": true,
"group_id": null,
"is_not_own_vehicle": false,
"products": [],
"files": [],
"signatures": []
}
Example response (201, Rudus Task):
{
"id": 12345,
"oid": "metrotec",
"object_id": "RUDUS-01",
"lat": 59.437,
"lon": 24.754,
"start_lat": 59.395,
"start_lon": 24.662,
"start_address": "Factory, Tallinn",
"start_time": "2025-01-20 08:00:00",
"stop_time": "2025-01-20 12:00:00",
"order_ref": "RUDUS-2025-001",
"order_details": "Client: Construction Site A",
"task_address": "Construction Site A, Tallinn",
"task_description": "Concrete delivery C30/37",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 15:30:00",
"updated_at": "2025-01-19 15:30:00",
"sender": "RudusAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Special delivery",
"active": true,
"group_id": 10,
"is_not_own_vehicle": false,
"preparation_time": "2025-01-20 07:30:00",
"volume": 8.5,
"client_id": "CLIENT123",
"ordered_volume": 10,
"delivered_volume": 8.2,
"pumped_volume": 8,
"dn_trash": "0.5",
"dn_plastic": "1.2",
"dn_water": "10.5",
"categoryID": 15,
"client_emails": [
"client@example.com",
"manager@example.com"
],
"last_cargo": 0,
"concrete_type": "C30/37",
"concrete_strength_class": "C30",
"environmental_class": "XC3",
"dmax": "16",
"consistency_class": "S3",
"cement_type": "CEM II/A-LL 42,5N",
"additives": "Superplasticizer",
"concrete_extra_info": "High durability",
"concrete_extra_info2": "Special finish required",
"unload_method": "Pump",
"driving_instructions": "Use back entrance",
"offer_number": "OFF-2025-123",
"work_order_number": "WO-2025-456",
"notes": "Handle with care",
"operator_name": "John Smith",
"pumper_name": "ABC Pumping Ltd",
"pump_type": "Stationary",
"factory_id": 5,
"client_address": "123 Construction Ave",
"other_object_id": "PUMP-01",
"products": [],
"files": [],
"signatures": []
}
Example response (201, Padapigi Task):
{
"id": 12347,
"oid": "metrotec",
"object_id": "TRUCK-05",
"lat": 59.437,
"lon": 24.754,
"start_lat": 59.395,
"start_lon": 24.662,
"start_address": "Warehouse A, Tallinn",
"start_time": "2025-01-20 06:00:00",
"stop_time": "2025-01-20 18:00:00",
"order_ref": "PAD-2025-100",
"order_details": "CMR delivery to Latvia",
"task_address": "Warehouse District, Tallinn",
"task_description": "International delivery to Latvia",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 14:00:00",
"updated_at": "2025-01-19 14:00:00",
"sender": "PadapigiAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "CMR documents prepared",
"active": false,
"group_id": 15,
"is_not_own_vehicle": false,
"contact_name": "John Doe",
"contact_email": "john.doe@example.com",
"contact_sender": "SENDER123",
"contact_receiver": "ABC Logistics Ltd",
"contact_trailer": "TRL456",
"contact_order": "ORD-PAD-100",
"contact_delivery_term": "DAP",
"contact_language": "en",
"delivery_name": "ABC Logistics Ltd",
"delivery_address1": "Industrial Street 15",
"delivery_address2": "Riga, LV-1234",
"delivery_address3": "Latvia",
"start_address1": "Warehouse A",
"start_address2": "Tallinn Port",
"start_address3": "Estonia",
"weight": 15000,
"amount": 24,
"hash": "abc123def456",
"products": [],
"files": [],
"signatures": []
}
Example response (201, Directo Task):
{
"id": 12348,
"oid": "metrotec",
"object_id": "INT-TRUCK-02",
"lat": 54.687,
"lon": 25.279,
"start_lat": 59.437,
"start_lon": 24.754,
"start_address": "Tallinn Logistics Center",
"start_time": "2025-01-20 05:00:00",
"stop_time": "2025-01-21 18:00:00",
"order_ref": "DIR-2025-055",
"order_details": "Electronics to Lithuania",
"task_address": "Vilnius, Lithuania",
"task_description": "Electronics transport to Lithuania",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 12:00:00",
"updated_at": "2025-01-19 12:00:00",
"sender": "DirectoAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Border documents ready",
"active": false,
"group_id": 20,
"is_not_own_vehicle": false,
"amount": 150,
"contact_name": "Maria Vasileva",
"contact_country_code": "+370",
"contact_phone_nr": "61234567",
"product_name": "Electronic Components",
"project_nr": "PROJ-2025-10",
"weight": 12000,
"carrier": "Baltic Express",
"receiver_email": "receiver@example.lt",
"receiver_name": "Tech Solutions UAB",
"directo_invoice": "987654",
"driver_notes": "Contact receiver 1 hour before arrival",
"own_transport": true,
"products": [],
"files": [],
"signatures": []
}
Example response (201, Esvika Task):
{
"id": 12349,
"oid": "metrotec",
"object_id": "ESV-TRUCK-08",
"lat": 60.169,
"lon": 24.938,
"start_lat": 59.437,
"start_lon": 24.754,
"start_address": "Tallinn Distribution Center",
"start_time": "2025-01-20 07:00:00",
"stop_time": "2025-01-20 16:00:00",
"order_ref": "ESV-2025-220",
"order_details": "Container to Helsinki Port",
"task_address": "Helsinki Port, Finland",
"task_description": "Container transport to Helsinki",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 13:30:00",
"updated_at": "2025-01-19 13:30:00",
"sender": "EsvikaAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Ferry booking confirmed",
"active": false,
"group_id": 25,
"is_not_own_vehicle": false,
"contact_name": "Pekka Virtanen",
"contact_country_code": "+358",
"contact_phone_nr": "401234567",
"amount": 1,
"weight": 22000,
"vehicle_type": "Curtainsider",
"carrier": "Nordic Transport Oy",
"order_number": "ORD-FI-2025-100",
"unloading_time": 45,
"products": [],
"files": [],
"signatures": []
}
Example response (201, Olaret Task):
{
"id": 12350,
"oid": "metrotec",
"object_id": "CONTAINER-TRUCK-03",
"lat": 59.437,
"lon": 24.754,
"start_lat": null,
"start_lon": null,
"start_address": null,
"start_time": "2025-01-20 09:00:00",
"stop_time": "2025-01-20 15:00:00",
"order_ref": "OLA-2025-456",
"order_details": "Container pickup",
"task_address": "Container Terminal, Port of Tallinn",
"task_description": "Container pickup and delivery",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 17:00:00",
"updated_at": "2025-01-19 17:00:00",
"sender": "OlaretAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Terminal gate code: 1234",
"active": true,
"group_id": null,
"is_not_own_vehicle": false,
"worder": "WO_2025_456",
"containerno": "MSCU1234567",
"do_send": true,
"products": [],
"files": [],
"signatures": []
}
Example response (201, LotusTimber Task):
{
"id": 12351,
"oid": "metrotec",
"object_id": "TIMBER-TRUCK-01",
"lat": 58.378,
"lon": 26.729,
"start_lat": 59.437,
"start_lon": 24.754,
"start_address": "Timber Yard, Tallinn",
"start_time": "2025-01-20 06:00:00",
"stop_time": "2025-01-20 14:00:00",
"order_ref": "LOTUS-2025-001",
"order_details": "Timber delivery to sawmill",
"customer_id": 1,
"carrier_id": 2,
"trailer_nr": "TRL-789",
"task_address": "Sawmill, Tartu",
"task_description": "Timber transport",
"cancel_reason": null,
"status": 1,
"created_at": "2025-01-19 15:00:00",
"updated_at": "2025-01-19 15:00:00",
"sender": "LotusTimberAPI",
"tracking_nr": "abc123xyz789def456",
"task_notes": "Handle with care",
"active": true,
"group_id": null,
"is_not_own_vehicle": false,
"products": [
{
"id": 1,
"name": "Pine Logs",
"pivot": {
"route_task_id": 12351,
"product_id": 1,
"quantity": "25.00",
"weight": "1500.00",
"created_at": "2025-01-19 15:00:00",
"updated_at": "2025-01-19 15:00:00"
}
},
{
"id": 2,
"name": "Spruce Logs",
"pivot": {
"route_task_id": 12351,
"product_id": 2,
"quantity": "15.00",
"weight": "900.00",
"created_at": "2025-01-19 15:00:00",
"updated_at": "2025-01-19 15:00:00"
}
}
],
"files": [],
"signatures": []
}
Example response (400, Validation Error):
{
"message": "Lat_Lon_Must_Be_Defined"
}
Example response (409, Duplicate Order Ref):
{
"message": "Duplicate order reference"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a specific task
Returns a single route task with files, signatures and products.
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/tasks/0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/tasks/0"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/tasks/0';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/tasks/0'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Example response (404, Task not found):
{
"message": "Not Found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a task
Updates an existing route task. All fields are optional on update. Additional fields depend on the user's profile type.
Status Changes:
- Setting status to 4 (rejected) will deactivate the task and remove group assignment
- Setting status to 3 (completed) or 7 (signed) triggers task-specific completion logic
Example request:
curl --request PUT \
"https://api2.metrotec.ee/api/tasks/0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"object_id\": \"ABC123\",
\"lat\": 59.437,
\"lon\": 24.754,
\"start_time\": \"2025-01-20 08:00:00\",
\"stop_time\": \"2025-01-20 17:00:00\",
\"start_lat\": 4326.41688,
\"start_lon\": 4326.41688,
\"start_address\": \"m\",
\"task_address\": \"i\",
\"order_ref\": \"y\",
\"order_details\": \"architecto\",
\"task_description\": \"architecto\",
\"task_notes\": \"architecto\",
\"cancel_reason\": \"Customer not available\",
\"status\": 2,
\"is_not_own_vehicle\": true,
\"active\": true,
\"group_id\": 16,
\"products\": [
{
\"product_id\": 1,
\"quantity\": 10.5,
\"weight\": 150
}
]
}"
const url = new URL(
"https://api2.metrotec.ee/api/tasks/0"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"object_id": "ABC123",
"lat": 59.437,
"lon": 24.754,
"start_time": "2025-01-20 08:00:00",
"stop_time": "2025-01-20 17:00:00",
"start_lat": 4326.41688,
"start_lon": 4326.41688,
"start_address": "m",
"task_address": "i",
"order_ref": "y",
"order_details": "architecto",
"task_description": "architecto",
"task_notes": "architecto",
"cancel_reason": "Customer not available",
"status": 2,
"is_not_own_vehicle": true,
"active": true,
"group_id": 16,
"products": [
{
"product_id": 1,
"quantity": 10.5,
"weight": 150
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/tasks/0';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'object_id' => 'ABC123',
'lat' => 59.437,
'lon' => 24.754,
'start_time' => '2025-01-20 08:00:00',
'stop_time' => '2025-01-20 17:00:00',
'start_lat' => 4326.41688,
'start_lon' => 4326.41688,
'start_address' => 'm',
'task_address' => 'i',
'order_ref' => 'y',
'order_details' => 'architecto',
'task_description' => 'architecto',
'task_notes' => 'architecto',
'cancel_reason' => 'Customer not available',
'status' => 2,
'is_not_own_vehicle' => true,
'active' => true,
'group_id' => 16,
'products' => [
[
'product_id' => 1,
'quantity' => 10.5,
'weight' => 150.0,
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/tasks/0'
payload = {
"object_id": "ABC123",
"lat": 59.437,
"lon": 24.754,
"start_time": "2025-01-20 08:00:00",
"stop_time": "2025-01-20 17:00:00",
"start_lat": 4326.41688,
"start_lon": 4326.41688,
"start_address": "m",
"task_address": "i",
"order_ref": "y",
"order_details": "architecto",
"task_description": "architecto",
"task_notes": "architecto",
"cancel_reason": "Customer not available",
"status": 2,
"is_not_own_vehicle": true,
"active": true,
"group_id": 16,
"products": [
{
"product_id": 1,
"quantity": 10.5,
"weight": 150
}
]
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (403, Forbidden):
{
"message": "Forbidden"
}
Example response (403, Invalid Period):
{
"message": "Invalid period"
}
Example response (409, Duplicate Order Ref):
{
"message": "Duplicate order reference"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a task
Deletes a route task and its associated extra data from the task-type-specific table.
Example request:
curl --request DELETE \
"https://api2.metrotec.ee/api/tasks/0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/tasks/0"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/tasks/0';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/tasks/0'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (204, Success):
Empty response
Example response (403, Forbidden):
{
"message": "Forbidden"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Ships
APIs for managing ships
Get all ships
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/ships?filter%5Barchived%5D=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/ships"
);
const params = {
"filter[archived]": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/ships';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[archived]' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/ships'
params = {
'filter[archived]': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
[
{
"id": 1,
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"captain_name": "Captain Jack",
"license_number": "LIC-2025-001",
"receiver": "Fish Processing Ltd",
"receiver_address": "Harbor Street 1, Tallinn",
"fish_destination": "Processing Plant A",
"active": true,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new ship
requires authentication
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/ships" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"ship_name\": \"Aurora\",
\"owner_name\": \"John Smith\",
\"board_number\": \"EST-1234\",
\"captain_name\": \"Captain Jack\",
\"email\": \"captain@ship.com, owner@ship.com\",
\"license_number\": \"LIC-2025-001\",
\"receiver_id\": 1,
\"fish_destination\": {
\"address\": \"Processing Plant A, Harbor 5\",
\"lat\": 59.437,
\"lon\": 24.753
},
\"active\": false
}"
const url = new URL(
"https://api2.metrotec.ee/api/ships"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"captain_name": "Captain Jack",
"email": "captain@ship.com, owner@ship.com",
"license_number": "LIC-2025-001",
"receiver_id": 1,
"fish_destination": {
"address": "Processing Plant A, Harbor 5",
"lat": 59.437,
"lon": 24.753
},
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/ships';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'ship_name' => 'Aurora',
'owner_name' => 'John Smith',
'board_number' => 'EST-1234',
'captain_name' => 'Captain Jack',
'email' => 'captain@ship.com, owner@ship.com',
'license_number' => 'LIC-2025-001',
'receiver_id' => 1,
'fish_destination' => [
'address' => 'Processing Plant A, Harbor 5',
'lat' => 59.437,
'lon' => 24.753,
],
'active' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/ships'
payload = {
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"captain_name": "Captain Jack",
"email": "captain@ship.com, owner@ship.com",
"license_number": "LIC-2025-001",
"receiver_id": 1,
"fish_destination": {
"address": "Processing Plant A, Harbor 5",
"lat": 59.437,
"lon": 24.753
},
"active": false
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"id": 1,
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"captain_name": "Captain Jack",
"license_number": "LIC-2025-001",
"receiver": "Fish Processing Ltd",
"receiver_address": "Harbor Street 1, Tallinn",
"fish_destination": "Processing Plant A",
"active": true,
"created_at": "2025-11-28T10:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a specific ship
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/ships/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/ships/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/ships/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/ships/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"id": 1,
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"captain_name": "Captain Jack",
"license_number": "LIC-2025-001",
"receiver": "Fish Processing Ltd",
"receiver_address": "Harbor Street 1, Tallinn",
"fish_destination": "Processing Plant A",
"active": true,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a ship
requires authentication
Example request:
curl --request PUT \
"https://api2.metrotec.ee/api/ships/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"ship_name\": \"Aurora\",
\"owner_name\": \"John Smith\",
\"board_number\": \"EST-1234\",
\"captain_name\": \"Captain Jack\",
\"email\": \"captain@ship.com, owner@ship.com\",
\"license_number\": \"LIC-2025-001\",
\"receiver_id\": 1,
\"fish_destination\": {
\"address\": \"Processing Plant A, Harbor 5\",
\"lat\": 59.437,
\"lon\": 24.753
},
\"active\": false
}"
const url = new URL(
"https://api2.metrotec.ee/api/ships/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"captain_name": "Captain Jack",
"email": "captain@ship.com, owner@ship.com",
"license_number": "LIC-2025-001",
"receiver_id": 1,
"fish_destination": {
"address": "Processing Plant A, Harbor 5",
"lat": 59.437,
"lon": 24.753
},
"active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/ships/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'ship_name' => 'Aurora',
'owner_name' => 'John Smith',
'board_number' => 'EST-1234',
'captain_name' => 'Captain Jack',
'email' => 'captain@ship.com, owner@ship.com',
'license_number' => 'LIC-2025-001',
'receiver_id' => 1,
'fish_destination' => [
'address' => 'Processing Plant A, Harbor 5',
'lat' => 59.437,
'lon' => 24.753,
],
'active' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/ships/1'
payload = {
"ship_name": "Aurora",
"owner_name": "John Smith",
"board_number": "EST-1234",
"captain_name": "Captain Jack",
"email": "captain@ship.com, owner@ship.com",
"license_number": "LIC-2025-001",
"receiver_id": 1,
"fish_destination": {
"address": "Processing Plant A, Harbor 5",
"lat": 59.437,
"lon": 24.753
},
"active": false
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (200):
{
"id": 1,
"ship_name": "Aurora Updated",
"owner_name": "John Smith",
"board_number": "EST-1234",
"captain_name": "Captain Jack",
"license_number": "LIC-2025-001",
"receiver": "Fish Processing Ltd",
"receiver_address": "Harbor Street 1, Tallinn",
"fish_destination": "Processing Plant A",
"active": true,
"created_at": "2025-01-01T00:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a ship
requires authentication
Example request:
curl --request DELETE \
"https://api2.metrotec.ee/api/ships/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/ships/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/ships/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/ships/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (204, success):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Task Groups
APIs for managing route task groups. Task groups organize multiple route tasks into a single delivery run or work session.
Get all task groups
requires authentication
Returns a list of active task groups for the authenticated user. Groups are filtered based on:
- Groups with group_date >= today
- Or groups with group_date < today that have at least one task with an active status
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/routetasksgroups" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/routetasksgroups"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/routetasksgroups';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/routetasksgroups'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
[
{
"id": 1,
"oid": "metrotec",
"name": "Morning Route",
"group_date": "2025-01-20T08:00:00.000000Z",
"object_id": "ABC123",
"other_object_id": null,
"work_started_at": null,
"should_return": true,
"active": true,
"driver_name": "John Doe",
"languages": "Estonian, English",
"driver_phone": "+372 5555 5555",
"trailer_number": "TRL-123",
"carrier_id": 1,
"status": null,
"created_at": "2025-01-19T10:00:00.000000Z",
"updated_at": "2025-01-19T10:00:00.000000Z",
"carrier": {
"id": 1,
"company_name": "ABC Logistics",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_phone_nr": "+372 5555 5555",
"company_country_code": "+372",
"company_email": "info@abc.com",
"company_address": "Warehouse St 1"
}
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new task group
requires authentication
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/routetasksgroups" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Morning Delivery Route\",
\"group_date\": \"2025-01-20 08:00:00\",
\"object_id\": \"ABC123\",
\"other_object_id\": \"XYZ789\",
\"work_started_at\": \"2025-01-20 08:15:00\",
\"should_return\": false,
\"active\": false,
\"driver_name\": \"John Doe\",
\"languages\": \"Estonian, English, Russian\",
\"driver_phone\": \"+372 5555 5555\",
\"trailer_number\": \"TRL-123\",
\"carrier_id\": 1
}"
const url = new URL(
"https://api2.metrotec.ee/api/routetasksgroups"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Morning Delivery Route",
"group_date": "2025-01-20 08:00:00",
"object_id": "ABC123",
"other_object_id": "XYZ789",
"work_started_at": "2025-01-20 08:15:00",
"should_return": false,
"active": false,
"driver_name": "John Doe",
"languages": "Estonian, English, Russian",
"driver_phone": "+372 5555 5555",
"trailer_number": "TRL-123",
"carrier_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/routetasksgroups';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Morning Delivery Route',
'group_date' => '2025-01-20 08:00:00',
'object_id' => 'ABC123',
'other_object_id' => 'XYZ789',
'work_started_at' => '2025-01-20 08:15:00',
'should_return' => false,
'active' => false,
'driver_name' => 'John Doe',
'languages' => 'Estonian, English, Russian',
'driver_phone' => '+372 5555 5555',
'trailer_number' => 'TRL-123',
'carrier_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/routetasksgroups'
payload = {
"name": "Morning Delivery Route",
"group_date": "2025-01-20 08:00:00",
"object_id": "ABC123",
"other_object_id": "XYZ789",
"work_started_at": "2025-01-20 08:15:00",
"should_return": false,
"active": false,
"driver_name": "John Doe",
"languages": "Estonian, English, Russian",
"driver_phone": "+372 5555 5555",
"trailer_number": "TRL-123",
"carrier_id": 1
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"id": 1,
"oid": "metrotec",
"name": "Morning Route",
"group_date": "2025-01-20T08:00:00.000000Z",
"object_id": "ABC123",
"other_object_id": null,
"work_started_at": null,
"should_return": true,
"active": true,
"driver_name": "John Doe",
"languages": "Estonian, English",
"driver_phone": "+372 5555 5555",
"trailer_number": "TRL-123",
"carrier_id": 1,
"status": null,
"created_at": "2025-01-19T10:00:00.000000Z",
"updated_at": "2025-01-19T10:00:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a specific task group
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/routetasksgroups/16" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/routetasksgroups/16"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/routetasksgroups/16';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/routetasksgroups/16'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"id": 1,
"oid": "metrotec",
"name": "Morning Route",
"group_date": "2025-01-20T08:00:00.000000Z",
"object_id": "ABC123",
"other_object_id": null,
"work_started_at": null,
"should_return": true,
"active": true,
"driver_name": "John Doe",
"languages": "Estonian, English",
"driver_phone": "+372 5555 5555",
"trailer_number": "TRL-123",
"carrier_id": 1,
"status": null,
"created_at": "2025-01-19T10:00:00.000000Z",
"updated_at": "2025-01-19T10:00:00.000000Z",
"carrier": {
"id": 1,
"company_name": "ABC Logistics",
"company_no": "12345678",
"company_vat_no": "EE123456789",
"company_phone_nr": "+372 5555 5555",
"company_country_code": "+372",
"company_email": "info@abc.com",
"company_address": "Warehouse St 1"
}
}
Example response (404, Not Found):
{
"message": "Not Found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a task group
requires authentication
Example request:
curl --request PUT \
"https://api2.metrotec.ee/api/routetasksgroups/16" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Morning Delivery Route\",
\"group_date\": \"2025-01-20 08:00:00\",
\"object_id\": \"ABC123\",
\"other_object_id\": \"XYZ789\",
\"work_started_at\": \"2025-01-20 08:15:00\",
\"should_return\": false,
\"active\": false,
\"driver_name\": \"John Doe\",
\"languages\": \"Estonian, English, Russian\",
\"driver_phone\": \"+372 5555 5555\",
\"trailer_number\": \"TRL-123\",
\"carrier_id\": 1
}"
const url = new URL(
"https://api2.metrotec.ee/api/routetasksgroups/16"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Morning Delivery Route",
"group_date": "2025-01-20 08:00:00",
"object_id": "ABC123",
"other_object_id": "XYZ789",
"work_started_at": "2025-01-20 08:15:00",
"should_return": false,
"active": false,
"driver_name": "John Doe",
"languages": "Estonian, English, Russian",
"driver_phone": "+372 5555 5555",
"trailer_number": "TRL-123",
"carrier_id": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/routetasksgroups/16';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Morning Delivery Route',
'group_date' => '2025-01-20 08:00:00',
'object_id' => 'ABC123',
'other_object_id' => 'XYZ789',
'work_started_at' => '2025-01-20 08:15:00',
'should_return' => false,
'active' => false,
'driver_name' => 'John Doe',
'languages' => 'Estonian, English, Russian',
'driver_phone' => '+372 5555 5555',
'trailer_number' => 'TRL-123',
'carrier_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/routetasksgroups/16'
payload = {
"name": "Morning Delivery Route",
"group_date": "2025-01-20 08:00:00",
"object_id": "ABC123",
"other_object_id": "XYZ789",
"work_started_at": "2025-01-20 08:15:00",
"should_return": false,
"active": false,
"driver_name": "John Doe",
"languages": "Estonian, English, Russian",
"driver_phone": "+372 5555 5555",
"trailer_number": "TRL-123",
"carrier_id": 1
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (200):
{
"id": 1,
"oid": "metrotec",
"name": "Updated Morning Route",
"group_date": "2025-01-20T08:00:00.000000Z",
"object_id": "ABC123",
"other_object_id": null,
"work_started_at": "2025-01-20T08:15:00.000000Z",
"should_return": true,
"active": true,
"driver_name": "John Doe",
"languages": "Estonian, English",
"driver_phone": "+372 5555 5555",
"trailer_number": "TRL-123",
"carrier_id": 1,
"status": null,
"created_at": "2025-01-19T10:00:00.000000Z",
"updated_at": "2025-01-20T08:15:00.000000Z"
}
Example response (403, Forbidden):
{
"message": "Forbidden"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a task group
requires authentication
Soft deletes a task group. The group will be marked as deleted but not permanently removed from the database.
Example request:
curl --request DELETE \
"https://api2.metrotec.ee/api/routetasksgroups/16" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/routetasksgroups/16"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/routetasksgroups/16';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/routetasksgroups/16'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (204, Success):
Empty response
Example response (403, Forbidden):
{
"message": "Forbidden"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Users
*
- APIs for managing users
Get an authenticated user
Returns the authenticated user's identifier and access level.
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/username" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/username"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/username';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/username'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"oid": "john_doe",
"access": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Auth logs
User authentication logs
Get authentication logs report
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/auth-logs?datetime[]=2025-01-01&datetime[]=2025-12-31&filter[oid]=metrotec&filter[user_agent]=Mozilla%2F5.0&filter[ip_address]=192.168.1.1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/auth-logs"
);
const params = {
"datetime[0]": "2025-01-01",
"datetime[1]": "2025-12-31",
"filter[oid]": "metrotec",
"filter[user_agent]": "Mozilla/5.0",
"filter[ip_address]": "192.168.1.1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/auth-logs';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'datetime[0]' => '2025-01-01',
'datetime[1]' => '2025-12-31',
'filter[oid]' => 'metrotec',
'filter[user_agent]' => 'Mozilla/5.0',
'filter[ip_address]' => '192.168.1.1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/auth-logs'
params = {
'datetime[0]': '2025-01-01',
'datetime[1]': '2025-12-31',
'filter[oid]': 'metrotec',
'filter[user_agent]': 'Mozilla/5.0',
'filter[ip_address]': '192.168.1.1',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"data": [
{
"id": 1,
"authenticatable_type": "App\\Models\\User",
"authenticatable_id": 123,
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0",
"login_at": "2025-11-28T10:00:00.000000Z",
"login_successful": true,
"logout_at": null,
"cleared_by_user": false,
"location": {
"city": "Tallinn",
"country": "Estonia"
}
}
],
"per_page": 15,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get User authentication logs
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/metrotec/auth-logs" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/metrotec/auth-logs"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/metrotec/auth-logs';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/metrotec/auth-logs'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"data": [
{
"id": 1,
"authenticatable_type": "App\\Models\\User",
"authenticatable_id": 123,
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0",
"login_at": "2025-11-28T10:00:00.000000Z",
"login_successful": true,
"logout_at": null,
"cleared_by_user": false,
"location": {
"city": "Tallinn",
"country": "Estonia"
}
}
],
"per_page": 30,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET xls/auth-logs
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/xls/auth-logs?datetime[]=2025-01-01&datetime[]=2025-12-31&filter[oid]=metrotec&filter[user_agent]=Mozilla%2F5.0&filter[ip_address]=192.168.1.1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/xls/auth-logs"
);
const params = {
"datetime[0]": "2025-01-01",
"datetime[1]": "2025-12-31",
"filter[oid]": "metrotec",
"filter[user_agent]": "Mozilla/5.0",
"filter[ip_address]": "192.168.1.1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/xls/auth-logs';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'datetime[0]' => '2025-01-01',
'datetime[1]' => '2025-12-31',
'filter[oid]' => 'metrotec',
'filter[user_agent]' => 'Mozilla/5.0',
'filter[ip_address]' => '192.168.1.1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/xls/auth-logs'
params = {
'datetime[0]': '2025-01-01',
'datetime[1]': '2025-12-31',
'filter[oid]': 'metrotec',
'filter[user_agent]': 'Mozilla/5.0',
'filter[ip_address]': '192.168.1.1',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IklBNStXT2Z5N0ZtWE9zR08yWnpiN0E9PSIsInZhbHVlIjoiOXNJUm1PRWl3WnRibnRHUzBDM1VJSVQwMGEwMS9lRkp6c25LSmZiQkVZb1pxZFZwb2Vxb2Qzdk52T3BEd24vaGFtZGtKa1lGQk00L3ExRk1sY0lFZ1N3MW83TVJOMDI4WFZpZkFydDlyUENnY0dMa0ZWcUI1OGNmZlJ1L0RlMmgiLCJtYWMiOiJlMGQ2NjEyMWU4NDU3N2NiYTFlMTA0NDgyMTBkYjlhYjI4NDU2MTlmZDg1MzAxOGNjMzIwMmNkNWIwNzBlNzVjIiwidGFnIjoiIn0%3D; expires=Mon, 13 Apr 2026 09:54:27 GMT; Max-Age=7200; path=/; secure; samesite=lax; metrotec_session=eyJpdiI6Im5Pd1lMbmMwQ21RRVpzTUUrdFpXMmc9PSIsInZhbHVlIjoiNm9oWEF2S0Ntc0t5aVhUTjdJRGtJTlVMRVpmQ1piZ0kxUnFRQ1JCWUhCUitVK20zanY3S3h6dElFWThLUVZRRFhFVkhCYjVlcXVXa2ZxN2RVbkJPMVJ5UXhOUjg3Uzg4MUozbEx6VUIxSHBJTlQzSUx1TldJa3R1bzhpaGJKRnoiLCJtYWMiOiJjOGYyY2YzZmNiMTc4NDZkZWUwNTZjNGZlMmE2MmQ2MTE5Zjg5MzBlYjA2YzBjNzcyOTA4ZmZkZWVjZTdkMmQ1IiwidGFnIjoiIn0%3D; expires=Mon, 13 Apr 2026 09:54:27 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User sessions
User session management
Get User's current active sessions
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/tokens" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/tokens"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/tokens';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/tokens'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
[
{
"id": 1,
"oid": "metrotec",
"name": "web",
"platform": "iOS",
"ip": "192.168.1.1",
"location": {
"country": "EE",
"city": "Tallinn"
},
"last_used_at": "2025-11-28T10:00:00.000000Z",
"created_at": "2025-11-28T08:00:00.000000Z",
"expires_at": "2025-12-28T10:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get sessions for all users owned by current user
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/architecto/tokens" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/architecto/tokens"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/architecto/tokens';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/architecto/tokens'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
[
{
"id": 1,
"oid": "metrotec",
"name": "API token",
"created_at": "2025-01-01T00:00:00.000000Z",
"expires_at": null,
"updated_at": "2025-11-28T10:00:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete the specific token
requires authentication
Example request:
curl --request DELETE \
"https://api2.metrotec.ee/api/metrotec/tokens/88" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/metrotec/tokens/88"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/metrotec/tokens/88';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/metrotec/tokens/88'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (204, success):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
API tokens
API tokens management
Get API tokens for all users owned by current user
requires authentication
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/api-tokens" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/api-tokens"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/api-tokens';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/api-tokens'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
[
{
"id": 1,
"oid": "metrotec",
"name": "API token",
"created_at": "2025-01-01T00:00:00.000000Z",
"expires_at": null,
"updated_at": "2025-11-28T10:00:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create an API token for given user
requires authentication
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/api-tokens" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"oid\": \"metrotec\",
\"token_name\": \"API token\",
\"expires_at\": \"2026-12-31\"
}"
const url = new URL(
"https://api2.metrotec.ee/api/api-tokens"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"oid": "metrotec",
"token_name": "API token",
"expires_at": "2026-12-31"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/api-tokens';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'oid' => 'metrotec',
'token_name' => 'API token',
'expires_at' => '2026-12-31',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/api-tokens'
payload = {
"oid": "metrotec",
"token_name": "API token",
"expires_at": "2026-12-31"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"id": 1,
"tokenable_type": "App\\Models\\User",
"tokenable_id": 123,
"name": "API token",
"abilities": [
"api"
],
"last_used_at": null,
"expires_at": "2026-12-31T00:00:00.000000Z",
"created_at": "2025-11-28T10:00:00.000000Z",
"updated_at": "2025-11-28T10:00:00.000000Z",
"plainTextToken": "1|abc123def456..."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete the specific API token
requires authentication
Example request:
curl --request DELETE \
"https://api2.metrotec.ee/api/api-tokens/88" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/api-tokens/88"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/api-tokens/88';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/api-tokens/88'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()Example response (204, success):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Vehicles
*
- APIs for managing vehicles
Objects
Object management
GET api/objects-query
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/objects-query" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"b\"
}"
const url = new URL(
"https://api2.metrotec.ee/api/objects-query"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "b"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/objects-query';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'q' => 'b',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/objects-query'
payload = {
"q": "b"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/objects
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/objects" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"object_id\": \"bngzmi\",
\"oid\": \"y\",
\"Serial_Nr\": \"vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip\",
\"GSM_NR\": \"ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz\",
\"Manufacture\": 16,
\"odometer\": 16,
\"T1max\": 16,
\"T2max\": 16,
\"odometer_day\": \"2026-04-13 07:54:27\",
\"description\": \"Eius et animi quos velit et.\",
\"tank_vol\": 4326.41688,
\"x_coord\": 4326.41688,
\"y_coord\": 4326.41688,
\"is_fixed_gps\": false
}"
const url = new URL(
"https://api2.metrotec.ee/api/objects"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"object_id": "bngzmi",
"oid": "y",
"Serial_Nr": "vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip",
"GSM_NR": "ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz",
"Manufacture": 16,
"odometer": 16,
"T1max": 16,
"T2max": 16,
"odometer_day": "2026-04-13 07:54:27",
"description": "Eius et animi quos velit et.",
"tank_vol": 4326.41688,
"x_coord": 4326.41688,
"y_coord": 4326.41688,
"is_fixed_gps": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/objects';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'object_id' => 'bngzmi',
'oid' => 'y',
'Serial_Nr' => 'vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip',
'GSM_NR' => 'ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz',
'Manufacture' => 16,
'odometer' => 16,
'T1max' => 16,
'T2max' => 16,
'odometer_day' => '2026-04-13 07:54:27',
'description' => 'Eius et animi quos velit et.',
'tank_vol' => 4326.41688,
'x_coord' => 4326.41688,
'y_coord' => 4326.41688,
'is_fixed_gps' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/objects'
payload = {
"object_id": "bngzmi",
"oid": "y",
"Serial_Nr": "vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip",
"GSM_NR": "ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz",
"Manufacture": 16,
"odometer": 16,
"T1max": 16,
"T2max": 16,
"odometer_day": "2026-04-13 07:54:27",
"description": "Eius et animi quos velit et.",
"tank_vol": 4326.41688,
"x_coord": 4326.41688,
"y_coord": 4326.41688,
"is_fixed_gps": false
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/objects/{id}
Example request:
curl --request PUT \
"https://api2.metrotec.ee/api/objects/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"object_id\": \"bngzmi\",
\"oid\": \"y\",
\"Serial_Nr\": \"vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip\",
\"GSM_NR\": \"ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz\",
\"Manufacture\": 16,
\"odometer\": 16,
\"T1max\": 16,
\"T2max\": 16,
\"odometer_day\": \"2026-04-13 07:54:27\",
\"description\": \"Eius et animi quos velit et.\",
\"tank_vol\": 4326.41688,
\"x_coord\": 4326.41688,
\"y_coord\": 4326.41688,
\"is_fixed_gps\": true
}"
const url = new URL(
"https://api2.metrotec.ee/api/objects/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"object_id": "bngzmi",
"oid": "y",
"Serial_Nr": "vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip",
"GSM_NR": "ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz",
"Manufacture": 16,
"odometer": 16,
"T1max": 16,
"T2max": 16,
"odometer_day": "2026-04-13 07:54:27",
"description": "Eius et animi quos velit et.",
"tank_vol": 4326.41688,
"x_coord": 4326.41688,
"y_coord": 4326.41688,
"is_fixed_gps": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/objects/architecto';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'object_id' => 'bngzmi',
'oid' => 'y',
'Serial_Nr' => 'vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip',
'GSM_NR' => 'ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz',
'Manufacture' => 16,
'odometer' => 16,
'T1max' => 16,
'T2max' => 16,
'odometer_day' => '2026-04-13 07:54:27',
'description' => 'Eius et animi quos velit et.',
'tank_vol' => 4326.41688,
'x_coord' => 4326.41688,
'y_coord' => 4326.41688,
'is_fixed_gps' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/objects/architecto'
payload = {
"object_id": "bngzmi",
"oid": "y",
"Serial_Nr": "vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip",
"GSM_NR": "ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz",
"Manufacture": 16,
"odometer": 16,
"T1max": 16,
"T2max": 16,
"odometer_day": "2026-04-13 07:54:27",
"description": "Eius et animi quos velit et.",
"tank_vol": 4326.41688,
"x_coord": 4326.41688,
"y_coord": 4326.41688,
"is_fixed_gps": true
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/lastdata
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/lastdata" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/lastdata"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/lastdata';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/lastdata'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/lastdata/{id}
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/lastdata/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/lastdata/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/lastdata/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/lastdata/architecto'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/rfid/{id}
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/rfid/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/rfid/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/rfid/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/rfid/architecto'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Devices
Device management
GET api/navilist/{id}
POST api/navireq
GET api/smslist/{id}
Example request:
curl --request GET \
--get "https://api2.metrotec.ee/api/smslist/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api2.metrotec.ee/api/smslist/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/smslist/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/smslist/architecto'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/smsreq
Example request:
curl --request POST \
"https://api2.metrotec.ee/api/smsreq" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"object_id\": \"bngzmi\",
\"content\": \"architecto\"
}"
const url = new URL(
"https://api2.metrotec.ee/api/smsreq"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"object_id": "bngzmi",
"content": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api2.metrotec.ee/api/smsreq';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'object_id' => 'bngzmi',
'content' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api2.metrotec.ee/api/smsreq'
payload = {
"object_id": "bngzmi",
"content": "architecto"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.