Skip to main content

scheduleReturnPickup

Requires at least one of the permissions purchase:debit_note:update or sales:credit_note:update.

Schedules the pickup of a returned shipment. Without delivery it only records the pickup details. With delivery it books a courier that is set up for returns; the booking is all-or-nothing and shows the carrier's own error if it fails, and it also needs the shipment create permission. A carrier's "collected" update moves the return to IN_TRANSIT. Needs the update permission of the return's direction.

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 ScheduleReturnPickup($input: SchedulePickupInput!, $returnId: String!) {
scheduleReturnPickup(input: $input, returnId: $returnId) {
id
returnNumber
rmaNumber
status
}
}

Variables:

{
"input": {},
"returnId": "string"
}

Response:

{
"data": {
"scheduleReturnPickup": {
"id": "string",
"returnNumber": "string",
"rmaNumber": "string",
"status": "string"
}
}
}
scheduleReturnPickup(
input: SchedulePickupInput!
returnId: String!
): ReturnResponse!

Arguments​

scheduleReturnPickup.input ● SchedulePickupInput! non-null input​

The details of the schedule pickup request.

scheduleReturnPickup.returnId ● String! non-null scalar​

The ID of the return.

Type​

ReturnResponse object​

A return created through the RMA flow.