vincere-io / restful-api-support

5 stars 0 forks source link

Error 500 on POST: Upload new candidate document #19

Open kieker opened 3 years ago

kieker commented 3 years ago

The issue happen when I send this request: So I first create the candidate, get the id of the candidate from the api and then use that id to try and submit the document using a url (which is public so it shouldnt be a permission error). Have tried changing around field types from boolean to string, from number to string, etc.

Curl options are set as follows, creating candidates and submitting candidates to jobs work fine on similiar calls: curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => strval($enc_doc), CURLOPT_HTTPHEADER => array( "x-api-key: xxobscuredxx", "id-token: ${id_token}", "Content-Type: application/json" ), )); And get the response body like below: {"message":"Internal Server Error","status":"FAILED","httpStatus":"500","errorId":"675b2607-b73a-4d2d-8229-3b187f75e5d2"}