Shipping Labels

RocketShipIt can create shipping labels for all supported shipping carriers. For carriers that support multiple-package shipments, RocketShipIt will generate labels for all packages shipped to the same destination in a single RocketShipIt request. For carriers that don't support multi-package shipments in a single request RocketShipIt will create subsequent requests or simultaneous requests for you depending on what the carrier supports.

Note: Most carriers will not charge your account until the package arrives but some carriers, like Stamps.com, require pre-paying for all labels. We recommend that you set the test parameter to true while developing/testing in order to avoid accidentally purchasing postage while developing.

Most carriers support creating labels as images (gif/png), thermal print codes (ZPL/EPL), and PDFs. For a complete list see: the image_type parameter.

Although our RocketShipIt Print Server supports printing image labels to a thermal printer we highly recommend using ZPL or EPL if you are printing to a thermal printer for maximum clarity and compatibility.

Request#

You can create a label using the RocketShipIt SubmitShipment Action. A typical request will require your carrier API credentials, to/from address, package weight/dimensions, and label type (image_type). Setting the test parameter to true will ensure that you are not charged for this label even though most carriers will not charge your account until the package is delivered.

Example:

{
  "carrier": "UPS-REST",
  "action": "SubmitShipment",
  "params": {
    "key": "YOUR_UPS_API_KEY",
    "account_number": "YOUR_UPS_ACCOUNT_NUMBER",
    "packages": [
      {
        "weight": 4,
        "length": 7
      }
    ],
    "service": "03",
    "shipper": "RocketShipIt",
    "ship_addr1": "201 1\/2 W 2nd St.",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "ship_phone": "1231231234",
    "ship_country": "US",
    "to_name": "John Doe",
    "to_addr1": "940 Presidio Ave",
    "to_addr2": "#103",
    "to_state": "CA",
    "to_city": "San Francisco",
    "to_code": "94115",
    "to_country": "US",
    "image_type": "GIF",
    "test": true
  }
}

Response#

See: SubmitShipment Response Format for the SubmitShipment Action

USPS Package Dimensions#

Send length, width and height with every USPS shipment, including shipments through Stamps.com (stamps, stamps-rest) and the USPS REST API (usps-rest).

  • Stamps.com returns an error for Priority Mail, Priority Mail Express and Parcel Select shipments without package dimensions.
  • From December 1, 2026, Stamps.com also requires dimensions for USPS Ground Advantage and all other USPS services.
  • USPS plans to charge a non-compliance fee for missing or inaccurate dimensions from early 2027.

Measure the real package. Do not send placeholder values such as 1 x 1 x 1.

You can put the dimensions at the top level of the request or on each package in packages. A package without dimensions uses the top-level values. Set length_unit to CM to send centimeters. RocketShipIt converts them to inches for USPS.

{
    "carrier": "stamps",
    "action": "submitshipment",
    "params": {
        "service": "US-GA",
        "weight": 2,
        "length": 10,
        "width": 8,
        "height": 4,
        "length_unit": "IN"
    }
}

Label Format#

RocketShipIt returns all labels in base64 format.

If you are using an image label you can embed your label directly in HTML with the data tag: <img src="data:image/gif;base64,iVBORw0KGgoAAAANS..." />

Shipping COD (Cash on Delivery)#

Most carriers will attempt to collect the amount shown on the COD. tag or package label (cod_amount), and then send the payment to you. If the carrier cannot collect the payment after multiple attempts, the package will be returned. Carriers typically charge an additional fee for COD.

Simply add these additional parameters:

"cod_fund_type": "PERSONAL_CHECK",
"cod_amount": 774.60,

Note: COD is no longer supported by FedEx.

See:

API Examples#

See: API Examples