Anchor to draftOrderBulkAddTagsdraft
draftOrderBulkAddTags
mutation
Requires access scope. Also: The user must have access to manage draft orders.
Adds tags to multiple draft orders.
Anchor to Arguments
Arguments
- •
The IDs of the draft orders to add tags to.
- 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.
- Anchor to tagstags•[String!]!required
List of tags to be added.
Was this section helpful?
Anchor to DraftOrderBulkAddTagsPayload returnsDraftOrderBulkAddTagsPayload returns
- •
The asynchronous job for adding tags to 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
mutation draftOrderBulkAddTags($ids: [ID!], $savedSearchId: ID, $search: String, $tags: [String!]!) {
draftOrderBulkAddTags(ids: $ids, savedSearchId: $savedSearchId, search: $search, tags: $tags) {
job {
# Job fields
}
userErrors {
field
message
}
}
}
Input
{
"ids": [
"gid://shopify/<objectName>/10079785100"
],
"savedSearchId": "gid://shopify/<objectName>/10079785100",
"search": "<your-search>",
"tags": [
"<your-tags>"
]
}
{
"ids": [
"gid://shopify/<objectName>/10079785100"
],
"savedSearchId": "gid://shopify/<objectName>/10079785100",
"search": "<your-search>",
"tags": [
"<your-tags>"
]
}