1. Home
  2. WooCommerce MultiLocation & Order Routing
  3. Developer Docs
  4. Using API to query assigned WooCommerce order locations

Using API to query assigned WooCommerce order locations

When a WooCommerce order is placed and automatically routed to a warehouse location using our integration, that assignment can be used with external integrations if needed when querying an order.  

 

 

Once a location has been added in our integration, it will be assigned an ID. This is the ID that is used in the background when we assign/route an order to a specific location.

 

 

 

There are two areas a location is associated with an order, as seen in the screenshot below.

  1.  In the Select location widget, which allows a user to manually assign/re-assign an order location. The number next to the location represents the stock of that product available in the location.
  2. In the Custom Field called mw_warehouse – the ID of the location will be stored. This is helpful when using alongside custom integrations or import/export tools.

Additionally, when querying (GET) an order via the REST API, the warehouse ID is also passed along with the order, inside the meta_data variable, as the key mw_warehouse:

"meta_data": [
             {
              "id": 21643,
              "key": "mw_warehouse",
              "value": "539"
             }
           ],

Updated on January 17, 2019

Was this article helpful?