Skip to content
Last updated

Create Shipment Label

Creates a shipping label. The labelData field returned in the response is a base64 encoded PDF value. You can decode and save the output as a PDF file to retrieve a printable label.

IMPORTANT

Active Manual Store Required

You must have at least one active Manual Store on your ShipStation account to create labels with this endpoint.

If you deactivated the Manual Store your ShipStation account initially came with, you must activate one. Otherwise, if you try to create labels with this endpoint, you will see a 500 error that reads, "Object reference not set to an instance of an object."

Required fields:

  • carrierCode - Carrier to use (e.g., "fedex", "ups", "stamps_com")
  • serviceCode - Shipping service (e.g., "fedex_ground", "usps_priority_mail")
  • packageCode - Package type (e.g., "package", "flat_rate_envelope")
  • shipDate - Date the shipment will be shipped
  • weight - Package weight
  • shipFrom - Origin address
  • shipTo - Destination address
curl -i -X POST \
  -u <username>:<password> \
  https://ssapi.shipstation.com/shipments/createlabel \
  -H 'Content-Type: application/json' \
  -d '{
    "carrierCode": "fedex",
    "serviceCode": "fedex_ground",
    "packageCode": "package",
    "confirmation": "delivery",
    "shipDate": "2014-04-03",
    "weight": {
      "value": 24,
      "units": "ounces"
    },
    "dimensions": {
      "length": 7,
      "width": 5,
      "height": 6,
      "units": "inches"
    },
    "shipFrom": {
      "name": "John Doe",
      "company": "Acme Corp",
      "street1": "123 Main St",
      "street2": "Apt 4B",
      "street3": "Building B",
      "city": "Austin",
      "state": "TX",
      "postalCode": "78701",
      "country": "US",
      "phone": "512-555-1234",
      "residential": true,
      "addressVerified": "Address validated successfully"
    },
    "shipTo": {
      "name": "John Doe",
      "company": "Acme Corp",
      "street1": "123 Main St",
      "street2": "Apt 4B",
      "street3": "Building B",
      "city": "Austin",
      "state": "TX",
      "postalCode": "78701",
      "country": "US",
      "phone": "512-555-1234",
      "residential": true,
      "addressVerified": "Address validated successfully"
    },
    "insuranceOptions": {
      "provider": "carrier",
      "insureShipment": true,
      "insuredValue": 200
    },
    "internationalOptions": {
      "contents": "merchandise",
      "customsItems": [
        {
          "customsItemId": 11558268,
          "description": "Cotton T-Shirt",
          "quantity": 2,
          "value": 49.99,
          "harmonizedTariffCode": "6109.10.0012",
          "countryOfOrigin": "US"
        }
      ],
      "nonDelivery": "return_to_sender"
    },
    "advancedOptions": {
      "warehouseId": 98765,
      "nonMachinable": false,
      "saturdayDelivery": false,
      "containsAlcohol": false,
      "mergedOrSplit": false,
      "mergedIds": [
        0
      ],
      "parentId": 93348442,
      "storeId": 12345,
      "customField1": "Custom data that you can add to an order",
      "customField2": "Per UI settings, this can appear on some carrier labels",
      "customField3": "https://help.shipstation.com/hc/en-us/articles/206639957",
      "source": "Webstore",
      "billToParty": "third_party",
      "billToAccount": "123456789",
      "billToPostalCode": "78701",
      "billToCountryCode": "US"
    },
    "testLabel": false
  }'
Loading...