Skip to content

Raise a Return

About

The createCustomerReturn mutation raises a new return (RMA) request for one item of one of the customer's orders. The item must be return-eligible — check it with returnableItems first. The requested quantity (rmaQty) is capped server-side by the quantity the customer is actually allowed to return. The return starts in a Pending status.

Authentication

This mutation requires an authenticated customer — send the storefront key and a customer Bearer token. See the Authentication page.

Input Fields

FieldTypeRequiredDescription
orderIdInt!✅ YesId of the order the item belongs to.
orderItemIdInt!✅ YesId of the order item being returned — from returnableItems.
rmaQtyInt!✅ YesQuantity to return. Capped server-side by the returnable quantity.
resolutionTypeString!✅ Yesreturn or cancel_items.
rmaReasonIdInt!✅ YesId of the chosen return reason — from returnReasons.
informationString❌ NoFree-text note about the return.
packageConditionString❌ NoReported package condition, e.g. opened.
agreementBoolean!✅ YesMust be true to confirm the return terms.

Possible Returns

FieldTypeDescription
customerReturn._idInt!Numeric return ID.
customerReturn.orderIdInt!Id of the order the item belongs to.
customerReturn.orderIncrementIdString!Human-readable order number.
customerReturn.statusIdInt!Numeric status id — 1 (Pending) for a fresh return.
customerReturn.statusTitleString!Status label.
customerReturn.statusColorString!Hex color for the status badge.
customerReturn.packageConditionStringReported package condition.
customerReturn.informationStringThe note supplied when raising the return.
customerReturn.canCloseBooleanWhether the return can be closed.
customerReturn.canReopenBooleanWhether the return can be reopened.
customerReturn.isExpiredBooleanWhether the return is past its action window.
customerReturn.itemObjectThe returned item — id, order_item_id, sku, name, quantity, resolution, reason_id, reason, variant_id. Query bare (a JSON object).
customerReturn.imagesArrayAttached images (id, path, url). Empty on a JSON-created return. Query bare (a JSON array).
customerReturn.messagesCountInt!Number of conversation messages — 0 for a fresh return.
customerReturn.createdAtDateTime!Return creation timestamp.
customerReturn.updatedAtDateTime!Return last update timestamp.

Image attachments

Attaching image files to a return is available over REST only, via a multipart images[] field — files cannot be transported over a JSON GraphQL request.

Released under the MIT License.