Switch GPIO via api

Hi, i need to run a script to pull data from an api to switch several gpio.

i have managed to get a return from the api though not sure where to go next.

I currently use an email version of this though i just find it is too slow.

does anyone think this is possible

api for info below