İçeriğe geç

Firmaya Göre Desi/Kg Hesaplama

GET /v1/shipments/desi-or-kgs/0

Belirli bir kargo firması için desi/kg hesaplar.

ParametreKonumTipAçıklamaVarsayılanÖrnek
Authorization * headerstringBearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...)-Bearer <TOKEN>
providerId * pathstringFirma ID'si--
fetch('https://api.kargomucuz.com/v1/shipments/desi-or-kgs/0', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_TOKEN>'
}
})
.then(response => response.json())
.then(data => console.log(data));
200: Başarılı kimlik doğrulaması ve geçerli ID parametresiyle istek gönderildiğinde dönen yanıt.
{
"status": true,
"message": "Desi or kgs getirildi.",
"payload": {
"data": {
"others": {
"updated": "2025-02-21T12:36:52.268Z",
"created": "2025-02-21T12:36:52.268Z"
},
"_id": "67b8736421fe979c1c8d27c4",
"providerServiceCode": "ptt_fixed_price",
"matchId": null,
"desiOrKg": 0.5,
"amount": 139,
"currency": "try",
"__v": 0,
"cost": 139,
"profit": 0
},
"totalCount": 1
},
"code": 500
}
200 - Başarılı kimlik doğrulaması ve geçerli ID parametresiyle istek gönderildiğinde dönen yanıt.: Başarılı kimlik doğrulaması ve geçerli ID parametresiyle istek gönderildiğinde dönen yanıt.
{
"status": false,
"message": "Id parametresi geçersiz.",
"code": 500
}