Skip to main content

bookReturnPickup

Requires permission sales:shipment:create.

Books a courier to collect a customer return, using one of your delivery partners that is set up for returns. The booking is all-or-nothing and shows the carrier's own error if it fails. Needs the delivery partners feature on your plan and the shipment create 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:

mutation BookReturnPickup($delivery: ShipmentBookingInput!, $productReturnId: ID!) {
bookReturnPickup(delivery: $delivery, productReturnId: $productReturnId) {
id
serviceLevelCode
shipmentNumber
trackingNumber
carrierName
serviceLevelName
costSplit {
changedByName
changedAt
courierCharge
currency
customerPaid
plannedCost
}
}
}

Variables:

{
"delivery": {
"deliveryPartnerConfigId": "id"
},
"productReturnId": "id"
}

Response:

{
"data": {
"bookReturnPickup": {
"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"
}
}
}
}
bookReturnPickup(
delivery: ShipmentBookingInput!
productReturnId: ID!
): ShipmentGql!

Arguments​

bookReturnPickup.delivery ● ShipmentBookingInput! non-null input​

The courier booking details.

bookReturnPickup.productReturnId ● ID! non-null scalar​

The ID of the product return.

Type​

ShipmentGql object​

A shipment as staff see it. It includes the seller's cost and is never returned to buyers.