Hello,
I assume you just want to add the rules on top of what you already have. If that is the case, you could try within your script to read the current rules via API, add your rules on top, and then putt the joint the data back via the API call you're using. Not ideal but seems to be the way to do what you want