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, required Identifies which order to ship.
carrierCode string, required The code for the carrier that is to appear on the label.
serviceCode string, required The code for the shipping service that is to appear on the label.
confirmation string, required 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.
shipDate string, required The date the order should be shipped.
weight Weight, optional Weight of the order. Use the Weight model.
dimensions Dimensions, optional Dimensions of the order. Use the Dimensions model.
insuranceOptions InsuranceOptions, optional The shipping insurance information associated with this label. Use the InsuranceOptions model.
internationalOptions InternationalOptions, optional Customs information that can be used to generate customs documents for international orders. Use the InternationalOptions model.
advancedOptions AdvancedOptions, optional Various advanced options that may be available depending on the shipping carrier that is used to ship the order. Use the AdvancedOptions model.
testLabel boolean, required Specifies whether or not to create a test label.

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
}