// using popular library axios (https://github.com/axios/axios)
// token is stored in an ENV file in this case, your implementation might be different
const token = process.env.RICH_RETURNS_API_TOKEN;
// axios sets the content-type to json automatically in the header
const returns = await axios.get("https://api.richcommerce.co/2020-05-25/returns",
"Authorization": "RichReturnsToken " + token,
// logic to use returns-data in your system