title: OAuth2 integration with ExactOnline
body: <p>I am trying to integrate our app with Exact Online website using OAuth2,or more specifically i am trying to create hour registration which should include "Employee","Project","Hours","Hours type".</p>
  
  <pre><code>function registerTime($access_token_for_data) {
  
      //$dataToFilterAccounts = array('$filter' =&gt; 'IsSales eq true');
      $dataToRetrieveFromEmployees = array('$select' =&gt; 'ID');
      // $queryToFilterAccounts = http_build_query($dataToFilterAccounts);   
      $queryToRetrieveFromEmployees = http_build_query($dataToRetrieveFromEmployees);
  
      // $dataToFilterItems = array('$filter' =&gt;'IsSalesItem eq true');
      $dataToRetrieveProjects = array('$select' =&gt; 'ID');
      //$queryToFilterItems = http_build_query($dataToFilterItems);   
      $queryToRetrieveProjects = http_build_query($dataToRetrieveProjects);
  
      $urlProjects = 'https://start.exactonline.nl/api/v1/638842/project/Projects';
      $urlEmployees = 'https://start.exactonline.nl/api/v1/638842/payroll/Employees';
  
      $curlProjects = curl_init($urlProjects);
      $curlEmployees = curl_init($urlEmployees);
  
      $headers = array(
          'Authorization: Bearer ' . $access_token_for_data,
          'Accept: application/json',
          'Content-type: application/json'
      );
  
      curl_setopt($curlProjects, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curlProjects, CURLOPT_HTTPHEADER, $headers);
      curl_setopt($curlProjects, CURLOPT_URL, $urlProjects . '?' . $queryToRetrieveProjects);
      curl_setopt($curlProjects, CURLOPT_CUSTOMREQUEST, 'GET');
  
      curl_setopt($curlEmployees, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curlEmployees, CURLOPT_HTTPHEADER, $headers);
      curl_setopt($curlEmployees, CURLOPT_URL, $urlEmployees . '?' . $queryToRetrieveFromEmployees);
      curl_setopt($curlEmployees, CURLOPT_CUSTOMREQUEST, 'GET');
  
  
      $resultProjects = curl_exec($curlProjects);
      $resultEmployees = curl_exec($curlEmployees);
  
      $projectsData = json_decode($resultProjects, true);
      $projectID = $projectsData["d"]["results"]["0"]["ID"];
  
      $employeesData = json_decode($resultEmployees, true);
      $employeeID = $employeesData["d"]["results"]["0"]["ID"];
  
      curl_close($curlProjects);
      curl_close($curlEmployees);
  
      $urlTimeTransaction = 'https://start.exactonline.nl/api/v1/638842/project/TimeTransactions';
  
      $curlTimeTransacation = curl_init($urlTimeTransaction);
      $content = json_encode(array("Project" =&gt; $projectID, "Employee" =&gt; $employeeI));
  
      curl_setopt($curlTimeTransacation, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curlTimeTransacation, CURLOPT_HTTPHEADER, $headers);
      curl_setopt($curlTimeTransacation, CURLOPT_POST, true);
      curl_setopt($curlTimeTransacation, CURLOPT_POSTFIELDS, $content);
  
      $createdTimeTransaction = curl_exec($curlTimeTransacation);
  
      $status = curl_getinfo($curlTimeTransacation, CURLINFO_HTTP_CODE);
      if ($status != 201) {
          die("Error: call to URL $curlTimeTransacation failed with status $status, response $createdTimeTransaction, curl_error " . curl_error($curlTimeTransacation) . ", curl_errno " . curl_errno($curlTimeTransacation));
      }
      echo "HTTP status $status creating time registartion&lt;br/&gt;&lt;br/&gt;";
      curl_close($curlTimeTransacation);
  }
  </code></pre>
  
  <p>And this is the error i get</p>
  
  <blockquote>
    <p>Error: call to URL Resource id #56 failed with status 500, response { "error": { "code": "", "message": { "lang": "", "value": "Mandatory: Employee\r\nMandatory: Hours\r\nMandatory: Hour type" } } }, curl_error , curl_errno 0</p>
  </blockquote>
  
  <p>But when i try to include any of these mandatroy fileds i get:</p>
  
  <blockquote>
    <p>Error: call to URL Resource id #56 failed with status 400, response { "error": { "code": "", "message": { "lang": "", "value": "Error processing request stream. The property name 'Hours' specified for type 'Exact.Web.Api.Models.TimeTransaction' is not valid." } } }, curl_error , curl_errno 0</p>
  </blockquote>