Hello @jdobbsy1987
Sure, it’s the same logic so it will work just fine.
Awesome.
Does the API have endpoints to create / delete locations?
Cheers.
Hi @jdobbsy1987
Currently the locations itself aren’t available for the REST API, only from the products to get and update those.
Hi,
Is it possible (or could it made possible) to include the ability to get location from API?
This is quite a big step for us to be able see what qty we have in each location.
Ideally we want to send a request to get 1 or all locations with the total stock in them.
Regards,
Jamie
-
This reply was modified 5 years, 9 months ago by
jdobbsy1987.
Hi @jdobbsy1987
It’s on the roadmap but i haven’t done yet, sorry.
Hi @jdobbsy1987
Please update to the last version.
Hi,
Thank you for updating the plugin with this functionality.
I have tested and can see it returns the QTY for the locations, this is very helpful.
The main thing i was looking for (sorry if I wasn’t so clear) was the ability to send a API request against a location.
Such as:
/wp-json/wc/v3/products/location/locationID
Is this possible?
Or actually a better option would be to send a request like the one above that will return a list of locations and the respective QTY’s.
I know the product returns the QTY but if for example a stock take is needed, it would be great to list all locations with QTY such as:
Example Request:
/wp-json/wc/v3/products/locationCount
Example Response:
"locations": [
{
"id": 24,
"name": "L1",
"slug": "l1",
"quantity": "2"
},
{
"id": 25,
"name": "L2",
"slug": "l2",
"quantity": "20"
},
{
"id": 26,
"name": "L3",
"slug": "l3",
"quantity": "10"
},
{
"id": 27,
"name": "L4",
"slug": "l4",
"quantity": "800"
}
]