wondering if via the admin notifications would it be possible to include return/created Etc?
Hey @ChrisBradley -
Just confirming that there isn’t currently a dedicated returns/create or exchange webhook topic. To detect a newly initiated return, I’d subscribe to returns/request and returns/approve, with returns/update and returns/process covering the later lifecycle.
Exchanges are represented on the same Return though through exchangeLineItems, (more info here) rather than as a separate replacement order if that makes sense. Your app can use the Return ID from the webhook to query those details with the read_returns scope.
Hope this helps, let me know if I can clarify anything here.
Hey @Alan_G
Thanks for your response.
would returns/request flag any order that have a returned added to it, that might suit my need (I really just need get a notification when a return is added)
No worries @ChrisBradley
returns/request fires when a Return enters the REQUESTED state, so I wouldn’t rely on that topic alone for every return added to an order. A return created directly by a merchant in Admin will generally be created in the OPEN state, which is covered by returns/approve.
For your use case, I think I’d subscribe to both returns/request and returns/approve, then de-duplicate notifications using the Return ID. That should cover customer-requested returns as well as returns created or approved directly by the merchant.
For exchanges, you can query the Return using that ID and inspect its exchangeLineItems.
Let me know if I can clarify anything on our end here, happy to help as always!