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

Discussions

Ask a Question
Back to All

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!