Clone Shipment
starshipit_clone_shipmentDuplicate a StarShipIt order to resend goods or create a return shipment; converts the order and swaps addresses when needed.
Instructions
Clone an existing shipment in StarShipIt, optionally converting it to a return shipment.
When to use: Use this tool to duplicate an existing order — for example, to resend the same goods to the same recipient, or to create a return shipment (pre-paid return label) based on an outbound order. The cloned order is created in a pending/unshipped state and will need a label printed separately.
Parameters:
order_id(required): The numeric StarShipIt order ID of the source shipment to clone.to_return_shipment(optional): Set totrueto create a return shipment from the original. The origin and destination addresses will be swapped. Defaults tofalse(standard clone).
Returns: The newly created order record including its new order ID, order number, and carrier details.
Example success response:
{
"success": true,
"order": {
"order_id": 99999,
"order_number": "CLONE-12345",
"carrier": "AUSPOST"
}
}Error cases: 400 if the order ID is invalid; 404 if the source order does not exist; 409 if the order cannot be cloned in its current state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | The StarShipIt order ID of the shipment to clone | |
| to_return_shipment | No | Set to true to create a return shipment (swaps origin/destination). Default: false |
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) |