RefreshSeries/RescanSeries command

Of course you have to run several curl commands (two) to get to the refresh series folder.

For example Filebot should identify the name of the series, passing that series name in the form of a variable to the script to fetch sonarr information.

SeriesName -> SonarrAPI -> seriesID ##this should be one curl command

RescanSeries+seriesID ->SonarrAPI ##this would be another curl command

I am not a frequent user of windows, but just a quick look on how to define a variable with the command output in cmd is just insane.

for /f "delims=" %%a in ('command') do @set foobar=%%a

There might be another easy way probably in powershell, maybe an advanced windows user can enlighten

That’s is why I prefer bash
In your case i would do something like this.

#!/bin/bash

seriesID=$(curl -s http://10.10.10.11:8989/api/series -H 'X-Api-Key: 5215023779d84ad391719fc703bba5ba' --compressed | jq -rs --arg seriestitle $seriesName '.[]| .[] | select(.title == $seriestitle ) | .id')

curl -s  http://10.10.10.11:8989/api/command -H 'X-Api-Key: 5215023779d84ad391719fc703bba5ba' --data-binary '{ "name": "rescanSeries", "seriesId" : "'$seriesID'" }'

In here were are assuming seriesName is some sort of environment variable defined by filebot that can pass to the script. I have no idea if filebot can do that.