Getting tags from the order API

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.

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
       }
      }
     }
    }
   }
  }
 }
}
1 Like