Discussions
Clarification on Creating Shipments via API
Hi there,
I hope you're doing well!
I had a quick question regarding the Easyship API. I’m looking to create a shipment programmatically and would like to confirm a few details.
- Is it possible to create a shipment (and generate a label) using the API?
If yes:
- Could you confirm whether the following parameters are sufficient to create a shipment and receive the label in the response (preferably as a PDF)?
- Are there any required fields missing from this payload?
{
"origin_address": {
"line_1": "Customer's Street 123",
"city": "Customer City",
"state": "CA",
"postal_code": "90210",
"country_alpha2": "US",
"company_name": "Customer",
"contact_name": "Jane Doe",
"contact_phone": "1234567890",
"contact_email": "[email protected]"
},
"destination_address": {
"line_1": "Our Warehouse Address",
"city": "Our City",
"state": "NY",
"postal_code": "10001",
"country_alpha2": "US",
"company_name": "Our Company",
"contact_name": "Admin Name",
"contact_phone": "9876543210",
"contact_email": "[email protected]"
},
"parcels": [
{
"total_actual_weight": 0.5,
"box": {
"length": 20,
"width": 15,
"height": 5
}
}
],
"buy_label": true,
"buy_label_synchronous": true
}
- Endpoint Confirmation
Is the correct endpoint for this: