These docs are for v1.0. Click to read the latest docs for v2024.09.

Discussions

Ask a Question
Back to All

Rates could not be calculated UK is not a supported country

Here is the request JSON, I am requesting to buy create and buy labels with V1 API. API is not returning label data. it was working fine before.

Here is the response and it is giving some error saying - ' "undefined method `[]' for nil:NilClass"' Please check, I am requesting against sandbox.

{
"shipment": {
"created_at": "2022-10-05T11:49:21.286Z",
"updated_at": "2022-10-05T11:49:22.074Z",
"order_created_at": null,
"easyship_shipment_id": "ESAU10112657",
"origin_address": {
"id": "5f82c4b9-a671-498f-912a-65aa964e4a70",
"company_name": "Tap N Go Pty Ltd",
"contact_name": "Sagar Malik",
"contact_email": "[email protected]",
"contact_phone": "0",
"line_1": "123 Test Road",
"line_2": null,
"postal_code": "2600",
"city": "CANBERRA",
"state": null,
"country": {
"name": "Australia"
},
"default_values": {
"pickup": true,
"billing": false,
"sender": true,
"return": true
}
},
"store_name": "Salesforce",
"set_as_residential": false,
"destination_name": "Aloha Chen",
"destination_company_name": null,
"consignee_tax_id": null,
"destination_address_line_1": "300 Park Avenue",
"destination_address_line_2": null,
"destination_city": "New York",
"destination_state": "NY",
"destination_postal_code": "10022",
"destination_phone_number": "+1234567890",
"destination_email_address": "[email protected]",
"order_notes": "Happy Birthday!",
"buyer_notes": "Happy Birthday!",
"seller_notes": "VIP client",
"order_tag_list": [],
"platform_order_number": "#1234",
"platform_name": "Amazon",
"total_customs_value": 135.17,
"total_actual_weight": 1,
"total_dimensional_weight": 0.2,
"total_volumetric_weight": 1,
"is_insured": false,
"currency": "AUD",
"shipment_state": "created",
"pickup_state": "not_requested",
"delivery_state": "not_created",
"label_state": "technical_failed",
"warehouse_state": "none",
"label_url": null,
"tracking_number": "ESAU10112657",
"tracking_page_url": "https://www.trackmyshipment.co/shipment-tracking/ESAU10112657",
"label_generated_at": null,
"label_response": {
"errors": [
"undefined method `[]' for nil:NilClass"
],
"status": "failure",
"cost": 54.5,
"available_balance": -4374.85
},
"origin_country": {
"name": "Australia",
"alpha2": "AU"
},
"destination_country": {
"name": "United States",
"alpha2": "US"
},
"items": [
{
"id": "022753ff-aab2-46bc-8f6f-8a5f3134af85",
"description": "test description",
"sku": null,
"width": 10,
"length": 10,
"height": 10,
"actual_weight": 1,
"dimensional_weight": 0.2,
"volumetric_weight": 1,
"declared_customs_value": 100,
"declared_currency": "USD",
"origin_customs_value": 135.17,
"origin_currency": "AUD",
"category": "tablets",
"quantity": 1
}
],
"box": {
"name": null,
"length": "10.0",
"width": "10.0",
"height": "10.0"
},
"selected_courier": {
"id": "6507937b-2484-4c3f-8a6c-74191e2fc91a",
"name": "Toll - Express Parcel",
"min_delivery_time": "6",
"max_delivery_time": "10",
"shipment_charge": 41.54,
"fuel_surcharge": 12.97,
"remote_area_surcharge": 0,
"remote_area_surcharges": {},
"other_surcharges": {},
"oversized_surcharge": 0,
"additional_services_surcharge": 0,
"residential_full_fee": 0,
"residential_discounted_fee": 0,
"shipment_charge_total": 54.5,
"warehouse_handling_fee": 0,
"insurance_fee": 0,
"import_tax_charge": 0,
"import_tax_non_chargeable": 0,
"import_duty_charge": 0,
"ddp_handling_fee": 0,
"total_charge": 54.5,
"is_above_threshold": false,
"effective_incoterms": "DDU",
"estimated_import_tax": 0,
"estimated_import_duty": 0,
"courier_does_pickup": null,
"courier_dropoff_url": null,
"available_handover_options": "free_pickup",
"courier_remarks": null,
"payment_recipient": "Easyship"
},
"is_merged": false,
"discount": {
"code": null,
"amount": 0,
"expires_at": null,
"percentage": null,
"origin_amount": 0
}
}
}


Thanks!