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
1mutation returnCreate($returnInput: ReturnInput!) {2 returnCreate(returnInput: $returnInput) {3 return {4 # Return fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "returnInput": {3 "exchangeLineItems": [4 {5 "appliedDiscount": "",6 "giftCardCodes": [7 "<your-giftCardCodes>"8 ],9 "quantity": 1,10 "variantId": "gid://shopify/<objectName>/10079785100"11 }12 ],13 "orderId": "gid://shopify/<objectName>/10079785100",14 "requestedAt": "2019-09-07T15:50:00Z",15 "returnLineItems": [16 {17 "fulfillmentLineItemId": "gid://shopify/<objectName>/10079785100",18 "quantity": 1,19 "restockingFee": "",20 "returnReason": "",21 "returnReasonNote": "<your-returnReasonNote>"22 }23 ],24 "returnShippingFee": {25 "amount": ""26 }27 }28}
{
"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!
}