returnCreate
Request a return for delivered lines, for the session's active business unit or, without one, the customer; every order must belong to it. Every line needs a reason from Query.returnReasons. A missing serial number, missing photos, a wrong pickup address or a missing refund method is a ValidationError on its field. A unit's return needs REQUEST_RETURNS. A consumer's return needs a refundMethod from Order.returnRefundMethods, unless every line is exchanged for one costing the same; a unit's return takes none. A line with exchangeFor is replaced rather than refunded. Issues no money.
Arguments
| Argument | Type | Description |
|---|---|---|
items | [ReturnItemInput!]! | |
reason | ReturnReasonInput | |
note | String | |
shipping | ReturnShippingInput! | |
refundMethod | ReturnRefundMethodType |
Returns
| Field | Type | Description |
|---|---|---|
return | Return | |
returnErrors | [ReturnCreateError!] |
Example
mutation { returnCreate( items: [{ orderId: "order-1", lineItemId: "line-1", quantity: 1, reason: { code: "too-small" } }] shipping: { method: DROP_OFF } refundMethod: ORIGINAL_PAYMENT ) { return { id status shipping { dropOff { code } } } returnErrors { ... on ReturnError { code } } }}{ "data": { "returnCreate": { "return": { "id": "id-1", "status": "REQUESTED", "shipping": { "dropOff": { "code": "Example" } } }, "returnErrors": [ { "code": "NOT_RETURNABLE" } ] } }}The query is the example the schema documents. The response shows its shape with placeholder values.
Served by
| @evolve-framework/commercetools | Resolved |
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-return:
ReturnCreate

