{"id":12910,"date":"2022-09-21T10:10:58","date_gmt":"2022-09-21T08:10:58","guid":{"rendered":"https:\/\/www.welaunch.io\/en\/?post_type=faq&#038;p=12910"},"modified":"2022-11-29T08:41:03","modified_gmt":"2022-11-29T07:41:03","slug":"woocommerce-multi-inventory-rest-api","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/en\/knowledge-base\/faq\/woocommerce-multi-inventory-rest-api\/","title":{"rendered":"WooCommerce Multi Inventory REST API"},"content":{"rendered":"<p>Starting with Version 1.3 of our <a href=\"https:\/\/www.welaunch.io\/en\/product\/woocommerce-multi-inventory\/\">WooCommerce Multi Inventory Plugin<\/a> we offer a built in REST API functionality. This allows vendors or other customers to fetch multi inventory stocks, locations and more.<\/p>\n<h2>REST API Base<\/h2>\n<p>The Base for all multi inventory calls of our API is &#8220;\/wc\/multi-inventory\/v1\/&#8221;. A full call would include also your site URL and wp-json of course.<\/p>\n<p>This is an example full base:<\/p>\n<pre>https:\/\/www.YOURDOMAIN.COM\/wp-json\/wc\/multi-inventory\/v1\/inventories?consumer_key=YOUR_KEY&amp;consumer_secret=YOUR_KEY<\/pre>\n<h2>Get Inventories<\/h2>\n<p>The first REST API Call is to get all inventory locations.<\/p>\n<pre>\/wp-json\/wc\/multi-inventory\/v1\/inventories<\/pre>\n<h2>Get Product Inventory Stocks<\/h2>\n<p>To get the inventory stock data for a product you can use the stock call. Parameters for the call are: sku or product_id. Example:<\/p>\n<pre>\/wp-json\/wc\/multi-inventory\/v1\/stock?sku=123<\/pre>\n<p>Parameters:<\/p>\n<pre>sku OR product_id\n<\/pre>\n<h2>Update Product Inventory Stocks<\/h2>\n<p>To update a product with inventory stock information use the stock call as POST.<\/p>\n<pre>\/wp-json\/wc\/multi-inventory\/v1\/stock?stock=5&amp;sku=123&amp;inventory=71<\/pre>\n<p>Parameters:<\/p>\n<pre>stock<br \/>sku OR product_id\ninventory (inventory id)\n<\/pre>\n<h2>Get Inventory Orders<\/h2>\n<p>If you need all orders by inventory ID, use the orders call. Parameter is inventory (containing your inventory ID).<\/p>\n<pre>\/wp-json\/wc\/multi-inventory\/v1\/orders?inventory=71<\/pre>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-12910","faq","type-faq","status-publish","hentry","faq_topics-multi-inventory"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/12910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/comments?post=12910"}],"version-history":[{"count":6,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/12910\/revisions"}],"predecessor-version":[{"id":13431,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/12910\/revisions\/13431"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media?parent=12910"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/product_cat?post=12910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}