{"openapi":"3.0.0","paths":{"/api/v1/me":{"get":{"description":"Bağlantı testi için idealdir. Bakiye eksi ise borç anlamına gelir.","operationId":"V1Controller_me","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MeDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Hesap bilgisi + anahtarın kapsamları","tags":["Hesap"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/me\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/me', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/profiles":{"get":{"description":"Yalnız app › Hesabım › Ürün Profilleri ekranında favorilediğiniz (kalp) profiller döner; siparişte `productProfileId` olarak kullanılır. `enabled: false` olanlar ops tarafından hesabınıza kapatılmıştır.","operationId":"V1Controller_profiles","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ProfilesDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Favori ürün profilleri","tags":["Ürün Profilleri"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/profiles\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/profiles', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/orders":{"get":{"description":"Yeniden eskiye, sayfalı. `channel` ile kanal (api, shopify, etsy, excel) filtrelenir.","operationId":"V1Controller_listOrders","parameters":[{"name":"status","required":false,"in":"query","schema":{}},{"name":"channel","required":false,"in":"query","description":"api | shopify | etsy | excel","schema":{}},{"name":"pageSize","required":false,"in":"query","description":"1-100 (varsayılan 50)","schema":{}},{"name":"page","required":false,"in":"query","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OrderListDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Sipariş listesi","tags":["Siparişler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/orders\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/orders', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]},"post":{"description":"Tek nesne veya en fazla 200 elemanlı dizi. Satır bazında sonuç: `created`, `duplicate` (aynı orderId daha önce gönderilmiş, üzerine yazılmaz) veya `error` (alan hataları `errors[]`). Bir satırın hatası diğerlerini durdurmaz; HTTP 200.","operationId":"V1Controller_createOrders","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1CreateOrderDto"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OrdersCreateResultDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Sipariş oluştur","tags":["Siparişler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.cargouse.com/api/v1/orders\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n  {\n    \"orderId\": \"ORD-10001\",\n    \"productProfileId\": 123,\n    \"receiver\": {\n      \"name\": \"Ada\",\n      \"surname\": \"Lovelace\",\n      \"country\": \"US\",\n      \"city\": \"Austin\",\n      \"state\": \"TX\",\n      \"postal\": \"73301\",\n      \"street\": \"Main St\",\n      \"buildingNumber\": \"12\",\n      \"address2\": \"Apt 4B\",\n      \"phone\": \"+1 512 555 0100\",\n      \"email\": \"ada@example.com\"\n    },\n    \"item\": {\n      \"quantity\": 2,\n      \"unitPriceUsd\": 12.5,\n      \"originCountry\": \"TR\"\n    },\n    \"package\": {\n      \"weightKg\": 0.5,\n      \"lengthCm\": 20,\n      \"widthCm\": 15,\n      \"heightCm\": 5\n    }\n  }\n]'"},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/orders', {\n  method: 'POST',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'Content-Type': 'application/json' },\n  body: JSON.stringify([\n    {\n      \"orderId\": \"ORD-10001\",\n      \"productProfileId\": 123,\n      \"receiver\": {\n        \"name\": \"Ada\",\n        \"surname\": \"Lovelace\",\n        \"country\": \"US\",\n        \"city\": \"Austin\",\n        \"state\": \"TX\",\n        \"postal\": \"73301\",\n        \"street\": \"Main St\",\n        \"buildingNumber\": \"12\",\n        \"address2\": \"Apt 4B\",\n        \"phone\": \"+1 512 555 0100\",\n        \"email\": \"ada@example.com\"\n      },\n      \"item\": {\n        \"quantity\": 2,\n        \"unitPriceUsd\": 12.5,\n        \"originCountry\": \"TR\"\n      },\n      \"package\": {\n        \"weightKg\": 0.5,\n        \"lengthCm\": 20,\n        \"widthCm\": 15,\n        \"heightCm\": 5\n      }\n    }\n  ])\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/orders/{orderId}":{"get":{"description":"Bağlı gönderiler (`shipments[]`) ve gönderi verisi (`shipping`) ile.","operationId":"V1Controller_getOrder","parameters":[{"name":"orderId","required":true,"in":"path","description":"Sizin sipariş numaranız","schema":{"type":"string"}},{"name":"channel","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OrderViewDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Sipariş detayı","tags":["Siparişler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/orders/SO-10045\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/orders/SO-10045', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]},"put":{"description":"Alıcı alanları (yalnız verilenler) bağlı gönderiye de yansır; ülke değişimi yeniden fiyatlandırır. `productProfileId` / `item` / `package` yalnız gönderisi olmayan siparişte değiştirilebilir (aksi halde 409 already_shipped).","operationId":"V1Controller_updateOrder","parameters":[{"name":"orderId","required":true,"in":"path","schema":{"type":"string"}},{"name":"channel","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1UpdateOrderDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OrderViewDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Sipariş güncelle","tags":["Siparişler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X PUT \"https://api.cargouse.com/api/v1/orders/SO-10045?channel=1\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"receiver\": {\n    \"name\": \"Ada\",\n    \"surname\": \"Lovelace\",\n    \"country\": \"US\",\n    \"city\": \"Austin\",\n    \"state\": \"TX\",\n    \"postal\": \"73301\",\n    \"street\": \"Main St\",\n    \"buildingNumber\": \"12\",\n    \"address2\": \"Apt 4B\",\n    \"phone\": \"+1 512 555 0100\",\n    \"email\": \"ada@example.com\"\n  },\n  \"productProfileId\": 123,\n  \"item\": {\n    \"quantity\": 2,\n    \"unitPriceUsd\": 12.5,\n    \"originCountry\": \"TR\"\n  },\n  \"package\": {\n    \"weightKg\": 0.5,\n    \"lengthCm\": 20,\n    \"widthCm\": 15,\n    \"heightCm\": 5\n  }\n}'"},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/orders/SO-10045?channel=1', {\n  method: 'PUT',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    \"receiver\": {\n      \"name\": \"Ada\",\n      \"surname\": \"Lovelace\",\n      \"country\": \"US\",\n      \"city\": \"Austin\",\n      \"state\": \"TX\",\n      \"postal\": \"73301\",\n      \"street\": \"Main St\",\n      \"buildingNumber\": \"12\",\n      \"address2\": \"Apt 4B\",\n      \"phone\": \"+1 512 555 0100\",\n      \"email\": \"ada@example.com\"\n    },\n    \"productProfileId\": 123,\n    \"item\": {\n      \"quantity\": 2,\n      \"unitPriceUsd\": 12.5,\n      \"originCountry\": \"TR\"\n    },\n    \"package\": {\n      \"weightKg\": 0.5,\n      \"lengthCm\": 20,\n      \"widthCm\": 15,\n      \"heightCm\": 5\n    }\n  })\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]},"delete":{"description":"Taslak/iptal gönderileri de silinir. Aktif gönderisi olan sipariş silinemez (409 order_locked) — önce gönderiyi panelden iptal edin.","operationId":"V1Controller_deleteOrder","parameters":[{"name":"orderId","required":true,"in":"path","schema":{"type":"string"}},{"name":"channel","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OrderDeleteResultDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Sipariş sil","tags":["Siparişler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X DELETE \"https://api.cargouse.com/api/v1/orders/SO-10045?channel=1\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/orders/SO-10045?channel=1', {\n  method: 'DELETE',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/orders/{orderId}/quote":{"post":{"description":"Para hareketi yoktur. Siparişteki paket/beyan/profil kullanılır; gövdede verilenler geçersiz kılar. Fiyat, depo ölçümü beyandan farklı çıkarsa değişebilir.","operationId":"V1Controller_quote","parameters":[{"name":"orderId","required":true,"in":"path","schema":{"type":"string"}},{"name":"channel","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1QuoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1QuoteResultDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Fiyat teklifi","tags":["Siparişler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.cargouse.com/api/v1/orders/SO-10045/quote?channel=1\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"serviceLevel\": \"standard\",\n  \"incoterm\": \"DDP\",\n  \"productProfileId\": 123,\n  \"item\": {\n    \"quantity\": 2,\n    \"unitPriceUsd\": 12.5,\n    \"originCountry\": \"TR\"\n  },\n  \"package\": {\n    \"weightKg\": 0.5,\n    \"lengthCm\": 20,\n    \"widthCm\": 15,\n    \"heightCm\": 5\n  }\n}'"},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/orders/SO-10045/quote?channel=1', {\n  method: 'POST',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    \"serviceLevel\": \"standard\",\n    \"incoterm\": \"DDP\",\n    \"productProfileId\": 123,\n    \"item\": {\n      \"quantity\": 2,\n      \"unitPriceUsd\": 12.5,\n      \"originCountry\": \"TR\"\n    },\n    \"package\": {\n      \"weightKg\": 0.5,\n      \"lengthCm\": 20,\n      \"widthCm\": 15,\n      \"heightCm\": 5\n    }\n  })\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/orders/{orderId}/ship":{"post":{"description":"Gönderiyi oluşturur ve ücreti bakiyenizden düşer (`pay:false` → taslak kalır, panelden ödenir). Bakiye yetersizse gönderi taslak kalır: `paid:false`, ödenecek tutar `amountDueUsd`. Aynı sipariş ikinci kez dönüştürülemez (409 already_shipped).","operationId":"V1Controller_ship","parameters":[{"name":"orderId","required":true,"in":"path","schema":{"type":"string"}},{"name":"channel","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ShipDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ShipResultDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Gönderiye dönüştür ve öde","tags":["Siparişler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.cargouse.com/api/v1/orders/SO-10045/ship?channel=1\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"serviceLevel\": \"standard\",\n  \"incoterm\": \"DDP\",\n  \"productProfileId\": 123,\n  \"item\": {\n    \"quantity\": 2,\n    \"unitPriceUsd\": 12.5,\n    \"originCountry\": \"TR\"\n  },\n  \"package\": {\n    \"weightKg\": 0.5,\n    \"lengthCm\": 20,\n    \"widthCm\": 15,\n    \"heightCm\": 5\n  },\n  \"pay\": true,\n  \"phoneUnknown\": false,\n  \"emailUnknown\": false\n}'"},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/orders/SO-10045/ship?channel=1', {\n  method: 'POST',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    \"serviceLevel\": \"standard\",\n    \"incoterm\": \"DDP\",\n    \"productProfileId\": 123,\n    \"item\": {\n      \"quantity\": 2,\n      \"unitPriceUsd\": 12.5,\n      \"originCountry\": \"TR\"\n    },\n    \"package\": {\n      \"weightKg\": 0.5,\n      \"lengthCm\": 20,\n      \"widthCm\": 15,\n      \"heightCm\": 5\n    },\n    \"pay\": true,\n    \"phoneUnknown\": false,\n    \"emailUnknown\": false\n  })\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/shipments":{"get":{"description":"Yeniden eskiye, sayfalı. Durum izleme için `updatedSince` (ISO-8601) ile yalnız değişenleri çekin; webhook daha verimlidir.","operationId":"V1Controller_listShipments","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{}},{"name":"page","required":false,"in":"query","schema":{}},{"name":"updatedSince","required":false,"in":"query","description":"ISO-8601","schema":{}},{"name":"orderId","required":false,"in":"query","schema":{}},{"name":"status","required":false,"in":"query","description":"Virgülle çoklu: paid,at_warehouse,in_transit…","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ShipmentListDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Gönderi listesi","tags":["Gönderiler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/shipments\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/shipments', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/shipments/{shipmentNo}":{"get":{"description":"CU numarasıyla. Fiyat kırılımı, beyan, alıcı, beyan/ölçüm paket bilgisi ve etiket durumu.","operationId":"V1Controller_getShipment","parameters":[{"name":"shipmentNo","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ShipmentViewDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"404":{"description":"shipment_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Gönderi detayı","tags":["Gönderiler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/shipments/CU7F3K9Q\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/shipments/CU7F3K9Q', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/shipments/{shipmentNo}/label":{"get":{"description":"Depoya kabul ve etiket üretiminden sonra hazırdır (`labelAvailable: true`). Hazır değilse 404 label_not_ready. Yanıt `application/pdf` dosyadır.","operationId":"V1Controller_label","parameters":[{"name":"shipmentNo","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"PDF dosyası","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"404":{"description":"label_not_ready / shipment_not_found","content":{"application/pdf":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Taşıyıcı etiketi (PDF)","tags":["Gönderiler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/label\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/label', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/shipments/{shipmentNo}/inbound-label":{"get":{"description":"Koliye yapıştırılacak QR (gönderi numarası) + CargoUse depo adresi + kap sırası. Ödeme sonrası, depoya kabule kadar (`paid` / `at_warehouse`) alınabilir; kendi etiketinizi bu veriyle basabilirsiniz.","operationId":"V1Controller_inboundLabel","parameters":[{"name":"shipmentNo","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InboundLabelDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Depo giriş etiketi verisi","tags":["Gönderiler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/inbound-label\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/inbound-label', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/shipments/{shipmentNo}/tracking":{"get":{"description":"Taşıyıcıdan anlık sorgulanır (normalize Türkçe olay listesi, yeniden eskiye). Takip numarası yoksa `tracking: null`. Taşıyıcı geçici olarak yanıt vermezse 503.","operationId":"V1Controller_tracking","parameters":[{"name":"shipmentNo","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1TrackingDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Canlı taşıyıcı takibi","tags":["Gönderiler"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/tracking\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/tracking', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/webhooks":{"get":{"operationId":"V1Controller_listWebhooks","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1WebhookDto"}}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Webhook uçları","tags":["Webhook'lar"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/webhooks\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/webhooks', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]},"post":{"description":"https zorunlu; yerel/özel ağ adresleri reddedilir. İmza gizi (`secret`) YALNIZ bu yanıtta döner. En fazla 5 aktif uç.","operationId":"V1Controller_createWebhook","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateWebhookDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WebhookCreatedDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Webhook ucu oluştur","tags":["Webhook'lar"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.cargouse.com/api/v1/webhooks\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"url\": \"https://example.com/cargouse/webhook\",\n  \"events\": [\n    \"shipment.status_changed\"\n  ]\n}'"},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/webhooks', {\n  method: 'POST',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    \"url\": \"https://example.com/cargouse/webhook\",\n    \"events\": [\n      \"shipment.status_changed\"\n    ]\n  })\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/webhooks/{id}":{"get":{"operationId":"V1Controller_getWebhook","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WebhookDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Webhook ucu detayı","tags":["Webhook'lar"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/webhooks/7\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/webhooks/7', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]},"patch":{"description":"`isActive: true` ile otomatik pasife düşmüş uç yeniden etkinleştirilir (hata sayacı sıfırlanır).","operationId":"V1Controller_updateWebhook","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1UpdateWebhookDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WebhookDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Webhook ucu güncelle","tags":["Webhook'lar"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X PATCH \"https://api.cargouse.com/api/v1/webhooks/7\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"url\": \"https://example.com/cargouse/webhook\",\n  \"events\": [\n    \"shipment.status_changed\"\n  ],\n  \"isActive\": true\n}'"},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/webhooks/7', {\n  method: 'PATCH',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    \"url\": \"https://example.com/cargouse/webhook\",\n    \"events\": [\n      \"shipment.status_changed\"\n    ],\n    \"isActive\": true\n  })\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]},"delete":{"operationId":"V1Controller_deleteWebhook","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WebhookDeleteResultDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Webhook ucu sil","tags":["Webhook'lar"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X DELETE \"https://api.cargouse.com/api/v1/webhooks/7\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/webhooks/7', {\n  method: 'DELETE',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/webhooks/{id}/test":{"post":{"description":"`webhook.test` olayını gerçek başlıklar ve imzayla hemen gönderir; HTTP sonucu döner.","operationId":"V1Controller_testWebhook","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WebhookTestDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Test olayı gönder","tags":["Webhook'lar"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.cargouse.com/api/v1/webhooks/7/test\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/webhooks/7/test', {\n  method: 'POST',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/webhooks/{id}/rotate-secret":{"post":{"description":"Yeni `secret` yalnız bu yanıtta döner; eski giz anında geçersizdir.","operationId":"V1Controller_rotateSecret","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WebhookCreatedDto"}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"İmza gizini yenile","tags":["Webhook'lar"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.cargouse.com/api/v1/webhooks/7/rotate-secret\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/webhooks/7/rotate-secret', {\n  method: 'POST',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}},"/api/v1/webhooks/{id}/deliveries":{"get":{"description":"Son 30 teslimat: durum, deneme sayısı, HTTP kodu, hata ve gönderilen gövde.","operationId":"V1Controller_deliveries","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1WebhookDeliveryDto"}}}}},"401":{"description":"API anahtarı yok / geçersiz (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"403":{"description":"Modül kapalı (MODULE_DISABLED), kapsam yetersiz (insufficient_scope), hesap pasif","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"rate_limited (60/dk) veya quota_exceeded (5000/gün)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"security":[{"api-key":[]}],"summary":"Son teslimatlar","tags":["Webhook'lar"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.cargouse.com/api/v1/webhooks/7/deliveries\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\""},{"lang":"JavaScript","label":"Node.js (fetch)","source":"const res = await fetch('https://api.cargouse.com/api/v1/webhooks/7/deliveries', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' }\n});\nif (!res.ok) throw new Error(`${res.status} ${await res.text()}`);\nconst data = await res.json();"}]}}},"info":{"title":"CargoUse Native API","description":"\n# Giriş\n\nCargoUse Native API, siparişlerinizi kendi sisteminizden (ERP, mağaza yazılımı, pazaryeri entegratörü) CargoUse'a aktarmanız,\nfiyat almanız, gönderiye dönüştürmeniz ve gönderi durumunu izlemeniz için tasarlanmış REST arayüzüdür.\n\n- **Temel adres:** `https://api.cargouse.com/api/v1`\n- **Biçim:** JSON istek ve yanıt (`Content-Type: application/json`, UTF-8). Tarihler ISO-8601 UTC.\n- **Sürüm:** v1. Geriye uyumsuz değişiklikler yeni bir sürüm yolunda yayınlanır; v1 yanıtlarına yeni alanlar eklenebilir, alan kaldırılmaz.\n- **Kimlik:** Hesabım › API sayfasından ürettiğiniz API anahtarı (aşağıda).\n\nAkış özeti: **profil seç → sipariş oluştur → (isteğe bağlı) fiyat al → gönderiye dönüştür ve öde → koliye depo giriş etiketini\nyapıştırıp CargoUse deposuna gönder → durumları webhook veya sorgu ile izle → taşıyıcı etiketi ve takip bilgisini al.**\n\nSağ paneldeki örnekler kopyalanıp çalıştırılabilir; `cu_live_XXXX…` yerine kendi anahtarınızı yazın.\n\n```bash\n# Bağlantı testi — anahtarınız ve kapsamlarınız döner\ncurl \"https://api.cargouse.com/api/v1/me\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n```\n\n```json\n{\n  \"customerId\": 42,\n  \"email\": \"magaza@ornek.com\",\n  \"name\": \"Ada Lovelace\",\n  \"companyName\": \"Örnek Ticaret Ltd.\",\n  \"balanceUsd\": 1250.4,\n  \"currency\": \"USD\",\n  \"apiKey\": {\n    \"id\": 12,\n    \"name\": \"ERP entegrasyonu\",\n    \"keyPrefix\": \"cu_live_3f9a1c2b\",\n    \"scopes\": [\"orders:write\", \"orders:read\", \"shipments:read\", \"webhooks:manage\"],\n    \"rateLimitPerMin\": 60,\n    \"dailyQuota\": 5000\n  }\n}\n```\n\n# Kimlik doğrulama\n\nHer istek `Authorization` başlığında bir API anahtarı taşır (sağdaki örnek).\n\n- Anahtar **app.cargouse.com › Hesabım › API** sayfasında üretilir ve **yalnız üretim anında bir kez** gösterilir. Kaybolursa yenisi üretilir, eskisi iptal edilir.\n- Hesap başına en fazla **5 aktif anahtar**. Anahtarlar müşteri veya CargoUse destek ekibi tarafından iptal edilebilir; iptal anında geçersizdir.\n- Anahtar üretilirken **kapsam** seçilir. Bir uç, anahtarın kapsamı yoksa `403 insufficient_scope` döner.\n\n| Kapsam | İzin verdiği uçlar |\n|---|---|\n| `orders:read` | Sipariş listeleme/detay, fiyat teklifi |\n| `orders:write` | Sipariş oluşturma/güncelleme/silme, gönderiye dönüştürme (**ödeme yapar**) |\n| `shipments:read` | Gönderi listeleme/detay, etiketler, takip |\n| `webhooks:manage` | Webhook uçlarını yönetme |\n\n`GET /v1/me` ve `GET /v1/profiles` herhangi bir geçerli anahtarla çalışır.\n\nAPI erişimi CargoUse ekibi tarafından hesabınızda açılan bir modüldür. Modül kapalıysa tüm istekler `403 MODULE_DISABLED` döner.\n\n```http\n# Her istekte\nAuthorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nContent-Type: application/json\n```\n\n```json\n// 401 — anahtar yok / geçersiz / iptal edilmiş\n{\n  \"statusCode\": 401,\n  \"path\": \"/api/v1/orders\",\n  \"message\": \"API anahtarı geçersiz veya iptal edilmiş.\",\n  \"code\": \"invalid_api_key\"\n}\n```\n\n```json\n// 403 — anahtarın kapsamı bu uca yetmiyor\n{\n  \"statusCode\": 403,\n  \"path\": \"/api/v1/orders/SO-10045/ship\",\n  \"message\": \"Bu işlem için 'orders:write' kapsamı gerekli.\",\n  \"code\": \"insufficient_scope\",\n  \"details\": { \"required\": \"orders:write\", \"granted\": [\"orders:read\"] }\n}\n```\n\n# Limitler\n\n| Sınır | Değer | Aşılınca |\n|---|---|---|\n| Dakikalık istek | anahtar başına **60 istek/dk** | `429 rate_limited`, `Retry-After` başlığı |\n| Günlük istek | anahtar başına **5.000 istek/gün** (UTC) | `429 quota_exceeded` |\n| Toplu sipariş | istek başına **200 sipariş** | `400 too_many_orders` |\n| Sayfalama | `pageSize` en fazla 100 | sessizce 100'e düşürülür |\n\nHer yanıt `X-RateLimit-Limit` ve `X-RateLimit-Remaining` başlıklarını taşır. Yoğun aktarımlarda istekleri toplu gönderin\n(tek istekte 200 sipariş) ve durum izlemede sorgu yerine webhook kullanın.\n\n```http\n# Her yanıtta\nHTTP/2 200\nX-RateLimit-Limit: 60\nX-RateLimit-Remaining: 57\n```\n\n```http\n# Sınır aşıldığında\nHTTP/2 429\nRetry-After: 23\n\n{\n  \"statusCode\": 429,\n  \"path\": \"/api/v1/shipments\",\n  \"message\": \"Dakikalık istek sınırı aşıldı (60/dk). 23 sn sonra tekrar deneyin.\",\n  \"code\": \"rate_limited\"\n}\n```\n\n# Hatalar\n\nTüm hatalar aynı gövdeyle döner (sağdaki örnekler). `code` alanı makine tarafından işlenmek içindir; `message` Türkçe\naçıklamadır; `details` varsa yapısal ek bilgi taşır.\n\n| HTTP | code | Anlamı |\n|---|---|---|\n| 401 | `missing_api_key` / `invalid_api_key` | Başlık yok / anahtar geçersiz ya da iptal edilmiş |\n| 403 | `MODULE_DISABLED` | API modülü hesabınızda kapalı |\n| 403 | `insufficient_scope` | Anahtarın kapsamı bu uca yetmiyor (`details.required`) |\n| 429 | `rate_limited` / `quota_exceeded` | Dakikalık / günlük sınır |\n| 400 | `validation_error` | Alan doğrulama hatası (`details.errors` satır satır) |\n| 400 | `profile_not_enabled` / `invalid_profile` | Ürün profili hesabınıza kapalı / geçersiz |\n| 404 | `order_not_found` / `shipment_not_found` | Kayıt yok ya da size ait değil |\n| 404 | `label_not_ready` | Taşıyıcı etiketi henüz üretilmedi (depoya kabulden sonra) |\n| 409 | `ambiguous_order` | Aynı sipariş numarası birden çok kanalda; `?channel=` ile belirtin |\n| 409 | `already_shipped` / `order_locked` / `order_converted` | Siparişin aktif gönderisi var; silinemez / değiştirilemez |\n| 422 | `missing_shipping_data` | Siparişte profil/paket/beyan yok; gövdede gönderin |\n| 422 | `ship_failed` | Gönderi oluşturulamadı (`details.errors`: fiyat bulunamadı, rota yok, alıcı eksik…) |\n| 400 | `invalid_url` / `webhook_limit` / `key_limit` | Webhook adresi geçersiz / 5 aktif uç / 5 aktif anahtar |\n\nSipariş oluşturma (`POST /v1/orders`) satır bazında çalışır: bir satırın hatası diğerlerini durdurmaz; her satır\n`results[]` içinde `created` / `duplicate` / `error` olarak gelir ve yanıt kodu 200'dür.\n\n```json\n// Hata gövdesi\n{\n  \"statusCode\": 409,\n  \"path\": \"/api/v1/orders/SO-10045/ship\",\n  \"message\": \"Bu siparişin gönderisi zaten var.\",\n  \"code\": \"already_shipped\"\n}\n```\n\n```json\n// Doğrulama hatası — details.errors alan alan\n{\n  \"statusCode\": 400,\n  \"path\": \"/api/v1/orders/SO-10045\",\n  \"message\": \"receiver.postal boş; receiver.state 10 karakteri aşıyor\",\n  \"code\": \"validation_error\",\n  \"details\": { \"errors\": [\"receiver.postal boş\", \"receiver.state 10 karakteri aşıyor\"] }\n}\n```\n\n```json\n// POST /v1/orders — satır bazında sonuç (HTTP 200)\n{\n  \"received\": 3, \"created\": 1, \"duplicate\": 1, \"error\": 1,\n  \"results\": [\n    { \"index\": 0, \"orderId\": \"SO-10045\", \"status\": \"created\",   \"channelOrderId\": 4182 },\n    { \"index\": 1, \"orderId\": \"SO-10044\", \"status\": \"duplicate\", \"channelOrderId\": 4170 },\n    { \"index\": 2, \"orderId\": \"SO-10046\", \"status\": \"error\",     \"channelOrderId\": null, \"errors\": [\"US/CA için receiver.state (eyalet kodu) gerekli\"] }\n  ]\n}\n```\n\n# Sipariş alanları\n\nSipariş satırı, Excel \"ShipmentDraft\" şablonunun alan-alan karşılığıdır (sağda tam örnek). Her satır **tek kalemli tek koli**\nbir gönderidir.\n\n| Alan | Zorunlu | Kural | Excel kolonu |\n|---|---|---|---|\n| `orderId` | evet | ≤ 64 karakter, hesabınızda benzersiz; tekrar gönderilirse `duplicate` (üzerine yazılmaz) | OrderID |\n| `productProfileId` | evet | `GET /v1/profiles` listesinden, `enabled: true` | — (Excel'de tek profil seçilir) |\n| `receiver.name` / `surname` | evet | birleştirilir, ≤ 100 | ReceiverName / ReceiverSurname |\n| `receiver.country` | evet | ISO-2 (US, DE, GB…) | ReceiverCountry |\n| `receiver.city` | evet | ≤ 35; `state` boşsa \"AUSTIN, TX\" biçimi ayrıştırılır | ReceiverCity |\n| `receiver.state` | US/CA | 2 harf eyalet kodu, ≤ 10 | (ReceiverCity içinde) |\n| `receiver.postal` | US/CA/GB | ≤ 20 | ReceiverPostal |\n| `receiver.street` + `buildingNumber` | evet | birleşik adres ≤ 35; US/CA/GB/AU/NZ/IE'de numara önce yazılır | ReceiverStreet / ReceiverBuildingNumber |\n| `receiver.address2` | hayır | ≤ 35 | — |\n| `receiver.phone` / `email` | hayır | ≤ 30 / geçerli e-posta | ReceiverPhone / ReceiverMail |\n| `item.quantity` | evet | pozitif tam sayı | ProformaAmount |\n| `item.unitPriceUsd` | evet | > 0, USD birim beyan değeri | ProformaPrice |\n| `item.originCountry` | hayır | ISO-2, varsayılan TR | OriginCountry |\n| `package.weightKg` | evet | > 0 | Kilogram |\n| `package.lengthCm` / `widthCm` / `heightCm` | evet | > 0 | LenghtCm / WidthCm / HeightCm |\n\nAlıcı bilgisi sonradan `PUT /v1/orders/{orderId}` ile güncellenebilir ve bağlı gönderiye yansır (ülke değişimi yeniden\nfiyatlandırır). Paket/beyan/profil yalnız gönderisi olmayan siparişte değiştirilebilir.\n\n```json\n// Tek sipariş satırı — POST /v1/orders gövdesi (dizi de olabilir)\n{\n  \"orderId\": \"SO-10045\",\n  \"productProfileId\": 123,\n  \"receiver\": {\n    \"name\": \"Ada\",\n    \"surname\": \"Lovelace\",\n    \"country\": \"US\",\n    \"city\": \"Austin\",\n    \"state\": \"TX\",\n    \"postal\": \"73301\",\n    \"street\": \"Main St\",\n    \"buildingNumber\": \"12\",\n    \"address2\": \"Apt 4B\",\n    \"phone\": \"+1 512 555 0100\",\n    \"email\": \"ada@example.com\"\n  },\n  \"item\": { \"quantity\": 2, \"unitPriceUsd\": 12.5, \"originCountry\": \"TR\" },\n  \"package\": { \"weightKg\": 0.5, \"lengthCm\": 20, \"widthCm\": 15, \"heightCm\": 5 }\n}\n```\n\n```json\n// Almanya örneği — eyalet ve posta kodu kuralı yok, adres \"sokak + numara\"\n{\n  \"orderId\": \"SO-10046\",\n  \"productProfileId\": 123,\n  \"receiver\": { \"name\": \"Max Mustermann\", \"country\": \"DE\", \"city\": \"Berlin\", \"postal\": \"10115\", \"street\": \"Hauptstr.\", \"buildingNumber\": \"5\" },\n  \"item\": { \"quantity\": 1, \"unitPriceUsd\": 39.9 },\n  \"package\": { \"weightKg\": 1.2, \"lengthCm\": 30, \"widthCm\": 20, \"heightCm\": 10 }\n}\n```\n\n# Gönderi durumları\n\n| `status` | Etiket | Anlamı |\n|---|---|---|\n| `draft` | Taslak | Oluşturuldu, ödenmedi (`pay:false` veya bakiye yetersiz) |\n| `paid` | Depoya Bekleniyor | Ödendi; koli CargoUse deposuna gönderilmeli (depo giriş etiketi hazır) |\n| `at_warehouse` / `label_created` | Depoda | Depoya ulaştı, ölçüldü; taşıyıcı etiketi üretiliyor / üretildi |\n| `in_transit` | Kargoya Verildi | Taşıyıcıya teslim edildi; takip numarası ve etiket PDF hazır |\n| `delivered` | Teslim Edildi | Alıcıya ulaştı |\n| `cancelled` | İptal | İptal edildi (ücret iadesi bakiyeye) |\n| `failed` | Hata | Etiket üretimi başarısız — CargoUse ekibi ilgilenir |\n\nDepo ölçümü beyandan büyük çıkarsa gönderi yeniden fiyatlanır; fark `dueAmountUsd` alanında görünür ve panelden ödenir.\nDurum değişimlerini sorguyla izlemek için `GET /v1/shipments?updatedSince=<ISO>` kullanın; webhook daha verimlidir.\n\n```bash\n# Son 15 dakikada değişen gönderiler\ncurl \"https://api.cargouse.com/api/v1/shipments?updatedSince=2026-09-16T07:00:00Z&pageSize=100\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n```\n\n```json\n// Gönderi özeti (GET /v1/shipments/{shipmentNo} — kısaltılmış)\n{\n  \"shipmentNo\": \"CU7F3K9Q\",\n  \"status\": \"in_transit\",\n  \"statusLabel\": \"Kargoya Verildi\",\n  \"orderId\": \"SO-10045\",\n  \"carrier\": \"UPS\",\n  \"waybill\": \"1Z999AA10123456784\",\n  \"trackingUrl\": \"https://www.ups.com/track?tracknum=1Z999AA10123456784\",\n  \"price\": 41.85,\n  \"dueAmountUsd\": 0,\n  \"labelStatus\": \"created\",\n  \"labelAvailable\": true,\n  \"receivedAt\": \"2026-09-16T08:00:00.000Z\",\n  \"shippedAt\": \"2026-09-16T15:00:00.000Z\",\n  \"deliveredAt\": null\n}\n```\n\n# Webhook'lar\n\nAktif bir webhook ucu tanımladığınızda, gönderi durumu veya takip numarası değiştiğinde adresinize\n`shipment.status_changed` olayı POST edilir (sağda örnek teslimat). Uç oluşturulmadan önce var olan gönderiler için geçmiş\nolay gönderilmez.\n\n**Başlıklar:** `X-CargoUse-Event`, `X-CargoUse-Event-Id` (tekilleştirme anahtarı), `X-CargoUse-Timestamp`,\n`X-CargoUse-Signature`.\n\n**İmza:** `X-CargoUse-Signature: t=<unix saniye>,v1=<hex>` — `v1`, gizli anahtarınızla `\"<t>.<ham gövde>\"` metninin\nHMAC-SHA256 özetidir. Gövdeyi **ayrıştırmadan** (ham byte'lar) doğrulayın ve `t` için 5 dakikalık tolerans uygulayın.\n\n**Teslimat kuralları:** 2xx dışındaki yanıtlar ve 10 saniyeyi aşan istekler başarısız sayılır; 1 dk → 5 dk → 30 dk → 2 sa → 12 sa\naralıklarla toplam 5 deneme yapılır. Yönlendirmeler (3xx) izlenmez. 20 ardışık başarısız teslimatta uç otomatik pasife alınır;\npanelden veya `PATCH /v1/webhooks/{id}` ile yeniden etkinleştirilir. Aynı olay nadiren birden fazla kez iletilebilir;\n`X-CargoUse-Event-Id` ile tekilleştirin. İsteği hemen 2xx ile yanıtlayıp işi kuyruğa alın.\n\nTeslimat geçmişi için `GET /v1/webhooks/{id}/deliveries`, kurulum testi için `POST /v1/webhooks/{id}/test`.\n\n```http\n# Örnek teslimat — CargoUse → sizin adresiniz\nPOST /cargouse/webhook HTTP/1.1\nHost: example.com\nContent-Type: application/json\nUser-Agent: CargoUse-Webhooks/1.0\nX-CargoUse-Event: shipment.status_changed\nX-CargoUse-Event-Id: evt_2b7c9f0e1a3d4c5b6a7f8e9d\nX-CargoUse-Timestamp: 1758034800\nX-CargoUse-Signature: t=1758034800,v1=6f2a9c1d…\n\n{\n  \"id\": \"evt_2b7c9f0e1a3d4c5b6a7f8e9d\",\n  \"type\": \"shipment.status_changed\",\n  \"createdAt\": \"2026-09-16T15:00:04.000Z\",\n  \"data\": {\n    \"shipmentNo\": \"CU7F3K9Q\",\n    \"orderId\": \"SO-10045\",\n    \"channelOrderId\": 4182,\n    \"previousStatus\": \"at_warehouse\",\n    \"status\": \"in_transit\",\n    \"statusLabel\": \"Kargoya Verildi\",\n    \"waybill\": \"1Z999AA10123456784\",\n    \"carrier\": \"UPS\",\n    \"trackingUrl\": \"https://www.ups.com/track?tracknum=1Z999AA10123456784\",\n    \"changes\": [\"status\"],\n    \"occurredAt\": \"2026-09-16T15:00:00.000Z\"\n  }\n}\n```\n\n```js\n// Node.js — imza doğrulama (rawBody: ayrıştırılmamış gövde)\nimport { createHmac, timingSafeEqual } from 'node:crypto';\n\nexport function verifyCargoUse(rawBody, signatureHeader, secret, toleranceSec = 300) {\n  const { t, v1 } = Object.fromEntries(signatureHeader.split(',').map((p) => p.split('=')));\n  if (Math.abs(Date.now() / 1000 - Number(t)) > toleranceSec) return false;   // eski / yeniden oynatılan istek\n  const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');\n  return expected.length === v1?.length && timingSafeEqual(Buffer.from(expected), Buffer.from(v1));\n}\n```\n\n```bash\n# Uç oluştur — secret yalnız bu yanıtta döner\ncurl -X POST \"https://api.cargouse.com/api/v1/webhooks\" \\\n  -H \"Authorization: Bearer cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"url\": \"https://example.com/cargouse/webhook\" }'\n```\n\n# Hızlı başlangıç\n\n1. **Bağlantı testi:** `GET /v1/me` — anahtarınız ve kapsamlarınız döner.\n2. **Profil kimliği:** `GET /v1/profiles` — app'te favorilediğiniz profillerden `enabled: true` olan bir `id` seçin.\n3. **Sipariş oluştur:** `POST /v1/orders` — tek nesne ya da 200'e kadar dizi.\n4. **Fiyat al (isteğe bağlı):** `POST /v1/orders/{orderId}/quote` — `incoterm` DDP (vergiler dahil) veya DDU.\n5. **Gönderiye dönüştür:** `POST /v1/orders/{orderId}/ship` — bakiyeden öder; `shipmentNo` döner. `pay:false` ile taslak bırakıp panelden ödeyebilirsiniz.\n6. **Depo giriş etiketi:** `GET /v1/shipments/{shipmentNo}/inbound-label` — QR ve depo adresi; koliye yapıştırın.\n7. **İzleme:** webhook tanımlayın ya da `GET /v1/shipments?updatedSince=…` ile sorgulayın; `in_transit` sonrası `…/label` ve `…/tracking`.\n\nUç başına ayrıntılı örnekler (cURL, Node.js) aşağıdaki bölümlerde, her ucun sağ panelindedir.\n\n```bash\n# 1-2) Bağlantı + profil listesi\nKEY=\"cu_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\ncurl \"https://api.cargouse.com/api/v1/me\" -H \"Authorization: Bearer $KEY\"\ncurl \"https://api.cargouse.com/api/v1/profiles\" -H \"Authorization: Bearer $KEY\"\n```\n\n```bash\n# 3) Sipariş oluştur\ncurl -X POST \"https://api.cargouse.com/api/v1/orders\" \\\n  -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" \\\n  -d '{ \"orderId\": \"SO-10045\", \"productProfileId\": 123,\n        \"receiver\": { \"name\": \"Ada\", \"surname\": \"Lovelace\", \"country\": \"US\", \"city\": \"Austin\", \"state\": \"TX\", \"postal\": \"73301\", \"street\": \"Main St\", \"buildingNumber\": \"12\", \"email\": \"ada@example.com\" },\n        \"item\": { \"quantity\": 2, \"unitPriceUsd\": 12.5 },\n        \"package\": { \"weightKg\": 0.5, \"lengthCm\": 20, \"widthCm\": 15, \"heightCm\": 5 } }'\n```\n\n```bash\n# 4) Fiyat teklifi (para hareketi yok) ve 5) gönderiye dönüştür + öde\ncurl -X POST \"https://api.cargouse.com/api/v1/orders/SO-10045/quote\" \\\n  -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" \\\n  -d '{ \"serviceLevel\": \"express\", \"incoterm\": \"DDP\" }'\n\ncurl -X POST \"https://api.cargouse.com/api/v1/orders/SO-10045/ship\" \\\n  -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" \\\n  -d '{ \"serviceLevel\": \"express\", \"incoterm\": \"DDP\", \"pay\": true }'\n```\n\n```bash\n# 6-7) Depo giriş etiketi, gönderi durumu, taşıyıcı etiketi (PDF) ve takip\ncurl \"https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/inbound-label\" -H \"Authorization: Bearer $KEY\"\ncurl \"https://api.cargouse.com/api/v1/shipments/CU7F3K9Q\" -H \"Authorization: Bearer $KEY\"\ncurl \"https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/label\" -H \"Authorization: Bearer $KEY\" -o CU7F3K9Q.pdf\ncurl \"https://api.cargouse.com/api/v1/shipments/CU7F3K9Q/tracking\" -H \"Authorization: Bearer $KEY\"\n```\n\n# Sürüm notları\n\n- **1.0 (2026-09-15):** İlk yayın — siparişler, fiyat teklifi, gönderiye dönüştürme, gönderi sorgu/etiket/takip, webhook'lar.\n","version":"1.0","contact":{},"x-logo":{"url":"/logo-navy.png","altText":"CargoUse","href":"https://www.cargouse.com"}},"tags":[{"name":"Hesap","description":"Bağlantı testi ve anahtar bilgisi."},{"name":"Ürün Profilleri","description":"Siparişte kullanacağınız ürün profili kimlikleri. Yalnız app › Hesabım › Ürün Profilleri ekranında favorilediğiniz (kalp) profiller döner."},{"name":"Siparişler","description":"Sipariş oluşturma (Excel ShipmentDraft alanlarının birebir karşılığı), güncelleme, fiyat teklifi ve gönderiye dönüştürme."},{"name":"Gönderiler","description":"Gönderi durumu, etiketler ve canlı taşıyıcı takibi. Salt-okuma."},{"name":"Webhook'lar","description":"Gönderi durumu değiştiğinde HTTPS adresinize imzalı bildirim."}],"servers":[{"url":"https://api.cargouse.com","description":"Üretim"}],"components":{"securitySchemes":{"api-key":{"scheme":"bearer","bearerFormat":"cu_live_…","type":"http","description":"API anahtarı (Hesabım › API)"}},"schemas":{"ApiErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","example":401},"path":{"type":"string","example":"/api/v1/orders"},"message":{"type":"string","example":"API anahtarı geçersiz veya iptal edilmiş.","description":"İnsan-okur mesaj (Türkçe)"},"code":{"type":"string","example":"invalid_api_key","description":"Makine-okur hata kodu (bkz. Hatalar bölümü)"},"details":{"type":"object","description":"Ek ayrıntı (ör. { errors: [...] })","example":{"errors":["receiver.postal boş"]}}},"required":["statusCode","path","message"]},"V1ApiKeyInfoDto":{"type":"object","properties":{"id":{"type":"number","example":12},"name":{"type":"string","example":"ERP entegrasyonu"},"keyPrefix":{"type":"string","example":"cu_live_3f9a1c2b"},"scopes":{"example":["orders:write","orders:read","shipments:read","webhooks:manage"],"type":"array","items":{"type":"string"}},"rateLimitPerMin":{"type":"number","example":60},"dailyQuota":{"type":"number","example":5000}},"required":["id","name","keyPrefix","scopes","rateLimitPerMin","dailyQuota"]},"V1MeDto":{"type":"object","properties":{"customerId":{"type":"number","example":42},"email":{"type":"string","example":"magaza@ornek.com"},"name":{"type":"object","example":"Ada Lovelace","nullable":true},"companyName":{"type":"object","example":"Örnek Ticaret Ltd.","nullable":true},"balanceUsd":{"type":"object","example":1250.4,"nullable":true,"description":"Güncel bakiye (USD); eksi değer borç"},"currency":{"type":"string","example":"USD"},"apiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/V1ApiKeyInfoDto"}]}},"required":["customerId","email","name","companyName","balanceUsd","currency","apiKey"]},"V1ProfileDto":{"type":"object","properties":{"id":{"type":"number","example":123},"name":{"type":"string","example":"Tişört (pamuklu)"},"nameEn":{"type":"string","example":"T-shirt (cotton)"},"hsCode":{"type":"object","example":"6109.10","nullable":true},"hsCodeUs":{"type":"object","example":"6109.10.0012","nullable":true},"enabled":{"type":"boolean","example":true,"description":"false ise ops bu profili hesabınıza kapatmış; siparişte kullanılamaz"}},"required":["id","name","nameEn","hsCode","hsCodeUs","enabled"]},"V1ProfilesDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1ProfileDto"}}},"required":["items"]},"V1OrderReceiverDto":{"type":"object","properties":{"name":{"type":"object","example":"Ada Lovelace","nullable":true},"phone":{"type":"object","example":"+1 512 555 0100","nullable":true},"email":{"type":"object","example":"ada@example.com","nullable":true},"address1":{"type":"object","example":"12 Main St","nullable":true},"address2":{"type":"object","example":"Apt 4B","nullable":true},"city":{"type":"object","example":"Austin","nullable":true},"state":{"type":"object","example":"TX","nullable":true},"postal":{"type":"object","example":"73301","nullable":true},"country":{"type":"object","example":"US","nullable":true}},"required":["name","phone","email","address1","address2","city","state","postal","country"]},"V1OrderItemDto":{"type":"object","properties":{"title":{"type":"string","example":"Tişört (pamuklu)"},"quantity":{"type":"number","example":2},"unitPrice":{"type":"number","example":12.5},"lineTotal":{"type":"number","example":25}},"required":["title","quantity","unitPrice","lineTotal"]},"V1OrderPackageDto":{"type":"object","properties":{"lengthCm":{"type":"number","example":20},"widthCm":{"type":"number","example":15},"heightCm":{"type":"number","example":5},"weightKg":{"type":"number","example":0.5}},"required":["lengthCm","widthCm","heightCm","weightKg"]},"V1OrderDeclaredDto":{"type":"object","properties":{"quantity":{"type":"number","example":2},"unitValueUsd":{"type":"number","example":12.5}},"required":["quantity","unitValueUsd"]},"V1OrderShippingDto":{"type":"object","properties":{"productProfileId":{"type":"object","example":123,"nullable":true},"package":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/V1OrderPackageDto"}]},"declared":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/V1OrderDeclaredDto"}]},"originCountry":{"type":"object","example":"TR","nullable":true}},"required":["productProfileId","package","declared","originCountry"]},"V1OrderShipmentLinkDto":{"type":"object","properties":{"shipmentNo":{"type":"string","example":"CU7F3K9Q"},"status":{"type":"string","example":"in_transit"},"statusLabel":{"type":"string","example":"Kargoya Verildi"},"serviceLevel":{"type":"object","example":"express","nullable":true},"incoterm":{"type":"object","example":"DDP","nullable":true},"price":{"type":"object","example":41.85,"nullable":true},"currency":{"type":"string","example":"USD"},"carrier":{"type":"object","example":"UPS","nullable":true,"description":"Taşıyıcı görünen adı"},"waybill":{"type":"object","example":"1Z999AA10123456784","nullable":true},"trackingUrl":{"type":"object","example":"https://www.ups.com/track?tracknum=1Z999AA10123456784","nullable":true},"createdAt":{"format":"date-time","type":"string","example":"2026-09-15T10:12:00.000Z"}},"required":["shipmentNo","status","statusLabel","serviceLevel","incoterm","price","currency","carrier","waybill","trackingUrl","createdAt"]},"V1OrderViewDto":{"type":"object","properties":{"orderId":{"type":"string","example":"SO-10045","description":"Sizin sipariş numaranız"},"id":{"type":"number","example":4182,"description":"CargoUse sipariş id"},"channel":{"type":"string","example":"api","description":"api | shopify | etsy | excel"},"orderNumber":{"type":"object","example":"SO-10045","nullable":true},"status":{"type":"string","example":"draft","description":"Birleşik sipariş durumu"},"statusLabel":{"type":"string","example":"Taslak"},"importStatus":{"type":"string","example":"draft","description":"draft | converted"},"receiver":{"$ref":"#/components/schemas/V1OrderReceiverDto"},"items":{"type":"array","items":{"$ref":"#/components/schemas/V1OrderItemDto"}},"shipping":{"nullable":true,"description":"Gönderi verisi (API/Excel siparişlerinde dolu)","type":"object","allOf":[{"$ref":"#/components/schemas/V1OrderShippingDto"}]},"orderTotal":{"type":"number","example":25},"currency":{"type":"string","example":"USD"},"createdAt":{"format":"date-time","type":"string","example":"2026-09-15T10:00:00.000Z"},"receiverEditedAt":{"type":"object","example":null,"nullable":true},"shipments":{"type":"array","items":{"$ref":"#/components/schemas/V1OrderShipmentLinkDto"}}},"required":["orderId","id","channel","orderNumber","status","statusLabel","importStatus","receiver","items","shipping","orderTotal","currency","createdAt","receiverEditedAt","shipments"]},"V1OrderListDto":{"type":"object","properties":{"page":{"type":"number","example":1},"pageSize":{"type":"number","example":50},"total":{"type":"number","example":137},"items":{"type":"array","items":{"$ref":"#/components/schemas/V1OrderViewDto"}}},"required":["page","pageSize","total","items"]},"V1ReceiverDto":{"type":"object","properties":{"name":{"type":"string","example":"Ada","description":"Alıcı adı (surname ile birleştirilir; toplam ≤100)"},"surname":{"type":"string","example":"Lovelace"},"country":{"type":"string","example":"US","description":"ISO-2 ülke kodu"},"city":{"type":"string","example":"Austin","description":"Şehir (≤35). state boşsa \"AUSTIN, TX\" biçimi de ayrıştırılır"},"state":{"type":"string","example":"TX","description":"Eyalet/bölge kodu — US/CA için zorunlu (≤10)"},"postal":{"type":"string","example":"73301","description":"Posta kodu — US/CA/GB için zorunlu (≤20)"},"street":{"type":"string","example":"Main St","description":"Sokak/cadde; buildingNumber ile birleşik adres ≤35 karakter"},"buildingNumber":{"type":"string","example":"12","description":"Bina no (US/CA/GB/AU/NZ/IE için numara önce yazılır)"},"address2":{"type":"string","example":"Apt 4B","description":"Adres 2 (≤35)"},"phone":{"type":"string","example":"+1 512 555 0100"},"email":{"type":"string","example":"ada@example.com"}},"required":["name","country","city","street"]},"V1ItemDto":{"type":"object","properties":{"quantity":{"type":"number","example":2,"description":"Adet (pozitif tam sayı)"},"unitPriceUsd":{"type":"number","example":12.5,"description":"Birim beyan değeri USD (>0)"},"originCountry":{"type":"string","example":"TR","description":"Menşei ülke ISO-2 (varsayılan TR)"}},"required":["quantity","unitPriceUsd"]},"V1PackageDto":{"type":"object","properties":{"weightKg":{"type":"number","example":0.5},"lengthCm":{"type":"number","example":20},"widthCm":{"type":"number","example":15},"heightCm":{"type":"number","example":5}},"required":["weightKg","lengthCm","widthCm","heightCm"]},"V1CreateOrderDto":{"type":"object","properties":{"orderId":{"type":"string","example":"ORD-10001","description":"Sizin sipariş numaranız (≤64, hesapta benzersiz; tekrar gönderilirse duplicate)"},"productProfileId":{"type":"number","example":123,"description":"Ürün profili id (GET /v1/profiles — favori profilleriniz)"},"receiver":{"$ref":"#/components/schemas/V1ReceiverDto"},"item":{"$ref":"#/components/schemas/V1ItemDto"},"package":{"$ref":"#/components/schemas/V1PackageDto"}},"required":["orderId","productProfileId","receiver","item","package"]},"V1OrderResultRowDto":{"type":"object","properties":{"index":{"type":"number","example":0,"description":"İstek dizisindeki sıra"},"orderId":{"type":"object","example":"SO-10045","nullable":true},"status":{"type":"string","enum":["created","duplicate","error"],"example":"created"},"channelOrderId":{"type":"object","example":4182,"nullable":true,"description":"CargoUse sipariş id (duplicate için mevcut kayıt)"},"errors":{"example":["receiver.postal boş"],"type":"array","items":{"type":"string"}}},"required":["index","orderId","status","channelOrderId"]},"V1OrdersCreateResultDto":{"type":"object","properties":{"received":{"type":"number","example":3},"created":{"type":"number","example":2},"duplicate":{"type":"number","example":1},"error":{"type":"number","example":0},"results":{"type":"array","items":{"$ref":"#/components/schemas/V1OrderResultRowDto"}}},"required":["received","created","duplicate","error","results"]},"V1UpdateOrderDto":{"type":"object","properties":{"receiver":{"description":"Yalnız verilen alanlar güncellenir; gönderiye yansır (ülke değişimi yeniden fiyatlandırır)","allOf":[{"$ref":"#/components/schemas/V1ReceiverDto"}]},"productProfileId":{"type":"number","example":123},"item":{"$ref":"#/components/schemas/V1ItemDto"},"package":{"$ref":"#/components/schemas/V1PackageDto"}}},"V1OrderDeleteResultDto":{"type":"object","properties":{"orderId":{"type":"string","example":"SO-10045"},"deleted":{"type":"boolean","example":true},"shipmentsDeleted":{"type":"number","example":0,"description":"Birlikte silinen taslak/iptal gönderi sayısı"}},"required":["orderId","deleted","shipmentsDeleted"]},"V1QuoteDto":{"type":"object","properties":{"serviceLevel":{"type":"string","enum":["standard","express"],"default":"standard"},"incoterm":{"type":"string","enum":["DDP","DDU"],"description":"DDP: vergiler dahil, DDU: alıcı öder"},"productProfileId":{"type":"number","example":123,"description":"Siparişte kayıtlı profili geçersiz kılar"},"item":{"$ref":"#/components/schemas/V1ItemDto"},"package":{"$ref":"#/components/schemas/V1PackageDto"}},"required":["incoterm"]},"V1QuoteLineItemDto":{"type":"object","properties":{"kind":{"type":"string","example":"base","description":"base | destination_surcharge | customs_ieepa | customs_mfn | customs_s232 | oversize_heavy | ddp_free | other"},"label":{"type":"string","example":"Kargo ücreti"},"amount":{"type":"number","example":33.38}},"required":["kind","label","amount"]},"V1QuoteResultDto":{"type":"object","properties":{"orderId":{"type":"string","example":"SO-10045"},"serviceLevel":{"type":"string","example":"express"},"incoterm":{"type":"string","example":"DDP"},"currency":{"type":"string","example":"USD"},"totalUsd":{"type":"number","example":41.85},"desi":{"type":"number","example":1.2},"customsDutyUsd":{"type":"number","example":8.47,"description":"DDP gümrük toplamı (DDU: 0)"},"dutyIncluded":{"type":"boolean","example":false,"description":"true: vergiler fiyata dahil (gümrük kalemleri 0)"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/V1QuoteLineItemDto"}}},"required":["orderId","serviceLevel","incoterm","currency","totalUsd","desi","customsDutyUsd","dutyIncluded","lineItems"]},"V1ShipDto":{"type":"object","properties":{"serviceLevel":{"type":"string","enum":["standard","express"],"default":"standard"},"incoterm":{"type":"string","enum":["DDP","DDU"],"description":"DDP: vergiler dahil, DDU: alıcı öder"},"productProfileId":{"type":"number","example":123,"description":"Siparişte kayıtlı profili geçersiz kılar"},"item":{"$ref":"#/components/schemas/V1ItemDto"},"package":{"$ref":"#/components/schemas/V1PackageDto"},"pay":{"type":"boolean","default":true,"description":"true: gönderiyi oluşturur ve bakiyeden öder; false: taslak (app'ten ödenir)"},"phoneUnknown":{"type":"boolean","default":false,"description":"Alıcı telefonu bilinmiyor beyanı (yer tutucu yazılır)"},"emailUnknown":{"type":"boolean","default":false,"description":"Alıcı e-postası bilinmiyor beyanı"}},"required":["incoterm"]},"V1ShipResultShipmentDto":{"type":"object","properties":{"shipmentNo":{"type":"string","example":"CU7F3K9Q"},"status":{"type":"string","example":"paid","description":"paid (ödendi) | draft (pay:false veya bakiye yetersiz)"},"statusLabel":{"type":"string","example":"Depoya Bekleniyor"},"price":{"type":"number","example":41.85},"currency":{"type":"string","example":"USD"},"serviceLevel":{"type":"string","example":"express"}},"required":["shipmentNo","status","statusLabel","price","currency","serviceLevel"]},"V1ShipResultDto":{"type":"object","properties":{"orderId":{"type":"string","example":"SO-10045"},"channelOrderId":{"type":"number","example":4182},"paid":{"type":"boolean","example":true},"totalUsd":{"type":"number","example":41.85},"amountDueUsd":{"type":"object","example":null,"nullable":true,"description":"Ödenmediyse ödenecek tutar (pay:false veya bakiye yetersiz)"},"shipments":{"type":"array","items":{"$ref":"#/components/schemas/V1ShipResultShipmentDto"}},"errors":{"example":[],"type":"array","items":{"type":"string"}}},"required":["orderId","channelOrderId","paid","totalUsd","amountDueUsd","shipments","errors"]},"V1ShipmentDeclaredDto":{"type":"object","properties":{"quantity":{"type":"object","example":2,"nullable":true},"unitValueUsd":{"type":"object","example":12.5,"nullable":true},"totalValueUsd":{"type":"object","example":25,"nullable":true},"customsDutyUsd":{"type":"object","example":3.13,"nullable":true}},"required":["quantity","unitValueUsd","totalValueUsd","customsDutyUsd"]},"V1ShipmentPackageDimsDto":{"type":"object","properties":{"lengthCm":{"type":"object","example":20,"nullable":true},"widthCm":{"type":"object","example":15,"nullable":true},"heightCm":{"type":"object","example":5,"nullable":true},"weightKg":{"type":"object","example":0.5,"nullable":true},"desi":{"type":"object","example":0.5,"nullable":true}},"required":["lengthCm","widthCm","heightCm","weightKg","desi"]},"V1ShipmentPackageMeasuredDto":{"type":"object","properties":{"lengthCm":{"type":"object","example":20,"nullable":true},"widthCm":{"type":"object","example":15,"nullable":true},"heightCm":{"type":"object","example":5,"nullable":true},"weightKg":{"type":"object","example":0.5,"nullable":true},"desi":{"type":"object","example":0.5,"nullable":true},"measuredAt":{"type":"object","example":"2026-09-16T08:00:00.000Z","nullable":true}},"required":["lengthCm","widthCm","heightCm","weightKg","desi","measuredAt"]},"V1ShipmentPackageDto":{"type":"object","properties":{"declared":{"nullable":true,"description":"Beyan edilen","type":"object","allOf":[{"$ref":"#/components/schemas/V1ShipmentPackageDimsDto"}]},"measured":{"nullable":true,"description":"Depoda ölçülen (kabulden sonra)","type":"object","allOf":[{"$ref":"#/components/schemas/V1ShipmentPackageMeasuredDto"}]}},"required":["declared","measured"]},"V1ShipmentProfileDto":{"type":"object","properties":{"id":{"type":"number","example":123},"name":{"type":"object","example":"Tişört (pamuklu)","nullable":true}},"required":["id","name"]},"V1ShipmentViewDto":{"type":"object","properties":{"shipmentNo":{"type":"string","example":"CU7F3K9Q"},"status":{"type":"string","example":"in_transit","description":"draft | awaiting_payment | paid | at_warehouse | label_created | in_transit | delivered | cancelled | failed"},"statusLabel":{"type":"string","example":"Kargoya Verildi"},"orderId":{"type":"object","example":"SO-10045","nullable":true,"description":"Sipariş numaranız"},"channelOrderId":{"type":"object","example":4182,"nullable":true},"channel":{"type":"object","example":"api","nullable":true},"serviceLevel":{"type":"object","example":"express","nullable":true},"incoterm":{"type":"object","example":"DDP","nullable":true},"carrier":{"type":"object","example":"UPS","nullable":true,"description":"Taşıyıcı görünen adı"},"waybill":{"type":"object","example":"1Z999AA10123456784","nullable":true},"trackingUrl":{"type":"object","example":"https://www.ups.com/track?tracknum=1Z999AA10123456784","nullable":true},"price":{"type":"object","example":41.85,"nullable":true},"originalPrice":{"type":"object","example":null,"nullable":true,"description":"Depo ölçümü sonrası yeniden fiyatlandıysa ilk fiyat"},"currency":{"type":"string","example":"USD"},"dueAmountUsd":{"type":"number","example":0,"description":"Ölçüm farkı için ödenmesi gereken ek tutar"},"priceBreakdown":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/V1QuoteLineItemDto"}},"declared":{"$ref":"#/components/schemas/V1ShipmentDeclaredDto"},"receiver":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/V1OrderReceiverDto"}]},"package":{"$ref":"#/components/schemas/V1ShipmentPackageDto"},"productProfile":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/V1ShipmentProfileDto"}]},"labelStatus":{"type":"object","example":"created","nullable":true,"description":"Taşıyıcı etiketi: queued | processing | created | failed"},"labelAvailable":{"type":"boolean","example":true,"description":"GET …/label ile PDF indirilebilir"},"lastTrackStatus":{"type":"object","example":"In Transit","nullable":true},"lastTrackedAt":{"type":"object","example":"2026-09-17T06:30:00.000Z","nullable":true},"createdAt":{"format":"date-time","type":"string","example":"2026-09-15T10:12:00.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-09-17T06:30:00.000Z"},"receivedAt":{"type":"object","example":"2026-09-16T08:00:00.000Z","nullable":true},"shippedAt":{"type":"object","example":"2026-09-16T15:00:00.000Z","nullable":true},"deliveredAt":{"type":"object","example":null,"nullable":true},"cancelledAt":{"type":"object","example":null,"nullable":true}},"required":["shipmentNo","status","statusLabel","orderId","channelOrderId","channel","serviceLevel","incoterm","carrier","waybill","trackingUrl","price","originalPrice","currency","dueAmountUsd","priceBreakdown","declared","receiver","package","productProfile","labelStatus","labelAvailable","lastTrackStatus","lastTrackedAt","createdAt","updatedAt","receivedAt","shippedAt","deliveredAt","cancelledAt"]},"V1ShipmentListDto":{"type":"object","properties":{"page":{"type":"number","example":1},"pageSize":{"type":"number","example":50},"total":{"type":"number","example":88},"items":{"type":"array","items":{"$ref":"#/components/schemas/V1ShipmentViewDto"}}},"required":["page","pageSize","total","items"]},"V1InboundLabelAddressDto":{"type":"object","properties":{"name":{"type":"string","example":"CargoUse Depo"},"address1":{"type":"string","example":"Örnek Mah. Depo Sk. No:1"},"address2":{"type":"object","example":null,"nullable":true},"city":{"type":"string","example":"İstanbul"},"state":{"type":"object","example":null,"nullable":true},"postal":{"type":"string","example":"34000"},"country":{"type":"string","example":"TR"},"phone":{"type":"string","example":"0541 192 13 93"}},"required":["name","address1","address2","city","state","postal","country","phone"]},"V1InboundLabelDto":{"type":"object","properties":{"shipmentNo":{"type":"string","example":"CU7F3K9Q"},"kapIndex":{"type":"number","example":1,"description":"Çok kolili siparişte kap sırası"},"kapCount":{"type":"number","example":1},"familyCode":{"type":"string","example":"CU7F3K9Q"},"channel":{"type":"object","example":"api","nullable":true},"orderRef":{"type":"object","example":"SO-10045","nullable":true},"qrDataUrl":{"type":"string","example":"data:image/png;base64,…","description":"Gönderi numarası QR kodu (PNG data URL) — koliye yapıştırılır"},"warehouse":{"description":"Kolinin gönderileceği CargoUse deposu","allOf":[{"$ref":"#/components/schemas/V1InboundLabelAddressDto"}]},"customer":{"type":"object","example":{"name":"Ada Lovelace"}},"package":{"type":"object","example":{"length":20,"width":15,"height":5,"weight":0.5,"desi":0.5}},"profileName":{"type":"object","example":"Tişört (pamuklu)","nullable":true},"destCountry":{"type":"object","example":"US","nullable":true},"createdAt":{"format":"date-time","type":"string","example":"2026-09-15T10:12:00.000Z"}},"required":["shipmentNo","kapIndex","kapCount","familyCode","channel","orderRef","qrDataUrl","warehouse","customer","package","profileName","destCountry","createdAt"]},"V1TrackEventDto":{"type":"object","properties":{"code":{"type":"object","example":"DP","nullable":true,"description":"Taşıyıcı olay kodu (teknik referans)"},"label":{"type":"string","example":"Yolda","description":"Müşteriye gösterilen başlık (Türkçe sözlük, yoksa taşıyıcı açıklaması)"},"timestamp":{"type":"object","example":"2026-09-17T06:30:00.000Z","nullable":true},"location":{"type":"object","example":"Köln, DE","nullable":true}},"required":["code","label","timestamp","location"]},"V1TrackingInfoDto":{"type":"object","properties":{"status":{"type":"string","example":"In Transit"},"events":{"description":"Yeniden eskiye","type":"array","items":{"$ref":"#/components/schemas/V1TrackEventDto"}}},"required":["status","events"]},"V1TrackingDto":{"type":"object","properties":{"shipmentNo":{"type":"string","example":"CU7F3K9Q"},"status":{"type":"string","example":"in_transit"},"carrierDisplay":{"type":"object","example":"UPS","nullable":true},"trackingUrl":{"type":"object","example":"https://www.ups.com/track?tracknum=1Z999AA10123456784","nullable":true},"waybill":{"type":"object","example":"1Z999AA10123456784","nullable":true},"tracking":{"nullable":true,"description":"Takip numarası henüz yoksa null","type":"object","allOf":[{"$ref":"#/components/schemas/V1TrackingInfoDto"}]}},"required":["shipmentNo","status","tracking"]},"V1WebhookDto":{"type":"object","properties":{"id":{"type":"number","example":7},"url":{"type":"string","example":"https://example.com/cargouse/webhook"},"events":{"example":["shipment.status_changed"],"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean","example":true},"failureCount":{"type":"number","example":0,"description":"Ardışık başarısız teslimat; 20 olunca uç otomatik pasife düşer"},"lastSuccessAt":{"type":"object","example":"2026-09-16T15:00:05.000Z","nullable":true},"lastFailureAt":{"type":"object","example":null,"nullable":true},"lastError":{"type":"object","example":null,"nullable":true},"secretHint":{"type":"string","example":"whsec_…9f3a","description":"Gizli anahtar ipucu (son 4 hane)"},"createdAt":{"format":"date-time","type":"string","example":"2026-09-15T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-09-16T15:00:05.000Z"}},"required":["id","url","events","isActive","failureCount","lastSuccessAt","lastFailureAt","lastError","secretHint","createdAt","updatedAt"]},"V1CreateWebhookDto":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/cargouse/webhook","description":"https zorunlu; özel/yerel ağ adresleri reddedilir"},"events":{"example":["shipment.status_changed"],"description":"Varsayılan: tüm olaylar","type":"array","items":{"type":"string"}}},"required":["url"]},"V1WebhookCreatedDto":{"type":"object","properties":{"id":{"type":"number","example":7},"url":{"type":"string","example":"https://example.com/cargouse/webhook"},"events":{"example":["shipment.status_changed"],"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean","example":true},"failureCount":{"type":"number","example":0,"description":"Ardışık başarısız teslimat; 20 olunca uç otomatik pasife düşer"},"lastSuccessAt":{"type":"object","example":"2026-09-16T15:00:05.000Z","nullable":true},"lastFailureAt":{"type":"object","example":null,"nullable":true},"lastError":{"type":"object","example":null,"nullable":true},"secretHint":{"type":"string","example":"whsec_…9f3a","description":"Gizli anahtar ipucu (son 4 hane)"},"createdAt":{"format":"date-time","type":"string","example":"2026-09-15T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-09-16T15:00:05.000Z"},"secret":{"type":"string","example":"whsec_4d1f…","description":"İmza gizi — YALNIZ bu yanıtta döner, saklayın"}},"required":["id","url","events","isActive","failureCount","lastSuccessAt","lastFailureAt","lastError","secretHint","createdAt","updatedAt","secret"]},"V1UpdateWebhookDto":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/cargouse/webhook"},"events":{"example":["shipment.status_changed"],"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean","example":true,"description":"Pasif ucu yeniden etkinleştirir (hata sayacı sıfırlanır)"}}},"V1WebhookDeleteResultDto":{"type":"object","properties":{"id":{"type":"number","example":7},"deleted":{"type":"boolean","example":true}},"required":["id","deleted"]},"V1WebhookTestDto":{"type":"object","properties":{"endpointId":{"type":"number","example":7},"ok":{"type":"boolean","example":true},"statusCode":{"type":"object","example":200,"nullable":true},"durationMs":{"type":"number","example":143},"error":{"type":"object","example":null,"nullable":true}},"required":["endpointId","ok","statusCode","durationMs","error"]},"V1WebhookDeliveryDto":{"type":"object","properties":{"id":{"type":"string","example":"9182"},"event":{"type":"string","example":"shipment.status_changed"},"eventId":{"type":"string","example":"evt_2b7c9f0e1a3d4c5b6a7f8e9d"},"status":{"type":"string","example":"delivered","description":"pending | delivered | failed"},"attempts":{"type":"number","example":1},"lastStatusCode":{"type":"object","example":200,"nullable":true},"lastError":{"type":"object","example":null,"nullable":true},"nextAttemptAt":{"type":"object","example":null,"nullable":true,"description":"pending ise sıradaki deneme zamanı"},"deliveredAt":{"type":"object","example":"2026-09-16T15:00:05.000Z","nullable":true},"createdAt":{"format":"date-time","type":"string","example":"2026-09-16T15:00:04.000Z"},"payload":{"type":"object","description":"Gönderilen olay gövdesi","example":{"id":"evt_2b7c9f0e1a3d4c5b6a7f8e9d","type":"shipment.status_changed","createdAt":"2026-09-16T15:00:04.000Z","data":{"shipmentNo":"CU7F3K9Q","orderId":"SO-10045","previousStatus":"at_warehouse","status":"in_transit","statusLabel":"Kargoya Verildi","waybill":"1Z999AA10123456784","carrier":"UPS","trackingUrl":"https://www.ups.com/track?tracknum=1Z999AA10123456784","changes":["status"],"occurredAt":"2026-09-16T15:00:00.000Z"}}}},"required":["id","event","eventId","status","attempts","lastStatusCode","lastError","nextAttemptAt","deliveredAt","createdAt","payload"]}}}}