title: WooCommerce REST API Create Product with Categories
body: <p>I am using the WooCommerce REST API V3 legacy. I can use their latest API, if necesssary</p>
  
  <p>I am trying to create a product with categories, but the product has none. What is wrong with my request?</p>
  
  <pre><code>POST https://XX.com/taiyi/wc-api/v3/products?consumer_key=XX&amp;consumer_secret=XXHTTP/1.1
  Authorization: Basic XX
  Content-Type: application/x-www-form-urlencoded
  Host: XX.com
  Content-Length: 228
  Expect: 100-continue
  Connection: Keep-Alive
  
  {"product":{"managing_stock":true,"title":"Testing123-1","sku":"Testing123-3","price":0.0,"categories":[{"id":"254","name":"10 needles with tube Bulk Pack","slug":"10-needles-with-tube-bulk-pack"}],"stock_quantity":0,"tags":[]}}
  </code></pre>
  
  <p>Response</p>
  
  <pre><code>{"product":{"title":"Testing123-1","id":3673,"created_at":"2017-06-08T17:20:05Z","updated_at":"2017-06-08T17:20:05Z","type":"simple","status":"publish","downloadable":false,"virtual":false,"permalink":"https:\/\/amplusclient.com\/taiyi\/product\/testing123-1-3\/","sku":"Testing123-3","price":"","regular_price":"","sale_price":null,"price_html":"&lt;br&gt;","taxable":true,"tax_status":"taxable","tax_class":"","managing_stock":true,"stock_quantity":0,"in_stock":false,"backorders_allowed":false,"backordered":false,"sold_individually":false,"purchaseable":false,"featured":false,"visible":true,"catalog_visibility":"visible","on_sale":false,"product_url":"","button_text":"","weight":null,"dimensions":{"length":"","width":"","height":"","unit":"cm"},"shipping_required":true,"shipping_taxable":true,"shipping_class":"","shipping_class_id":null,"description":"","short_description":"","reviews_allowed":true,"average_rating":"0.00","rating_count":0,"related_ids":[],"upsell_ids":[],"cross_sell_ids":[],"parent_id":0,"categories":[],"tags":[],"images":[{"id":0,"created_at":"2017-06-08T17:20:06Z","updated_at":"2017-06-08T17:20:06Z","src":"https:\/\/amplusclient.com\/taiyi\/wp-content\/plugins\/woocommerce\/assets\/images\/placeholder.png","title":"Placeholder","alt":"Placeholder","position":0}],"featured_src":false,"attributes":[],"downloads":[],"download_limit":-1,"download_expiry":-1,"download_type":"standard","purchase_note":"","total_sales":0,"variations":[],"parent":[],"grouped_products":[],"menu_order":0}}
  </code></pre>