Anchor to returnCreatereturn
returnCreate
mutation
Requires access scope or
access scope. Also: Requires the
access scope. The user must have acess to return orders.
Creates a return.
Anchor to Arguments
Arguments
- Anchor to returnInputreturn•
Input ReturnInput! required Specifies the input fields for a return.
Was this section helpful?
Anchor to ReturnCreatePayload returnsReturnCreatePayload returns
- Anchor to returnreturn•
The created return.
- Anchor to userErrorsuser•
Errors [ReturnUser non-nullError!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation returnCreate($returnInput: ReturnInput!) {
returnCreate(returnInput: $returnInput) {
return {
# Return fields
}
userErrors {
field
message
}
}
}
Input
{
"returnInput": {
"exchangeLineItems": [
{
"appliedDiscount": "",
"giftCardCodes": [
"<your-giftCardCodes>"
],
"quantity": 1,
"variantId": "gid://shopify/<objectName>/10079785100"
}
],
"orderId": "gid://shopify/<objectName>/10079785100",
"requestedAt": "2019-09-07T15:50:00Z",
"returnLineItems": [
{
"fulfillmentLineItemId": "gid://shopify/<objectName>/10079785100",
"quantity": 1,
"restockingFee": "",
"returnReason": "",
"returnReasonNote": "<your-returnReasonNote>"
}
],
"returnShippingFee": {
"amount": ""
{
"returnInput": {
"exchangeLineItems": [
{
"appliedDiscount": "",
"giftCardCodes": [
"<your-giftCardCodes>"
],
"quantity": 1,
"variantId": "gid://shopify/<objectName>/10079785100"
}
],
"orderId": "gid://shopify/<objectName>/10079785100",
"requestedAt": "2019-09-07T15:50:00Z",
"returnLineItems": [
{
"fulfillmentLineItemId": "gid://shopify/<objectName>/10079785100",
"quantity": 1,
"restockingFee": "",
"returnReason": "",
"returnReasonNote": "<your-returnReasonNote>"
}
],
"returnShippingFee": {
"amount": ""
}
}
}
input ReturnInput {
exchangeLineItems: [ExchangeLineItemInput!]
notifyCustomer: Boolean
orderId: ID!
requestedAt: DateTime
returnLineItems: [ReturnLineItemInput!]!
returnShippingFee: ReturnShippingFeeInput
}
input ExchangeLineItemInput {
appliedDiscount: ExchangeLineItemAppliedDiscountInput
giftCardCodes: [String!]
quantity: Int!
variantId: ID
}
input ReturnLineItemInput {
fulfillmentLineItemId: ID!
quantity: Int!
restockingFee: RestockingFeeInput
returnReason: ReturnReason!
returnReasonNote: String
}
input ReturnShippingFeeInput {
amount: MoneyInput!
}