Discussions

Ask a Question
Back to All

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
}
]
}
]
}