For the complete documentation index, see llms.txt.

Shipments
POST/api/orders/shipment

Print Label

Print a shipping label for a given order. The labels field returned in the response is a base64 encoded string that you can simply use to decode and save the output as a PDF file.

View as MarkdownCopy for LLM

Shipments

Print labels, batch labels, clone shipments, replace shipments, and work with shipment documents.

7 related endpoints

Endpoint

Endpoint URL

https://api.starshipit.com/api/orders/shipment

Details

Print a shipping label for a given order. The labels field returned in the response is a base64 encoded string that you can simply use to decode and save the output as a PDF file.

Attribute Type Description
order_id (optional) integer The unique numeric identifier for the order
order_number (optional) string The identifier of the order pulled from source e-Commerce platform
carrier string The carrier that will be used when creating shipment
carrier_service_code string Carrier service code for delivery
packages object list Package list containing the parcel details (Package Model)
reprint boolean Returns labels previously generated for the printed order
Attribute Type Description
weight (optional) double Physical weight of the parcel in kilograms (kg)
height (optional) decimal Height of the parcel in meters (m)
width (optional) decimal Width of the parcel in meters (m)
length (optional) decimal Length of the parcel in meters (m)
packaging_type string Example valid values: Carton, Box, Envelope, Item, Jiffy, Pallet, Satchel, Skid or Bag.
tracking_number string Carrier tracking number
Attribute Type Description
order_id integer The unique numeric identifier for the order
order_number string The identifier of the order pulled from source e-Commerce platform
carrier_name string Name of the carrier used for shipment delivery
tracking_numbers string list List of tracking numbers
labels string list List of base64 string which can be converted to PDF files for printing
label_types string list List of label type codes which will match the label in order
success boolean Determines whether the request was successfully submitted
errors object list List of detailed errors (Error Model)

Request body

{
  "order_id": 430614764,
  "carrier": "DHL",
  "carrier_service_code": "DOM",
  "packages": [
    {
      "weight": 0.7,
      "height": 0.04,
      "width": 0.08,
      "length": 0.1
    }
  ],
  "reprint": false
}

Response examples

Print Label (200)
{
  "application/json": {
    "order_id": 121330827,
    "order_number": "10001",
    "carrier_name": "CourierPost",
    "tracking_numbers": [
      "QQQ001156301000960302"
    ],
    "labels": [
      "JVBERi0xLjQKJeLjz9M .......... lwZS9JbWFnZS9Xa"
    ],
    "label_types": [
      "CourierPost"
    ],
    "success": true
  }
}

Related endpoints