I had made a simple APP which automatically creates my upwork invoices to my Invoice ninja setup but lately, upwork side broke. I saw that there were updates and changes on it but after my research, nothing changed in my specific call. After the authorization, I am using the following call:
$finreports = new \Upwork\API\Routers\Reports\Finance\Accounts($upwork_client);
$freelancerReference = "8009XXX";
$params = array(
"tq" => "SELECT amount, notes WHERE date >= '2018-06-01' AND date <= '2018-06-30'"
);
$results = $finreports->getOwned($freelancerReference, $params);
echo "<pre>".print_r($results, true)."</pre>";
and i am receiving this:
stdClass Object
(
[version] => 0.6
[status] => error
[errors] => Array
(
[0] => stdClass Object
(
[reason] => invalid_query
[message] => Internal Server Error
)
)
The auth seems OK because I can successfully get the response from:
$auth->getUserInfo();
it's a pity to hear that your reporting system stopped working correctly. Unfortunately, you use the API which is marked for deprecation. Inherently, the changes are being rolled out, and that seems to be the root of the issue you experience - see the proper announce.