Solax Inverter change mode based on the plan

Hi. Want to read the data to influxdb and change the solax Hybrid x3 gen4 mode based on hourly plan available on rest api programaticaly. What is the best way to do it?

Thanks a lot.