Skip to main content

approveRMA

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

Approves a return request on the terms given. A rejected, cancelled or completed return cannot be approved, and approving a return that is already approved changes nothing. Approving a purchase return posts its stock and debit note. Needs the approve permission of the return's direction: credit notes approve for a customer return, debit notes approve for a supplier return.

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 ApproveRMA($returnId: String!, $terms: [String!]!) {
approveRMA(returnId: $returnId, terms: $terms) {
id
returnNumber
rmaNumber
status
}
}

Variables:

{
"returnId": "string",
"terms": [
"string"
]
}

Response:

{
"data": {
"approveRMA": {
"id": "string",
"returnNumber": "string",
"rmaNumber": "string",
"status": "string"
}
}
}
approveRMA(
returnId: String!
terms: [String!]!
): ReturnResponse!

Arguments​

approveRMA.returnId ● String! non-null scalar​

The ID of the return.

approveRMA.terms ● [String!]! non-null scalar​

The conditions of the approval, one per entry.

Type​

ReturnResponse object​

A return created through the RMA flow.