Automate Heidelberg Wallbox

Hi there,
is it possible to automate how a Wallbox is working?
My wallbox is accessible via JSON commands (WIFI Module installed). Alternatively I can send URL with commands direcly. I want to control the charging intensity, to say: If my PV produces enough power, load with 11kW, else reduce it to 6kW else dont allow charging at all if no sun (i.e. at night). I have a zigbee power meter installed, so I can read the current power output of my PV System. The part to control the wallbox is missing…
Sorry - I am a complete newbie, so I hope I described my problem with enough details…
Thanks,
Mike