Barkod Numarası ile Sorgu

Barkod Numarası ile Sorgu

Bu API, kullanıcının gönderiye tanımladığı barkod numarası ile gönderi sorgulama işlemini sağlar.

Endpoint Bilgileri

  • URL: {{BASE_URL}}/api/v1/consignments/find/barcode/{barcode}
  • HTTP Metodu: GET
  • İçerik Türü: application/json
  • Kimlik Doğrulama Tipi: APIKEY

İstek Parametreleri

URL Parametreleri

Parametre Adı Parametre Tipi Zorunluluk Açıklama
barcode String ZORUNLU Gönderinin barkod numarası

Örnek Kullanım

API İsteği

Aşağıda, API isteği için bir örnek HTTP raw request bulunmaktadır.

GET {{BASE_URL}}/api/v1/consignments/find/barcode/C2H00001030686
Content-Type: application/json
APIKEY: {{APIKEY}}

API Cevabı

Başarılı bir istekte, API aşağıdaki gibi bir yanıt döndürecektir:

{
    "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=9vdrQegw1TLAeH4aSKgA7rg%2B%2B82FGub2Bn0YLynTecM%3D",
                "tracking_code": "XYZ123",
                "label_type": 0,
                "tracking_type": 2
            }
        ],
        "reference_no": "XYZ123",
        "consignmentType": 0,
        "status": 1,
        "status_message": "Consignment sent to provider",
        "desi": 1.13,
        "weight": 5.4,
        "consignor": {
            "name": "PtteM Tek. ve Elektronik Hiz A.Ş.",
            "attention_name": "PtteM Tek. ve Elektronik Hiz. A.Ş.",
            "country": "Turkey",
            "countryIso3": "TUR",
            "state": "İstanbul",
            "city": "Arnavutköy",
            "address": "Yassıören Mah. Dolunay Sk. 28/A Arnavutköy İstanbul",
            "postal_code": "34277",
            "phone": "905386831394",
            "email": "consignor@comtohome.com"
        },
        "consignee": {
            "name": "Emre Sabancı",
            "attention_name": "Emre Sabancı",
            "country": "Turkey",
            "countryIso3": "TUR",
            "state": "Bursa",
            "city": "Nilüfer",
            "address": "Dumlupınar Mh. Cevizlik Cd. Anadolu Evleri 1, B Blok, D:12",
            "postal_code": "16285",
            "phone": "905386416672",
            "email": "consignee@comtohome.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": "GIDA",
                        "category": "GIDA",
                        "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": "ComToHome Admin",
            "authorized_name": null
        },
        "user": {
            "id": 1,
            "firstname": "Veli",
            "lastname": "Arı"
        },
        "provider": {
            "id": 1,
            "name": "Ptt",
            "logo": "http://localhost/uploads/provider_logos/ptt.png"
        },
        "special_services": [],
        "specific_shipping_method": null
    }
}

Hata Cevapları

API isteği başarısız olursa, API aşağıdaki gibi bir hata yanıtı döndürecektir:

{
    "status": false,
    "errors": [
        {
            "message": "Consignment not found"
        }
    ]
}