title: Add a Variation to Cart using AJAX - WooCommerce API?
body: <p>I have an item with the following data :</p>
  
  <pre><code>var item = {
    id : "124",
    name : "xxx",
    price : "13.13",
    quantity : 1,
    options : {
      "size" : "xl",
      "color": "pink"
    }
  };
  </code></pre>
  
  <p>When the user clicks on "Add to Cart" I'd like to make an Ajax Request using the WC API and add the above item to the Cart.</p>
  
  <pre><code>jQuery.ajax({
     url: "some/woocommerce/api/add/to/cart/request/path",
     data: item,
     type: "POST"
  });
  </code></pre>
  
  <p>Then on the Cart Page I'd like to make another Ajax Request using the WC API and retrieve the contents of the cart. </p>
  
  <p>I haven't found any documentation (official or unofficial) on how to do that from the client using Javascript.</p>
  
  <p>Does anyone know and can provide me with an example please?</p>
  
  <p>Also, does anyone know why the WooCommerce Api Documentation is so horrible (lacking any kind of information regarding obvious/standard questions like the above). I'm seriously thinking of having our company switch to Shopify.</p>