Anchor to draftOrderDuplicatedraft
draftOrderDuplicate
mutation
Requires access scope. Also: The user must have access to manage draft orders.
Duplicates a draft order.
Anchor to Arguments
Arguments
- •
The ID of the draft order to duplicate.
- Anchor to draftOrderIddraft•
Order Id IDDeprecated The ID of the draft order to duplicate. Use
id
instead.
Was this section helpful?
Anchor to DraftOrderDuplicatePayload returnsDraftOrderDuplicatePayload returns
- Anchor to draftOrderdraft•
Order The newly duplicated draft order.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation draftOrderDuplicate($draftOrderId: ID, $id: ID) {2 draftOrderDuplicate(draftOrderId: $draftOrderId, id: $id) {3 draftOrder {4 # DraftOrder fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "draftOrderId": "gid://shopify/<objectName>/10079785100",3 "id": "gid://shopify/<objectName>/10079785100"4}
{
"draftOrderId": "gid://shopify/<objectName>/10079785100",
"id": "gid://shopify/<objectName>/10079785100"
}