Replace Shipment
starshipit_replace_shipmentVoids an existing StarShipIt shipment label and creates a new one when order details change after label printing.
Instructions
Replace an existing shipment in StarShipIt — voids the previous label and creates a new one.
When to use: Use this tool when an existing label must be voided and replaced, such as when order details have changed after a label was printed (address correction, weight change, carrier change). This is a destructive operation: the previous label is voided with the carrier.
Warning: This action voids the carrier label for the existing shipment. If the package has already been dispatched with that label, do NOT use this tool. Coordinate with the carrier directly in that case.
Parameters:
order_id(required): The numeric StarShipIt order ID whose shipment label should be voided and replaced.
Returns: The updated order record including the new label URL, new tracking number, carrier, and service details.
Example success response:
{
"success": true,
"order": {
"order_id": 12345,
"order_number": "ORD-12345",
"carrier": "DHL",
"tracking_number": "NEWTRACK001",
"label_url": "https://cdn.starshipit.com/labels/label-12345-v2.pdf"
}
}Error cases: 400 if the order ID is invalid; 404 if the order does not exist; 409 if the order is manifested or already dispatched and cannot be replaced.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | The StarShipIt order ID whose label will be voided and replaced with a new one |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | No | Validation or processing errors returned by StarShipIt | |
| object | No | The response payload when StarShipIt returns a non-object value | |
| success | No | StarShipIt success flag (a boolean on most endpoints) |