Kargo Lab API Dokümantasyonu

Kargo entegrasyonu için REST API referansı

Güncellenme: 2026-11-17 17:04 +0300 Sürüm: 83c8c532 İletişim: info@kargolab.com

Kargo Lab-User - Professional API Collection

Usage:

  • Set collection variables before running requests.
  • Authenticate with sign-in endpoints to populate automatically.
  • Use Lang and system_number headers with collection variables for consistency.

Koleksiyon Değişkenleri

Aşağıdaki değişkenler örneklerde {{key}} olarak görünür. Postman'de çalıştırırken kendi değerlerini gir.

KeyDeğer / ÖrnekAçıklama
kargolab_languageTRtr | en (varsayılan: tr)
kargolab_member_idSign-in cevabındaki user.member.id
kargolab_system_numberHesabınıza atanan sistem numarası
kargolab_tokenSign-in çağrısından dönen access_token
kargolab_urlhttps://kargolab.com/api/v1API base URL
kargolab_user_idSign-in cevabındaki user.id
trendyol_api_key
trendyol_secret_key
trendyol_supplier_id
trendyol_urlhttps://api.trendyol.com/sapigwAPI base URL
kargolab_admin_urlhttps://kargolab.com/api/v1/adminAPI base URL

Auth

POST

sign-in

https://kargolab.com/api/v1/sign-in

Bot koruması

Bu endpoint web formundan çağrıldığında çok katmanlı bot korumasından geçer: honeypot (gizli company_website alanı — boş kalmalı), imzalı zaman-tuzağı token (form_token, sunucu tarafından üretilir) ve Cloudflare Turnstile (turnstile_token).

Mobil uygulama / API entegrasyonu için önemli: Bu istemciler form_token göndermez. Bu durumda honeypot / token / CAPTCHA kontrolleri otomatik atlanır (istek kırılmaz); yalnızca IP tabanlı rate-limit uygulanır. Yani programatik kullanımda form_token / turnstile_token göndermenize gerek yoktur.

  • 412 — form_token geçersiz/eksik (yalnız web formu; sayfayı yenileyin)
  • 403 — Turnstile / güvenlik doğrulaması başarısız
  • 429 — Aynı IP'den çok fazla deneme (rate-limit)

POST /sign-in Auth: No Auth

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "email": "ornek@ornek.com",
  "password": "********"
}
403Adaptive CAPTCHA gerekli
{
  "status": 403,
  "captcha_required": true,
  "message": "Güvenlik doğrulaması gerekiyor. Lütfen doğrulamayı tamamlayıp tekrar deneyin."
}
429Çok fazla başarısız giriş
{
  "status": 429,
  "message": "Çok fazla deneme yapıldı. Lütfen bir süre bekleyip tekrar deneyin."
}
POST

refresh-token

https://kargolab.com/api/v1/refresh-token

POST /refresh-token Auth: No Auth

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
200refresh-token
{
  "status": 200,
  "user": {
    "id": 67,
    "name": "Örnek",
    "surname": "Kullanıcı",
    "email": "ornek@ornek.com",
    "phone": "05000000000",
    "phone2": null,
    "birth_date": "2024-01-11",
    "identity_number": "11111111111",
    "lang": "tr",
    "phone_verified": 1,
    "phone_verification_code": "000000",
    "phone_verification_date": "2023-12-21 14:39:08",
    "email_verified_at": null,
    "status": 1,
    "iyzico_card_user_key": null,
    "photo": null,
    "banner": null,
    "member": {
      "id": 30,
      "system_number": 56487567,
      "member_type": 2,
      "credit": "0.00",
      "company_type": 2,
      "invoice_to": null,
      "member_name": "ÖRNEK FİRMA",
      "nationality": "TR",
      "identity_number": "11111111111",
      "identity_verified": 1,
      "has_bill_address": 1,
      "documents_uploaded": 1,
      "tax_number": "1111111111",
      "tax_office": "Örnek VD.",
      "tax_office_code": "000000",
      "tax_number_verified": 1,
      "auto_pay_price_difference": 1,
      "profit": "0.00",
      "profit_percentage": 1,
      "special_list": 0,
      "master_list_number": 1001,
      "web": "global.net",
      "iban": "TR000000000000000000000000",
      "ptt_mail_check_number": 0,
      "ptt_mail_check_name": "ÖRNEK FİRMA",
      "member_has_sub_members": 1,
      "related_member_id": null,
      "status": 3,
      "created_at": "2023-12-17 04:22:12"
    },
    "bill": "",
    "role": {
      "id": 1,
      "name": "MEM",
      "display_name": "Member"
    }
  },
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvcm5layI6dHJ1ZX0.ORNEK_IMZA",
  "expire_time": 1723625123,
  "expire_time_string": "2024-08-14 11:45:23",
  "message": "Success"
}
POST

verify-token

https://kargolab.com/api/v1/verify-token

POST /verify-token Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
200verify-token
{
  "status": 200,
  "exp": 1723625029,
  "expire_time": "14/08/2024 11:43:49",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvcm5layI6dHJ1ZX0.ORNEK_IMZA",
  "data": {
    "id": 67,
    "name": "Örnek",
    "surname": "Kullanıcı",
    "email": "ornek@ornek.com",
    "member_id": 30,
    "system_number": 56487567,
    "member_name": "ÖRNEK FİRMA",
    "member_type": 2,
    "role": "MEM",
    "user_status": 1,
    "member_status": 3,
    "lang": "tr",
    "photo": null
  },
  "message": "Success"
}
POST

forget-password-by-email

https://kargolab.com/api/v1/forget-password

POST /forget-password Auth: No Auth


⚠️ Doğrulama kodu yanıtta DÖNMEZ

6 haneli doğrulama kodu yalnızca kullanıcının e-postasına ve/veya SMS ile gider. Bu endpoint kimlik doğrulaması istemediği için kodu yanıtta döndürmek, bir e-posta adresini bilen herkesin o hesabı ele geçirmesi anlamına gelirdi. Aynı sebeple hazır reset-password linki de dönmez.

Akış üç adımdır:

  1. POST /forget-password → yanıtta data.token gelir. Bu token'ı saklayın.
  2. Kullanıcı mail/SMS'ten aldığı 6 haneli kodu girer → POST /verify-reset-code {token, code} ile sunucuya doğrulatın. İstemci tarafında karşılaştırma yapmayın; karşılaştıracak bir değer yoktur.
  3. POST /reset-password {token, code, password, confirm_password}.

data.email ve data.phone alanları maskeli döner (t***@email.com, 0532 *** ** 27); kullanıcıya "kodu nereye gönderdik" bilgisini göstermek içindir, olduğu gibi ekrana basabilirsiniz.

Hız sınırı: aynı e-posta/telefon için 15 dakikada 5, aynı IP için 15 dakikada 10 istek. Aşılırsa 429 döner.

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
system_number
Acceptapplication/json
Content-Typeapplication/json
{
  "email": "ornek@ornek.com"
}
200forget-password email
{
  "status": 200,
  "message": "Parola Yenileme İsteğiniz Başarılı.",
  "data": {
    "token": "ORNEK-TOKEN-0000000000",
    "email": "t***@email.com",
    "phone": "0000 *** ** 00",
    "sms_sent": true,
    "email_sent": true
  }
}
POST

forget-password-by-phone

https://kargolab.com/api/v1/forget-password

POST /forget-password Auth: No Auth


⚠️ Doğrulama kodu yanıtta DÖNMEZ

6 haneli doğrulama kodu yalnızca kullanıcının e-postasına ve/veya SMS ile gider. Bu endpoint kimlik doğrulaması istemediği için kodu yanıtta döndürmek, bir e-posta adresini bilen herkesin o hesabı ele geçirmesi anlamına gelirdi. Aynı sebeple hazır reset-password linki de dönmez.

Akış üç adımdır:

  1. POST /forget-password → yanıtta data.token gelir. Bu token'ı saklayın.
  2. Kullanıcı mail/SMS'ten aldığı 6 haneli kodu girer → POST /verify-reset-code {token, code} ile sunucuya doğrulatın. İstemci tarafında karşılaştırma yapmayın; karşılaştıracak bir değer yoktur.
  3. POST /reset-password {token, code, password, confirm_password}.

data.email ve data.phone alanları maskeli döner (t***@email.com, 0532 *** ** 27); kullanıcıya "kodu nereye gönderdik" bilgisini göstermek içindir, olduğu gibi ekrana basabilirsiniz.

Hız sınırı: aynı e-posta/telefon için 15 dakikada 5, aynı IP için 15 dakikada 10 istek. Aşılırsa 429 döner.

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "phone": "05000000000"
}
200forget-password phone
{
  "status": 200,
  "message": "Parola Yenileme İsteğiniz Başarılı.",
  "data": {
    "token": "ORNEK-TOKEN-0000000000",
    "email": "t***@email.com",
    "phone": "0000 *** ** 00",
    "sms_sent": true,
    "email_sent": true
  }
}
POST

verify-reset-code

https://kargolab.com/api/v1/verify-reset-code

POST /verify-reset-code Auth: No Auth

forget-password sonrası kullanıcının girdiği 6 haneli kodu sunucuda doğrular. Doğrulama kodu API yanıtında dönmediği için bu adım zorunludur.

Alan Tip Açıklama
token string forget-password yanıtındaki data.token
code string Kullanıcının mail/SMS'ten girdiği 6 haneli kod

Yanıtlar

Kod Anlam
200 Kod doğru — kullanıcıyı parola belirleme ekranına geçirin
401 Kod hatalı veya sıfırlama isteğinin süresi dolmuş (30 dk)
429 Aynı token için çok fazla hatalı deneme (15 dakikada 6)
400 token veya code eksik

Bu çağrı parolayı değiştirmez ve token'ı tüketmez; sadece kodu doğrular. Parola değişikliği için ardından reset-password çağrılır.

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
system_number
Acceptapplication/json
Content-Typeapplication/json
{
  "token": "ORNEK-TOKEN-0000000000",
  "code": "292474"
}
200verify-reset-code başarılı
{
  "status": 200,
  "message": "Doğrulama kodu onaylandı"
}
401verify-reset-code hatalı kod
{
  "status": 401,
  "message": "Doğrulama kodu hatalı veya süresi dolmuş. Lütfen tekrar deneyin."
}
429verify-reset-code çok fazla deneme
{
  "status": 429,
  "message": "Çok fazla hatalı kod denemesi yapıldı. Lütfen bir süre bekleyip tekrar deneyin."
}
POST

reset-password

https://kargolab.com/api/v1/reset-password

POST /reset-password Auth: No Auth


Kurallar

  • Sıfırlama isteği 30 dakika geçerlidir. Süresi geçmiş token/code çifti 401 döner.
  • token ve code birlikte ve tam olarak eşleşmelidir; joker/kısmi eşleşme yoktur.
  • Yeni parola en az 6 karakter olmalıdır, aksi halde 401 döner.
  • password ile confirm_password birebir aynı olmalıdır.
  • Başarılı sıfırlamadan sonra token tüketilir ve tekrar kullanılamaz.
  • Aynı token için 15 dakikada 6'dan fazla hatalı deneme 429 döndürür.

Bu endpoint'ten önce verify-reset-code ile kodu doğrulamanız önerilir; böylece kullanıcı parolayı yazmadan önce hatalı kod uyarısını alır.

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
system_number
Acceptapplication/json
Content-Typeapplication/json
{
  "code": 292474,
  "token": "ORNEK-TOKEN-0000000000",
  "password": "********",
  "confirm_password": "test123456"
}
200reset-password
{
  "status": 200,
  "message": "Parolanız Güncellendi"
}
401reset-password hatalı/süresi dolmuş
{
  "status": 401,
  "message": "Girilen bilgilere ait bir yenileme isteği bulunamadı.Farklı bir talepte bulunduysanız o isteğe ait bilgilerle giriş yapınız"
}
401reset-password kısa parola
{
  "status": 401,
  "message": "Parolanız en az 6 karakter olmalıdır."
}

PriceCheck

POST

member-price-check

https://kargolab.com/api/v1/member-price-check

Kargonuzun fiyatını almak için kullanmanız gereken endpointtir.
İstek sonucunda fiyatlar 'data' içinde dizin olarak döner. İstek içinde 'request_code' olarak gelen parametreyi kargo oluşturulurken kullanılacak olan 'shipment-create' endpoint'inde body içine 'price_request_code' olarak eklerseniz ilgili kargo için önceden alınmış fiyatı kargonuzla eşleştirmiş olursunuz. Eklenmez ise otomatik fiyat verilecektir.

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "origin": "TR",
  "destination": "TR",
  "addresses": {
    "sender": {
      "contact_name": "Örnek Kişi",
      "company_name": "VGC",
      "address1": "Örnek Mah. Örnek Sk. No: 1",
      "address2": "Daire 1",
      "zipcode": "34680",
      "town": "Çengelköy",
      "city": "Üsküdar",
      "state": "İstanbul",
      "country": "TR",
      "email": "ornek@ornek.com",
      "phone": "05000000000"
    },
    "receiver": {
      "contact_name": "Örnek Kişi",
      "company_name": "VGC",
      "address1": "Örnek Mah. Örnek Sk. No: 1",
      "address2": "Daire 1",
      "zipcode": "34680",
      "town": "Çengelköy",
      "city": "Üsküdar",
      "state": "İstanbul",
      "country": "TR",
      "email": "ornek@ornek.com",
      "phone": "05000000000"
    }
  },
  "cw": 0.5,
  "packaging_type": 4,
  "master_list_number": 1001
}
200member-price-check
{
  "status": 200,
  "request_code": "23246580965104066c455e774eff730782",
  "data": [
    {
      "courrier_id": 456,
      "courrier_name": "SÜRAT",
      "service_type": "P",
      "insurance": 0,
      "ddp": 0,
      "ioss": 0,
      "accept_door_payments": 1,
      "logo": "surat.svg",
      "return_cost": "4.20",
      "price": "8.40",
      "currency": "EUR",
      "prices": {
        "TRY": "277.81",
        "USD": "9.08",
        "GBP": "7.21"
      }
    },
    {
      "courrier_id": 455,
      "courrier_name": "PTT",
      "service_type": "P",
      "insurance": 1,
      "ddp": 0,
      "ioss": 0,
      "accept_door_payments": 1,
      "logo": "ptt.svg",
      "return_cost": "2.94",
      "price": "8.40",
      "currency": "TRY",
      "prices": {
        "EUR": "0.26",
        "USD": "0.27",
        "GBP": "0.22"
      }
    }
  ],
  "rates": {
    "status": 200,
    "message": "Success",
    "data": {
      "USD": {
        "currency": "USD",
        "buy": "30.5791",
        "sell": "30.7016"
      },
      "EUR": {
        "currency": "EUR",
        "buy": "32.9403",
        "sell": "33.0723"
      },
      "GBP": {
        "currency": "GBP",
        "buy": "38.5119",
        "sell": "38.7979"
      },
      "TRY": {
        "currency": "TRY",
        "buy": "1.0000",
        "sell": "1.0000"
      }
    },
    "total_count": 4,
    "system_currency": "TRY"
  },
  "message": "Success"
}
POST

price-check-with-dimensions

https://kargolab.com/api/v1/member-price-check

POST /member-price-check Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "origin": "TR",
  "destination": "TR",
  "addresses": {
    "sender": {
      "contact_name": "Örnek Kişi",
      "company_name": "VGC",
      "address1": "Örnek Mah. Örnek Sk. No: 1",
      "address2": "Daire 1",
      "zipcode": "34680",
      "town": "Çengelköy",
      "city": "Üsküdar",
      "state": "İstanbul",
      "country": "TR",
      "email": "ornek@ornek.com",
      "phone": "05000000000"
    },
    "receiver": {
      "contact_name": "Örnek Kişi",
      "company_name": "VGC",
      "address1": "Örnek Mah. Örnek Sk. No: 1",
      "address2": "Daire 1",
      "zipcode": "34680",
      "town": "Çengelköy",
      "city": "Üsküdar",
      "state": "İstanbul",
      "country": "TR",
      "email": "ornek@ornek.com",
      "phone": "05000000000"
    }
  },
  "dimensions": [
    {
      "width": "10",
      "length": "15",
      "height": "5",
      "quantity": "2",
      "gw": "15"
    },
    {
      "width": "6",
      "length": "6",
      "height": "4",
      "quantity": "1",
      "gw": "0.7"
    }
  ],
  "insurance_value": 24,
  "insurance_currency": "EUR",
  "packaging_type": 4
}
200price-check-with-dimensions
GET

currency-rates

https://kargolab.com/api/v1/currency-rates

GET /currency-rates Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "system_number": "56487567"
}
200currency-rates
{
  "status": 200,
  "message": "Success",
  "data": {
    "USD": {
      "currency": "USD",
      "buy": "30.5791",
      "sell": "30.7016"
    },
    "EUR": {
      "currency": "EUR",
      "buy": "32.9403",
      "sell": "33.0723"
    },
    "GBP": {
      "currency": "GBP",
      "buy": "38.5119",
      "sell": "38.7979"
    },
    "TRY": {
      "currency": "TRY",
      "buy": "1.0000",
      "sell": "1.0000"
    }
  },
  "total_count": 4,
  "system_currency": "TRY"
}

Addresses

POST

address

https://kargolab.com/api/v1/address

POST /address Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "address_type": 4,
  "is_default": 1,
  "contact_name": "Örnek Kişi",
  "company_name": "VGC",
  "address1": "Örnek Mah. Örnek Sk. No: 1",
  "address2": "Daire 1",
  "zipcode": "34680",
  "town": "Çengelköy",
  "city": "Üsküdar",
  "state": "İstanbul",
  "state_code": "34",
  "country": "TR",
  "email": "ornek@ornek.com",
  "phone": "05000000000"
}
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "POST",
    "path": "/address"
  },
  "data": {
    "address_type": 4,
    "is_default": 1,
    "contact_name": "Örnek Kişi",
    "company_name": "VGC",
    "address1": "Örnek Mah. Örnek Sk. No: 1",
    "address2": "Daire 1",
    "zipcode": "34680",
    "town": "Çengelköy",
    "city": "Üsküdar",
    "state": "İstanbul",
    "state_code": "34",
    "country": "TR",
    "email": "ornek@ornek.com",
    "phone": "05000000000"
  }
}
POST

address-get

https://kargolab.com/api/v1/address-get

POST /address-get Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 1,
    "limit": 10,
    "order_by": "id",
    "asc_desc": "asc"
  },
  "param": {
    "sql": "`address_type`=2 AND `default`=1"
  }
}
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "POST",
    "path": "/address-get"
  },
  "data": {
    "pagination": {
      "page": 1,
      "limit": 10,
      "order_by": "id",
      "asc_desc": "asc"
    },
    "param": {
      "sql": "`address_type`=2 AND `default`=1"
    }
  }
}
PUT

address-mark

https://kargolab.com/api/v1/address-mark

PUT /address-mark Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "id": 114,
  "proccess": "active"
}
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "PUT",
    "path": "/address-mark"
  },
  "data": {
    "id": 114,
    "proccess": "active"
  }
}
PUT

address-description-update

https://kargolab.com/api/v1/address-description-update

PUT /address-description-update Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "id": 49,
  "address_description": "Ev Adresim"
}
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "PUT",
    "path": "/address-description-update"
  },
  "data": {
    "id": 49,
    "address_description": "Ev Adresim"
  }
}
POST

zipcode-check

https://kargolab.com/api/v1/zipcode-check

POST /zipcode-check Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "country": "TR",
  "zipcode": "34676"
}
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "POST",
    "path": "/zipcode-check"
  },
  "data": {
    "country": "TR",
    "zipcode": "34676"
  }
}
POST

state-check

https://kargolab.com/api/v1/state-check

POST /state-check Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "country": "TR",
  "state": "ARTVİN",
  "city": "ARTVİN"
}
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "POST",
    "path": "/state-check"
  },
  "data": {
    "country": "TR",
    "state": "ARTVİN",
    "city": "ARTVİN"
  }
}
POST

state-code-check

https://kargolab.com/api/v1/state-code-check

POST /state-code-check Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "country": "TR",
  "state_code": "34"
}
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "POST",
    "path": "/state-code-check"
  },
  "data": {
    "country": "TR",
    "state_code": "34"
  }
}

Shipments

GET

track

https://kargolab.com/api/v1/track/KLB5223999614

Bir kargonun güncel durumu ve hareket geçmişi. Path'in sonundaki KLB5223999614 hem kendi sisteminizdeki tracking_number hem de kuryenin barkod numarası ile çağrılabilir — ikisi arasındaki eşlemeyi sistem otomatik kurar.

Endpoint cache + circuit breaker arkasında çalışır: aynı barkoda 60 saniye içinde tekrar istek atarsanız önbellekten döner, kurye API'sine çıkmaz. Yanıt PTT, Aras, Sürat, Yurtiçi, MNG, UPS, Kargoist gibi desteklenen tüm kuryeler için aynı zarfta gelir; sadece data alanının iç şeması kuryeye göre değişir.

Önemli alanlar

  • status — HTTP status değil, uygulama-seviyesi durum kodu (200 başarılı, 203 kurye API'si yanıt verdi ama veri yok, 404 barkod sistemde bulunamadı veya tenant'a ait değil). Kargonun durumu değildir — onun için aşağıdaki shipment_status'ü kullanın.
  • shipment_status — kargonun bizdeki kanonik durumu (integer: 5=Teslim Edildi, 9=Göndericiye Teslim/İade, 8=İade Dönüyor, …). Durum kararlarını her zaman bu alana göre verin. Tam liste için aşağıdaki "Kargo durum kodları" tablosuna bakın.
  • shipment_status_text — shipment_status integer'ının insan-okur Türkçe karşılığı (UI'da göstermek için). Bu metin bizim ürettiğimiz sabit etikettir; taşıyıcıya göre değişmez.
  • data.last_status ile karıştırmayın: o, taşıyıcının gönderdiği ham metindir (her kurye farklı yazabilir, boş gelebilir) ve otorite değildir. Örn. iade için PTT bazen "Teslim Edildi" yazar — ham metne göre karar verirseniz iadeyi teslim sanırsınız. Daima shipment_status'e güvenin.
  • courrier / courrier_string — taşıyıcı id ve metin adı (455=PTT, 14=Aras, vb.). Sonradan kurye değişirse otomatik güncellenir.
  • track_link — kuryenin kendi public tracking sayfası; müşteriye link olarak verebilirsiniz
  • data.dongu — hareket geçmişi (en yeni en üstte, siraNo büyük → eski). PTT için 8-12 satır tipik, son satır genelde "Kabul Edildi"dir.
  • data.last_status + data.last_status_location — son hareket metni + şubesi (UI'da büyük yazıyla göstermek için ideal)
  • data.upper_status_id — tüm kuryelerde ortak normalize edilmiş durum: 1000=Kabul, 2000=Yolda, 3000=Dağıtımda, 5000=Teslim, 9000=İade. Status üstü "kargo teslim edildi mi?" gibi sorularda upper_status_id === 5000 ile karar verin.
  • final_cw — gerçek ücretlendirme ağırlığı (gönderim bedeli bunun üzerinden hesaplanır)

Kargo durum kodları (shipment_status)

Kargonun yaşam döngüsündeki bizdeki kanonik durum. Karar mantığınızı bu integer'lar üzerine kurun:

  • 0 — Entegrasyon Bekleniyor
  • 1 — Kayıt Oluşturuldu
  • 2 — Şubeye Teslim Bekleniyor
  • 3 — Şubeye Teslim Edildi
  • 4 — Transit Halinde
  • 5 — Teslim Edildi (alıcıya teslim — başarı)
  • 6 — Teslim Edilemedi
  • 7 — Teslim İptal
  • 8 — İade/İade Dönüyor
  • 9 — Göndericiye Teslim Edildi/İade (iade tamamlandı — nihai durumdur; 5'ten ayrı tutulur ki teslim ile iadeyi ayırt edebilesiniz)
  • 10 — İptal  ·  11 — İmha İptal  ·  12 — Tasfiye  ·  13 — Geri Zimmet  ·  14 — El Terminali  ·  16 — Kayıp

İade ayrımı: Bir kargo göndericiye iade olarak ulaştığında durum 9 olur, 5 değil. 5 yalnızca alıcıya teslimdir. İadeyi yakalamak için shipment_status === 9 kontrol edin; data.last_status ham metnini "Teslim Edildi" diye parse etmeyin.

Status kod referansı (envelope status)

  • 200 — Barkod bulundu, gönderi geçerli. data doludur, dongu array'i hareket geçmişini taşır.
  • 203 — Kurye API'si cevap verdi ama bu barkoda dair kayıt yok. Yeni basılmış / kuryeye henüz teslim edilmemiş bir kargo olabilir; 1-2 saat sonra tekrar deneyin.
  • 404 — Barkod sistemde yok veya bu tenant'a ait değil. Cross-tenant erişim engellenmiştir (her tenant sadece kendi barkodlarını sorgulayabilir).
  • 203 + "Please Add tracking number..." — URL'de barkod kısmı yok (örn. /track/ sonu boş).

Auth

Public endpoint — Bearer Token gerekmez. Tenant tespiti Host header'ından yapılır; localhost test ederken Host: gönderio.com override etmeniz gerekir.

Rate limit ve cache

  • Aynı barkod için 60 sn cache; aynı IP'den dakikada 60+ istek durumunda mod_evasive geçici 429 dönebilir.
  • Aktif olmayan kurye / circuit breaker açıkken cache'lenmiş eski veri dönülür (data aynı, kayıt güncellenmez).

GET /track/KLB5223999614 Auth: No Auth

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
200Başarılı — Teslim edilmiş kargo (PTT)
{
  "status": 200,
  "message": "Success",
  "courrier_string": "PTT",
  "courrier": 455,
  "track_link": "https://pttws.ptt.gov.tr/Gonderi_Sorgu/faces/index.xhtml?barkod=KLB5223999614&barkod_guid=...",
  "package_gw": "0.50",
  "package_vw": "2.00",
  "package_cw": "2.00",
  "final_cw": "1.00",
  "shipment_status": 5,
  "shipment_status_text": "Teslim Edildi",
  "data": {
    "ALICI": "HAKAN OZDAMAR",
    "BARNO": "KLB5223999614",
    "GONDEREN": "LEYAWOMAN BMS YAZILIM TEKNOLOJİ TİC. LTD. ŞTİ.",
    "GR": "450Gr/1.00D.",
    "IMERK": "BURSA PKİM/BURSA PKİM",
    "ITARIH": "20260525",
    "TESALAN": "HAKAN OZDAMAR",
    "VMERK": "ANKARA",
    "EKHIZ": "--",
    "last_status": "Teslim Edildi",
    "last_status_location": "SİNCAN PDM/SİNCAN PDM",
    "upper_status_id": 5000,
    "upper_status_description": "TESLİM",
    "sonucKodu": 10,
    "sonucAciklama": "islem basarili",
    "dongu": [
      {
        "siraNo": 8,
        "ITARIH": "26/05/2026",
        "IMERK": "SİNCAN PDM/SİNCAN PDM",
        "ISLEM": "Teslim Edildi",
        "gonderiDurumId": "100"
      },
      {
        "siraNo": 7,
        "ITARIH": "26/05/2026",
        "IMERK": "SİNCAN PDM/SİNCAN PDM",
        "ISLEM": "Dağıtıcıya Verildi",
        "gonderiDurumId": "7"
      },
      {
        "siraNo": 6,
        "ITARIH": "26/05/2026",
        "IMERK": "SİNCAN PDM/SİNCAN PDM",
        "ISLEM": "Gönderinin Geliş Kaydı Yapıldı",
        "gonderiDurumId": "11"
      },
      {
        "siraNo": 5,
        "ITARIH": "26/05/2026",
        "IMERK": "ANKARA KİM/ANKARA KİM",
        "ISLEM": "Torbaya Eklendi",
        "gonderiDurumId": "3"
      },
      {
        "siraNo": 1,
        "ITARIH": "25/05/2026",
        "IMERK": "BURSA PKİM/BURSA PKİM",
        "ISLEM": "Kabul Edildi",
        "gonderiDurumId": "1"
      }
    ]
  }
}
203Kurye yanıt verdi, kayıt yok
{
  "status": 203,
  "message": "Bu barkoda ait PTT sistemlerinde kayıt bulunamadı!",
  "courrier_string": "PTT",
  "track_link": "https://pttws.ptt.gov.tr/Gonderi_Sorgu/faces/index.xhtml?barkod=KLB5223999614&barkod_guid=...",
  "data": {
    "BARNO": null,
    "ALICI": null,
    "GONDEREN": null,
    "GR": null,
    "IMERK": null,
    "ITARIH": null,
    "TESALAN": null,
    "VMERK": null,
    "EKHIZ": null,
    "dongu": null,
    "sonucKodu": -15,
    "sonucAciklama": "Bu barkoda ait PTT sistemlerinde kayıt bulunamadı!"
  }
}
404Barkod sistemde yok / tenant'a ait değil
{
  "status": 404,
  "message": "Not Found"
}
203URL'de barkod yok
{
  "status": 203,
  "message": "Please Add tracking number in your link after track/ Sample: track/5636465474"
}
POST

shipment-get

https://kargolab.com/api/v1/shipment-get

POST /shipment-get Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 1,
    "limit": 10,
    "order_by": "id",
    "asc_desc": "asc"
  },
  "param": {},
  "sql": "",
  "group_by": ""
}
200shipment-get
{
  "status": 200,
  "message": "Success",
  "data": [
    {
      "id": 7000,
      "system_number": 30642447,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "4134583106",
      "shipment_type": 1,
      "status": 2,
      "courrier_last_status": null,
      "branch_code": null,
      "customer_barcode": "165532536",
      "commodutie_description": "KAMAGRA-1, KAHVE-1",
      "package_gw": "0.50",
      "package_vw": "0.04",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 2,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "1350.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "tracking_number": "2782810605737",
      "order_number": "",
      "platform": "Trendyol",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": null,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 49,
      "receiver_id": 658,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "AYYILDIZ İNTERAKTİF TİCARET LİMİTED ŞİRKETİ",
      "sender_address1": "Güzeltepe Mah.Küçük Namazgah Cd.",
      "sender_address2": "Kaleseramik Evleri No:13/V2 Test4",
      "sender_address3": null,
      "sender_zipcode": "34680",
      "sender_town": "Çengelköy",
      "sender_city": "Kadıköy",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "ORNEK",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "AHMET GÖKKAYA",
      "receiver_company_name": null,
      "receiver_address1": "İŞCEHİSAR PTT ŞUBESİ TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "İscehisar",
      "receiver_city": "İSCEHİSAR",
      "receiver_state": "AFYONKARAHISAR",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5362860419",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ]
    },
    {
      "id": 7001,
      "system_number": 30642447,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "9589646319",
      "shipment_type": 1,
      "status": 2,
      "courrier_last_status": null,
      "branch_code": null,
      "customer_barcode": "165532539",
      "commodutie_description": "PENİS KREMİ-1, SPREY-1",
      "package_gw": "0.50",
      "package_vw": "0.04",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 2,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "700.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "tracking_number": "2782811337392",
      "order_number": "",
      "platform": "",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": null,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 49,
      "receiver_id": 659,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "AYYILDIZ İNTERAKTİF TİCARET LİMİTED ŞİRKETİ",
      "sender_address1": "Güzeltepe Mah.Küçük Namazgah Cd.",
      "sender_address2": "Kaleseramik Evleri No:13/V2 Test4",
      "sender_address3": null,
      "sender_zipcode": "34680",
      "sender_town": "Çengelköy",
      "sender_city": "Kadıköy",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "ORNEK",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "FEHMİ YAVUZ/MESUT YILMAZ",
      "receiver_company_name": null,
      "receiver_address1": "KASTAMONU MERKEZİ PTT ŞUBE TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "MERKEZ",
      "receiver_city": "MERKEZ",
      "receiver_state": "KASTAMONU",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5455130099",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ]
    },
    {
      "id": 7002,
      "system_number": 56487567,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "2468398463",
      "shipment_type": 1,
      "status": 4,
      "courrier_last_status": "Gönderinin Geliş Kaydı Yapıldı",
      "branch_code": null,
      "customer_barcode": "165532541",
      "commodutie_description": "BLACKHAWK-1, CİALİS-1",
      "package_gw": "0.50",
      "package_vw": "0.04",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 2,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "650.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "tracking_number": null,
      "order_number": "",
      "platform": "",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": null,
      "deleted_date": null,
      "sender_id": 49,
      "receiver_id": 660,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "AYYILDIZ İNTERAKTİF TİCARET LİMİTED ŞİRKETİ",
      "sender_address1": "Güzeltepe Mah.Küçük Namazgah Cd.",
      "sender_address2": "Kaleseramik Evleri No:13/V2 Test4",
      "sender_address3": null,
      "sender_zipcode": "34680",
      "sender_town": "Çengelköy",
      "sender_city": "Kadıköy",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "ORNEK",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "CELİL ERDOĞAN",
      "receiver_company_name": null,
      "receiver_address1": "KURTKÖY PTT ŞUBESİ TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "Yenişehir",
      "receiver_city": "PENDİK",
      "receiver_state": "İSTANBUL",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5388174569",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ],
      "price_information": [
        {
          "id": 3002,
          "created_at": "2024-05-22 22:36:34",
          "price_type": 1,
          "price": "8.40",
          "sub_member_profit": "0.00",
          "currency": "TRY",
          "paid": 1,
          "paid_date": "2024-05-22 22:48:18",
          "paid_by": 20,
          "status": 1,
          "created_by": 20,
          "profile_photo": "6622318b97685.jpg",
          "profile_name": "Mehmet ŞAH"
        }
      ]
    },
    {
      "id": 7004,
      "system_number": 56487567,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "9207470492",
      "shipment_type": 1,
      "status": 5,
      "courrier_last_status": null,
      "branch_code": 155,
      "customer_barcode": "",
      "commodutie_description": "test",
      "package_gw": "0.50",
      "package_vw": "0.03",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 3,
      "payment_type": null,
      "paid": 2,
      "additional_services": 0,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": 0,
      "payment_at_door": null,
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "tracking_number": "2782810772594",
      "order_number": "",
      "platform": "",
      "source": 1,
      "waybill": "",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": null,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 49,
      "receiver_id": 60,
      "sender_contact_name": "NURŞAH EMİNOĞLU",
      "sender_company_name": "AYYILDIZ İNTERAKTİF TİCARET LİMİTED ŞİRKETİ",
      "sender_address1": "Güzeltepe Mah.Küçük Namazgah Cd.",
      "sender_address2": "Kaleseramik Evleri No:13/V2 Test4",
      "sender_address3": null,
      "sender_zipcode": "34680",
      "sender_town": "Çengelköy",
      "sender_city": "Kadıköy",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "ORNEK",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "Mehmet ŞAH",
      "receiver_company_name": "VGC",
      "receiver_address1": "Kaleseramik Evleri",
      "receiver_address2": "No:13-V2",
      "receiver_address3": null,
      "receiver_zipcode": "48400",
      "receiver_town": "Dereköy",
      "receiver_city": "Bodrum",
      "receiver_state": "Muğla",
      "receiver_country": "TR",
      "receiver_email": "ORNEK",
      "receiver_phone": "ORNEK",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "3.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.03",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ],
      "price_information": [
        {
          "id": 3004,
          "created_at": "2024-05-27 09:33:06",
          "price_type": 1,
          "price": "8.40",
          "sub_member_profit": "0.00",
          "currency": "TRY",
          "paid": 1,
          "paid_date": "2024-05-27 09:34:45",
          "paid_by": 20,
          "status": 1,
          "created_by": 20,
          "profile_photo": "6622318b97685.jpg",
          "profile_name": "Mehmet ŞAH"
        }
      ]
    },
    {
      "id": 7005,
      "system_number": 56487567,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "3024138109",
      "shipment_type": 1,
      "status": 5,
      "courrier_last_status": "Teslim Edildi",
      "branch_code": null,
      "customer_barcode": "165532536",
      "commodutie_description": "KAMAGRA-1, KAHVE-1",
      "package_gw": "0.30",
      "package_vw": "0.04",
      "package_cw": "0.40",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 1,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "1350.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "tracking_number": "2782809318662",
      "order_number": "",
      "platform": "Trendyol",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": "2024-04-06",
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": null,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 262,
      "receiver_id": 661,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "",
      "sender_address1": "DENEME ADRES SATIRI 4",
      "sender_address2": "",
      "sender_address3": null,
      "sender_zipcode": "34010",
      "sender_town": "Topkapi",
      "sender_city": "Zeytinburnu",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "sah@gmail.com",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "AHMET GÖKKAYA",
      "receiver_company_name": null,
      "receiver_address1": "İŞCEHİSAR PTT ŞUBESİ TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "İscehisar",
      "receiver_city": "İSCEHİSAR",
      "receiver_state": "AFYONKARAHISAR",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5362860419",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ],
      "price_information": [
        {
          "id": 3005,
          "created_at": "2024-05-27 09:56:12",
          "price_type": 1,
          "price": "8.40",
          "sub_member_profit": "0.00",
          "currency": "TRY",
          "paid": 1,
          "paid_date": "2024-05-27 10:00:55",
          "paid_by": 20,
          "status": 1,
          "created_by": 20,
          "profile_photo": "6622318b97685.jpg",
          "profile_name": "Mehmet ŞAH"
        }
      ]
    },
    {
      "id": 7006,
      "system_number": 56487567,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "1556317537",
      "shipment_type": 1,
      "status": 4,
      "courrier_last_status": null,
      "branch_code": null,
      "customer_barcode": "165532539",
      "commodutie_description": "PENİS KREMİ-1, SPREY-1",
      "package_gw": "0.50",
      "package_vw": "0.04",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 2,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "700.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "tracking_number": "2782810738918",
      "order_number": "",
      "platform": "",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": null,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 262,
      "receiver_id": 662,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "",
      "sender_address1": "DENEME ADRES SATIRI 4",
      "sender_address2": "",
      "sender_address3": null,
      "sender_zipcode": "34010",
      "sender_town": "Topkapi",
      "sender_city": "Zeytinburnu",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "sah@gmail.com",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "FEHMİ YAVUZ/MESUT YILMAZ",
      "receiver_company_name": null,
      "receiver_address1": "KASTAMONU MERKEZİ PTT ŞUBE TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "MERKEZ",
      "receiver_city": "MERKEZ",
      "receiver_state": "KASTAMONU",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5455130099",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ],
      "price_information": [
        {
          "id": 3006,
          "created_at": "2024-05-27 09:56:13",
          "price_type": 1,
          "price": "8.40",
          "sub_member_profit": "0.00",
          "currency": "TRY",
          "paid": 1,
          "paid_date": "2024-05-27 10:00:55",
          "paid_by": 20,
          "status": 1,
          "created_by": 20,
          "profile_photo": "6622318b97685.jpg",
          "profile_name": "Mehmet ŞAH"
        }
      ]
    },
    {
      "id": 7007,
      "system_number": 56487567,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "2835716099",
      "shipment_type": 1,
      "status": 4,
      "courrier_last_status": null,
      "branch_code": null,
      "customer_barcode": "165532541",
      "commodutie_description": "BLACKHAWK-1, CİALİS-1",
      "package_gw": "0.50",
      "package_vw": "0.04",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 0,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "650.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "order_number": "",
      "platform": "",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": 20,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 262,
      "receiver_id": 663,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "",
      "sender_address1": "DENEME ADRES SATIRI 4",
      "sender_address2": "",
      "sender_address3": null,
      "sender_zipcode": "34010",
      "sender_town": "Topkapi",
      "sender_city": "Zeytinburnu",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "sah@gmail.com",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "CELİL ERDOĞAN",
      "receiver_company_name": null,
      "receiver_address1": "KURTKÖY PTT ŞUBESİ TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "Yenişehir",
      "receiver_city": "PENDİK",
      "receiver_state": "İSTANBUL",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5388174569",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ],
      "price_information": [
        {
          "id": 3007,
          "created_at": "2024-05-27 09:56:13",
          "price_type": 1,
          "price": "8.40",
          "sub_member_profit": "0.00",
          "currency": "TRY",
          "paid": 0,
          "paid_date": null,
          "paid_by": null,
          "status": 1,
          "created_by": 20,
          "profile_photo": "6622318b97685.jpg",
          "profile_name": "Mehmet ŞAH"
        }
      ]
    },
    {
      "id": 7008,
      "system_number": 30642447,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "2370280343",
      "shipment_type": 1,
      "status": 2,
      "courrier_last_status": null,
      "branch_code": null,
      "customer_barcode": "165532536",
      "commodutie_description": "KAMAGRA-1, KAHVE-1",
      "package_gw": "0.50",
      "package_vw": "0.04",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 0,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "1350.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "order_number": "",
      "platform": "Trendyol",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": 20,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 49,
      "receiver_id": 664,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "AYYILDIZ İNTERAKTİF TİCARET LİMİTED ŞİRKETİ",
      "sender_address1": "Güzeltepe Mah.Küçük Namazgah Cd.",
      "sender_address2": "Kaleseramik Evleri No:13/V2 Test4",
      "sender_address3": null,
      "sender_zipcode": "34680",
      "sender_town": "Çengelköy",
      "sender_city": "Kadıköy",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "ORNEK",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "AHMET GÖKKAYA",
      "receiver_company_name": null,
      "receiver_address1": "İŞCEHİSAR PTT ŞUBESİ TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "İscehisar",
      "receiver_city": "İSCEHİSAR",
      "receiver_state": "AFYONKARAHISAR",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5362860419",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ]
    },
    {
      "id": 7009,
      "system_number": 56487567,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "9598239274",
      "shipment_type": 1,
      "status": 2,
      "courrier_last_status": null,
      "branch_code": null,
      "customer_barcode": "165532539",
      "commodutie_description": "PENİS KREMİ-1, SPREY-1",
      "package_gw": "0.50",
      "package_vw": "0.04",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 0,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "700.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "order_number": "",
      "platform": "",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": 20,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 49,
      "receiver_id": 665,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "AYYILDIZ İNTERAKTİF TİCARET LİMİTED ŞİRKETİ",
      "sender_address1": "Güzeltepe Mah.Küçük Namazgah Cd.",
      "sender_address2": "Kaleseramik Evleri No:13/V2 Test4",
      "sender_address3": null,
      "sender_zipcode": "34680",
      "sender_town": "Çengelköy",
      "sender_city": "Kadıköy",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "ORNEK",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "FEHMİ YAVUZ/MESUT YILMAZ",
      "receiver_company_name": null,
      "receiver_address1": "KASTAMONU MERKEZİ PTT ŞUBE TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "MERKEZ",
      "receiver_city": "MERKEZ",
      "receiver_state": "KASTAMONU",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5455130099",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ],
      "price_information": [
        {
          "id": 3009,
          "created_at": "2024-05-27 12:08:11",
          "price_type": 1,
          "price": "8.40",
          "sub_member_profit": "0.00",
          "currency": "TRY",
          "paid": 0,
          "paid_date": null,
          "paid_by": null,
          "status": 1,
          "created_by": 20,
          "profile_photo": "6622318b97685.jpg",
          "profile_name": "Mehmet ŞAH"
        }
      ]
    },
    {
      "id": 7010,
      "system_number": 56487567,
      "member_id": 30,
      "created_by": 20,
      "ref_number": "8449770774",
      "shipment_type": 1,
      "status": 2,
      "courrier_last_status": null,
      "branch_code": null,
      "customer_barcode": "165532541",
      "commodutie_description": "BLACKHAWK-1, CİALİS-1",
      "package_gw": "0.50",
      "package_vw": "0.04",
      "package_cw": "0.50",
      "package_quantity": 1,
      "packaging_type": 2,
      "payment_type": 0,
      "paid": 0,
      "additional_services": null,
      "insurance": 0,
      "insurance_currency": null,
      "ddp": null,
      "payment_at_door": "650.00",
      "payment_at_door_paid_date": null,
      "payment_at_door_paid_amount": null,
      "courrier": 455,
      "order_number": "",
      "platform": "",
      "source": 1,
      "waybill": "123",
      "linked_courrier": null,
      "linked_courrier_tracking_number": null,
      "return_completed": 0,
      "extra_payment_status": 0,
      "invoice_number": null,
      "invoice_date": null,
      "delivery_date": null,
      "return_date": null,
      "master_list_number": 60701756,
      "list_number": 21329107,
      "created_at": "2024-05-28 00:00:00",
      "deleted": 0,
      "deleted_by": 20,
      "deleted_date": "2024-05-27 00:00:00",
      "sender_id": 49,
      "receiver_id": 666,
      "sender_contact_name": "MEHMET ŞAH",
      "sender_company_name": "AYYILDIZ İNTERAKTİF TİCARET LİMİTED ŞİRKETİ",
      "sender_address1": "Güzeltepe Mah.Küçük Namazgah Cd.",
      "sender_address2": "Kaleseramik Evleri No:13/V2 Test4",
      "sender_address3": null,
      "sender_zipcode": "34680",
      "sender_town": "Çengelköy",
      "sender_city": "Kadıköy",
      "sender_state": "İstanbul",
      "sender_country": "TR",
      "sender_email": "ORNEK",
      "sender_phone": "ORNEK",
      "receiver_contact_name": "CELİL ERDOĞAN",
      "receiver_company_name": null,
      "receiver_address1": "KURTKÖY PTT ŞUBESİ TEL İHB",
      "receiver_address2": null,
      "receiver_address3": null,
      "receiver_zipcode": null,
      "receiver_town": "Yenişehir",
      "receiver_city": "PENDİK",
      "receiver_state": "İSTANBUL",
      "receiver_country": "TR",
      "receiver_email": null,
      "receiver_phone": "5388174569",
      "dimensions": [
        {
          "shipment_type": 1,
          "width": "5.00",
          "length": "5.00",
          "height": "5.00",
          "quantity": 1,
          "gw": "0.50",
          "vw": "0.04",
          "cw": "0.50",
          "status": 1,
          "created_by": 20
        }
      ],
      "price_information": [
        {
          "id": 3010,
          "created_at": "2024-05-27 12:08:12",
          "price_type": 1,
          "price": "8.40",
          "sub_member_profit": "0.00",
          "currency": "TRY",
          "paid": 0,
          "paid_date": null,
          "paid_by": null,
          "status": 1,
          "created_by": 20,
          "profile_photo": "6622318b97685.jpg",
          "profile_name": "Mehmet ŞAH"
        }
      ]
    }
  ],
  "total_count": 10,
  "total_items": 99,
  "total_page": 10,
  "current_page": 1,
  "all_data_count": 99
}
POST

shipment-create

https://kargolab.com/api/v1/shipment-create
Parametre Varsayılan Değer Zorunlu Açıklama
courrier 455 Evet Taşıyıcı firmanın kodudur. Ptt için 455 gönderilir.
origin TR Evet Çıkış ülke kodu.ISO 3166-1 2 haneli kod olarak verilir.
destination TR Evet Varış ülke kodu.ISO 3166-1 2 haneli kod olarak verilir.
sender_id Hayır Kayıtlı bir adres varsa id numarası burada gönderilir. sender/receiver ile ilgili diğer bilgilere gerek duyulmaz.(contac_name->phone alanına kadar) Adres eklemek için 'address' endpointine bakınız.
contact_name Evet Ad Soyad
company_name Hayır Şirket Adı
address1 Evet Adres Satırı
address2 Hayır Address1 yetersiz kalırsa bu alanı kullanabilirsiniz.
zipcode Hayır Posta Kodu
town Evet Semt
city Evet İlçe (Yurt Dışı Eyaletli Ülkelerde Şehir)
state Evet Şehir/İl (Yurt Dışı Eyaletli Ülkelerde Eyalet)
country Evet Ülke kodu.ISO 3166-1 2 haneli kod olarak verilir.
email Evet E Posta Adresi
phone Evet Telefon
commodity_description Evet Paket içeriğinin açıklamasıdır
commoduties Hayır Paket İçeriğinin ayrı ayrı tanımlanması için bu dizine ihtiyaç duyulur.Yurt dışı gönderilerinde zorunludur.Dizin içine her ürün için ayrı bir dizin eklenir.
commoduties->description Hayır Ürün Tanımı
commoduties->sku Hayır Ürün SKU kodu
commoduties->hs_code Hayır Ürün GTIP kodu
commoduties->origin_country Hayır Ürün Menşei
commoduties->qty Hayır Ürün Adeti
commoduties->weight Hayır Ürün Ağırlığı
commoduties->price Hayır Ürün Fiyatı
commoduties->currency TRY Hayır Ürün Döviz Tipi 3 haneli
commoduties->total_price Hayır Ürünün Adeti ile Fiyatının Çarpımı
dimensions Evet Paket Ölçüleri.Dizin olarak gönderilir.Dizin içine her farklı paket için ayrı bir dizin eklenir.
dimensions->width Evet Paketi En Ölçüsü (cm)
dimensions->length Evet Paketi Boy Ölçüsü (cm)
dimensions->height Evet Paketi Yükseklik Ölçüsü (cm)
dimensions->quantity Evet Paketi Adeti
dimensions->gw Evet Paket Ağırlığı (KG)
packaging_type Evet Paketleme Tipi.
2 ve 3 değerlerini alır.
2 Paket
3 Dosya/Zarf olarak gönderilir.
additional_services Hayır PTT için kullanılan ek servislerdir.
customer_barcode Hayır Ürün Barkodu
order_number Hayır Varsa Sipariş Numaranız
platform Hayır Siparişiniz Pazaryeri satışı ise burada belirtebilirsiniz.
Verilebilecek değerler 1-10 arasındadır.
'1'=>'Trendyol', '2'=>'HepsiBurada',
'3'=>'N11',
'4'=>'Amazon',
'5'=>'Shopify',
'6'=>'WooCommerce'
tracking_number Hayır Kendi barkod numaranız/aralığınız varsa burada barkod numarasını gönderebilirsiniz.
Referans numarası ile kargo oluşturup KP li numara almak isterseniz bu parametreyi "ref" olarak tanımlayınız.
price_request_code Hayır Önceden fiyat aldığınız bir kargonun fiyat kodunu burada gönderebilirsiniz.
payment_at_door Hayır Kapıda ödemeli gönderim yapmak için tahsil edilecek bedeli bu parametre ile göndermeniz gerekir.Bu işlemi yapabilmek için Profil kısmındaki Ptt Posta Çeki Numarası alanını doldurmanız gerekmektedir.
ptt_mail_check_number Hayır Hesabım kısmında kayıtlı olan Posta Çeki Hesabı haricinde bir numara göndermek isterseniz bu parametre ile gönderebilirsiniz.
courrier_api_type Hayır 1 olarak göndeirlirse ilgili kargonun taşıyıcı ile api entegrasyonu sağlanır.

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "courrier": "455",
  "origin": "TR",
  "destination": "TR",
  "addresses": {
    "receiver": {
      "contact_name": "Örnek Kişi",
      "company_name": "VGC",
      "address1": "Örnek Mah. Örnek Sk. No: 1",
      "address2": "Daire 1",
      "zipcode": "34680",
      "town": "Çengelköy",
      "city": "Üsküdar",
      "state": "İstanbul",
      "country": "TR",
      "email": "ornek@ornek.com",
      "phone": "05000000000"
    }
  },
  "commodity_description": "TEXTILE GARMENTS",
  "commoduties": [
    {
      "description": "Product Title 1",
      "sku": "",
      "hs_code": "999999000000",
      "origin_country": "TR",
      "qty": "1",
      "weight": 1,
      "price": "45",
      "currency": "EUR",
      "total_price": 45
    }
  ],
  "dimensions": [
    {
      "width": "10",
      "length": "15",
      "height": "5",
      "quantity": "2",
      "gw": "0.5"
    },
    {
      "width": "6",
      "length": "6",
      "height": "4",
      "quantity": "1",
      "gw": "0.7"
    }
  ],
  "packaging_type": 2,
  "payment_type": 1,
  "additional_services": "",
  "customer_barcode": "728764W853775",
  "order_number": "7465746",
  "price_request_code": "23246580965104066c455e774eff730782",
  "platform": 2
}
200shipment-create
{
  "status": 200,
  "message": "Success",
  "insert_id": "8099",
  "courrier_api": {
    "status": 200,
    "tracking_number": "2782812195342",
    "file_name": "20240820-113828-66c456048b782",
    "data": {
      "aciklama": "BASARILI",
      "dongu": {
        "barkod": "2782812195342",
        "donguAciklama": "https://pttws.ptt.gov.tr/Gonderi_SorguTest/faces/index.xhtml?barkod=2782812195342&barkod_guid=AJflb3S7R9EyoBtlQ1d2Q",
        "donguHataKodu": 1,
        "donguSonuc": true
      },
      "hataKodu": 1
    }
  },
  "tracking_number": "2782812195342",
  "reference_number": "5733201563",
  "data": {
    "courrier": 455,
    "origin": "TR",
    "destination": "TR",
    "addresses": {
      "sender": {
        "contact_name": "Örnek Kişi",
        "company_name": "VGC",
        "address1": "Örnek Mah. Örnek Sk. No: 1",
        "address2": "Daire 1",
        "zipcode": "34680",
        "town": "Çengelköy",
        "city": "Üsküdar",
        "state": "İstanbul",
        "country": "TR",
        "email": "ornek@ornek.com",
        "phone": "05000000000",
        "address_type": 4
      },
      "receiver": {
        "contact_name": "Örnek Kişi",
        "company_name": "VGC",
        "address1": "Örnek Mah. Örnek Sk. No: 1",
        "address2": "Daire 1",
        "zipcode": "34680",
        "town": "Çengelköy",
        "city": "Üsküdar",
        "state": "İstanbul",
        "country": "TR",
        "email": "ornek@ornek.com",
        "phone": "05000000000",
        "address_type": 5
      },
      "sender_id": "809",
      "receiver_id": "810"
    },
    "commodutie_description": "Product Title 1",
    "commoduties": [
      {
        "description": "Product Title 1",
        "sku": "",
        "hs_code": "999999000000",
        "origin_country": "TR",
        "qty": "1",
        "weight": 1,
        "price": "45",
        "currency": "EUR",
        "total_price": 45
      }
    ],
    "dimensions": [
      {
        "width": "10",
        "length": "15",
        "height": "5",
        "quantity": "2",
        "gw": "0.5",
        "gw_total": "1.00",
        "vw": "0.25",
        "vw_total": "0.50",
        "max_length": "15",
        "cw": 0.5,
        "cw_total": 1
      },
      {
        "width": "6",
        "length": "6",
        "height": "4",
        "quantity": "1",
        "gw": "0.7",
        "gw_total": "0.70",
        "vw": "0.05",
        "vw_total": "0.05",
        "max_length": "6",
        "cw": 1,
        "cw_total": 1
      }
    ],
    "packaging_type": 4,
    "payment_type": 1,
    "additional_services": 0,
    "customer_barcode": "728764W853775",
    "order_number": "7465746",
    "price_request_code": "23246580965104066c455e774eff730782",
    "platform": 2,
    "branch_code": "155",
    "shipment_type": 1,
    "package_gw": "1.70",
    "package_vw": "0.55",
    "package_cw": "2.00",
    "package_quantity": "3.00",
    "price_informations": {
      "request": {
        "origin": "TR",
        "destination": "TR",
        "addresses": {
          "sender": {
            "contact_name": "Örnek Kişi",
            "company_name": "VGC",
            "address1": "Örnek Mah. Örnek Sk. No: 1",
            "address2": "Daire 1",
            "zipcode": "34680",
            "town": "u00c7engelku00f6y",
            "city": "u00dcsku00fcdar",
            "state": "u0130stanbul",
            "country": "TR",
            "email": "ornek@ornek.com",
            "phone": "05000000000"
          },
          "receiver": {
            "contact_name": "Örnek Kişi",
            "company_name": "VGC",
            "address1": "Örnek Mah. Örnek Sk. No: 1",
            "address2": "Daire 1",
            "zipcode": "34680",
            "town": "u00c7engelku00f6y",
            "city": "u00dcsku00fcdar",
            "state": "u0130stanbul",
            "country": "TR",
            "email": "ornek@ornek.com",
            "phone": "05000000000"
          }
        },
        "cw": 0.5,
        "packaging_type": 4,
        "master_list_number": 1001
      },
      "response": {
        "456": {
          "courrier_id": 456,
          "system_number": 56487567,
          "courrier_name": "Su00dcRAT",
          "service_type": "P",
          "branch_code": "156",
          "insurance": 0,
          "insurance_percentage": 1,
          "insurance_limit": "1000.00",
          "insurance_over_cost": "1.00",
          "insurance_over_price": "1.50",
          "insurance_fixed_cost": "10.00",
          "insurance_fixed_price": "15.00",
          "ddp": 0,
          "ddp_percentage": 1,
          "ddp_cost": "0.00",
          "ddp_price": "0.00",
          "etgb": 0,
          "ioss": 0,
          "accept_door_payments": 1,
          "logo": "surat.svg",
          "over_each": 1,
          "over_each_limit": 16,
          "max_length": 220,
          "max_gw": "500.00",
          "max_qty": null,
          "return_cost": "50.00",
          "origin": "TR",
          "destination": "TR",
          "area": 1,
          "master_list_number": "60701756",
          "list_number": 506,
          "weight": "0.50",
          "price": "8.40",
          "currency": "EUR",
          "cost": "7.00"
        },
        "455": {
          "courrier_id": 455,
          "system_number": 56487567,
          "courrier_name": "PTT",
          "service_type": "P",
          "branch_code": "155",
          "insurance": 1,
          "insurance_percentage": 1,
          "insurance_limit": "1000.00",
          "insurance_over_cost": "1.00",
          "insurance_over_price": "1.50",
          "insurance_fixed_cost": "10.00",
          "insurance_fixed_price": "15.00",
          "ddp": 0,
          "ddp_percentage": 1,
          "ddp_cost": "35.00",
          "ddp_price": "45.00",
          "etgb": 0,
          "ioss": 0,
          "accept_door_payments": 1,
          "logo": "ptt.svg",
          "over_each": 1,
          "over_each_limit": 16,
          "max_length": null,
          "max_gw": "500.00",
          "max_qty": null,
          "return_cost": "35.00",
          "origin": "TR",
          "destination": "TR",
          "area": 1,
          "master_list_number": "60701756",
          "list_number": 21329107,
          "weight": "0.50",
          "price": "8.40",
          "currency": "TRY",
          "cost": "7.00"
        }
      }
    },
    "reference_number": "5733201563"
  }
}
POST

shipment-create-without-commoduties

https://kargolab.com/api/v1/shipment-create

Parametre açıklamaları aynıdır.Yurtiçi gönderilerde gümrük olmadığı için commodity_description parametresi gönderilir commoduties gönderilmez.

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "courrier": 455,
  "origin": "TR",
  "destination": "TR",
  "addresses": {
    "receiver": {
      "contact_name": "Örnek Kişi",
      "company_name": "",
      "address2": "",
      "zipcode": 0,
      "town": "çarşamba",
      "city": "çarşamba",
      "state": "Samsun",
      "country": "TR",
      "email": "",
      "phone": "05000000000"
    }
  },
  "commodity_description": "Kargomucuz Inc.",
  "dimensions": [
    {
      "width": "5",
      "length": "5",
      "height": "5",
      "quantity": "1",
      "gw": "1"
    }
  ],
  "packaging_type": 2,
  "payment_type": 1,
  "additional_services": 0
}
200shipment-create
{
  "status": 200,
  "message": "Success",
  "insert_id": "8099",
  "courrier_api": {
    "status": 200,
    "tracking_number": "2782812195342",
    "file_name": "20240820-113828-66c456048b782",
    "data": {
      "aciklama": "BASARILI",
      "dongu": {
        "barkod": "2782812195342",
        "donguAciklama": "https://pttws.ptt.gov.tr/Gonderi_SorguTest/faces/index.xhtml?barkod=2782812195342&barkod_guid=AJflb3S7R9EyoBtlQ1d2Q",
        "donguHataKodu": 1,
        "donguSonuc": true
      },
      "hataKodu": 1
    }
  },
  "tracking_number": "2782812195342",
  "reference_number": "5733201563",
  "data": {
    "courrier": 455,
    "origin": "TR",
    "destination": "TR",
    "addresses": {
      "sender": {
        "contact_name": "Örnek Kişi",
        "company_name": "VGC",
        "address1": "Örnek Mah. Örnek Sk. No: 1",
        "address2": "Daire 1",
        "zipcode": "34680",
        "town": "Çengelköy",
        "city": "Üsküdar",
        "state": "İstanbul",
        "country": "TR",
        "email": "ornek@ornek.com",
        "phone": "05000000000",
        "address_type": 4
      },
      "receiver": {
        "contact_name": "Örnek Kişi",
        "company_name": "VGC",
        "address1": "Örnek Mah. Örnek Sk. No: 1",
        "address2": "Daire 1",
        "zipcode": "34680",
        "town": "Çengelköy",
        "city": "Üsküdar",
        "state": "İstanbul",
        "country": "TR",
        "email": "ornek@ornek.com",
        "phone": "05000000000",
        "address_type": 5
      },
      "sender_id": "809",
      "receiver_id": "810"
    },
    "commodutie_description": "Product Title 1",
    "commoduties": [
      {
        "description": "Product Title 1",
        "sku": "",
        "hs_code": "999999000000",
        "origin_country": "TR",
        "qty": "1",
        "weight": 1,
        "price": "45",
        "currency": "EUR",
        "total_price": 45
      }
    ],
    "dimensions": [
      {
        "width": "10",
        "length": "15",
        "height": "5",
        "quantity": "2",
        "gw": "0.5",
        "gw_total": "1.00",
        "vw": "0.25",
        "vw_total": "0.50",
        "max_length": "15",
        "cw": 0.5,
        "cw_total": 1
      },
      {
        "width": "6",
        "length": "6",
        "height": "4",
        "quantity": "1",
        "gw": "0.7",
        "gw_total": "0.70",
        "vw": "0.05",
        "vw_total": "0.05",
        "max_length": "6",
        "cw": 1,
        "cw_total": 1
      }
    ],
    "packaging_type": 4,
    "payment_type": 1,
    "additional_services": 0,
    "customer_barcode": "728764W853775",
    "order_number": "7465746",
    "price_request_code": "23246580965104066c455e774eff730782",
    "platform": 2,
    "branch_code": "155",
    "shipment_type": 1,
    "package_gw": "1.70",
    "package_vw": "0.55",
    "package_cw": "2.00",
    "package_quantity": "3.00",
    "price_informations": {
      "request": {
        "origin": "TR",
        "destination": "TR",
        "addresses": {
          "sender": {
            "contact_name": "Örnek Kişi",
            "company_name": "VGC",
            "address1": "Örnek Mah. Örnek Sk. No: 1",
            "address2": "Daire 1",
            "zipcode": "34680",
            "town": "u00c7engelku00f6y",
            "city": "u00dcsku00fcdar",
            "state": "u0130stanbul",
            "country": "TR",
            "email": "ornek@ornek.com",
            "phone": "05000000000"
          },
          "receiver": {
            "contact_name": "Örnek Kişi",
            "company_name": "VGC",
            "address1": "Örnek Mah. Örnek Sk. No: 1",
            "address2": "Daire 1",
            "zipcode": "34680",
            "town": "u00c7engelku00f6y",
            "city": "u00dcsku00fcdar",
            "state": "u0130stanbul",
            "country": "TR",
            "email": "ornek@ornek.com",
            "phone": "05000000000"
          }
        },
        "cw": 0.5,
        "packaging_type": 4,
        "master_list_number": 1001
      },
      "response": {
        "456": {
          "courrier_id": 456,
          "system_number": 56487567,
          "courrier_name": "Su00dcRAT",
          "service_type": "P",
          "branch_code": "156",
          "insurance": 0,
          "insurance_percentage": 1,
          "insurance_limit": "1000.00",
          "insurance_over_cost": "1.00",
          "insurance_over_price": "1.50",
          "insurance_fixed_cost": "10.00",
          "insurance_fixed_price": "15.00",
          "ddp": 0,
          "ddp_percentage": 1,
          "ddp_cost": "0.00",
          "ddp_price": "0.00",
          "etgb": 0,
          "ioss": 0,
          "accept_door_payments": 1,
          "logo": "surat.svg",
          "over_each": 1,
          "over_each_limit": 16,
          "max_length": 220,
          "max_gw": "500.00",
          "max_qty": null,
          "return_cost": "50.00",
          "origin": "TR",
          "destination": "TR",
          "area": 1,
          "master_list_number": "60701756",
          "list_number": 506,
          "weight": "0.50",
          "price": "8.40",
          "currency": "EUR",
          "cost": "7.00"
        },
        "455": {
          "courrier_id": 455,
          "system_number": 56487567,
          "courrier_name": "PTT",
          "service_type": "P",
          "branch_code": "155",
          "insurance": 1,
          "insurance_percentage": 1,
          "insurance_limit": "1000.00",
          "insurance_over_cost": "1.00",
          "insurance_over_price": "1.50",
          "insurance_fixed_cost": "10.00",
          "insurance_fixed_price": "15.00",
          "ddp": 0,
          "ddp_percentage": 1,
          "ddp_cost": "35.00",
          "ddp_price": "45.00",
          "etgb": 0,
          "ioss": 0,
          "accept_door_payments": 1,
          "logo": "ptt.svg",
          "over_each": 1,
          "over_each_limit": 16,
          "max_length": null,
          "max_gw": "500.00",
          "max_qty": null,
          "return_cost": "35.00",
          "origin": "TR",
          "destination": "TR",
          "area": 1,
          "master_list_number": "60701756",
          "list_number": 21329107,
          "weight": "0.50",
          "price": "8.40",
          "currency": "TRY",
          "cost": "7.00"
        }
      }
    },
    "reference_number": "5733201563"
  }
}
POST

shipment-create-excel

https://kargolab.com/api/v1/shipment-create-excel

POST /shipment-create-excel Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
KeyDeğer / ÖrnekAçıklama
file
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "POST",
    "path": "/shipment-create-excel"
  },
  "data": {
    "file": "/Users/mehmetsah/Downloads/whole_shipments (2).xlsx"
  }
}
POST

shipment-label

https://kargolab.com/api/v1/shipment-actions/label

POST /shipment-actions/label Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
Acceptapplication/json
Content-Typeapplication/json
{
  "data": [
    "102",
    "105"
  ]
}
200Example - Success
{
  "success": true,
  "message": "Auto-generated response example.",
  "endpoint": {
    "method": "POST",
    "path": "/shipment-actions/label"
  },
  "data": {
    "data": [
      "102",
      "105"
    ]
  }
}
POST

shipment-delete

https://kargolab.com/api/v1/shipment-actions/delete

POST /shipment-actions/delete Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "data": [
    8098
  ]
}
200shipment-delete
{
  "status": 200,
  "message": "Success",
  "data": [
    {
      "id": 8098,
      "ref_number": null,
      "tracking_number": null,
      "courrier": 455,
      "status": 0,
      "deleted": 0,
      "deleted_date": null
    }
  ],
  "total_count": 1,
  "deleteds": [
    {
      "id": 8098,
      "ref_number": null,
      "label": {
        "status": 404,
        "message": "Silinecek bir etiket bulunamadı"
      },
      "refund": {
        "status": 404,
        "message": "İade edilecek bir ödeme bulunamadı"
      }
    }
  ],
  "cant_deleteds": []
}

Register

POST

sign-up

https://kargolab.com/api/v1/sign-up

Bot koruması

Bu endpoint web formundan çağrıldığında çok katmanlı bot korumasından geçer: honeypot (gizli company_website alanı — boş kalmalı), imzalı zaman-tuzağı token (form_token, sunucu tarafından üretilir) ve Cloudflare Turnstile (turnstile_token).

Mobil uygulama / API entegrasyonu için önemli: Bu istemciler form_token göndermez. Bu durumda honeypot / token / CAPTCHA kontrolleri otomatik atlanır (istek kırılmaz); yalnızca IP tabanlı rate-limit uygulanır. Yani programatik kullanımda form_token / turnstile_token göndermenize gerek yoktur.

  • 412 — form_token geçersiz/eksik (yalnız web formu; sayfayı yenileyin)
  • 403 — Turnstile / güvenlik doğrulaması başarısız
  • 429 — Aynı IP'den çok fazla deneme (rate-limit)

POST /sign-up Auth: No Auth

Headers

KeyDeğer / ÖrnekAçıklama
LangTR
system_number
Acceptapplication/json
Content-Typeapplication/json
{
  "name": "Örnek",
  "surname": "Kullanıcı",
  "email": "ornek@ornek.com",
  "password": "********",
  "confirm_password": "test123456",
  "nationality": "TR",
  "lang": "tr",
  "terms_service": 1
}
200Kayıt başarılı
{
  "status": 200,
  "message": "Kayıt Başarılı"
}
403Turnstile doğrulaması başarısız
{
  "status": 403,
  "message": "Güvenlik doğrulaması başarısız. Lütfen tekrar deneyin."
}
429Rate-limit aşıldı
{
  "status": 429,
  "message": "Çok fazla deneme yapıldı. Lütfen bir süre bekleyip tekrar deneyin."
}

Warehouse

Category

GET

categories

https://kargolab.com/api/v1/warehouse/categories

GET /warehouse/categories Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/warehouse/categories"
  },
  "data": {}
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/warehouse/categories"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

category-add

https://kargolab.com/api/v1/warehouse/categories

POST /warehouse/categories Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "category_name": "Mobilya"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/categories"
  },
  "data": {
    "category_name": "Mobilya"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/categories"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
PUT

category-edit

https://kargolab.com/api/v1/warehouse/categories

PUT /warehouse/categories Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "category_name": "Samsung",
  "parent_id": 3,
  "category_id": 6
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "PUT",
    "path": "/warehouse/categories"
  },
  "data": {
    "category_name": "Samsung",
    "parent_id": 3,
    "category_id": 6
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "PUT",
    "path": "/warehouse/categories"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
DELETE

category-delete

https://kargolab.com/api/v1/warehouse/categories

DELETE /warehouse/categories Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
[
  11
]
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "DELETE",
    "path": "/warehouse/categories"
  },
  "data": [
    11
  ]
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "DELETE",
    "path": "/warehouse/categories"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}

Stocks

GET

product-code-check

https://kargolab.com/api/v1/warehouse/product-code-check/7673267637

GET /warehouse/product-code-check/7673267637 Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/warehouse/product-code-check/7673267637"
  },
  "data": {}
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/warehouse/product-code-check/7673267637"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

product-code-check-multiple

https://kargolab.com/api/v1/warehouse/product-code-check

POST /warehouse/product-code-check Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
[
  "2147483647",
  "7673267637"
]
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-code-check"
  },
  "data": [
    "2147483647",
    "7673267637"
  ]
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-code-check"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

product-variant-combinate

https://kargolab.com/api/v1/warehouse/product-variant-combinate

POST /warehouse/product-variant-combinate Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "Size": [
    "S",
    "M",
    "L"
  ],
  "Color": [
    "Black",
    "Purple"
  ]
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-variant-combinate"
  },
  "data": {
    "Size": [
      "S",
      "M",
      "L"
    ],
    "Color": [
      "Black",
      "Purple"
    ]
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-variant-combinate"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

product-add

https://kargolab.com/api/v1/warehouse/product-add

POST /warehouse/product-add Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "title": "TEST ÜRÜN GİRİŞİ 346",
  "description": "ürün bilgileri",
  "quantity": 30,
  "cost_price": "10",
  "vat": "18",
  "selling_price": "20",
  "currency": "TRY",
  "warehouse": 3,
  "codes": [
    {
      "type": 2,
      "code": "8684349990509"
    },
    {
      "type": 0,
      "code": "FF6749847"
    }
  ],
  "category": [
    "5",
    "2",
    "3"
  ]
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-add"
  },
  "data": {
    "title": "TEST ÜRÜN GİRİŞİ 346",
    "description": "ürün bilgileri",
    "quantity": 30,
    "cost_price": "10",
    "vat": "18",
    "selling_price": "20",
    "currency": "TRY",
    "warehouse": 3,
    "codes": [
      {
        "type": 2,
        "code": "8684349990509"
      },
      {
        "type": 0,
        "code": "FF6749847"
      }
    ],
    "category": [
      "5",
      "2",
      "3"
    ]
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-add"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

product-update

https://kargolab.com/api/v1/warehouse/product-update

POST /warehouse/product-update Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "product_id": 7500010,
  "title": "title 185789505",
  "description": "test desc update",
  "warehouse": 2,
  "package_width": 8,
  "package_length": 8,
  "package_height": 8,
  "package_weight": 2.4,
  "product_width": 5,
  "product_length": 5,
  "product_height": 5,
  "product_weight": 2,
  "prices": {}
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-update"
  },
  "data": {
    "product_id": 7500010,
    "title": "title 185789505",
    "description": "test desc update",
    "warehouse": 2,
    "package_width": 8,
    "package_length": 8,
    "package_height": 8,
    "package_weight": 2.4,
    "product_width": 5,
    "product_length": 5,
    "product_height": 5,
    "product_weight": 2,
    "prices": {}
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-update"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

product-stock-quantity-process

https://kargolab.com/api/v1/warehouse/product-stock-quantity-process

POST /warehouse/product-stock-quantity-process Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
[
  {
    "product_id": 64,
    "quantity": 2,
    "process": 2,
    "warehouse": 3
  }
]
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-stock-quantity-process"
  },
  "data": [
    {
      "product_id": 64,
      "quantity": 2,
      "process": 2,
      "warehouse": 3
    }
  ]
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-stock-quantity-process"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

product-stock-quantity-balance

https://kargolab.com/api/v1/warehouse/product-stock-quantity-balance

POST /warehouse/product-stock-quantity-balance Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "product_id": 9
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-stock-quantity-balance"
  },
  "data": {
    "product_id": 9
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/product-stock-quantity-balance"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

products-get

https://kargolab.com/api/v1/warehouse/products-get

POST /warehouse/products-get Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 1,
    "limit": 100,
    "order_by": "id",
    "asc_desc": "desc"
  },
  "param": {
    "product_id": 7500007
  }
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/products-get"
  },
  "data": {
    "pagination": {
      "page": 1,
      "limit": 100,
      "order_by": "id",
      "asc_desc": "desc"
    },
    "param": {
      "product_id": 7500007
    }
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/products-get"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
GET

product-details-get

https://kargolab.com/api/v1/warehouse/product/7500007

GET /warehouse/product/7500007 Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/warehouse/product/7500007"
  },
  "data": {}
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/warehouse/product/7500007"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}

Warehouses

GET

warehouses

https://kargolab.com/api/v1/warehouse/warehouses

GET /warehouse/warehouses Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/warehouse/warehouses"
  },
  "data": {}
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/warehouse/warehouses"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

warehouse-add

https://kargolab.com/api/v1/warehouse/warehouses

POST /warehouse/warehouses Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "name": "Ev3333",
  "city": "ISTANBUL",
  "country": "TR"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/warehouses"
  },
  "data": {
    "name": "Ev3333",
    "city": "ISTANBUL",
    "country": "TR"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/warehouse/warehouses"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
DELETE

warehouse-delete

https://kargolab.com/api/v1/warehouse/warehouses

DELETE /warehouse/warehouses Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
[
  7,
  8
]
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "DELETE",
    "path": "/warehouse/warehouses"
  },
  "data": [
    7,
    8
  ]
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "DELETE",
    "path": "/warehouse/warehouses"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
PUT

warehouse-edit

https://kargolab.com/api/v1/warehouse/warehouses

PUT /warehouse/warehouses Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "id": 3,
  "name": "ŞİRKET DEPO5",
  "city": "ISTANBUL",
  "country": "TR"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "PUT",
    "path": "/warehouse/warehouses"
  },
  "data": {
    "id": 3,
    "name": "ŞİRKET DEPO5",
    "city": "ISTANBUL",
    "country": "TR"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "PUT",
    "path": "/warehouse/warehouses"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}

Integrations

Trendyol

GET

Get Orders (Sipariş Paketlerini Çekme)

https://api.trendyol.com/sapigwsuppliers//orders

GET /suppliers//orders Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/suppliers//orders"
  },
  "data": {}
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "GET",
    "path": "/suppliers//orders"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-orders

https://kargolab.com/api/v1/integration-orders/trendyol

POST /integration-orders/trendyol Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 3,
    "limit": 15,
    "order_by": "id",
    "asc_desc": "DESC"
  },
  "param": {}
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-orders/trendyol"
  },
  "data": {
    "pagination": {
      "page": 3,
      "limit": 15,
      "order_by": "id",
      "asc_desc": "DESC"
    },
    "param": {}
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-orders/trendyol"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-orders-track-update

https://api.trendyol.com/sapigw/suppliers//orders/packages

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 3,
    "limit": 15,
    "order_by": "id",
    "asc_desc": "DESC"
  },
  "param": {}
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/sapigw/suppliers/%7b%7btrendyol_supplier_id%7d%7d/orders/packages"
  },
  "data": {
    "pagination": {
      "page": 3,
      "limit": 15,
      "order_by": "id",
      "asc_desc": "DESC"
    },
    "param": {}
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/sapigw/suppliers/%7b%7btrendyol_supplier_id%7d%7d/orders/packages"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}

Hepsi Burada

POST

test

https://kargolab.com/api/v1/integration-hepsi-burada-test

POST /integration-hepsi-burada-test Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 3,
    "limit": 15,
    "order_by": "id",
    "asc_desc": "DESC"
  },
  "param": {}
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-hepsi-burada-test"
  },
  "data": {
    "pagination": {
      "page": 3,
      "limit": 15,
      "order_by": "id",
      "asc_desc": "DESC"
    },
    "param": {}
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-hepsi-burada-test"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-orders-all

https://kargolab.com/api/v1/integration-orders

POST /integration-orders Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 1,
    "limit": 500,
    "order_by": "order_date",
    "asc_desc": "DESC"
  },
  "param": {}
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-orders"
  },
  "data": {
    "pagination": {
      "page": 1,
      "limit": 500,
      "order_by": "order_date",
      "asc_desc": "DESC"
    },
    "param": {}
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-orders"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-track-update

https://kargolab.com/api/v1/integration-track-update

POST /integration-track-update Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
[
  {
    "order_number": "2149",
    "shop_name": "lefkepottery2.com"
  }
]
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-track-update"
  },
  "data": [
    {
      "order_number": "2149",
      "shop_name": "lefkepottery2.com"
    }
  ]
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-track-update"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

woocommerce-track-update

https://kargolab.com/api/v1/woocommerce-track-update

POST /woocommerce-track-update Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "order_number": "2150",
  "courrier": "PTT",
  "link": "https://gonderitakip.ptt.gov.tr/Track/Verify?q=",
  "tracking_number": "2753442458578",
  "shop_name": "lefkepottery.com"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/woocommerce-track-update"
  },
  "data": {
    "order_number": "2150",
    "courrier": "PTT",
    "link": "https://gonderitakip.ptt.gov.tr/Track/Verify?q=",
    "tracking_number": "2753442458578",
    "shop_name": "lefkepottery.com"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/woocommerce-track-update"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integrations

https://kargolab.com/api/v1/integrations

POST /integrations Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 1,
    "limit": 15,
    "order_by": "id",
    "asc_desc": "DESC"
  },
  "param": {}
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integrations"
  },
  "data": {
    "pagination": {
      "page": 1,
      "limit": 15,
      "order_by": "id",
      "asc_desc": "DESC"
    },
    "param": {}
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integrations"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-add-trendyol

https://kargolab.com/api/v1/integration-add/1

POST /integration-add/1 Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "shop_name": "test",
  "api_key": "PTAZeCYyI3eYv2j4nl9z",
  "secret_key": "qljDUZ0iQyc873mMT8Zp",
  "supplier_id": "744768"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-add/1"
  },
  "data": {
    "shop_name": "test",
    "api_key": "PTAZeCYyI3eYv2j4nl9z",
    "secret_key": "qljDUZ0iQyc873mMT8Zp",
    "supplier_id": "744768"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-add/1"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-add-ptt

https://kargolab.com/api/v1/integration-add/20

POST /integration-add/20 Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "shop_name": "kargolab",
  "ptt_api_username": "705273952",
  "ptt_api_password": "iiik2bojdkE7uWGoKUEdVg",
  "ptt_barcodes": "278318600000,278318799999"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-add/20"
  },
  "data": {
    "shop_name": "kargolab",
    "ptt_api_username": "705273952",
    "ptt_api_password": "iiik2bojdkE7uWGoKUEdVg",
    "ptt_barcodes": "278318600000,278318799999"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-add/20"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-add-woocommerce

https://kargolab.com/api/v1/integration-add/6

POST /integration-add/6 Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "shop_name": "lefkepottery",
  "shop_url": "https://www.lefkepottery.com/"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-add/6"
  },
  "data": {
    "shop_name": "lefkepottery",
    "shop_url": "https://www.lefkepottery.com/"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-add/6"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-callback-woocommerce

https://kargolab.com/api/v1/callback/woocommerce

POST /callback/woocommerce Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "shop_name": "cizje",
  "shop_url": "https://cizje.com/",
  "protocol": "https://",
  "key_id": "key_id",
  "user_id": "user_id",
  "consumer_key": "consumer_key",
  "consumer_secret": "consumer_secret",
  "key_permissions": "key_permissions"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/callback/woocommerce"
  },
  "data": {
    "shop_name": "cizje",
    "shop_url": "https://cizje.com/",
    "protocol": "https://",
    "key_id": "key_id",
    "user_id": "user_id",
    "consumer_key": "consumer_key",
    "consumer_secret": "consumer_secret",
    "key_permissions": "key_permissions"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/callback/woocommerce"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

integration-delete

https://kargolab.com/api/v1/integration-delete

POST /integration-delete Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "shop_name": "test"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-delete"
  },
  "data": {
    "shop_name": "test"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/integration-delete"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}

Tickets

POST

ticket-new

https://kargolab.com/api/v1/ticket-add

POST /ticket-add Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "title": 1,
  "ref_number": "",
  "message": "dene55555"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/ticket-add"
  },
  "data": {
    "title": 1,
    "ref_number": "",
    "message": "dene55555"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/ticket-add"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

tickets-get

https://kargolab.com/api/v1/tickets-get

POST /tickets-get Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 1,
    "limit": 10,
    "order_by": "id",
    "asc_desc": "asc"
  },
  "param": {
    "id": 6
  },
  "sql": "",
  "group_by": ""
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/tickets-get"
  },
  "data": {
    "pagination": {
      "page": 1,
      "limit": 10,
      "order_by": "id",
      "asc_desc": "asc"
    },
    "param": {
      "id": 6
    },
    "sql": "",
    "group_by": ""
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/tickets-get"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
POST

ticket-details-get

https://kargolab.com/api/v1/ticket-details-get

POST /ticket-details-get Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "pagination": {
    "page": 1,
    "limit": 10,
    "order_by": "id",
    "asc_desc": "asc"
  },
  "param": {
    "ticket_id": 6
  },
  "sql": "",
  "group_by": ""
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/ticket-details-get"
  },
  "data": {
    "pagination": {
      "page": 1,
      "limit": 10,
      "order_by": "id",
      "asc_desc": "asc"
    },
    "param": {
      "ticket_id": 6
    },
    "sql": "",
    "group_by": ""
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "POST",
    "path": "/ticket-details-get"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
PUT

ticket-mark-deleted

https://kargolab.com/api/v1/ticket-mark

PUT /ticket-mark Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "id": 6,
  "process": "delete"
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "PUT",
    "path": "/ticket-mark"
  },
  "data": {
    "id": 6,
    "process": "delete"
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "PUT",
    "path": "/ticket-mark"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}
DELETE

ticket-message-delete

https://kargolab.com/api/v1/ticket-message-delete

DELETE /ticket-message-delete Auth: Bearer

Headers

KeyDeğer / ÖrnekAçıklama
Acceptapplication/json
Content-Typeapplication/json
{
  "id": 14
}
200Auto Example - Success
{
  "success": true,
  "message": "Sample response generated automatically.",
  "endpoint": {
    "method": "DELETE",
    "path": "/ticket-message-delete"
  },
  "data": {
    "id": 14
  }
}
400Auto Example - Validation Error
{
  "success": false,
  "message": "Sample validation error generated automatically.",
  "endpoint": {
    "method": "DELETE",
    "path": "/ticket-message-delete"
  },
  "errors": [
    {
      "field": "example_field",
      "message": "This field is required."
    }
  ]
}

AI ile Gönderi Oluştur

Bir sipariş mesajını (WhatsApp/DM/e-posta metni) ya da bir görseli (kargo etiketi, sipariş ekran görüntüsü, fatura) gönderin; Kargo Lab sunucusu alıcı + paket bilgisini çıkarıp gönderi oluşturma formunun beklediği 13 alanlık sözleşmeye normalize ederek döner. Yapay zeka anahtarı yalnızca sunucuda tutulur — uygulamanız doğrudan model sağlayıcısına gitmez. Dönen alanları shipment-create'e doldurarak akışı tek adımda tamamlayabilirsiniz.

BAŞLANGIÇ

Mesaj/görselden gönderi — en basit anlatım

Tek uç, iki giriş tipi: metin veya görsel. Akış üç adım:

  1. Gönderin: POST /api/v1/ai/shipment-extract'e ya type: "text" + text, ya da type: "image" + image_base64 yollarsınız.
  2. Alırsınız: data içinde 13 alan (alıcı adı, telefon, il/ilçe/mahalle, adres, içerik, ağırlık…). Bulunamayan alan boş string gelir — model uydurmaz.
  3. Doldurursunuz: bu alanları kendi formunuza / doğrudan shipment-create gövdesine map'leyip gönderiyi oluşturursunuz.

Not: Bu uç yalnızca çıkarım yapar; gönderiyi oluşturmaz. Kullanıcıya doğrulatıp sonra shipment-create çağırmanız önerilir (özellikle telefon ve adres alanlarını).

POST

Metinden çıkarım — /ai/shipment-extract

POST /api/v1/ai/shipment-extract

Sipariş/mesaj metninden gönderi bilgisi çıkarır. Bearer Token gerekir (üye oturumu). İçerik-Tipi application/json.

İstek gövdesi (JSON)

AlanZorunluAçıklama
typehayır"text". Verilmezse text alanı varsa otomatik text kabul edilir.
textevetSerbest metin sipariş/mesaj. En fazla 20.000 karakter (fazlası kırpılır).

Örnek istek

{
  "type": "text",
  "text": "Merhaba, siparişi Ahmet Yılmaz'a gönderir misiniz? Adres: Caferağa Mah. "
            "Moda Cad. No:12 D:5 Kadıköy/İstanbul. Tel: 0532 111 22 33. "
            "1 adet mavi tişört, sipariş no ORD-9087."
}

Örnek yanıt (200)

{
  "status": 200,
  "data": {
    "recipientName": "Ahmet Yılmaz",
    "company": "",
    "phone": "05321112233",
    "email": "",
    "country": "TR",
    "state": "İSTANBUL",
    "city": "KADIKÖY",
    "town": "CAFERAĞA MAH.",
    "address1": "Moda Cad. No:12 D:5",
    "zip": "",
    "content": "1 adet mavi tişört",
    "orderNumber": "ORD-9087",
    "weightKg": ""
  }
}
POST

Görselden çıkarım — /ai/shipment-extract

POST /api/v1/ai/shipment-extract

Aynı uç; giriş tipi image. Kargo etiketi, sipariş ekran görüntüsü veya fatura fotoğrafından alanları okur. Görseli base64 olarak gönderirsiniz.

İstek gövdesi (JSON)

AlanZorunluAçıklama
typehayır"image". Verilmezse image_base64 varsa otomatik image kabul edilir.
image_base64evetGörselin base64'ü. data:image/...;base64, ön eki gelirse sunucu ayıklar. Varsayılan üst sınır ~8 MB (base64 ham boyut) — aşılırsa 413.
mime_typehayırGörsel MIME tipi; varsayılan image/jpeg. (image/png, image/webp …)

Örnek istek

{
  "type": "image",
  "mime_type": "image/jpeg",
  "image_base64": "/9j/4AAQSkZJRgABAQAAAQ..."
  // Kargo etiketi, sipariş ekran görüntüsü veya faturanın base64'ü.
  // 'data:image/jpeg;base64,' ön eki gelirse sunucu otomatik ayıklar.
}

Yanıt gövdesi metin modu ile birebir aynıdır (yukarıdaki 200 örneği); yalnızca giriş tipi değişir.

ALANLAR

Çıktı sözleşmesi — data içindeki 13 alan

Yanıttaki data nesnesi her zaman aşağıdaki 13 alanı içerir; tüm değerler string'dir. Model emin olmadığı alanı boş string ("") bırakır — uydurmaz. country boşsa TR yazılır.

Alan tablosu

AlanAçıklama
recipientNameAlıcının ad soyadı
companyFirma/şirket adı (varsa)
phoneTelefon — yalnızca rakamlar (boşluk/işaret olmadan)
emailE-posta
countryÜlke 2-harf kodu. Belli değilse TR
stateİL (ör. İSTANBUL) — ilçe/mahalle değil
cityİLÇE (ör. KADIKÖY)
townMAHALLE (ör. CAFERAĞA MAH.)
address1Açık adres (cadde, sokak, no, daire)
zipPosta kodu
contentPaket içeriği / ürün açıklaması
orderNumberSipariş numarası
weightKgAğırlık (kilogram, yalnızca sayı; ör. 1.5)

Türkiye adres hiyerarşisi

Adres alanlarını karıştırmayın: state = İl, city = İlçe, town = Mahalle. Bu ayrım kurye entegrasyonunun doğru şube/dağıtım eşlemesi için kritiktir.

HATA & LİMİT

Hata kodları, oran sınırı ve yetki

Hata yanıtları

// 400 — type/alan eksik
{ "status": 400, "message": "type 'text' veya 'image' olmalı" }

// 413 — görsel çok büyük (varsayılan sınır ~8 MB base64)
{ "status": 413, "message": "Görsel çok büyük" }

// 429 — üye saatlik limiti aşıldı (sunucu tarafında açıksa)
{ "status": 429, "message": "Saatlik AI istek limitine ulaşıldı (60/saat). Lütfen daha sonra deneyin." }

// 502 — AI çıkarımı başarısız / yanıt çözümlenemedi
{ "status": 502, "message": "AI çıkarımı başarısız oldu, lütfen tekrar deneyin." }

Yetki (Auth)

Üye oturumu gerekir: Authorization: Bearer <access_token>. Token yoksa 401 Bearer Token Required döner. Kullanım üye bazında loglanabilir/limitlenebilir.

Oran sınırı (rate limit)

  • Sunucu tarafında üye/saat sınırı opsiyoneldir; açıksa aşımda 429 döner. Kapalıyken sınırsızdır.
  • Görsel çağrıları maliyetlidir; istemci tarafında görseli göndermeden önce makul boyuta (ör. 1600px kenar, JPEG ~%80) küçültmeniz önerilir.
  • Çıkarım gecikmesi model yanıtına bağlıdır (tipik 1–4 sn). İsteğinizi buna göre timeout'layın.

İyi uygulama

  • Çıkarımı doğrulama adımı olarak gösterin: kullanıcı onaylamadan gönderi oluşturmayın.
  • Boş dönen zorunlu alanları (telefon, il/ilçe) formda işaretleyip kullanıcıdan tamamlatın.
  • weightKg boş gelirse kendi varsayılan desi/ağırlığınızı uygulayın; ücret her zaman kuryenin ölçüm ağırlığına göre yeniden hesaplanır.

Depo Stok Düşümü

Kargo Lab depo (warehouse) modülünü kullanıyorsanız, bir gönderi oluştururken stoktan otomatik düşüm yapabilirsiniz. Gönderi oluşturma isteğine opsiyonel warehouse dizisi eklersiniz; her kalemi product_id ile ya da kendi sku / barcode / match_text değerinizle belirtirsiniz — sistem ürünü çözüp stoğu düşer.

BAŞLANGIÇ

Gönderi oluştururken stok düşümü

Gönderi oluşturma çağrınıza warehouse dizisini ekleyin. Her kalem bir ürünü ve düşülecek adedi temsil eder. Ürünü dört yoldan biriyle gösterebilirsiniz:

  • product_id — bizim iç ürün id'miz (en kesin).
  • sku / barcode — kendi kodunuz; ürün kodlarınız sisteme tanımlıysa otomatik çözülür.
  • match_text — serbest metin (ör. ürün açıklaması). Daha önce eşleştirdiyseniz (alias) kesin çözülür; aksi halde yalnızca suggestions döner ve otomatik düşüm yapılmaz (yanlış ürün düşmesini engellemek için).

İstek gövdesi (POST shipment-create)

{
  "origin": "...", "destination": "...", "courrier": 455,
  "addresses": { "...": "..." },
  "commodity_description": "Samsung Akıllı Monitör",
  "dimensions": [ { "...": "..." } ], "packaging_type": 2,

  // Opsiyonel: stok düşümü. Her kalem bir depo (warehouse) ürününü belirtir.
  // Ürünü 4 yoldan biriyle gösterebilirsiniz: product_id | sku | barcode | match_text
  "warehouse": [
    { "product_id": 7500002, "quantity": 2 },
    { "sku": "SAM-MON-27", "quantity": 1 },
    { "match_text": "LG Monitör 24 inç", "quantity": 1 }
  ]
}

Cevap (warehouse[] her kalem için sonuç)

{
  "status": 200,
  "reference_number": "...",
  "warehouse": [
    { "product_id": 7500002, "quantity": 2, "drop_result": "dropped",
      "matched_by": "product_id", "balance": 8, "warehouse": 1 },
    { "sku": "SAM-MON-27", "quantity": 1, "drop_result": "dropped",
      "matched_by": "sku", "product_id": 7500050, "balance": 3 },
    { "match_text": "LG Monitör 24 inç", "quantity": 1, "status": 409,
      "drop_result": "unmatched",
      "suggestions": [ { "product_id": 7500004, "title": "LG Monitör", "score": 0.83 } ] }
  ]
}

Önemli

  • Stok düşümü gönderiyi asla bozmaz: bir kalem eşleşmese/düşmese bile gönderi oluşur, ilgili kalem unmatched/failed olarak işaretlenir.
  • Bir kez eşleştirdiğiniz bir match_text'i kalıcı hale getirmek için /warehouse/product-alias kullanın — sonra aynı metin hep matched_by: alias ile kesin çözülür.
ALANLAR

warehouse[] kalem alanları

Kalem alanları

AlanTipAçıklama
product_idintDoğrudan depo ürün id'si. Verilirse eşleştirme atlanır (en kesin).
skustringÜrün SKU'su. warehouse_product_codes üzerinden product_id'ye çözülür.
barcodestringÜrün barkodu. SKU ile aynı şekilde çözülür.
match_textstringSerbest metin (ör. ürün açıklaması). Alias varsa kesin çözülür; yoksa yalnızca suggestions döner (otomatik düşmez).
quantityintDüşülecek adet (≥1). Zorunlu.
ref_idintVaryant kombinasyon id'si (opsiyonel).
warehouseintDepo id'si (opsiyonel; verilmezse stok bulunan depo otomatik çözülür).
stock_drop_enabledint0 ise bu kalem için düşüm atlanır (varsayılan 1).

Sonuç (drop_result) değerleri

drop_resultAnlamı
droppedStok başarıyla düşüldü. balance = yeni bakiye.
unmatchedÜrün eşleştirilemedi (status 409). Gönderi iptal olmaz; suggestions döner.
failedÜrün bulundu ama düşüm başarısız (ör. yetersiz stok). message'a bakın.
disabledKalem stock_drop_enabled=0 ile atlandı.

matched_by alanı eşleşmenin nasıl yapıldığını söyler: product_id · alias · sku · barcode.

POST

/warehouse/product-resolve

POST /api/v1/warehouse/product-resolve

Bir kalemi gönderi oluşturmadan ürüne çözer — önizleme/eşleştirme için. resolved:true ise product_id/ref_id doludur; değilse suggestions (benzerlik skorlu öneri listesi) döner.

İstek

{
  "match_text": "Samsung Akıllı Monitör"
  // veya: { "sku": "SAM-MON-27" } / { "barcode": "869..." }
}

Cevap

{
  "status": 200,
  "message": "Eşleşme bulunamadı, öneriler döndü.",
  "data": {
    "resolved": false,
    "product_id": 0, "ref_id": 0, "matched_by": "", "confidence": 0,
    "suggestions": [
      { "product_id": 7500002, "title": "Samsung Akıllı Monitör", "quantity": 10, "score": 1 },
      { "product_id": 7500004, "title": "LG Monitör", "quantity": 10, "score": 0.56 }
    ]
  }
}
POST

/warehouse/product-alias

POST /api/v1/warehouse/product-alias

Bir serbest metni (açıklama/sku/barkod) bir ürüne kalıcı olarak bağlar. Kaydedildikten sonra aynı metin için yapılan product-resolve ve stok düşümü çağrıları doğrudan matched_by: alias ile kesin çözülür — bir daha eşleştirme sorulmaz. Metin normalize edilir (Türkçe-duyarlı küçük harf + boşluk sadeleştirme), böylece kasa/boşluk farkları aynı eşleşmeye düşer.

İstek

{
  "source_text": "Samsung Akıllı Monitör",
  "source_type": "description",   // description | sku | barcode
  "product_id": 7500002,
  "ref_id": 0                       // opsiyonel varyant
}

Cevap

{ "status": 200, "message": "Eşleştirme kaydedildi.", "alias_id": 12 }

Ürün isteği atan üyeye ait değilse 404 döner (tenant izolasyonu).

Webhook Bildirimleri

Kargo Lab sisteminde bir kargonun durumu değiştiğinde veya kurye tarafı bize bir webhook gönderdiğinde, üyenin profilinde tanımladığı endpoint'e POST ile bildirim atılır. Bu bölüm entegre eden tarafa yöneliktir: payload şeması, header tipleri ve debug ipuçları.

BAŞLANGIÇ

Webhook ile otomatik güncelleme — en basit anlatım

Sürekli bize sormak (polling) yerine, bir kargonun durumu her değiştiğinde biz sizin verdiğiniz URL'ye haber veririz. Mantık üç adım — istek/sonuç:

  1. Olay: Kargonun durumu değişir (kabul → dağıtımda → teslim → iade…).
  2. İstek (biz → siz): Sizin endpoint URL'nize bir POST atarız; gövdesinde kargonun yeni durumu vardır.
  3. Sonuç (siz → biz): Kaydınızı güncelleyip 200 OK dönersiniz. Bitti — artık siz sormuyorsunuz, biz söylüyoruz.

Tek yapmanız gereken: gelen POST'taki shipment.status_current (integer) alanını okuyup kendi tablonuzu güncellemek. Karar mantığını daima bu integer'a göre kurun (9 = göndericiye iade / nihai, 5 = alıcıya teslim); courrier_last_status taşıyıcının ham metnidir, ona göre karar vermeyin.

1) Kurulum (tek seferlik)

Panel → Profil → Bilgiler → Webhook Bildirimleri: Aktif'i açın · Endpoint URL'nizi yazın · bir token belirleyin (gelen isteğin bizden geldiğini doğrulamak için). Alan detayları aşağıdaki SETUP ve AUTH bölümlerinde.

2) Endpoint'inizde (≈15 satır PHP)

<?php
// 1) Token doğrula (sahte istekleri ele)
$token = $_SERVER['HTTP_AUTHORIZATION'] ?? '';
if ($token !== 'Bearer SIZIN_TOKENINIZ') { http_response_code(401); exit; }

// 2) Gelen gövdeyi oku
$body  = json_decode(file_get_contents('php://input'), true);
$takip = $body['shipment']['tracking_number'] ?? '';
$durum = (int)($body['shipment']['status_current'] ?? -1);

// 3) Kendi kaydınızı GÜNCELLE — karar daima status'e göre
//    9 = göndericiye iade (nihai), 5 = alıcıya teslim
//    UPDATE siparisler SET kargo_durum = $durum WHERE takip_no = $takip

// 4) Bize 200 dönün
http_response_code(200);
echo 'OK';

Notlar

  • Her isteğin başlığında X-Kargolab-Event-Id gelir — bunu saklayıp aynı id tekrar gelirse atlayın (mükerrer işleme engeli).
  • İstek "fire-and-forget"tir; hızlı 2xx dönün, ağır işi arka plana atın.
  • Kaçırma ihtimaline karşı kritik kargoları ara sıra /track ile teyit edebilirsiniz.
SETUP

Webhook nereden tanımlanır?

Üye giriş yaptıktan sonra Profil → Bilgiler sekmesinin altındaki Webhook Bildirimleri kartından şu alanları doldurur:

  • Aktif switch'i (kapalıyken sistem hiçbir POST atmaz)
  • Webhook Endpoint URL — https:// veya http:// ile başlayan tam adres. Boş veya geçersiz URL aktifi otomatik kapatır.
  • Header Token Tipi — aşağıdaki tablodaki seçeneklerden biri
  • Header Adı — yalnızca custom tipinde gerekli, regex: ^[A-Za-z0-9\-_]+$
  • Header Değeri (Token) — opak değer, bizim tarafta hash edilmez, doğrudan header'a yazılır
AUTH

Header Token Tipi → Gönderilen header

Eşleme tablosu

auth_typeGönderilen header
noneHeader gönderilmez
bearerAuthorization: Bearer <header_value>
basicAuthorization: Basic <header_value>
x_api_keyX-API-Key: <header_value>
custom<header_name>: <header_value>

Custom header adı tüm karakter setine değil yalnızca A-Z a-z 0-9 - _ kümesine izin verir. Geçersiz isim verilirse profil kaydı 412 ile reddedilir.

POST

shipment.status.updated

POST {üyenin tanımladığı webhook URL'i}

Bir kargonun durumu değiştiğinde — kuyruktaki status worker'dan push edilirken (source: status-worker) veya kurye tarafı bize inbound webhook attığında (source: comtohome-webhook gibi) — aşağıdaki payload üyenin endpoint'ine POST edilir.

Sabit Header'lar

HeaderDeğer
Content-Typeapplication/json
X-Kargolab-Eventshipment.status.updated
X-Kargolab-Event-Id<event_id>

Yukarıdakine ek olarak üyenin seçtiği auth tipine göre ya Authorization ya da X-API-Key ya da custom header eklenir.

Payload

{
  "event": "shipment.status.updated",
  "event_id": "shipment-status-12345-1716470000",
  "event_time": "2026-05-23T10:30:00+03:00",
  "source": "comtohome-webhook",
  "system_number": "56487567",
  "member_id": 30,
  "shipment": {
    "id": 12345,
    "ref_number": "REF-001",
    "tracking_number": "PTT123456789",
    "courrier_id": 455,
    "status_old": 2,
    "status_new": 3,
    "status_current": 3,
    "status_text_old": "Şubeye Teslim Bekleniyor",
    "status_text_new": "Şubeye Teslim Edildi",
    "status_text_current": "Şubeye Teslim Edildi",
    "courrier_last_status_old": "Sube'de",
    "courrier_last_status_new": "Dagitimda",
    "courrier_last_status_current": "Dagitimda"
  }
}

Durum alanları — hangisine güvenmeli?

  • status_old / status_new / status_current — kargonun bizdeki kanonik durumu (integer). Karar mantığınızı her zaman bunlara göre kurun. Örn. iade tamamlandığında status_current = 9 (Göndericiye Teslim/İade), normal teslimde 5 (Teslim Edildi) olur — ikisi kasıtlı olarak ayrıdır.
  • status_text_old / status_text_new / status_text_current — yukarıdaki integer'ların insan-okur Türkçe karşılığı (UI'da göstermek için). Bizim ürettiğimiz sabit etikettir, taşıyıcıya göre değişmez.
  • courrier_last_status_* — taşıyıcının ham metnidir (her kurye farklı yazabilir, boş gelebilir). Yalnızca bilgilendirme amaçlıdır, otorite değildir. Bu metni "Teslim Edildi" diye parse edip karar vermeyin: iade için PTT bazen "Teslim Edildi" yazar ve teslimi iadeden ayıramazsınız. Durum kararları için daima status_* integer'ını kullanın.

cURL davranışı

  • Connect timeout: 2 sn, total timeout: 4 sn
  • Redirect takip edilmez
  • 2xx → başarılı; 3xx-5xx → hata olarak işaretlenir
  • İletim fail olsa bile asıl status güncelleme akışı etkilenmez (fire-and-forget)
  • Şu an retry yapılmaz — endpoint'iniz 5xx döndürürse aynı event tekrar denenmez. Idempotent kalın ve event_id'i kullanarak dedupe yapın.

Önerilen doğrulama

  • Endpoint'iniz X-Kargolab-Event-Id'yi cache edip aynı event'i tekrar işlemesin.
  • Auth tipi olarak bearer veya custom tercih edin — secret'ı asla URL'e gömmeyin.
  • Hızlı 2xx döndürün (ağır işi kuyruğa atın), ki 4 sn timeout'a takılmasın.