Site Logo

Carrier Packaging

Package Basics

When you use a carrier package, this can affect things like your rate (e.g. USPS Flat Rate Boxes). Additionally, you cannot provide any dimensions for the package in the shipment. For this example, we're going to use USPS and send a medium_flat_rate_box.

Add the objects directly into the shipment object. This is the same format to use when getting shipping rates as well.

Example Request

POST /v1/labels/

Instead of using custom packaging, we'll send this shipment using a USPS Medium Flat Rate Box. To send that box, we only need to know its weight, which is 9.6 ounces.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
POST /v1/labels HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_API_KEY_HERE__
Content-Type: application/json
{
"shipment": {
"packages": [
{
"package_code": "medium_flat_rate_box",
"weight": {
"value": 9.6,
"unit": "ounce"
}
}
],
"service_code": "usps_priority_mail",
"ship_to": {
"name": "Amanda Miller",
"phone": "555-555-5555",
"address_line1": "525 S Winchester Blvd",
"city_locality": "San Jose",
"state_province": "CA",
"postal_code": "95128",
"country_code": "US",
"address_residential_indicator": "yes"
},
"ship_from": {
"company_name": "Example Corp.",
"name": "John Doe",
"phone": "111-111-1111",
"address_line1": "4009 Marathon Blvd",
"address_line2": "Suite 300",
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US",
"address_residential_indicator": "no"
},
"confirmation": "none",
"insurance_provider": "none"
}
}

Example Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
"label_id": "se-test-41844486",
"status": "processing",
"shipment_id": "se-41844486",
"ship_date": "2019-07-25T05:00:00.000Z",
"created_at": "2019-07-25T15:24:46.657Z",
"shipment_cost": {
"currency": "usd",
"amount": 0.0
},
"insurance_cost": {
"currency": "usd",
"amount": 0.0
},
"tracking_number": "9999999999999",
"is_return_label": false,
"is_international": false,
"batch_id": "",
"carrier_id": "se-0",
"service_code": "usps_priority_mail",
"package_code": "medium_flat_rate_box",
"voided": false,
"voided_at": null,
"label_format": "pdf",
"label_layout": "4x6",
"trackable": true,
"carrier_code": "stamps_com",
"tracking_status": "unknown",
"label_download": {
"pdf": "https://api.shipengine.com/v1/downloads/6/Q2OLdnGaqk-UzkN6pFH0lg/testlabel-202923521.pdf",
"png": "https://api.shipengine.com/v1/downloads/6/Q2OLdnGaqk-UzkN6pFH0lg/testlabel-202923521.png",
"zpl": "https://api.shipengine.com/v1/downloads/6/Q2OLdnGaqk-UzkN6pFH0lg/testlabel-202923521.zpl",
"href": "https://api.shipengine.com/v1/downloads/6/Q2OLdnGaqk-UzkN6pFH0lg/testlabel-202923521.pdf"
},
"form_download": null,
"insurance_claim": null
}

You can now print your label and ship! Find your label by going to label_download.href.