Discussions
Turn on Easyship
how do I turn this on, on my website.
Posted by Sarai bridal almost 4 years ago
Cannot get rates from default API
API returns ["Sorry, we couldn't find any shipping solutions based on the information provided."]}"
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.easyship.com/rate/v1/rates");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{
\"origin_country_alpha2\": \"SG\",
\"origin_postal_code\": \"WC2N\",
\"destination_country_alpha2\": \"US\",
\"destination_postal_code\": \"10030\",
\"taxes_duties_paid_by\": \"Sender\",
\"is_insured\": false,
\"items\": [
{
\"actual_weight\": 1.2,
\"height\": 10,
\"width\": 15,
\"length\": 20,
\"category\": \"mobiles\",
\"declared_currency\": \"SGD\",
\"declared_customs_value\": 100
}
]
}");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"Authorization: Bearer YOUR-TOKEN"
));
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
Posted by Benny Yung almost 4 years ago
AU POST Generate Manifest
Hi!
We are having trouble to generate a manifest on our shipments. One problem is that selecting all shipments method does not give us an option to generate so we have select all shipment for every page to allow us to generate and another problem is that when we click the manifest button - it ask as if we are sure to generate and we confirm but nothing happens after we confirm.
Error on request : The shipment jo0K0EyEFFUAAAF0fxsdV4no cannot be modified or included in a new order, as the shipment is contained in an order currently being finalized.
Posted by Bryan about 4 years ago
Dynamic Origin Address
Dear Support,
I need to build a platform to let my customers ship their products to their customers via this easyship platform but I couldn't find a way to implement this.
According to my short tries, this uses my address by default and don't allow to set the origin address. Was this expected?
Posted by Wei about 4 years ago
Clarification on item quantity & dimensional information
Hello,
There seems to be a discrepancy regarding the quantity field in relation to weight, dimensions & declared_customs_value.
For instance declared_customs_value seems to be related to the unit price rather than the total value.
But actual_weight seems to be the opposite, as in the total weight for all quantities of that item. If I submit an API rates request with the same unit weight and different quantities, the prices returned are all the same. But if I split the one item into multiple items, or use total weight of all items the prices differ.
Please clarify and include this information in your API documentation.
Kind regards,
Michael
Posted by Michael Walalce about 4 years ago
Failed to create shipment
Hello Team,
I am facing a issue related to categories, items of category are not supported to any of the countries.
I am using sand box token => "sand_0XgiXm/JrPsaOJCOy94HN8+9oqpv8sCwXHKJBVMN+2M="
here is my code :
request({
method: 'POST',
url: 'https://api.easyship.com/shipment/v1/shipments',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sand_0XgiXm/JrPsaOJCOy94HN8+9oqpv8sCwXHKJBVMN+2M='
},
body: {
"platform_name": "Amazon",
"platform_order_number": "#1234",
"selected_courier_id": "b8d528a7-a2d4-4510-a7ac-11cbbb6542cd",
"destination_country_alpha2": "US",
"destination_city": "New York",
"destination_postal_code": "10022",
"destination_state": "NY",
"destination_name": "Aloha Chen",
"destination_company_name": "My Company",
"destination_address_line_1": "300 Park Avenue",
"destination_address_line_2": null,
"destination_phone_number": "+1 234-567-890",
"destination_email_address": "[email protected]",
"items": [{
"description": "toy cars",
"sku": "test",
"actual_weight": 1.2,
"height": 10,
"width": 15,
"length": 20,
"category": "gaming",
"declared_currency": "SGD",
"declared_customs_value": 100
}]
},
json: true
}, function (error, response, body) {
console.log('Status:', response.statusCode);
console.log('Headers:', JSON.stringify(response.headers));
console.log('Response:', body);
if (error) {
console.log(error);
}
});
and getting the error:
{
"message": "Failed to create shipment: [\"error_message: Sorry, we don't support this item category for India. (Fashion)\"]"
}
Posted by Varun Rajaurya about 4 years ago
"label_url":null
I was able to create and purchase a label sucessfully using the API, however I received a null value for label url in response .
Posted by simar about 4 years ago
unable to generate shipping label
I'm trying to create a shipment by combining create shipment and buying a label by following your this API docs "https://developers.easyship.com/reference#create-a-shipment".I was able to create a shipment , but no label was generated..
values = {
"platform_name": "Cura Health ",
"platform_order_number": "001",
"destination_country_alpha2": order.destination_country,
"destination_city": order.destination_city,
"destination_postal_code": order.destination_postal_code,
"destination_state": order.destination_state,
"destination_name": order.name,
"destination_company_name": "Hugo",
"destination_address_line_1": order.address,
"destination_address_line_2": order.address2,
"destination_phone_number": order.phone,
"destination_email_address": order.email_address,
"items": [
{
"description": "Silk dress",
"actual_weight": 0.5,
"height": 10,
"width": 15,
"length": 20,
"category": "fashion",
"declared_currency": "SGD",
"declared_customs_value": 100
}
],
"shipments": [
{
"easyship_shipment_id": order.shipment_id,
"courier_id": ""
},
]
}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxxProduction API xxxxxx'
}
r = requests.post("https://api.easyship.com/shipment/v1/shipments/create_and_buy_label", data=json.dumps(values), headers=headers)
print(r.json())
order.shipment_id = r.json()['shipment']['easyship_shipment_id']
order.shipment_status = 'Created'
print(r.text)
Posted by simar about 4 years ago
Set origin when create a shipping
On the API docs, there is no option to set the origin address.
URL: https://developers.easyship.com/reference#create-a-shipment
Posted by Kesavan about 4 years ago
WSGIRequest' object has no attribute 'type
I'm using django to to integrate esyship with our manufacturing system and when the shipment creation event is triggered , we are getting this error " 'WSGIRequest' object has no attribute 'type' ." I would appreciate if your technical tean could help me out . Thanks !
Posted by simar about 4 years ago