Questions

Ask A Question
0

Buy label issue

Hello. I'm having this error when i'm trying to buy a label for a shipment using https://api.easyship.com/label/v1/labels request: { "message": "undefined method map' for nil:NilClass", "errors": [ "undefined methodmap' for nil:NilClass" ], "labels": [], "total_cost": null, "available_balance": 100.0 } I'm having it on both sandbox and prod accounts. Can you please explain what this error could mean? Can you please provide a list of possible error codes/errors which can occur on label creation? Also i see on the UI that for some destinations/weight the system can not find a courier. What will be in the buy label api response in this case? And what will be in the response if there's not enough money on available balance ? The shipment was created in postman using https://api.easyship.com/v2/shipments with following body: { "origin_address": { "line_1": "2509 Plantside Dr", "line_2": "Unit 401", "state": "KY", "city": "Louisville", "postal_code": "40299", "country_alpha2": "US", "contact_name": "Rob", "company_name": "SV", "contact_phone": "+8129876619", "contact_email": "[email protected]" }, "sender_address": { "line_1": "2509 Plantside Dr", "line_2": "Unit 401", "state": "KY", "city": "Louisville", "postal_code": "40299", "country_alpha2": "US", "contact_name": "Rob", "company_name": "SV", "contact_phone": "+8129876619", "contact_email": "[email protected]" }, "return_address": { "line_1": "2509 Plantside Dr", "line_2": "Unit 401", "state": "KY", "city": "Louisville", "postal_code": "40299", "country_alpha2": "US", "contact_name": "Rob", "company_name": "SV", "contact_phone": "+8129876619", "contact_email": "[email protected]" }, "destination_address": { "line_1": "9265 Firestone Blvd, Downey, CA 90241, United States", "line_2": "Porte A", "state": "CA", "city": "Downey", "postal_code": "90241", "country_alpha2": "US", "contact_name": "Sonny Bill", "company_name": "Sonny Bill", "contact_phone": "+336638000", "contact_email": "[email protected]" }, "metadata": {}, "set_as_residential": false, "incoterms": "DDU", "shipping_settings": { "units": { "weight": "lb", "dimensions": "in" }, "printing_options": { "format": "pdf", "label": "4x6", "commercial_invoice": "A4", "packing_slip": "none" }, "buy_label": false, "buy_label_synchronous": false }, "parcels": [ { "total_actual_weight": 10, "box": { "slug": null, "length": 10, "width": 8, "height": 5 }, "items": [ { "description": "Silk dress", "category": "fashion", "sku": "test01", "quantity": 2, "dimensions": { "length": 12, "width": 12, "height": 12 }, "actual_weight": 10, "declared_currency": "USD", "declared_customs_value": 20 } ] } ] }

Posted by Ivan Ivanenko 21 days ago

0

We're sorry, but something went wrong (500)

Hey! I'm attempting to use shipment api to print labels, whilst in sandbox enviroment. I had this working last week- but came back to finish my work and am getting 'We're sorry, but something went wrong (500)' I've run through the script to make sure nothing is wrong with my json etc, and all seems the same as before. All my data, which is passed to the request successfully: {"origin_address":{"line_1":"Gatehouse Lodge","state":"eqweq","city":"Reading","postal_code":"RG76NN","country_alpha2":"GB","contact_name":"Ben b","company_name":"SwapCs","contact_phone":"[email protected]","contact_email":"[email protected]"},"sender_address":{"line_1":"Gatehouse Lodge","state":"eqweq","city":"Reading","postal_code":"RG76NN","country_alpha2":"GB","contact_name":"Ben b","company_name":"SwapCs","contact_phone":"[email protected]","contact_email":"[email protected]"},"return_address":{"line_1":"Gatehouse Lodge","state":"eqweq","city":"Reading","postal_code":"RG76NN","country_alpha2":"GB","contact_name":"Ben b","company_name":"SwapCs","contact_phone":"[email protected]","contact_email":"[email protected]"},"destination_address":{"line_1":"Gatehouse Lodge","state":"eqweq","city":"Reading","postal_code":"RG7 6NN","country_alpha2":"GB","contact_name":"Ben ben","contact_phone":"07955450874","contact_email":"[email protected]"},"metadata":{},"set_as_residential":false,"consignee_tax_id":null,"eei_reference":null,"incoterms":"DDU","insurance":{"is_insured":false,"insured_amount":10,"insured_currency":"GBP"},"order_data":{"platform_name":"SwapCs","platform_order_number":"1003","order_tag_list":["clothes"],"seller_notes":null,"buyer_notes":null},"courier_selection":{"selected_courier_id":"d70f503c-905b-4e28-a015-d27069a09e0c","allow_courier_fallback":true,"apply_shipping_rules":true},"shipping_settings":{"units":{"weight":"lb","dimensions":"in"},"printing_options":{"format":"pdf","label":"4x6","commercial_invoice":"A4","packing_slip":"none"},"buy_label":true,"buy_label_synchronous":true},"parcels":[{"total_actual_weight":0.8,"box":{"length":5,"width":4,"height":2},"items":[{"description":"Silk dress","category":"fashion","sku":"test01","quantity":1,"declared_currency":"GBP","declared_customs_value":20}]}]} Here's my request: --- callback: "{% log response, type: 'response object' %}\n" format: https request_headers: '{ "Authorization": "Bearer sand_c+vc4wvtoxCsbVpPxUOb6uGECV81PyPy................=", "Content-Type": "application/json" }' to: https://api.easyship.com/v2/shipments trigger_condition: t --- { "origin_address": { "line_1": "{{data.seller_address_street}}", "state": "{{data.seller_address_state}}", "city": "{{data.seller_address_city}}", "postal_code": "{{data.seller_address_zip}}", "country_alpha2": "GB", "contact_name": "{{data.seller_name}}", "company_name": "SwapCs", "contact_phone": "{{data.seller_mobile}}", "contact_email": "{{data.seller_email}}" }, "sender_address": { "line_1": "{{data.seller_address_street}}", "state": "{{data.seller_address_state}}", "city": "{{data.seller_address_city}}", "postal_code": "{{data.seller_address_zip}}", "country_alpha2": "GB", "contact_name": "{{data.seller_name}}", "company_name": "SwapCs", "contact_phone": "{{data.seller_mobile}}", "contact_email": "{{data.seller_email}}" }, "return_address": { "line_1": "{{data.seller_address_street}}", "state": "{{data.seller_address_state}}", "city": "{{data.seller_address_city}}", "postal_code": "{{data.seller_address_zip}}", "country_alpha2": "GB", "contact_name": "{{data.seller_name}}", "company_name": "SwapCs", "contact_phone": "{{data.seller_mobile}}", "contact_email": "{{data.seller_email}}" }, "destination_address": { "line_1": "{{data.address_street}}", "state": "{{data.address_state}}", "city": "{{data.address_city}}", "postal_code": "{{data.address_zip}}", "country_alpha2": "GB", "contact_name": "{{data.buyer_name}}", "contact_phone": "{{data.buyer_mobile}}", "contact_email": "{{data.buyer_email}}" }, "metadata": {}, "set_as_residential": false, "consignee_tax_id": null, "eei_reference": null, "incoterms": "DDU", "insurance": { "is_insured": false, "insured_amount": 10, "insured_currency": "GBP" }, "order_data": { "platform_name": "SwapCs", "platform_order_number": "1003", "order_tag_list": [ "clothes" ], "seller_notes": null, "buyer_notes": null }, "courier_selection": { "selected_courier_id": "{{data.courier_id}}", "allow_courier_fallback": true, "apply_shipping_rules": true }, "shipping_settings": { "units": { "weight": "lb", "dimensions": "in" }, "printing_options": { "format": "pdf", "label": "4x6", "commercial_invoice": "A4", "packing_slip": "none" }, "buy_label": true, "buy_label_synchronous": true }, "parcels": [ { "total_actual_weight": 0.8, "box": { "length": 5, "width": 4, "height": 2 }, "items": [ { "description": "Silk dress", "category": "fashion", "sku": "test01", "quantity": 1, "declared_currency": "GBP", "declared_customs_value": 20 } ] } ] }

Posted by Ben Porter 22 days ago

4
ANSWERED

Create a Shipment 201 always represents created,but I want to test the status of 200

The example given in the API access method <Create a Shipment>: when the value of this method < buy_label_synchronous> is true, it always reports an error of 500, and when the value is false, 201 always represents created, but I want to test the status of 200 { "origin_address": { "line_1": "55 Prospect St", "line_2": "Unit 401", "state": "NY", "city": "Sydney", "postal_code": "11201", "country_alpha2": "US", "contact_name": "Mandy Morrison", "company_name": "Mandy's Watches", "contact_phone": "+1396380000", "contact_email": "[email protected]" }, "sender_address": { "line_1": "55 Prospect St", "line_2": "Unit 401", "state": "NY", "city": "Sydney", "postal_code": "11201", "country_alpha2": "US", "contact_name": "Mandy Morrison", "company_name": "Mandy's Watches", "contact_phone": "+1396380000", "contact_email": "[email protected]" }, "return_address": { "line_1": "55 Prospect St", "line_2": "Unit 401", "state": "NY", "city": "Sydney", "postal_code": "11201", "country_alpha2": "US", "contact_name": "Mandy Morrison", "company_name": "Mandy's Watches", "contact_phone": "+1396380000", "contact_email": "[email protected]" }, "destination_address": { "line_1": "1 quai de Jemmapes", "line_2": "Porte A", "state": "CA", "city": "Paris", "postal_code": "75010", "country_alpha2": "FR", "contact_name": "Sonny Bill", "company_name": null, "contact_phone": "+336638000", "contact_email": "[email protected]" }, "metadata": {}, "set_as_residential": true,// "consignee_tax_id": null, "eei_reference": null, "incoterms": "DDU", "insurance": { "is_insured": true,// "insured_amount": 600, "insured_currency": "USD" }, "order_data": { "platform_name": "Shopify",// "platform_order_number": "#1001",// "order_tag_list": [ "VIP" ], "seller_notes": null, "buyer_notes": null }, "courier_selection": { "selected_courier_id": "5179fe34-33ba-403a-9270-bda4162bc190", "allow_courier_fallback": false, "apply_shipping_rules": true }, "shipping_settings": { "units": { "weight": "lb", "dimensions": "in" }, "printing_options": { "format": "png", "label": "4x6", "commercial_invoice": "A4", "packing_slip": "4x6" }, "buy_label": false, "buy_label_synchronous": true }, "parcels": [ { "total_actual_weight": 0.8, "box": { "slug": null, "length": 10, "width": 8, "height": 5 }, "items": [ { "description": "Silk dress", "category": "fashion", "sku": "test01", "quantity": 2, "dimensions": { "length": null, "width": null, "height": null }, "actual_weight": 10, "declared_currency": "USD", "declared_customs_value": 20 } ] } ] }

Posted by han about a month ago

3
ANSWERED

Why call rates api just only get one courer?

Hello Easyship developer. I am trying to use your api (https://api.easyship.com/v2/rates) to get rates. My request data: { "origin_address": { "line_1": "hk", "city": "hk" }, "destination_address": { "line_1": "London, United%20Kingdom", "city": "London", "postal_code": "E1%206AN", "country_alpha2": "GB" }, "incoterms": "DDP", "insurance": { "is_insured": false }, "courier_selection": { "apply_shipping_rules": true }, "shipping_settings": { "units": { "weight": "kg", "dimensions": "cm" } }, "parcels": [ { "total_actual_weight": 10, "box": { "length": 10, "width": 10, "height": 10 }, "items": [ { "quantity": 1, "dimensions": {}, "category": "Accessory (no-battery)", "description": "description here", "actual_weight": 10, "declared_currency": "HKD", "declared_customs_value": 50 } ] } ] } But i just got only courier on response data: { "status": "success", "rates": [ { "courier_id": "43d6f8aa-6b9b-49dc-b053-47dd9817f317", "courier_name": "Aramex - Parcel", "min_delivery_time": 6, "max_delivery_time": 9, "value_for_money_rank": 1, "delivery_time_rank": 1, "currency": "HKD", "shipment_charge": 858.2, "fuel_surcharge": 180.22, "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": 1038.42, "warehouse_handling_fee": 0, "insurance_fee": 0, "sales_tax": 0, "provincial_sales_tax": 0, "ddp_handling_fee": 125.88, "import_tax_charge": 217.68, "import_tax_non_chargeable": 0, "import_duty_charge": 0, "total_charge": 1381.98, "is_above_threshold": true, "incoterms": "DDP", "estimated_import_tax": 0, "estimated_import_duty": 0, "minimum_pickup_fee": 0, "available_handover_options": "free_pickup", "tracking_rating": 3, "easyship_rating": 3.6, "courier_remarks": "50 HKD charge for remote area pickup", "payment_recipient": "Easyship", "discount": { "amount": 0, "code": null, "percentage": null, "expires_at": null, "origin_amount": 0 }, "description": " 343.56 of taxes & duties are INCLUDED in the cost", "full_description": "Aramex - Parcel (6-9 working days) 343.56 of taxes & duties are INCLUDED in the cost" } ] } How can I get multi courier while calling rates api? Please guide me. Thank you so much.

Posted by Ha Hieu about a month ago

2

Shipment/Label API issues

Hey, I'm trying to setup a Shipment/Label API. I've used postman examples to get me started, and am filling out all of the required fields, however the API call returns an empty body tag- I'd expect this to contain a link to the shipping label/some of details? Could someone help please? Here's my request: --- callback: "{% log response, type: 'response object' %}\n" format: https request_headers: '{ "Authorization": "Bearer sand_c.........", "Content-Type": "application/json" }' to: https://api.easyship.com/v2/shipments trigger_condition: t --- { "origin_address": { "line_1": "{{data.seller_address_street}}", "state": "{{data.seller_address_state}}", "city": "{{data.seller_address_city}}", "postal_code": "{{data.seller_address_zip}}", "country_alpha2": "GB", "contact_name": "{{data.seller_name}}", "company_name": null "contact_phone": "{{data.seller_mobile}}", "contact_email": "{{data.seller_email}}" }, "sender_address": { "line_1": "{{data.seller_address_street}}", "state": "{{data.seller_address_state}}", "city": "{{data.seller_address_city}}", "postal_code": "{{data.seller_address_zip}}", "country_alpha2": "GB", "contact_name": "{{data.seller_name}}", "company_name": null "contact_phone": "{{data.seller_mobile}}", "contact_email": "{{data.seller_email}}" }, "return_address": { "line_1": "{{data.seller_address_street}}", "state": "{{data.seller_address_state}}", "city": "{{data.seller_address_city}}", "postal_code": "{{data.seller_address_zip}}", "country_alpha2": "GB", "contact_name": "{{data.seller_name}}", "company_name": null "contact_phone": "{{data.seller_mobile}}", "contact_email": "{{data.seller_email}}" }, "destination_address": { "line_1": "{{data.address_street}}", "state": "{{data.address_state}}", "city": "{{data.address_city}}", "postal_code": "{{data.address_zip}}", "country_alpha2": "GB", "contact_name": "{{data.buyer_name}}", "contact_phone": "{{data.buyer_mobile}}", "contact_email": "{{data.buyer_email}}" }, "metadata": {}, "set_as_residential": false, "consignee_tax_id": null, "eei_reference": null, "incoterms": "DDU", "insurance": { "is_insured": false, "insured_amount": 10, "insured_currency": "GBP" }, "order_data": { "platform_name": null, "platform_order_number": null, "order_tag_list": null "seller_notes": null, "buyer_notes": null }, "courier_selection": { "selected_courier_id": "{{data.courier_id}}", "allow_courier_fallback": true, "apply_shipping_rules": true }, "shipping_settings": { "units": { "weight": "lb", "dimensions": "in" }, "printing_options": { "format": "pdf", "label": "4x6", "commercial_invoice": "A4", "packing_slip": "none" }, "buy_label": true, "buy_label_synchronous": true }, "parcels": [ { "total_actual_weight": 0.8, "box": { "slug": null, "length": 5, "width": 4, "height": 2 }, "items": [ { "description": "Silk dress", "category": "fashion", "sku": "test01", "quantity": 2, "dimensions": { "length": null, "width": null, "height": null }, "actual_weight": 10, "declared_currency": "GBP", "declared_customs_value": 20 } ] } ] } Any fields that are wrapped in {{- are pulled from these: address_street: Gatehouse Lodge address_country: United Kingdom address_city: Reading address_state: eqweq address_zip: RG76NN buyer_name: Ben ben buyer_mobile: 07955450874 buyer_email: [email protected] seller_id: 24893 seller_name: Ben b seller_email: [email protected] courier_id: d70f503c-905b-4e28-a015-d27069a09e0c (There are some more that arn't shown there, but do have values- anything outputted within {{}} will be a String- not sure if that could cause issues). Thanks!

Posted by Ben Porter about a month ago