How can I refund duties using refunds/calculate.json and refunds.json?

How to refund duties using the refunds/calculate.json and refunds.json ?