resolveOrphanedShipment
Requires permission sales:shipment:update.
Resolves a booking that needs checking (status BOOKING_ORPHANED), once you have checked with the courier. CONFIRM_BOOKED records that the courier holds the booking, optionally with its tracking number, and MARK_CANCELLED records that you cancelled it there. It never calls the carrier. A shipment in any other status is refused. Needs the delivery partners feature on your plan and the shipment update permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation ResolveOrphanedShipment($id: ID!, $input: ResolveOrphanedShipmentInput!) {
resolveOrphanedShipment(id: $id, input: $input) {
id
serviceLevelCode
shipmentNumber
trackingNumber
carrierName
serviceLevelName
costSplit {
changedByName
changedAt
courierCharge
currency
customerPaid
plannedCost
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ResolveOrphanedShipment($id: ID!, $input: ResolveOrphanedShipmentInput!) {\n resolveOrphanedShipment(id: $id, input: $input) {\n id\n serviceLevelCode\n shipmentNumber\n trackingNumber\n carrierName\n serviceLevelName\n costSplit {\n changedByName\n changedAt\n courierCharge\n currency\n customerPaid\n plannedCost\n }\n }\n}",
"variables": {
"id": "id",
"input": {
"action": "CONFIRM_BOOKED"
}
}
}
EOF
Variables:
{
"id": "id",
"input": {
"action": "CONFIRM_BOOKED"
}
}
Response:
{
"data": {
"resolveOrphanedShipment": {
"id": "id",
"serviceLevelCode": "string",
"shipmentNumber": "string",
"trackingNumber": "string",
"carrierName": "string",
"serviceLevelName": "string",
"costSplit": {
"changedByName": "string",
"changedAt": "2025-01-15T00:00:00Z",
"courierCharge": "string",
"currency": "string",
"customerPaid": "string",
"plannedCost": "string"
}
}
}
}
resolveOrphanedShipment(
id: ID!
input: ResolveOrphanedShipmentInput!
): ShipmentGql!
Arguments
resolveOrphanedShipment.id ● ID! non-null scalar
The ID of the shipment.
resolveOrphanedShipment.input ● ResolveOrphanedShipmentInput! non-null input
The details of the resolve orphaned shipment request.
Type
ShipmentGql object
A shipment as staff see it. It includes the seller's cost and is never returned to buyers.