This guide uses upsell and Stripe information as examples, but you can use the
steps below to create reports containing any return information returned by
the Get Return Details
endpoint.
Retrieving Detailed Return Data
To generate a return report, you’ll first need to fetch detailed return information.-
Start by using the Detailed Returns List endpoint to retrieve a list of returns.
- You can use query parameters to filter returns by date range, status, or other relevant criteria to narrow down your report scope.
-
Iterate through the list of returns to extract the
return_id
for each return.
Fetching Detailed Return Information
For eachreturn_id
returned in the previous step, retrieve the detailed return information to access upsell and transaction details.
- Use the Get Return Details endpoint to fetch detailed information for each return.
-
Parse the returned JSON response to extract the following information for each return:
_ Upsell Details: The
upsell
field includes the upsell value associated with the return. _ Transaction Details: The name of the refund gateway (such as Stripe) is found in thegateway
field of therefunds
object.