I’m not finding information in the API documentation that allows me to query products that have been flagged Dangerous Goods and to provide which dangerous goods setting the product(s) have.
Thanks for raising this.
This is not currently exposed through the Public API products query, but we’re looking at whether adding support for this would be useful.
Would something like this cover your use case?
query {
products(has_dangerous_goods: true) {
data(first: 50) {
edges {
node {
sku
name
dangerous_goods_code
dangerous_goods {
id
name
}
}
}
}
}
A couple of questions:
- Do you need to filter only for products that have any Dangerous Goods setting?
- Would you also need to filter by a specific DG code/type?
- Is returning both the code and the display name enough for your workflow?
Also, if you can add your ShipHero Account ID to your Community profile, we can provide more precise answers for your setup.