Create Shipment Label

Creates a shipping label. 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 has the following attributes:

Name Data Type Description
carrierCode string, required Identifies the carrier to be used for this label.
serviceCode string, required Identifies the shipping service to be used for this label.
packageCode string, required Identifies the packing type that should be used for this label.
confirmation string, optional 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 shipment will be shipped.
weight Weight, required Shipment's weight. Use the Weight model.
dimensions Dimensions, optional Shipment's dimensions. Use the Dimensions model.
shipFrom Address, required Address indicating shipment's origin. Use the Address model.
shipTo Address, required Address indicating shipment's destination. Use the Address model.
insuranceOptions InsuranceOptions, optional The shipping insurance information associated with this order. 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, optional Specifies whether a test label should be created. Default value: false.

Example Request

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

{
  "carrierCode": "fedex",
  "serviceCode": "fedex_ground",
  "packageCode": "package",
  "confirmation": "delivery",
  "shipDate": "2014-04-03",
  "weight": {
    "value": 3,
    "units": "ounces"
  },
  "dimensions": {
    "units": "inches",
    "length": 7,
    "width": 5,
    "height": 6
  },
  "shipFrom": {
    "name": "Jason Hodges",
    "company": "ShipStation",
    "street1": "2815 Exposition Blvd",
    "street2": "Ste 2353242",
    "street3": null,
    "city": "Austin",
    "state": "TX",
    "postalCode": "78703",
    "country": "US",
    "phone": null,
    "residential": false
  },
  "shipTo": {
    "name": "The President",
    "company": "US Govt",
    "street1": "1600 Pennsylvania Ave",
    "street2": "Oval Office",
    "street3": null,
    "city": "Washington",
    "state": "DC",
    "postalCode": "20500",
    "country": "US",
    "phone": null,
    "residential": false
  },
  "insuranceOptions": null,
  "internationalOptions": null,
  "advancedOptions": null,
  "testLabel": false
}

Example Response

{
  "shipmentId": 123456789,
  "orderId": null,
  "userId": null,
  "customerEmail": null,
  "orderNumber": null,
  "createDate": "2016-04-03T12:11:36.8630000",
  "shipDate": "2016-04-03",
  "shipmentCost": 9.06,
  "insuranceCost": 0,
  "trackingNumber": "782390443992",
  "isReturnLabel": false,
  "batchNumber": null,
  "carrierCode": "fedex",
  "serviceCode": "fedex_ground",
  "packageCode": "package",
  "confirmation": "delivery",
  "warehouseId": null,
  "voided": false,
  "voidDate": null,
  "marketplaceNotified": false,
  "notifyErrorMessage": null,
  "shipTo": null,
  "weight": null,
  "dimensions": null,
  "insuranceOptions": null,
  "advancedOptions": null,
  "shipmentItems": null,
  "labelData": "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9MZW5ndGggNjIvRmlsdGVyL0ZsYXRlRGVjb2RlPj5zdHJlYW0KeJwr5HIK4TI2U...",
  "formData": null
}