Discussions
2-Way API Call
Hi,
I have an upgraded easyship account and I need to make recurring 2-way api calls between freshdesk api and easyship api. This is an actual example of the api call to easyship from a freshdesk sales agent for my company to retrieve shipping rates for a customer order:
POST /2023-01/rates HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer prod_k31AsLGnjnDLBwvRQXCozN6EQ0eic6aG88lA7LWc42I=
Host: api.easyship.com
Content-Length: 987
{"origin_address":{"line_1":"13734 Bermuda Cay Ct","state":"FL","city":"Jacksonville","postal_code":"32225","country_alpha2":"US","company_name":"Quick Shaver LLC","contact_name":"Attn Wes Krosnick","contact_phone":"9043801159","contact_email":"[email protected]"},"destination_address":{"line_1":"19 Gaywood Cr","state":"AL","city":"Birmingham","postal_code":"36213","contact_name":"George Brown","contact_phone":"9045531910","country_alpha2":"US"},"insurance":{"is_insured":false},"courier_selection":{"apply_shipping_rules":true},"shipping_settings":{"units":{"weight":"lb","dimension":"in"},"output_currency":"USD"},"parcels":[{"box":{"slug":"bubble-shipping-bag","length":17,"width":9,"height":4},"items":[{"quantity":1,"dimensions":{"length":11,"width":9,"height":4},"description":"Electric Shaver","category":"health_beauty","sku":"QS-3300","hs_code":"8510.10.00","origin_country_alpha2":"US","declared_currency":"USD","declared_customs_value":59.95}],"total_actual_weight":2}]}
This is the api call to freshdesk from easyship in direct and immediate response to the above api call. It updates my agent's shipping dropdown menu options in his sales ticket to give the customer his shipping courier and rate options from inside the freshdesk interface:
curl -v -u MYAPIKEY:X -H "Content-Type: application/json" -X PUT -d '{ "label_for_customers":"Shipping", "label":"Shipping", "position": 17, "choices":[{ "deleted":true,"id":53 },{ "deleted":true,"id":54 },{ "deleted":true,"id":55 },{ "value":"$5.08 - USPS Priority - 2-10 days", "position":1 },{ "value":"$7.82 - USPS Media - 2-3 days", "position":2 },{ "value":"$15.08 - UPS Ground - 3 days", "position":3 }] }' 'https://MYDOMAIN.freshdesk.com/api/v2/admin/ticket_fields/151000699500'
This requires some custom coding to insert data from the easyship api response data into this freshdesk api call and also requires the persistent storage of field id numbers in the call to increment them each time the api call is made.
Are you able and willing to do this?
Posted by Burton Krosnick about 1 month ago
Why are no italian couriers displayed, and how could I add them?
I'd like the sellers on my marketplace to be able to ship from almost all major companies in Europe. Problem I'm having is that although i have added an italian address to my accounts list of addresses, I'm not getting any couriers that would match.
Is this something i would need an EasyShip Plus account for? I'm slightly confused why UPS doesn't offer shipping in italy?
Also on this page, https://app.easyship.com/couriers , when I click the country dropdown, italy does not display.
Posted by Ben Porter about 1 month ago
Why are shipping rates so high on my account?
I'm attempting to a build an integration of EasyShip into a new marketplace. For some reason the rates calculator is always returning a total cost much higher then my client would expect to pay.
These are the sort of rates I was hoping to get returned:
https://www.easyship.com/en-gb/shipping-rate-calculator/unitedkingdom-to-germany?weight=1&weight_unit=kg&category_slug=sport_leisure&width=11&height=6&length=16&dimension_unit=in&range=%3C100
However, using the rates API, I get £46 returned. See below:
Sender Address: Kamminer Str. 24 Berlin 10589 Germany - Paul
Ship To Country: United Kingdom
Category/HS Code: Sport & Leisure
Box Name: Custom Box
Box Dimensions: 20 x 20 x 20 cm Weight: 1 kg
Currency: GBP
Is there a setting that could be causing this difference?
Posted by Ben Porter about 1 month ago
Moved Website - Want to load our Easyship from previous website domain onto the new domain
It's apparently not as easy as copying the Easyship Access Token into the shipping tab of our WooCommerce. Currently the new site is successfully pulling rates from our Easyship, and orders are going through, but I have not been able to successfully pull orders from the website into our Easyship account to start printing labels.
It seems, somehow, that I have to tell Easyship where to point to to retrieve shipping information. Any help would be appreciated!
Thanks
Posted by Jeffrey Vyain about 1 month ago
Is it possible to send HS codes via API ?
Hello, it seems HS codes are going to be more stringent and required on international shipments from March, our courrier account managers have told us....
We are already using the general available categories using the default fallback catch all for all our items.
Looking at the docs we are able to send a predetermined category string when creating a shipment
https://developers.easyship.com/v1.0/reference/create-a-shipment
However is it possible to send an actual HS code?
Looking at the list of 'Toy' categories, there are a huge number of sub categories,
https://www.trade-tariff.service.gov.uk/headings/9503
From my current understanding, the Easyship dedicated HS code for the Toy category is HS#95030099
(Toy, Other, Other)
Say for example, we wish to send the HS code HS#95030069 (Toy, Puzzle, Other)
How would we do this as it does not seem possible apart from manually creating a label
Thank you if you can advise, or if you are able to say with confidence that the generalised HS code categories are enough to cover all types of products and there should be no issue exporting (to the customer) without specifying the detailed category at a B2C level.
Best regards
Posted by null about 1 month ago
Confuse about customer shipping address
Thank for all!
Currently, I can create a shipment with address info like as: line_1: "231/1 Chiến LượcBình Trị Đông, Bình Tân, Thành phố Hồ Chí Minh", state: "0", city: "0", country_alpha2: "VN". Is correct data to ship product from original address(shop) to customer with address above(It mean address info of customer in shipment create body request)?
Posted by Doan Van about 1 month ago
Creating Shipment, Why can't destination_address.contact_phone be blank?
https://developers.easyship.com/reference/shipments_create clearly shows that the phone contact is not required for destination address but when creating a shipment in sandbox is can't be null or blank. I do not want to collect phone numbers of my customers just to ship to them. Why is it not consistent?
Posted by Chris Allison about 1 month ago
Connect Power Bi and easyship data via api
Hi! How I can connect directly Easyship and power bi. I need to create dashboards based on your data.
Posted by Nikita Kopyshev about 1 month ago
Unable to genrate label with vague error message "undefined method `[]' for nil:NilClass"
Hello, we are unable to generate label and we are receiving "undefined method `[]' for nil:NilClass" error. We also noticed that the country in the response for the origin address is United States although it is sent in the request as GB (United Kingdom). Can someone please help us generate a label?
The request:
```
{
"origin_address": {
"name": "Customer",
"company_name": "Customer",
"line_1": "84 hartley green gardens",
"line_2": "",
"state": "billinge",
"city": "wigan",
"postal_code": "wn57ga",
"country_alpha2": "GB",
"phone_number": "+3106-89826441",
"email_address": "[email protected]"
},
"output_currency": "USD",
"platform_name": "Open Border - #L11962-gb-3",
"platform_order_number": "#L11962-gb-3",
"taxes_duties_paid_by": "receiver",
"is_insured": false,
"destination_country_alpha2": "GB",
"destination_city": "wigan",
"destination_state": "billinge",
"destination_postal_code": "wn57ga",
"destination_address_line_1": "85 hartley green gardens",
"destination_address_line_2": "",
"destination_name": "Luminskin TEST",
"destination_company_name": "Luminskin TEST",
"destination_phone_number": "+3106-89826441",
"destination_email_address": "[email protected]",
"items": [
{
"actual_weight": 0.0453592,
"height": 0,
"width": 0,
"length": 0,
"category": "Accessory",
"declared_currency": "USD",
"declared_customs_value": 0.01,
"quantity": 1,
"sku": "S1A",
"description": "S1A",
"origin_country_alpha2": "KR",
"hs_code": "330499"
}
],
"box": {
"length": 1,
"width": 1,
"height": 1
},
"buy_label_synchronous": true,
"format": "url",
"label": "4x6",
"consignee_tax_id": "",
"allow_courier_fallback": false
}
```
This is the response:
```
{
"shipment": {
"created_at": "2023-02-10T04:30:28.874Z",
"updated_at": "2023-02-10T04:30:29.852Z",
"order_created_at": null,
"easyship_shipment_id": "ESUS130419122",
"origin_address": {
"id": "f5511da8-9e27-475b-be7f-59d4c3cec809",
"company_name": "Customer",
"contact_name": "Customer",
"contact_email": "[email protected]",
"contact_phone": "+3106-89826441",
"line_1": "84 hartley green gardens",
"line_2": "",
"postal_code": "wn57ga",
"city": "wigan",
"state": "billinge",
"country": {
"name": "United States"
},
"default_values": {
"pickup": false,
"billing": false,
"sender": false,
"return": false
}
},
"store_name": "Open Border",
"set_as_residential": false,
"destination_name": "Luminskin TEST",
"destination_company_name": "Luminskin TEST",
"consignee_tax_id": "",
"destination_address_line_1": "85 hartley green gardens",
"destination_address_line_2": null,
"destination_city": "wigan",
"destination_state": "billinge",
"destination_postal_code": "WN5 7GA",
"destination_phone_number": "+310689826441",
"destination_email_address": "[email protected]",
"order_notes": null,
"buyer_notes": null,
"seller_notes": null,
"order_tag_list": [],
"platform_order_number": "#L11962-gb-3",
"platform_name": "Open Border - #L11962-gb-3",
"total_customs_value": 0.01,
"total_actual_weight": 0.045,
"total_dimensional_weight": 0.0,
"total_volumetric_weight": 0.045,
"is_insured": false,
"currency": "USD",
"shipment_state": "created",
"pickup_state": "not_requested",
"delivery_state": "not_created",
"label_state": "technical_failed",
"warehouse_state": "none",
"label_url": null,
"tracking_number": "ESUS130419122",
"tracking_page_url": "https://www.trackmyshipment.co/shipment-tracking/ESUS130419122",
"label_generated_at": null,
"label_response": {
"errors": [
"undefined method `[]' for nil:NilClass"
],
"status": "failure",
"cost": 12.99,
"available_balance": 37.01
},
"origin_country": {
"name": "United States",
"alpha2": "US"
},
"destination_country": {
"name": "United Kingdom",
"alpha2": "GB"
},
"items": [
{
"id": "ee1ebd88-b0f4-4540-b83c-2432d018c3d4",
"description": "S1A",
"sku": "S1A",
"width": 0.0,
"length": 0.0,
"height": 0.0,
"actual_weight": 0.045,
"dimensional_weight": 0.0,
"volumetric_weight": 0.045,
"declared_customs_value": 0.01,
"declared_currency": "USD",
"origin_customs_value": 0.01,
"origin_currency": "USD",
"category": null,
"quantity": 1
}
],
"box": {
"name": null,
"length": "1.0",
"width": "1.0",
"height": "1.0"
},
"selected_courier": {
"id": "1422eb90-f90a-4afa-a7b2-83657ee54582",
"name": "FedEx Cross Border Untracked",
"min_delivery_time": "10",
"max_delivery_time": "20",
"shipment_charge": 12.99,
"fuel_surcharge": 0.0,
"remote_area_surcharge": 0.0,
"remote_area_surcharges": {},
"other_surcharges": {},
"oversized_surcharge": 0.0,
"additional_services_surcharge": 0.0,
"residential_full_fee": 0.0,
"residential_discounted_fee": 0.0,
"shipment_charge_total": 12.99,
"warehouse_handling_fee": 0.0,
"insurance_fee": 0.0,
"import_tax_charge": 0.0,
"import_tax_non_chargeable": 0.0,
"import_duty_charge": 0.0,
"ddp_handling_fee": 0.0,
"total_charge": 12.99,
"is_above_threshold": true,
"effective_incoterms": "DDU",
"estimated_import_tax": 2.6,
"estimated_import_duty": 0.0,
"courier_does_pickup": null,
"courier_dropoff_url": "https://tools.usps.com/find-location.htm?",
"available_handover_options": "dropoff,free_pickup",
"courier_remarks": null,
"payment_recipient": "Easyship"
},
"is_merged": false,
"discount": {
"code": null,
"amount": 0,
"expires_at": null,
"percentage": null,
"origin_amount": 0
}
}
}
```
Posted by Rana Emad about 1 month ago
why does this rates request api call return an error?
POST /2023-01/rates HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer prod_4jZAQeqvVWAlL2pJWu2Zfe7GRu++0oymSxwI1fbzrCc=
Host: api.easyship.com
Content-Length: 1104
{"origin_address":{"line_1":"13734 Bermuda Cay Ct","state":"FL","city":"Jacksonville","postal_code":"32225","country_alpha2":"US","company_name":"Quick Shaver LLC","contact_name":"Wes Krosnick","contact_phone":"9043801159","contact_email":"[email protected]"},"destination_address":{"line_1":"19 Gaywood Cr","state":"AL","city":"Jacksonville","postal_code":"32225","contact_name":"George Brown","contact_phone":"9045531910","country_alpha2":"US","contact_email":"[email protected]"},"insurance":{"is_insured":false},"courier_selection":{"apply_shipping_rules":true},"shipping_settings":{"units":{"weight":"kg","dimension":"cm"}},"parcels":[{"box":{"slug":"Bubble Shipping Bag","length":17,"width":9,"height":4},"items":[{"quantity":1,"dimensions":{"length":17,"width":9,"height":4},"description":"Shaver","category":"health_beauty","sku":"SKU1","hs_code":"8510.10.0000","contains_battery_pi966":true,"contains_battery_pi967":false,"contains_liquids":false,"origin_country_alpha2":"US","actual_weight":0.907,"declared_currency":"USD","declared_customs_value":59.95}],"total_actual_weight":2}]}
Posted by Wesley Krosnick about 1 month ago