Anchor to draftOrderBulkDeletedraft
draftOrderBulkDelete
mutation
Requires access scope. Also: The user must have access to delete multiple draft orders.
Deletes multiple draft orders.
Anchor to Arguments
Arguments
- •
The IDs of the draft orders to delete.
- Anchor to savedSearchIdsaved•
Search Id The ID of the draft order saved search for filtering draft orders on.
- Anchor to searchsearch•
The conditions for filtering draft orders on. See the detailed search syntax.
Was this section helpful?
Anchor to DraftOrderBulkDeletePayload returnsDraftOrderBulkDeletePayload returns
- •
The asynchronous job for deleting the draft orders.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation draftOrderBulkDelete($ids: [ID!], $savedSearchId: ID, $search: String) {2 draftOrderBulkDelete(ids: $ids, savedSearchId: $savedSearchId, search: $search) {3 job {4 # Job fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "ids": [3 "gid://shopify/<objectName>/10079785100"4 ],5 "savedSearchId": "gid://shopify/<objectName>/10079785100",6 "search": "<your-search>"7}
{
"ids": [
"gid://shopify/<objectName>/10079785100"
],
"savedSearchId": "gid://shopify/<objectName>/10079785100",
"search": "<your-search>"
}