Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Retrieve tag id with REST API

albertogiantin
Visitor
2 0 0

Hi, in my client shop we are using the langshop app for multilanguage translation. My client need to generate automatically the translation file starting from data in his SAP system. To do this he needs ids of several Shopify items (Product, metafields, Variant etc.) I can retrieve all of them using REST Api except for tags ids... Is there a way to retrieve the id of a tag related to a product with REST Api or Graphql?

Here an example of what i need to achieve: products[5470876827809][tags][07eadbea3700b64f60e855ef80a660]

where 07eadbea3700b64f60e855ef80a660 is the id of a tag related to a product.

Thank you for your help.

Reply 1 (1)

Jayvin
Shopify Partner
284 42 89

Hi,

Tags do not have ids, tags is a string property of an entity. When you retrieve a product using this endpoint /admin/product/xxxxx.json, you will get the tags as a comma separated string in the product entity itself.

banned