Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
I have a question about order comment. I post comment below an order, and I want to retrieve order comment. But how can I get these data? Like who post the comment, and what content he post? Can I get these information by webhook?
Solved! Go to the solution
This is an accepted solution.
Hey @Alfred27
Alas, it's not possible to do this in REST presently, though you may know it's possible to get Order timeline comment events via the GraphQL Admin API. Something like this would work :
query {
order(id: "gid://shopify/Order/xxxxxxxxxxxxx"){
id
createdAt
hasTimelineComment
events(first: 10) {
edges {
node {
__typename
id
message
}
}
}
}
}
This would return you :
"node": {
"__typename": "CommentEvent",
"id": "gid:\/\/shopify\/CommentEvent\/78327073407032",
"message": "test comment"
}
}
I will certainly make it known as a feature request though internally. Hope that helps.
This is an accepted solution.
Hey @Alfred27
Alas, it's not possible to do this in REST presently, though you may know it's possible to get Order timeline comment events via the GraphQL Admin API. Something like this would work :
query {
order(id: "gid://shopify/Order/xxxxxxxxxxxxx"){
id
createdAt
hasTimelineComment
events(first: 10) {
edges {
node {
__typename
id
message
}
}
}
}
}
This would return you :
"node": {
"__typename": "CommentEvent",
"id": "gid:\/\/shopify\/CommentEvent\/78327073407032",
"message": "test comment"
}
}
I will certainly make it known as a feature request though internally. Hope that helps.