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.
carrierCode string The code for the carrier that is to appear on the label.
serviceCode string The code for the shipping service that is to appear on the label.
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.
shipDate string The date the order should be shipped.
weight Object: numbers and strings Weight of the order. Use the Weight model.
dimensions Object: numbers and strings Dimensions of the order. Use the Dimensions model.
insuranceOptions Object: numbers, strings, and boolean The shipping insurance information associated with this label. Use the InsuranceOptions model.
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.
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.
testLabel boolean Specifies whether or not to create a test label.

Example Request

POST /orders/createlabelfororder HTTP/1.1
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",
  "formData": null