Create Label for Order

Creates a shipping label for a given order. The labelData field returned in the response is a base64 encoded PDF value. Simply decode and save the output as a PDF file to retrieve a printable label. The body of this request should specify the following attributes:

Name Data Type Description
orderId number Identifies which order to ship.
Required
carrierCode string The code for the carrier that is to appear on the label.
Required
serviceCode string The code for the shipping service that is to appear on the label.
Required
confirmation string The type of delivery confirmation that is to be used once the shipment is created. Possible values: none, delivery, signature, adult_signature, and direct_signature. direct_signature is available for FedEx only.
Required
shipDate string The date the order should be shipped.
Required
weight Object: numbers and strings Weight of the order. Use the Weight model.
Optional
dimensions Object: numbers and strings Dimensions of the order. Use the Dimensions model.
Optional
insuranceOptions Object: numbers, strings, and boolean The shipping insurance information associated with this label. Use the InsuranceOptions model.
Optional
internationalOptions Object: strings, and an Array of customs items Customs information that can be used to generate customs documents for international orders. Use the InternationalOptions model.
Optional
advancedOptions Object: numbers, strings, and boolean Various advanced options may be available depending on the shipping carrier that is used to ship the order. Use the AdvancedOptions model.
Optional
testLabel boolean Specifies whether or not to create a test label. Available for USPS labels only.
Required

Example Request

POST /orders/createlabelfororder HTTP/1.1
Host: ssapi.shipstation.com
Authorization: __YOUR_AUTH_HERE__
Content-Type: application/json

{
  "orderId": 93348442,
  "carrierCode": "fedex",
  "serviceCode": "fedex_2day",
  "packageCode": "package",
  "confirmation": null,
  "shipDate": "2014-04-03",
  "weight": {
    "value": 2,
    "units": "pounds"
  },
  "dimensions": null,
  "insuranceOptions": null,
  "internationalOptions": null,
  "advancedOptions": null,
  "testLabel": false
}

Example Response

{
  "shipmentId": 72513480,
  "shipmentCost": 7.3,
  "insuranceCost": 0,
  "trackingNumber": "248201115029520",
  "labelData": "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9MZW5ndGggNjIvRmlsdGVyL0ZsYXRlRGVjb2RlPj5zdHJlYW0KeJwr5HIK4TI2UzC2NFMISeFyDeEK5CpUMFQwAEJDBV0jCz0LBV1jY0M9I4XkXAX9iDRDBZd8hUAuAEdGC7cKZW5kc3RyZWFtCmVuZG9iago0IDAgb2JqCjw8L1R5cGUvUGFnZS9NZWRpYUJveFswIDAgMjg4IDQzMl0vUmVzb3VyY2VzPDwvUHJvY1NldCBbL1BERiAvVGV4dCAvSW1hZ2VCIC9JbWFnZUMgL0ltYWdlSV0vWE9iamVjdDw8L1hmMSAxIDAgUj4+Pj4vQ29udGVudHMgMiAwIFIvUGFyZW50....",
  "formData": null
}