UETDS Pro API, taşımacılık operasyonlarınızı programatik olarak yönetmenizi sağlayan RESTful bir API'dir.
Tüm API endpoint'lerini Postman'de test etmek için collection'ı import edin.
UETDS-SaaS-v1.postman_collection.json dosyasını seçinapi_key değişkenini doldurunhttps://api.depiar.com/api/v1
Tüm request'ler application/json formatında gönderilmelidir.
Planınıza göre aylık quota limitiniz vardır. Limit aşıldığında 429 Too Many Requests hatası döner.
| Plan | Aylık Limit | Fiyat (Yıllık) |
|---|---|---|
Y-10 |
1,000 çağrı | 14,000 ₺ |
Y-25 |
2,500 çağrı | 28,000 ₺ |
Y-50 |
5,000 çağrı | 40,000 ₺ |
Y-100 |
10,000 çağrı | 56,000 ₺ |
Y-999 |
Sınırsız | 100,000 ₺ |
Her API response'unda aşağıdaki header'lar bulunur:
X-RateLimit-Limit: Aylık toplam limitX-RateLimit-Remaining: Kalan çağrı sayısıX-RateLimit-Reset: Limit sıfırlanma zamanı (Unix timestamp)# Retry logic örneği
max_retries=3
retry_delay=1
for i in $(seq 1 $max_retries); do
response=$(curl -s -w "\n%{http_code}" -X GET "https://api.depiar.com/api/v1/portal/me" \
-H "Authorization: Bearer sk_live_xxx")
http_code=$(echo "$response" | tail -n1)
if [ "$http_code" != "429" ]; then
echo "$response" | head -n-1
break
fi
if [ $i -lt $max_retries ]; then
sleep $((retry_delay * 2 ** (i - 1)))
fi
done
API'ye erişim için Bearer token kullanılır. Token'ı almak için:
POST /v1/auth/register ile hesap oluşturun (ilk API key döner)POST /v1/auth/token ile token alınAuthorization: Bearer {token} header'ı ekleyincurl -X POST https://api.depiar.com/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"client_id":"demo","client_secret":"sk_live_xxx"}'
# Token ile istek
curl -X GET https://api.depiar.com/api/v1/portal/me \
-H "Authorization: Bearer sk_live_xxx"
Yeni bir organizasyon ve owner kullanıcı oluşturur. Response'da ilk API key döner (tek sefer gösterilir).
{
"organization_name": "Acme Tasimacilik",
"tax_number": "1234567890",
"full_name": "Ali Veli",
"email": "dev@acme.com",
"password": "StrongPass123"
}
organization_name (required): Firma adıtax_number (required): Vergi numarası (10 haneli)full_name (required): Owner kullanıcının tam adıemail (required): Geçerli email adresipassword (required): Minimum 8 karakter{
"ok": true,
"organization_id": 1,
"api_key": "sk_live_xxxxxxxxxxxxxxxxxxxx",
"api_key_prefix": "sk_live_xxxx"
}
api_key sadece bir kez gösterilir. Güvenli bir yerde saklayın!
curl -X POST https://api.depiar.com/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"organization_name": "Acme Tasimacilik",
"tax_number": "1234567890",
"full_name": "Ali Veli",
"email": "dev@acme.com",
"password": "StrongPass123"
}'
const response = await fetch('https://api.depiar.com/api/v1/auth/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
organization_name: 'Acme Tasimacilik',
tax_number: '1234567890',
full_name: 'Ali Veli',
email: 'dev@acme.com',
password: 'StrongPass123'
})
});
const data = await response.json();
console.log('API Key:', data.api_key);
$ch = curl_init('https://api.depiar.com/api/v1/auth/register');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'organization_name' => 'Acme Tasimacilik',
'tax_number' => '1234567890',
'full_name' => 'Ali Veli',
'email' => 'dev@acme.com',
'password' => 'StrongPass123'
])
]);
$response = json_decode(curl_exec($ch), true);
echo 'API Key: ' . $response['api_key'];
curl_close($ch);
import requests
response = requests.post(
'https://api.depiar.com/api/v1/auth/register',
json={
'organization_name': 'Acme Tasimacilik',
'tax_number': '1234567890',
'full_name': 'Ali Veli',
'email': 'dev@acme.com',
'password': 'StrongPass123'
}
)
data = response.json()
print('API Key:', data['api_key'])
API key'inizi kullanarak Bearer token alın. Bu token'ı tüm authenticated request'lerde kullanın.
{
"client_id": "your-client-id",
"client_secret": "sk_live_xxxxxxxxx"
}
client_id (optional): Client identifier - şu an kullanılmıyor, boş bırakılabilirclient_secret (required): API key'iniz (sk_live_ ile başlar) - Step 1'den aldığınız değerAuthorization: Bearer sk_live_xxx
{
"access_token": "sk_live_xxxxxxxxx",
"token_type": "Bearer",
"expires_in": 86400,
"scope": "journeys:write submissions:read webhooks:write"
}
access_token değerini Authorization: Bearer {token} header'ında kullanın.
curl -X POST https://api.depiar.com/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{
"client_id": "your-client-id",
"client_secret": "sk_live_xxxxxxxxx"
}'
const response = await fetch('https://api.depiar.com/api/v1/auth/token', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
client_id: 'your-client-id',
client_secret: 'sk_live_xxxxxxxxx'
})
});
const data = await response.json();
const token = data.access_token;
$ch = curl_init('https://api.depiar.com/api/v1/auth/token');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'your-client-id',
'client_secret' => 'sk_live_xxxxxxxxx'
])
]);
$data = json_decode(curl_exec($ch), true);
$token = $data['access_token'];
curl_close($ch);
import requests
response = requests.post(
'https://api.depiar.com/api/v1/auth/token',
json={
'client_id': 'your-client-id',
'client_secret': 'sk_live_xxxxxxxxx'
}
)
data = response.json()
token = data['access_token']
Web portal için session-based login. API çağrıları için kullanılmaz.
{
"email": "dev@acme.com",
"password": "StrongPass123"
}
{
"ok": true,
"user": {
"user_id": 1,
"organization_id": 1,
"email": "dev@acme.com",
"full_name": "Ali Veli",
"role": "owner"
}
}
curl -X POST https://api.depiar.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "dev@acme.com",
"password": "StrongPass123"
}'
const response = await fetch('https://api.depiar.com/api/v1/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'dev@acme.com',
password: 'StrongPass123'
}),
credentials: 'include' // Session cookie için
});
const data = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/auth/login');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'email' => 'dev@acme.com',
'password' => 'StrongPass123'
]),
CURLOPT_COOKIEJAR => '/tmp/cookies.txt',
CURLOPT_COOKIEFILE => '/tmp/cookies.txt'
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
session = requests.Session()
response = session.post(
'https://api.depiar.com/api/v1/auth/login',
json={
'email': 'dev@acme.com',
'password': 'StrongPass123'
}
)
data = response.json()
Authenticated kullanıcının bilgilerini, organizasyon detaylarını ve aktif subscription'ı döner.
{
"user": {
"user_id": 1,
"organization_id": 1,
"email": "dev@acme.com",
"full_name": "Ali Veli",
"role": "owner"
},
"organization": {
"id": 1,
"name": "Acme Tasimacilik",
"tax_number": "1234567890",
"status": "trial",
"monthly_quota": 1000,
"ws_username": null
},
"subscription": {
"code": "starter",
"name": "Starter Plan",
"monthly_quota": 1000,
"price_try": 99.00,
"status": "active"
}
}
curl -X GET https://api.depiar.com/api/v1/portal/me \
-H "Authorization: Bearer sk_live_xxx"
const response = await fetch('https://api.depiar.com/api/v1/portal/me', {
headers: { 'Authorization': 'Bearer sk_live_xxx' }
});
const me = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/portal/me');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_xxx']
]);
$me = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.depiar.com/api/v1/portal/me',
headers={'Authorization': 'Bearer sk_live_xxx'}
)
me = response.json()
API key'lerinizi listele, yeni key oluştur veya mevcut key'i iptal et.
curl -X GET https://api.depiar.com/api/v1/portal/api-keys \
-H "Authorization: Bearer sk_live_xxx"
const response = await fetch('https://api.depiar.com/api/v1/portal/api-keys', {
headers: { 'Authorization': 'Bearer sk_live_xxx' }
});
const keys = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/portal/api-keys');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_xxx']
]);
$keys = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.depiar.com/api/v1/portal/api-keys',
headers={'Authorization': 'Bearer sk_live_xxx'}
)
keys = response.json()
curl -X POST https://api.depiar.com/api/v1/portal/api-keys \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "New Key",
"scopes": ["journeys:write", "submissions:read", "webhooks:write"]
}'
const response = await fetch('https://api.depiar.com/api/v1/portal/api-keys', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'New Key',
scopes: ['journeys:write', 'submissions:read', 'webhooks:write']
})
});
const result = await response.json();
console.log('API Key:', result.api_key);
$ch = curl_init('https://api.depiar.com/api/v1/portal/api-keys');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer sk_live_xxx',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'New Key',
'scopes' => ['journeys:write', 'submissions:read', 'webhooks:write']
])
]);
$result = json_decode(curl_exec($ch), true);
echo 'API Key: ' . $result['api_key'];
curl_close($ch);
import requests
response = requests.post(
'https://api.depiar.com/api/v1/portal/api-keys',
headers={
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
json={
'name': 'New Key',
'scopes': ['journeys:write', 'submissions:read', 'webhooks:write']
}
)
result = response.json()
print('API Key:', result['api_key'])
DELETE /api/v1/portal/api-keys/{id}
Authorization: Bearer {token}
Response:
{
"ok": true
}
journeys:write, journeys:read, submissions:read, webhooks:write, webhooks:read
Yeni sefer kaydı oluştur, mevcut seferleri listele veya seferi submit et.
{
"vehicle_id": "06ABC123",
"departure": {
"date": "2026-02-22",
"time": "10:00",
"district_id": "2051"
},
"arrival": {
"date": "2026-02-22",
"time": "14:00",
"district_id": "1130"
},
"tarifeli_context": {
"firma_id": 999999,
"unet_guzergah_kodu": 10001,
"kalkis_yer_id": 2051,
"varis_yer_id": 1130,
"seyahat_suresi_saat": 4
}
}
vehicle_id (required): Araç plaka numarasıdeparture.date (required): Kalkış tarihi (YYYY-MM-DD)departure.time (required): Kalkış saati (HH:MM)departure.district_id (required): Kalkış ilçe ID (UETDS)arrival.*: Varış bilgileri (departure ile aynı format)tarifeli_context (required): Tarifeli sefer context'iGET /api/v1/portal/journeys
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"vehicle_id": "06ABC123",
"status": "draft",
"created_at": "2026-02-22T10:00:00Z"
}
]
}
POST /api/v1/portal/journeys/{id}/submit
Authorization: Bearer {token}
Response (202 Accepted):
{
"submission_id": 1,
"status": "delivered"
}
GET /v1/portal/submissions ile takip edin.
Journey submit işlemlerinin durumunu takip edin.
{
"data": [
{
"id": 1,
"target_id": 1,
"target_type": "journey",
"state": "delivered",
"downstream_reference": "UETDS-REF-12345",
"error_message": null,
"created_at": "2026-02-22T10:05:00Z"
}
]
}
pending: İşlem bekliyordelivered: Başarıyla gönderildifailed: Hata oluştucurl -X GET https://api.depiar.com/api/v1/portal/submissions \
-H "Authorization: Bearer sk_live_xxx"
const response = await fetch('https://api.depiar.com/api/v1/portal/submissions', {
headers: { 'Authorization': 'Bearer sk_live_xxx' }
});
const submissions = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/portal/submissions');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_xxx']
]);
$submissions = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.depiar.com/api/v1/portal/submissions',
headers={'Authorization': 'Bearer sk_live_xxx'}
)
submissions = response.json()
Endpoint bazlı kullanım istatistiklerini ve aylık toplam çağrı sayısını görüntüleyin.
{
"monthly_total": 245,
"by_endpoint": [
{
"endpoint": "/v1/portal/journeys",
"total_calls": 120,
"error_calls": 2
},
{
"endpoint": "/v1/portal/submissions",
"total_calls": 100,
"error_calls": 0
}
]
}
curl -X GET https://api.depiar.com/api/v1/portal/usage \
-H "Authorization: Bearer sk_live_xxx"
const response = await fetch('https://api.depiar.com/api/v1/portal/usage', {
headers: { 'Authorization': 'Bearer sk_live_xxx' }
});
const usage = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/portal/usage');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_xxx']
]);
$usage = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.depiar.com/api/v1/portal/usage',
headers={'Authorization': 'Bearer sk_live_xxx'}
)
usage = response.json()
Webhook'lar, belirli event'ler gerçekleştiğinde sizin belirlediğiniz URL'lere HTTP POST request gönderir.
POST /api/v1/portal/webhooks
Authorization: Bearer {token}
{
"event_type": "submission.delivered",
"endpoint_url": "https://your-app.com/webhook",
"secret": "your-secret-key"
}
Event Types: submission.delivered, submission.failed, journey.created
Webhook'lar X-Webhook-Signature header'ı ile imzalanır. Doğrulama için:
// PHP örneği
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'];
$payload = file_get_contents('php://input');
$expected = hash_hmac('sha256', $payload, $your_secret);
if ($signature !== $expected) {
http_response_code(401);
exit;
}
GET /api/v1/portal/webhooks
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"event_type": "submission.delivered",
"endpoint_url": "https://your-app.com/webhook",
"active": 1,
"created_at": "2026-02-22T10:00:00Z"
}
]
}
GET /api/v1/portal/webhooks/events
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"event_type": "submission.delivered",
"delivery_status": "delivered",
"attempts": 1,
"created_at": "2026-02-22T10:05:00Z"
}
]
}
POST /api/v1/portal/webhooks/test-event
Authorization: Bearer {token}
Response:
{
"ok": true
}
Webhook signature'ınızı doğrulamak için secret, payload ve signature'ı girin.
Her event type için örnek payload'lar:
Araçlarınızı ekleyin, listele, güncelle veya silin.
{
"plate": "06ABC123",
"vehicle_type": "otobus",
"brand": "Mercedes",
"model": "Travego",
"model_year": 2022,
"capacity": 46,
"phone": "05551234567"
}
plate (required): Araç plaka numarasıvehicle_type (required): Araç tipi (otobus, minibus, midibus, sedan, van, kamyon, tir, dorse)brand (optional): Markamodel (optional): Modelmodel_year (optional): Model yılıcapacity (optional): Yolcu/kargo kapasitesiphone (optional): İletişim telefonu{
"id": 1,
"plate": "06ABC123",
"vehicle_type": "otobus",
"brand": "Mercedes",
"model": "Travego",
"model_year": 2022,
"capacity": 46,
"status": "active",
"created_at": "2026-02-22T10:00:00Z"
}
curl -X POST https://api.depiar.com/api/v1/portal/vehicles \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"plate": "06ABC123",
"vehicle_type": "otobus",
"brand": "Mercedes",
"model": "Travego",
"model_year": 2022,
"capacity": 46
}'
const response = await fetch('https://api.depiar.com/api/v1/portal/vehicles', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
plate: '06ABC123',
vehicle_type: 'otobus',
brand: 'Mercedes',
model: 'Travego',
model_year: 2022,
capacity: 46
})
});
const vehicle = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/portal/vehicles');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer sk_live_xxx',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'plate' => '06ABC123',
'vehicle_type' => 'otobus',
'brand' => 'Mercedes',
'model' => 'Travego',
'model_year' => 2022,
'capacity' => 46
])
]);
$vehicle = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.depiar.com/api/v1/portal/vehicles',
headers={
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
json={
'plate': '06ABC123',
'vehicle_type': 'otobus',
'brand': 'Mercedes',
'model': 'Travego',
'model_year': 2022,
'capacity': 46
}
)
vehicle = response.json()
GET /api/v1/portal/vehicles
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"plate": "06ABC123",
"vehicle_type": "otobus",
"status": "active"
}
]
}
PUT /api/v1/portal/vehicles/{id}
Authorization: Bearer {token}
{
"brand": "MAN",
"capacity": 50
}
DELETE /api/v1/portal/vehicles/{id}
Authorization: Bearer {token}
Response:
{
"ok": true
}
Şoför ve diğer personeli ekleyin, listele, güncelle veya silin.
{
"identity_number": "12345678901",
"first_name": "Mehmet",
"last_name": "Demir",
"gender": "E",
"nationality": "TC",
"role_type": "driver",
"phone": "05551234567",
"address": "İstanbul",
"hes_code": "ABC123DEF456"
}
identity_number (required): TC Kimlik No veya pasaport numarasıfirst_name (required): Adlast_name (required): Soyadgender (required): Cinsiyet (E/K)nationality (optional): Uyruk (TC, vb.)role_type (required): Rol (driver, host, guide, other)phone (optional): Telefonaddress (optional): Adreshes_code (optional): HES kodu{
"id": 1,
"identity_number": "12345678901",
"first_name": "Mehmet",
"last_name": "Demir",
"gender": "E",
"role_type": "driver",
"status": "active",
"created_at": "2026-02-22T10:00:00Z"
}
curl -X POST https://api.depiar.com/api/v1/portal/personnel \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"identity_number": "12345678901",
"first_name": "Mehmet",
"last_name": "Demir",
"gender": "E",
"role_type": "driver"
}'
const response = await fetch('https://api.depiar.com/api/v1/portal/personnel', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
identity_number: '12345678901',
first_name: 'Mehmet',
last_name: 'Demir',
gender: 'E',
role_type: 'driver'
})
});
const personnel = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/portal/personnel');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer sk_live_xxx',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'identity_number' => '12345678901',
'first_name' => 'Mehmet',
'last_name' => 'Demir',
'gender' => 'E',
'role_type' => 'driver'
])
]);
$personnel = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.depiar.com/api/v1/portal/personnel',
headers={
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
json={
'identity_number': '12345678901',
'first_name': 'Mehmet',
'last_name': 'Demir',
'gender': 'E',
'role_type': 'driver'
}
)
personnel = response.json()
GET /api/v1/portal/personnel
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"identity_number": "12345678901",
"first_name": "Mehmet",
"last_name": "Demir",
"role_type": "driver",
"status": "active"
}
]
}
PUT /api/v1/portal/personnel/{id}
Authorization: Bearer {token}
{
"phone": "05559876543",
"role_type": "host"
}
DELETE /api/v1/portal/personnel/{id}
Authorization: Bearer {token}
Response:
{
"ok": true
}
Eşya/Kargo taşımacılığı bildirimlerini oluşturun, yönetin ve UETDS'e submit edin.
{
"vehicle_id": 1,
"transport_type": 1,
"cargo_type": 999,
"transport_mode": 1,
"cargo_amount": 5000,
"cargo_unit": "KG",
"sender_tax_number": "1234567890",
"sender_name": "ABC Lojistik",
"receiver_tax_number": "9876543210",
"receiver_name": "XYZ Ticaret",
"loading_date": "2026-03-01",
"loading_time": "08:00",
"loading_city_id": 6,
"loading_district_id": 1001,
"unloading_date": "2026-03-02",
"unloading_time": "18:00",
"unloading_city_id": 34,
"unloading_district_id": 2001
}
vehicle_id (required): Araç IDtransport_type (required): Taşıma tipi (1=Karayolu, 2=Demiryolu, 3=Denizyolu, 4=Havayolu)cargo_type (required): Yük cinsi kodutransport_mode (required): Taşıma modu (1=Komple, 2=Parsiyel)cargo_amount (required): Miktarcargo_unit (required): Birim (KG, TON, ADET, M3, LITRE)sender_* (required): Gönderici bilgilerireceiver_* (required): Alıcı bilgileriloading_* (required): Yükleme bilgileriunloading_* (required): Boşaltma bilgileri{
"id": 1,
"vehicle_id": 1,
"status": "draft",
"created_at": "2026-02-22T10:00:00Z"
}
curl -X POST https://api.depiar.com/api/v1/portal/cargo \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"vehicle_id": 1,
"transport_type": 1,
"cargo_type": 999,
"cargo_amount": 5000,
"cargo_unit": "KG",
"sender_tax_number": "1234567890",
"sender_name": "ABC Lojistik",
"receiver_tax_number": "9876543210",
"receiver_name": "XYZ Ticaret",
"loading_date": "2026-03-01",
"loading_city_id": 6,
"unloading_date": "2026-03-02",
"unloading_city_id": 34
}'
const response = await fetch('https://api.depiar.com/api/v1/portal/cargo', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
vehicle_id: 1,
transport_type: 1,
cargo_type: 999,
cargo_amount: 5000,
cargo_unit: 'KG',
sender_tax_number: '1234567890',
sender_name: 'ABC Lojistik',
receiver_tax_number: '9876543210',
receiver_name: 'XYZ Ticaret',
loading_date: '2026-03-01',
loading_city_id: 6,
unloading_date: '2026-03-02',
unloading_city_id: 34
})
});
const cargo = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/portal/cargo');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer sk_live_xxx',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'vehicle_id' => 1,
'transport_type' => 1,
'cargo_type' => 999,
'cargo_amount' => 5000,
'cargo_unit' => 'KG',
'sender_tax_number' => '1234567890',
'sender_name' => 'ABC Lojistik',
'receiver_tax_number' => '9876543210',
'receiver_name' => 'XYZ Ticaret',
'loading_date' => '2026-03-01',
'loading_city_id' => 6,
'unloading_date' => '2026-03-02',
'unloading_city_id' => 34
])
]);
$cargo = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.depiar.com/api/v1/portal/cargo',
headers={
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
json={
'vehicle_id': 1,
'transport_type': 1,
'cargo_type': 999,
'cargo_amount': 5000,
'cargo_unit': 'KG',
'sender_tax_number': '1234567890',
'sender_name': 'ABC Lojistik',
'receiver_tax_number': '9876543210',
'receiver_name': 'XYZ Ticaret',
'loading_date': '2026-03-01',
'loading_city_id': 6,
'unloading_date': '2026-03-02',
'unloading_city_id': 34
}
)
cargo = response.json()
GET /api/v1/portal/cargo
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"vehicle_id": 1,
"status": "draft",
"created_at": "2026-02-22T10:00:00Z"
}
]
}
POST /api/v1/portal/cargo/{id}/submit
Authorization: Bearer {token}
Response (202 Accepted):
{
"submission_id": 1,
"status": "pending"
}
GET /v1/portal/submissions ile takip edin.
Sefer yolcularını ekleyin, listele, güncelle veya silin. Toplu ekleme/güncelleme de desteklenir.
{
"first_name": "Ahmet",
"last_name": "Yılmaz",
"identity_number": "12345678901",
"gender": "E",
"nationality": "TC",
"boarding_place_code": 2051,
"destination_place_code": 1130,
"ticket_serial_no": "ABC123",
"ticket_issue_date": "2026-02-22",
"amount": 150.00
}
first_name (required): Adlast_name (required): Soyadidentity_number (required): TC Kimlik Nogender (required): Cinsiyet (E/K)nationality (optional): Uyruk (TC, vb.)boarding_place_code (required): Biniş yeri kodu (UETDS)destination_place_code (required): İniş yeri kodu (UETDS)ticket_serial_no (optional): Bilet seri numarasıticket_issue_date (optional): Bilet tarihiamount (optional): Bilet ücreti{
"id": 1,
"journey_id": 123,
"first_name": "Ahmet",
"last_name": "Yılmaz",
"identity_number": "12345678901",
"created_at": "2026-02-22T10:00:00Z"
}
curl -X POST https://api.depiar.com/api/v1/portal/journeys/123/passengers \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Ahmet",
"last_name": "Yılmaz",
"identity_number": "12345678901",
"gender": "E",
"boarding_place_code": 2051,
"destination_place_code": 1130,
"amount": 150.00
}'
const response = await fetch('https://api.depiar.com/api/v1/portal/journeys/123/passengers', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: 'Ahmet',
last_name: 'Yılmaz',
identity_number: '12345678901',
gender: 'E',
boarding_place_code: 2051,
destination_place_code: 1130,
amount: 150.00
})
});
const passenger = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/portal/journeys/123/passengers');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer sk_live_xxx',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Ahmet',
'last_name' => 'Yılmaz',
'identity_number' => '12345678901',
'gender' => 'E',
'boarding_place_code' => 2051,
'destination_place_code' => 1130,
'amount' => 150.00
])
]);
$passenger = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
'https://api.depiar.com/api/v1/portal/journeys/123/passengers',
headers={
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json'
},
json={
'first_name': 'Ahmet',
'last_name': 'Yılmaz',
'identity_number': '12345678901',
'gender': 'E',
'boarding_place_code': 2051,
'destination_place_code': 1130,
'amount': 150.00
}
)
passenger = response.json()
POST /api/v1/portal/journeys/{id}/passengers:bulk-upsert
Authorization: Bearer {token}
{
"passengers": [
{
"first_name": "Ahmet",
"last_name": "Yılmaz",
"identity_number": "12345678901",
"gender": "E",
"amount": 150.00
},
{
"first_name": "Ayşe",
"last_name": "Kaya",
"identity_number": "98765432109",
"gender": "K",
"amount": 150.00
}
]
}
GET /api/v1/portal/journeys/{id}/passengers
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"first_name": "Ahmet",
"last_name": "Yılmaz",
"identity_number": "12345678901"
}
]
}
PUT /api/v1/portal/journeys/{id}/passengers/{passenger_id}
Authorization: Bearer {token}
{
"first_name": "Mehmet",
"amount": 200.00
}
DELETE /api/v1/portal/journeys/{id}/passengers/{passenger_id}
Authorization: Bearer {token}
Response:
{
"ok": true
}
UETDS için şehir ve ilçe referans verilerini listeleyin.
{
"data": [
{
"id": 6,
"name": "Ankara"
},
{
"id": 34,
"name": "İstanbul"
},
{
"id": 35,
"name": "İzmir"
}
]
}
curl -X GET https://api.depiar.com/api/v1/ref/cities \
-H "Authorization: Bearer sk_live_xxx"
const response = await fetch('https://api.depiar.com/api/v1/ref/cities', {
headers: {
'Authorization': 'Bearer sk_live_xxx'
}
});
const cities = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/ref/cities');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_xxx']
]);
$cities = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.depiar.com/api/v1/ref/cities',
headers={'Authorization': 'Bearer sk_live_xxx'}
)
cities = response.json()
{
"data": [
{
"id": 100,
"city_id": 6,
"name": "Altındağ"
},
{
"id": 101,
"city_id": 6,
"name": "Ayaş"
}
]
}
curl -X GET "https://api.depiar.com/api/v1/ref/districts?city_id=6" \
-H "Authorization: Bearer sk_live_xxx"
const response = await fetch('https://api.depiar.com/api/v1/ref/districts?city_id=6', {
headers: {
'Authorization': 'Bearer sk_live_xxx'
}
});
const districts = await response.json();
$ch = curl_init('https://api.depiar.com/api/v1/ref/districts?city_id=6');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_xxx']
]);
$districts = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.depiar.com/api/v1/ref/districts',
params={'city_id': 6},
headers={'Authorization': 'Bearer sk_live_xxx'}
)
districts = response.json()
GET /api/v1/portal/billing/plans
Response:
{
"data": [
{
"code": "starter",
"name": "Starter Plan",
"monthly_quota": 1000,
"price_try": 99.00,
"overage_unit_try": 0.10
}
]
}
GET /api/v1/portal/billing/subscription
Authorization: Bearer {token}
Response:
{
"code": "starter",
"name": "Starter Plan",
"monthly_quota": 1000,
"price_try": 99.00,
"status": "active"
}
POST /api/v1/portal/billing/subscription/change
Authorization: Bearer {token}
{
"plan_code": "growth"
}
Response:
{
"ok": true
}
GET /api/v1/portal/billing/invoices
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"period_start": "2026-01-01",
"period_end": "2026-01-31",
"total_amount": 99.00,
"status": "paid",
"created_at": "2026-02-01T00:00:00Z"
}
]
}
GET /api/v1/portal/support/tickets
Authorization: Bearer {token}
Response:
{
"data": [
{
"id": 1,
"subject": "API entegrasyon sorunu",
"priority": "normal",
"status": "open",
"created_at": "2026-02-22T10:00:00Z"
}
]
}
POST /api/v1/portal/support/tickets
Authorization: Bearer {token}
{
"subject": "API entegrasyon sorunu",
"body": "Journey submit işlemi çalışmıyor...",
"priority": "normal"
}
Response:
{
"id": 1,
"status": "open"
}
low, normal, high, urgent
| HTTP Status | Kod | Açıklama |
|---|---|---|
200 |
OK | İstek başarılı |
201 |
Created | Kayıt oluşturuldu |
400 |
Bad Request | Geçersiz request formatı |
401 |
Unauthorized | Authentication gerekli veya geçersiz token |
403 |
Forbidden | Yetki yetersiz |
404 |
Not Found | Endpoint veya kayıt bulunamadı |
422 |
Validation Error | Validasyon hatası (eksik/hatalı field) |
429 |
Too Many Requests | Rate limit aşıldı |
500 |
Internal Server Error | Sunucu hatası |
{
"error": "Validation failed",
"detail": "email field is required"
}
POST /v1/auth/register endpoint'ini çağırdığınızda response'da api_key field'ı döner. Bu key'i güvenli bir yerde saklayın, tekrar gösterilmez.
GET /v1/portal/submissions ile takip edebilirsiniz.
POST /v1/portal/webhooks/test-event endpoint'ini çağırabilirsiniz.