Discussing APIs and development related to customers, discounts, and order management.
I am trying to pull tags in a web service from Salesforce to filter various items. It appears the tags are associated with line items but the API documentation is related to an order. Anyway, I get no data from the Web Service for tags. The Service pull back all data as expected.
Solved! Go to the solution
This is an accepted solution.
Hey @nstolos,
While I was unable to find an efficient solution using the REST Admin API (using a single request), this functionality could be achieved through the GraphQL Admin API - Orders Object. This would be possible with connections via lineItems
and product
, and I have included an example query below that you are welcome to use as a starting point!
{
orders(first: 10) {
edges {
node {
id
lineItems(first: 5) {
edges {
node {
product {
id
title
tags
}
}
}
}
}
}
}
}
awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hey @nstolos,
While I was unable to find an efficient solution using the REST Admin API (using a single request), this functionality could be achieved through the GraphQL Admin API - Orders Object. This would be possible with connections via lineItems
and product
, and I have included an example query below that you are welcome to use as a starting point!
{
orders(first: 10) {
edges {
node {
id
lineItems(first: 5) {
edges {
node {
product {
id
title
tags
}
}
}
}
}
}
}
}
awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog