title: An Issue with saving SalesOrders data from REST API call to Exact Online
body: <p>I have been using <a href="https://github.com/picqer/exact-php-client" rel="nofollow noreferrer">PHP Client library for Exact Online</a> for a long time.</p>
  
  <p>After saving the customer Accounts, Addresses, Contacts and then filtering out the PaymentConditions based on WooCommerce orders, items are successfully reflecting in the Exact Online dashboard.</p>
  
  <p>But unfortunately calling the <a href="https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SalesOrderSalesOrders" rel="nofollow noreferrer">SalesOrders</a> post request API. I'm unable to store into the Exact Online dashboard, 
  even though in order to store only <code>OrderedBy</code> itself is enough which is given in the official documentation</p>
  
  <blockquote>
  <pre><code>$ordersn = $order-&gt;save();
  </code></pre>
    
    <blockquote>
      <p>Picqer\Financials\Exact\ApiException : Error 403: Forbidden</p>
    </blockquote>
  </blockquote>
  
  <pre><code>$order = new SalesOrder($connection);
  $lines = new SalesOrderLine($connection);
  
  
  ....
  
  echo'&lt;pre&gt;'; print_r($order); 
  $order-&gt;SalesOrderLines = $lines;
  $ordersn = $order-&gt;save();
  if ($ordersn-&gt;ID)
  {
      $orderitem['sync_flag'] = true;
  }
  </code></pre>
  
  <p>Here is the details of an order array </p>
  
  <pre><code>Picqer\Financials\Exact\SalesOrder Object
  (
      ...
      [attributes:protected] =&gt; Array
              (
                  [WarehouseID] =&gt; 26ca2016-453f-499a-8a34-c986009bc78d
                  [OrderID] =&gt; FC290B7D-766B-4CBB-B7A2-47327AA3841F
                  [OrderedBy] =&gt; 764a4f6d-4b39-43b4-a86c-265e5478afbd
                  [DeliverTo] =&gt; 764a4f6d-4b39-43b4-a86c-265e5478afbd
                  [OrderDate] =&gt; 2019-02-17T19:29:53
                  [YourRef] =&gt; 75591901YP220320G
                  [OrderedByName] =&gt; Peter Kerner
                  [Description] =&gt; 16031_PayPal/Lastschrift/Kreditkarte
                  [Remarks] =&gt; Order is processing
                  [PaymentReference] =&gt; 16031
                  [PaymentCondition] =&gt; 
                  [SalesOrderLines] =&gt; Picqer\Financials\Exact\SalesOrderLine Object
                      (
                          [attributes:protected] =&gt; Array
                              (
                                  [OrderID] =&gt; FC290B7D-766B-4CBB-B7A2-47327AA3841F
                                  [VATAmount] =&gt; 5,58
                                  [Description] =&gt; Goodies Box
                                  [Quantity] =&gt; 1,00
                                  [UnitPrice] =&gt; 29,37
                                  [Item] =&gt; 418d43d6-55fe-410a-8df2-b05cbb72cea5
                              )
                              ...
                      )
              )
      ...
  )
  </code></pre>
  
  <p>Do we need to upload <strong>VAT code</strong> or Am I missing something else data to be resided first shown from the above order-array or what else should we need to call appropriate API. Since in-order to reflect on the Exact Online dashboard. what should we need to follow?</p>
  
  <p>From the built-In function call <code>addItem()</code> below snippets of code:</p>
  
  <pre><code>$soLines = array(
                  'OrderID' =&gt; $lines-&gt;OrderID,
                  'Item' =&gt; $lines-&gt;Item,
                  'Description' =&gt;  $lines-&gt;Description,
                  'Quantity' =&gt; $lines-&gt;Quantity,
                  'UnitPrice' =&gt; $lines-&gt;UnitPrice,
                  'VATAmount' =&gt; $lines-&gt;VATAmount,
                  'VATCode' =&gt; $lines-&gt;VATCode
             );
  $order-&gt;addItem($soLines);
  </code></pre>
  
  <p><strong>Generates the results with <code>LineNumber</code> to be included in <code>SalesOrderLines</code> array</strong></p>
  
  <pre><code>[attributes:protected] =&gt; Array
  (
      [WarehouseID] =&gt; 26ca2016-453f-499a-8a34-c986009bc78d
      [OrderID] =&gt; 65F93F56-97A8-4D54-AE37-C0BDDE774E67
      [OrderedBy] =&gt; 9b048b81-f729-413a-b196-526436f11fe7
      [DeliverTo] =&gt; 9b048b81-f729-413a-b196-526436f11fe7
      [OrderDate] =&gt; 2019-02-17T20:45:34
      [YourRef] =&gt; 9Y9593859V795183K
      [OrderedByName] =&gt; Katrin Lenk
      [Description] =&gt; 16033_PayPal Express
      [Remarks] =&gt;  Order is processing
      [PaymentReference] =&gt; 16033
      [PaymentCondition] =&gt; 
      [SalesOrderLines] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [OrderID] =&gt; 65F93F56-97A8-4D54-AE37-C0BDDE774E67
                      [Item] =&gt; 5c415369-615c-4953-b28c-c7688f61cfaa
                      [Description] =&gt; ABC Classic
                      [Quantity] =&gt; 2,00
                      [UnitPrice] =&gt; 15,08
                      [VATAmount] =&gt; 5,73
                      [VATCode] =&gt; 
                      [LineNumber] =&gt; 1
                  )
  
          )
  
  )
  </code></pre>
  
  <p>Also note I haven't created Journals, GLAccounts, Documents &amp; DocumentAttachments API. Does this actually affects storing of SalesOrders</p>
  
  <hr>
  
  <p><strong>EDIT:</strong></p>
  
  <p>In much simpler </p>
  
  <pre><code>$salesOrder = new \Picqer\Financials\Exact\SalesOrder($connection);
  $salesOrder-&gt;WarehouseID = '26ca2016-453f-499a-8a34-c986009bc78d';
  $salesOrder-&gt;OrderID = '65F93F56-97A8-4D54-AE37-C0BDDE774E67';
  $salesOrder-&gt;OrderedBy = '9b048b81-f729-413a-b196-526436f11fe7';
  $salesOrder-&gt;DeliverTo = '9b048b81-f729-413a-b196-526436f11fe7';
  $salesOrder-&gt;OrderDate = '2019-02-17T20:45:34';
  $salesOrder-&gt;YourRef = '9Y9593859V795183K';
  $salesOrder-&gt;OrderedByName = 'Katrin Lenk';
  $salesOrder-&gt;Description = '16033_PayPal Express';
  $salesOrder-&gt;Remarks = 'Order is processing';
  $salesOrder-&gt;PaymentReference = '16033';
  $salesOrder-&gt;PaymentCondition = 'PP';
  
  $soLines = array(
      'Item' =&gt; '5c415369-615c-4953-b28c-c7688f61cfaa',
      'Description' =&gt; 'ABC Classic',
      'Quantity' =&gt; '1,00',
      'UnitPrice' =&gt; '29,37',
      'OrderID' =&gt; '65F93F56-97A8-4D54-AE37-C0BDDE774E67'
  );
  
  echo '&lt;pre&gt;'; print_r($soLines);
  $salesOrder-&gt;addItem($soLines);
  echo '&lt;pre&gt;'; print_r($salesOrder);
  $salesOrder-&gt;save();
  </code></pre>
  
  <p><strong>Resulting value stored from the <code>soLines</code> array</strong></p>
  
  <pre><code>[attributes:protected] =&gt; Array
  (
      [WarehouseID] =&gt; 26ca2016-453f-499a-8a34-c986009bc78d
      [OrderID] =&gt; 65F93F56-97A8-4D54-AE37-C0BDDE774E67
      [OrderedBy] =&gt; 9b048b81-f729-413a-b196-526436f11fe7
      [DeliverTo] =&gt; 9b048b81-f729-413a-b196-526436f11fe7
      [OrderDate] =&gt; 2019-02-17T20:45:34
      [YourRef] =&gt; 9Y9593859V795183K
      [OrderedByName] =&gt; Katrin Lenk
      [Description] =&gt; 16033_PayPal Express
      [Remarks] =&gt;  Order is processing
      [PaymentReference] =&gt; 16033
      [PaymentCondition] =&gt; 
      [SalesOrderLines] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [OrderID] =&gt; 65F93F56-97A8-4D54-AE37-C0BDDE774E67
                      [Item] =&gt; 5c415369-615c-4953-b28c-c7688f61cfaa
                      [Description] =&gt; ABC Classic
                      [Quantity] =&gt; 2,00
                      [UnitPrice] =&gt; 15,08
                      [VATAmount] =&gt; 5,73
                      [VATCode] =&gt; 
                      [LineNumber] =&gt; 1
                  )
  
          )
  
  )
  </code></pre>
  
  <p><strong>Actual Result:</strong></p>
  
  <blockquote>
    <p>Picqer\Financials\Exact\ApiException : Error 403: Forbidden</p>
  </blockquote>