Products in the orders object does not contain tags

Solved

Products in the orders object does not contain tags

mnzn
Shopify Partner
2 0 0

Is there a way to include product tags in the orders api response? I see the customer tags are included in the Orders api response. Is there a way to achieve this without making a separate API request for each product in the line items of an order?

Accepted Solution (1)

ikolarov
Shopify Partner
101 17 27

This is an accepted solution.

Hi @mnzn 

 

I think switching to GraphQL will be the only option here, but it depends what is the requested object you need since you won't be able to return 250 orders with different attributes with a single request.

 

Something like so:

 

{ 
	orders(first: 1){
    edges {
      node {
        lineItems(first: 50){
          edges {
            node {
              product {
                tags
              }
            }
          }
        }
      }
    }
  }
}

View solution in original post

Reply 1 (1)

ikolarov
Shopify Partner
101 17 27

This is an accepted solution.

Hi @mnzn 

 

I think switching to GraphQL will be the only option here, but it depends what is the requested object you need since you won't be able to return 250 orders with different attributes with a single request.

 

Something like so:

 

{ 
	orders(first: 1){
    edges {
      node {
        lineItems(first: 50){
          edges {
            node {
              product {
                tags
              }
            }
          }
        }
      }
    }
  }
}