403 Error on admin/finance/to-bill

Hi,

I get an Error 403 Forbidden when calling this function from the REST API, I have checked, and the API key has full permissions on everything.

Code:
$result = $api->api_call_put(‘admin/finance/to-bill’,$apiID.“–generate”,array(‘toBillDate’ => ‘2022-12-01’,‘transactionDate’ => ‘2022-12-01’,‘period’ => ‘1’));
print "Result: ";
if ($result) {
print “Ok!\n”;
print_r($api->response);
} else {
print “Fail! Error code: $api->response_code\n”;
print_r($api->response);
}

Output:
API Call Result
Result: Fail! Error code: 403
Array
(
[error] => Array
(
[code] => 403
[internal_code] => FORBIDDEN
[message] => Call forbidden!
)

)

Does anyone know how to troubleshoot this ?

API permissions (FINANCE)

one more update: api_call_put (PUT)
should be api_call_post (POST)

(as per support ticket)