title: RESTful way to create multiple items in one request
body: <p>I am working on a small client server program to collect orders. I want to do this in a "REST(ful) way".</p>
  
  <p>What I want to do is:</p>
  
  <p>Collect all orderlines (product and quantity) and send the complete order to the server</p>
  
  <p>At the moment I see two options to do this:</p>
  
  <ol>
  <li>Send each orderline to the server: POST qty and product_id</li>
  </ol>
  
  <p>I actually don't want to do this because I want to limit the number of requests to the server so option 2:</p>
  
  <ol start="2">
  <li>Collect all the orderlines and send them to the server at once.</li>
  </ol>
  
  <p>How should I implement option 2? a couple of ideas I have is:
  Wrap all orderlines in a JSON object and send this to the server or use an array to post the orderlines.</p>
  
  <p>Is it a good idea or good practice to implement option 2, and if so how should I do it.</p>
  
  <p>What is good practice? </p>