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
mutation draftOrderDuplicate($draftOrderId: ID, $id: ID) {
draftOrderDuplicate(draftOrderId: $draftOrderId, id: $id) {
draftOrder {
# DraftOrder fields
}
userErrors {
field
message
}
}
}
Input
{
"draftOrderId": "gid://shopify/<objectName>/10079785100",
"id": "gid://shopify/<objectName>/10079785100"
}
{
"draftOrderId": "gid://shopify/<objectName>/10079785100",
"id": "gid://shopify/<objectName>/10079785100"
}