rejectRMA
Requires at least one of the permissions purchase:debit_note:approve or sales:credit_note:approve.
Rejects a return request with a reason. A completed or cancelled return cannot be rejected, a return that already has a live credit note is refused, and so is a purchase return that has already posted stock or a debit note. Needs the approve 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:
- GraphQL
- cURL
mutation RejectRMA($reason: String!, $returnId: String!) {
rejectRMA(reason: $reason, returnId: $returnId) {
id
returnNumber
rmaNumber
status
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RejectRMA($reason: String!, $returnId: String!) {\n rejectRMA(reason: $reason, returnId: $returnId) {\n id\n returnNumber\n rmaNumber\n status\n }\n}",
"variables": {
"reason": "string",
"returnId": "string"
}
}
EOF
Variables:
{
"reason": "string",
"returnId": "string"
}
Response:
{
"data": {
"rejectRMA": {
"id": "string",
"returnNumber": "string",
"rmaNumber": "string",
"status": "string"
}
}
}
rejectRMA(
reason: String!
returnId: String!
): ReturnResponse!
Arguments
rejectRMA.reason ● String! non-null scalar
Why the return is rejected.
rejectRMA.returnId ● String! non-null scalar
The ID of the return.
Type
ReturnResponse object
A return created through the RMA flow.