Skip to content

Return GraphQL

Served by ReturnModule on commercetools.

Each operation has its own page with its arguments, an example and the engines that serve it. The types link to their fields on the return types page.

Operations

OperationDescriptionServed by
returnEstimateQueryWhat a return of these lines would withhold and pay back, before it is requested.commercetools
returnExchangeOptionsQueryWhat a line of one of the customer's own orders can be exchanged for: the other variants of its product that are in stock and cost no more than was paid.commercetools
returnReasonsQueryReasons a buyer may give, in the store's languagecommercetools
returnAttachmentUploadMutationA signed URL to upload one attachment tocommercetools
returnCancelMutationWithdraw a return that is still cancellablecommercetools
returnCreateMutationRequest a return for delivered lines, for the session's active business unit or, without one, the customer; every order must belong to it.commercetools

Types

TypeDescription
InvoiceObject
ReturnObjectA return raised against one or more orders
ReturnableLineObjectAn order line that can still be returned, and how many.
ReturnAttachmentObjectA photo or document attached to a returned line
ReturnAttachmentUploadObjectA signed URL to PUT one attachment to, before it is named in returnCreate
ReturnAttachmentUploadErrorUnion
ReturnAttachmentUploadResponseObject
ReturnCancelErrorUnion
ReturnCancelResponseObject
ReturnCreateErrorUnion
ReturnCreateResponseObject
ReturnCreditNoteObjectThe credit note that settles a credited return against its invoice
ReturnDropOffObjectWhat the buyer shows at a service point to hand the parcel in.
ReturnErrorObjectA return the server refuses for a reason of the domain rather than of one field
ReturnErrorCodeTypeEnum
ReturnEstimateObjectWhat a return of these lines would withhold and pay back, to show before it is requested
ReturnEstimateLineObject
ReturnExchangeObjectWhat a returned line is exchanged for, in the same quantity, instead of being refunded.
ReturnExchangeInputInput object
ReturnItemObjectA single returned line within a return
ReturnItemInputInput object
ReturnReasonObjectWhy a return or one of its lines was raised
ReturnReasonInputInput object
ReturnReasonOptionObjectA reason a buyer may give for returning a line, with what it requires.
ReturnRefundObjectWhere a consumer's refund goes, and what was paid back
ReturnRefundMethodTypeEnumWhere a consumer's refund goes
ReturnResolutionTypeEnumHow a completed return was settled
ReturnResultObject
ReturnShippingObject
ReturnShippingInputInput object
ReturnShippingMethodTypeEnumHow the goods go back to the seller
ReturnStatusTypeEnumWhere a return is in the process, normalized across engines

Fields on other types

This domain adds these fields to types that another domain defines.

BusinessUnit

FieldTypeDescription
returnsReturnResult!Returns for the unit's orders the associate can see, newest firstArguments: page, pageSize, status
returnReturnOne of the unit's returns the associate can see; null otherwiseArguments: id

Customer

FieldTypeDescription
returnsReturnResult!The signed-in customer's returns, newest firstArguments: page, pageSize, status
returnReturnOne of the signed-in customer's returns; null when it is not theirsArguments: id

Order

FieldTypeDescription
returnableLines[ReturnableLine!]!Lines that can still be returned; empty when nothing was delivered or all went back
returnRefundMethods[ReturnRefundMethodType!]!How a consumer's return of this order may be refunded; a refundMethod outside it is refused. Empty for a business unit's order, which is settled by credit note instead.