Development discussions around Shopify APIs
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
I'm trying to programmatically add tags to products.
The only option I see would be using the /products/<#id>.json POST , but it seems this would replace the tags? Is that assumption correct?
Is there a better way to add tags to the existing list of tags?
Yes, It will replace tags, and no direct option to append tags,
But we generally use this way.
Hello Ashish,
i agree with you but i know shopify provide less facilities can you provide any guidline so i can append some of tags using api
ex:- my product tag : category_saree,color_black,size_xxl etc...
and i want to append product tag : Catelog_latest-product,hot_products
but 1 thing without read current tag it's possibal?
Dear Ravipatel,
with the REST API, I think it is not possible to keep the old tags while performing a PUT request. However I noticed, that it is possible by using the GraphQL API. There is a mutation to add tags: https://shopify.dev/api/admin-graphql/2021-10/mutations/tagsAdd and it kept the previous tags, when I execute it.
For example:
mutation tagsAdd {
tagsAdd(id: "gid://shopify/Order/<your_order_id>", tags: "Test") {
node {
id
}
userErrors {
field
message
}
}
}
Greetings, Tom
Hi @tommydev,
I'm using the GraphQL API that you've mentioned. But I'm facing the issue while adding tags in languages other than english i.e. japanese & russian. Tags in other languages are not being saved in the order. Have you faced similar issues?
User | RANK |
---|---|
6 | |
5 | |
5 | |
5 | |
4 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022