Barkod Numarası ile Sorgu

Bu API, ComToHome sistem barkodu (C2H...) ile gönderi sorgulama işlemini sağlar.

Endpoint Bilgileri

Özellik Değer
URL {{BASE_URL}}/api/v1/consignments/find/barcode/{barcode}
HTTP Metodu GET
İçerik Türü application/json
Kimlik Doğrulama APIKEY header
Rate Limit 300 istek / 1 dakika (sliding window)

Rate Limit Aşımı: Limit aşıldığında API 429 Too Many Requests hatası döner. Detaylı bilgi için Rate Limit sayfasına bakın.


İstek Parametreleri

URL Parametreleri

Parametre Tip Zorunluluk Açıklama
barcode String ZORUNLU ComToHome sistem barkodu (örn: C2H07238640094)

Örnek Kullanım

curl -X GET "{{BASE_URL}}/api/v1/consignments/find/barcode/C2H07238640094" \
  -H "Content-Type: application/json" \
  -H "APIKEY: {{APIKEY}}"

API Cevabı

Başarılı Yanıt

{
    "status": true,
    "message": null,
    "data": {
        "id": 632280,
        "uuid": "3c1563eb-9afd-4eda-8c26-51174d805b08",
        "parent": null,
        "type": "NORMAL",
        "barcode": "C2H07238640094",
        "labels": [
            {
                "id": 149546,
                "provider": 1,
                "file_name": "label_GejlkH.pdf",
                "file_url": "http://localhost/api/v1/public-download/consignment-label/149546?_hash=...",
                "tracking_code": "1Z999AA10123456784",
                "label_type": 0,
                "tracking_type": 2
            }
        ],
        "reference_no": "ORDER-2024-001",
        "consignmentType": 0,
        "status": 1,
        "status_message": "Consignment sent to provider",
        "desi": 1.13,
        "weight": 5.4,
        "consignor": {
            "name": "Gönderen Firma A.Ş.",
            "attention_name": "Gönderen Firma A.Ş.",
            "country": "Turkey",
            "countryIso3": "TUR",
            "state": "İstanbul",
            "city": "Arnavutköy",
            "address": "Yassıören Mah. Dolunay Sk. 28/A",
            "postal_code": "34277",
            "phone": "905386831394",
            "email": "consignor@example.com"
        },
        "consignee": {
            "name": "Alıcı Adı",
            "attention_name": "Alıcı Adı",
            "country": "Turkey",
            "countryIso3": "TUR",
            "state": "Bursa",
            "city": "Nilüfer",
            "address": "Dumlupınar Mh. Cevizlik Cd.",
            "postal_code": "16285",
            "phone": "905386416672",
            "email": "consignee@example.com"
        },
        "warehouse_id": null,
        "consignee_id": null,
        "details": [
            {
                "status": 1,
                "status_name": "SENDED_TO_PROVIDER",
                "status_description": "Consignment sent to provider",
                "message": "Consignment sent to provider",
                "status_datetime": "2025-02-18 13:21:16",
                "location": null
            }
        ],
        "packages": [
            {
                "id": 562353,
                "package_type": 1,
                "post_type": 4,
                "quantity": 1,
                "dangerous_goods": false,
                "items": [
                    {
                        "id": 150433,
                        "gtip": null,
                        "description": "Ürün Açıklaması",
                        "category": "Kategori",
                        "origin": "TR",
                        "currency": "USD",
                        "quantity": 1,
                        "unit_price": 8.03
                    }
                ]
            }
        ],
        "documents": [],
        "created_at": "2025-02-18 13:21:16",
        "updated_at": "2025-02-18 13:21:18",
        "provider_base_cost": 20,
        "additional_cost": 64,
        "rule_cost": 0,
        "service_fee": 16.8,
        "special_service_fee": 0,
        "total_cost": 120.96,
        "currency_code": "TRY",
        "currency_rate": 1,
        "permissions": {
            "can_create_cn22": true,
            "can_create_cn23": true,
            "can_create_proforma_invoice": true,
            "can_send_to_provider_manually": true,
            "can_recheck_manually": true
        },
        "customer": {
            "id": 1,
            "customer_code": "1",
            "name": "Müşteri Adı",
            "authorized_name": null
        },
        "user": {
            "id": 1,
            "firstname": "Kullanıcı",
            "lastname": "Adı"
        },
        "provider": {
            "id": 1,
            "name": "Ptt",
            "logo": "http://localhost/uploads/provider_logos/ptt.png"
        },
        "special_services": [],
        "specific_shipping_method": null
    }
}

Hata Yanıtları

{
    "status": false,
    "errors": [
        {
            "message": "Konsinye bulunamadı"
        }
    ]
}