In order to cancel a subscription via API, you will need to use the endpoint /publisher/subscription/cancel.
Below is an example request, which would also refund the last payment of the user's subscription:
https://api.piano.io/api/v3/publisher/subscription/cancel?aid=<AID>&subscription_id=<subscription_ID>&refund_last_payment=true&api_token=<API_token>
More information about this endpoint is available here.
If you would like to cancel subscriptions in bulk, you will need to iterate through the list of subscriptions you want to cancel.