7

I'm trying to build inventory checker application using walmart api. I started playing with the open source api's provided in https://developer.walmartlabs.com/docs/read/Home

eg: http://api.walmartlabs.com/v1/items/12417832?apiKey={MYKEY}&format=xml

Can someone please help me understand how to retrieve stock/quantity and local store by providing zip code and id.

There are existing web apps like brickseek and bmsteek etc..

Good Lux
  • 896
  • 9
  • 19
MarcoP
  • 81
  • 1
  • 1
  • 3
  • I have never used Walmart API before but looking at the documentation I think you would have to use [Store Locator API](https://developer.walmartlabs.com/docs/read/Store_Locator_API) – Arti Oct 04 '16 at 07:44
  • I have seen this but I don't know how to join store locator api with items api. Thanks for taking a look – MarcoP Oct 08 '16 at 23:09

2 Answers2

6

https://search.mobile.walmart.com/v1/products-by-code/UPC/027242901605?storeId=1 works.

You may combine other walmartlab APIs to convert sku to UPC, get store ids by zip code and pass it to the above url.

Venu
  • 69
  • 2
  • 7
  • 2
    The API referenced still responds but the in-store quantity is incorrect. It only returns 10 or 0. Any other way to pull this? – Nash Apr 13 '19 at 02:23
  • 2
    Venu's answer used to work, but sadly it is broken now. You are right about the 10 / 0 thing. Have you found a solution? – Mapplesoft Aug 01 '19 at 02:49
0

I've been trying to do the same, and as far as I can tell, you can't.

So, the developer of Walton (Walmart stock lookup app) shared a bit of his code

this.walmart.dotcom.query.URL1 = 'http://mobile.walmart.com/m/j?e=1&version=2&service=Browse&method=searchByDepartmentFiltered&p1=';
this.walmart.dotcom.query.URL2 = '&p2=ENTIRESITE&p3=All&p4=RELEVANCE&p5=';
this.walmart.dotcom.query.URL3 = '&p6=50&p7=%5B%5D';
this.walmart.dotcom.upcq = 'http://www.walmart.com/product/mobile/api/upc/';
this.walmart.dotcom.item = 'http://www.walmart.com/product/mobile/api/';
this.walmart.store.query = 'http://search.mobile.walmart.com/search?query=';
this.walmart.store.items = 'http://search.mobile.walmart.com/items';

getWalmartDotcomQuery(query){
    return this.http.get(this.walmart.dotcom.query.URL1 + query + this.walmart.dotcom.query.URL2 + '0' + this.walmart.dotcom.query.URL3).map(res => res.json()); } getWalmartDotcomQueryMore(query, more){
    return this.http.get(this.walmart.dotcom.query.URL1 + query + this.walmart.dotcom.query.URL2 + more + this.walmart.dotcom.query.URL3).map(res => res.json()); } getWalmartDotcomUPC(upc){
    return this.http.get(this.walmart.dotcom.upcq + upc).map(res => res.json()); } getWalmartDotcomID(id){
    return this.http.get(this.walmart.dotcom.item + id).map(res => res.json()); }getWalmartStoreQuery(query, offset){
    return this.http.get('http://search.mobile.walmart.com/search?query='+query+'&store='+this.storeid+'&size=20&offset='+ offset).map(res => res.json()); }

Looks like we have to cross reference it from their official website as well.

Source:

https://www.reddit.com/r/walmart/comments/4hsq7s/questions_about_walmart_api/d2ste4f/

kckaiwei
  • 416
  • 7
  • 18