vincere-io / restful-api-support

5 stars 0 forks source link

message : Internal Server Error #5

Closed justatom closed 5 years ago

justatom commented 5 years ago

The issue happen when I send this request:

$handle = curl_init('https://(sample).vincere.io/api/v2/candidate'); $data = array(

          'candidate_source_id' => '1',
          'email' => $requestData['email'],
          'first_name' => $requestData['firstname'],
          'middle_name' => $requestData['middlename'],
          'last_name' => $requestData['lastname'],
          'phone' => $requestData['phone'],

      );
      $header = array(
        'id-token:eyJraWQiOiI5bHNyUXBsU1lXWDNXXC9CR0o',  (sample)
        'x-api-key:c897a39cf6a', (sample)
      );
        curl_setopt($handle, CURLOPT_POST, true);
        curl_setopt($handle, CURLOPT_HTTPHEADER, $header);
        curl_setopt($handle, CURLOPT_POSTFIELDS, $data);

        $resp = curl_exec($handle);

And get the response body like below:

{"message":"Internal Server Error","status":"FAILED","httpStatus":"500","errorId":"37e3ad73-0aef-41f6-bc53-145a64221c27"}

mrbkiter commented 5 years ago

Hi @justatom

From our log:

Content type 'multipart/form-data;boundary=----------------------------cea6749b9a89' not supported

Did you send request with content type "multipart"? We dont support that type for candidate retrieve.