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": {
"orderId": "gid://shopify/<objectName>/10079785100",
"requestedAt": "2019-09-07T15:50:00Z",
"returnLineItems": [
{
"fulfillmentLineItemId": "gid://shopify/<objectName>/10079785100",
"quantity": 1,
"returnReason": "",
"returnReasonNote": "<your-returnReasonNote>"
}
]
}
}
{
"returnInput": {
"orderId": "gid://shopify/<objectName>/10079785100",
"requestedAt": "2019-09-07T15:50:00Z",
"returnLineItems": [
{
"fulfillmentLineItemId": "gid://shopify/<objectName>/10079785100",
"quantity": 1,
"returnReason": "",
"returnReasonNote": "<your-returnReasonNote>"
}
]
}
}
input ReturnInput {
notifyCustomer: Boolean
orderId: ID!
requestedAt: DateTime
returnLineItems: [ReturnLineItemInput!]!
}
input ReturnLineItemInput {
fulfillmentLineItemId: ID!
quantity: Int!
returnReason: ReturnReason!
returnReasonNote: String
}