Skip to main content

createWarrantyReturn

Requires the permissions sales:credit_note:approve and sales:credit_note:create.

Starts a warranty return against a sales invoice. The invoice and each product must exist on it, and the product's warranty must still be valid, otherwise the line is refused. The return is approved as it is created, so it needs the credit notes create and approve permissions, and the customer must be one you may see.

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 CreateWarrantyReturn($input: CreateWarrantyReturnInput!) {
createWarrantyReturn(input: $input) {
id
returnNumber
rmaNumber
status
}
}

Variables:

{
"input": {
"customerId": "string",
"invoiceId": "string",
"items": [
{
"defects": [
"string"
],
"productId": "string",
"repairRequired": true,
"serialNumber": "string",
"variantId": "string"
}
],
"warehouseId": "string",
"warrantyClaimNo": "string"
}
}

Response:

{
"data": {
"createWarrantyReturn": {
"id": "string",
"returnNumber": "string",
"rmaNumber": "string",
"status": "string"
}
}
}
createWarrantyReturn(
input: CreateWarrantyReturnInput!
): ReturnResponse!

Arguments​

createWarrantyReturn.input ● CreateWarrantyReturnInput! non-null input​

The details of the warranty return to create.

Type​

ReturnResponse object​

A return created through the RMA flow.