Skip to main content

applyRestockingFee

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

Sets the restocking fee on a return and saves the reason in the return's notes. The fee replaces any earlier one. 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 ApplyRestockingFee($feeAmount: Float!, $reason: String!, $returnId: String!) {
applyRestockingFee(feeAmount: $feeAmount, reason: $reason, returnId: $returnId) {
id
returnNumber
rmaNumber
status
}
}

Variables:

{
"feeAmount": 0,
"reason": "string",
"returnId": "string"
}

Response:

{
"data": {
"applyRestockingFee": {
"id": "string",
"returnNumber": "string",
"rmaNumber": "string",
"status": "string"
}
}
}
applyRestockingFee(
feeAmount: Float!
reason: String!
returnId: String!
): ReturnResponse!

Arguments​

applyRestockingFee.feeAmount ● Float! non-null scalar​

The restocking fee to charge.

applyRestockingFee.reason ● String! non-null scalar​

Why the fee is applied. It is saved in the return's notes.

applyRestockingFee.returnId ● String! non-null scalar​

The ID of the return.

Type​

ReturnResponse object​

A return created through the RMA flow.