Ana içeriğe geç

ID'ye Göre Ticaret Bilgisi Getir

Belirtilen ID'ye ait ticaret ve beyanname verilerini döndürür.

İstek

GET /api/v1/trades/:id

Parametreler

İsimTipYerAçıklama
idstringpathZorunlu. Getirilecek ticaretin ID'si

Başlıklar

İsimAçıklama
AuthorizationZorunlu. Kimlik doğrulama için Bearer token
X-Target-ServerZorunlu. Hedef sunucu tanımlayıcısı

Örnek

curl --request GET \
--url '{{HOST}}/api/v1/trades/682735a3b702ddb736a9b9f2' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'X-Target-Server: declaration'

Yanıt

Başarılı bir istek, ticaret bilgileriyle birlikte HTTP 200 durum kodu döndürür.

{
"id": "682735a3b702ddb736a9b9f2",
"declaration_id": "682735a3b702ddb736a9b9f3",
"name": "API Trade Doom",
"node_name": "Interzoon A.S",
"node_id": "6784fea5481a2963fcb2d74c",
"status": 1,
"type": 1,
"permissions": [],
"created_by": "6784fea5481a2963fcb2d74d",
"created_at": "2025-05-16T12:54:59.782Z",
"updated_at": "2025-05-16T12:54:59.782Z",
"declaration": {
"id": "682735a3b702ddb736a9b9f3",
"trade_id": "682735a3b702ddb736a9b9f2",
"is_summary_declaration": false,
"source_country": null,
"target_country": null,
"senders": [],
"receiver": {
"name": "Interzoon A.S",
"tax_identification_number": "asdasd",
"address": "",
"country": null,
"type": 1,
"is_auto_generated": false,
"auto_fill_id": null
},
"shipment_reference_number": null,
"transaction_attribute_code": null,
"regime_code": null,
"previous_declaration": null,
"financial_officer": null,
"representative": null,
"incoterms": null,
"insurance": null,
"approver": null,
"cif_price": null,
"fob_price": null,
"total_tax_amount": null,
"contracts": null,
"meta": null,
"logistic": null,
"shipment_or_export_country": null,
"transport_vehicle_information": null,
"border_crossing_vehicle_information": null,
"invoices": null,
"preview_url": "",
"signature": null,
"created_at": "2025-05-16T12:54:59.794Z",
"updated_at": "2025-05-16T12:54:59.794Z",
"deleted_at": null,
"total_box_count": 0,
"total_invoice": {
"currency": "USD",
"amount": 0
}
}
}

Durum Kodları

Durum KoduAçıklama
200Başarılı
401Yetkisiz - Geçersiz veya eksik kimlik doğrulama tokeni
404Bulunamadı - Ticaret ID'si mevcut değil
500Sunucu Hatası
}