You can connect with the API by sending a POST request to the following endpoint:
https://do-calculate.com/api/calculate-money-zakat
Request Body:
The API expects a JSON object in the request body with the following properties:
{ "amount": 20000, "yearType": "gregorian", "gramPriceGold": 500, "gramPriceSilver": 0 }
The API will respond with a JSON object containing the calculated Zakat on money, the threshold, and the Zakat duty as shown in the following example:
{ "result": { "zakatDuty": "yes", "zakat": 515.4, "threshold": 17000 } }
If the request is missing any of the required properties (amount or yearType), the API will respond with a 400 Bad Request status code and an error message.
If the weight or height is negative, the API will also respond with a 400 Bad Request status code and an error message.
curl -X POST -H "Content-Type: application/json" -d '{"amount":20000,"yearType":"gregorian","gramPriceGold":500,"gramPriceSilver":0}' https://do-calculate.com/api/calculate-money-zakat