{
"OriginAddress": {
"Line1": null,
"Line2": null,
"Line3": null,
"City": "Colombo",
"StateOrProvinceCode": "",
"PostCode": "01300",
"CountryCode": "LK",
"Longitude": 0.0,
"Latitude": 0.0,
"BuildingNumber": null,
"BuildingName": null,
"Floor": null,
"Apartment": null,
"POBox": null,
"Description": null
},
"DestinationAddress": {
"Line1": null,
"Line2": null,
"Line3": null,
"City": "Galle",
"StateOrProvinceCode": "",
"PostCode": "80000",
"CountryCode": "LK",
"Longitude": 0.0,
"Latitude": 0.0,
"BuildingNumber": null,
"BuildingName": null,
"Floor": null,
"Apartment": null,
"POBox": null,
"Description": null
},
"ShipmentDetails": {
"Dimensions": null,
"ActualWeight": {
"Unit": "kg",
"Value": 5.0
},
"ChargeableWeight": {
"Unit": "kg",
"Value": 5.0
},
"DescriptionOfGoods": null,
"GoodsOriginCountry": null,
"NumberOfPieces": 1,
"ProductGroup": "DOM",
"ProductType": "ONP",
"PaymentType": "P",
"PaymentOptions": null,
"CustomsValueAmount": null,
"CashOnDeliveryAmount": null,
"InsuranceAmount": null,
"CashAdditionalAmount": null,
"CashAdditionalAmountDescription": null,
"CollectAmount": null,
"Services": "",
"Items": null,
"DeliveryInstructions": null,
"AdditionalProperties": null,
"ContainsDangerousGoods": false
},
"PreferredCurrencyCode": "LKR",
"Transaction": null
}
Я добавил пример кода, это должно работать. Вы получите сообщение Failed to Get Rate, если ставки не определены.