Advanced Options

Advanced Options

Many carriers support "Advanced Options", such as the ability to ship alcohol, bill to the receiving party, request money on delivery, or many others. You will need to see the supported options by using the List Carrier Advanced Options.

PropertyDescription
bill_to_accountstring
The account number to be billed
bill_to_partyenumerated_string
recipient or third_party
bill_to_postal_codestring
bill_to_country_codestring
Two letter country code as it corresponds to ISO 3166-1 alpha-2.
contains_alcoholbool
Indicates if the shipment contains alcohol
delivered_duty_paidbool
non_machinablebool
saturday_deliverybool
dry_icebool
dry_ice_weightsee weight object below

Weight Object

PropertyDescription
unitenumerated string, required
valuedecimal, required

Example

POST /v1/labels

For this example, we're going to send Amanda Miller some wine. Since we're shipping alcohol, we're also going to have to use a special Delivery Confirmation as well. We'll be using UPS as the carrier, since they support adult_signature and alcohol delivery.

We added the dictionary shipment.advanced_options and string shipment.confirmation:

1
2
3
4
5
6
{
"advanced_options": {
"contains_alcohol": "true"
},
"confirmation": "adult_signature"
}

Example Request

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
44
45
46
47
48
49
POST /v1/labels HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_API_KEY_HERE__
Content-Type: application/json
{
"shipment": {
"service_code": "ups_3_day_select",
"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": "adult_signature",
"advanced_options": {
"contains_alcohol": "true"
},
"insurance_provider": "none",
"total_weight": {
"value": 3.0,
"unit": "pound"
},
"packages": [
{
"weight": {
"value": 3.0,
"unit": "pound"
}
}
]
}
}

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
{
"label_id": "se-421210",
"status": "completed",
"shipment_id": "se-2126974",
"ship_date": "2019-07-25T05:00:00.000Z",
"created_at": "2019-07-25T15:24:46.657Z",
"shipment_cost": {
"currency": "usd",
"amount": 29.25
},
"insurance_cost": {
"currency": "usd",
"amount": 0.0
},
"tracking_number": "1Z28A1R9A713398376",
"is_return_label": false,
"is_international": false,
"batch_id": "",
"carrier_id": "se-123890",
"service_code": "ups_3_day_select",
"package_code": "package",
"voided": false,
"label_format": "pdf",
"label_layout": "4x6",
"trackable": false,
"carrier_code": "ups",
"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
}

Step 2: Ship It!

You can now print your label and ship it! Your label can be found by navigating to label_download.href.