沃尔玛通过提供邮政编码和身份证来检索库存/数量和本地商店

Mar*_*coP 5 xml api json response walmart-api

我正在尝试使用walmart api构建库存检查器应用程序.我开始玩https://developer.walmartlabs.com/docs/read/Home中提供的开源api

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

有人可以通过提供邮政编码和身份证明来帮助我了解如何检索库存/数量和本地商店.

有现成的网络应用程序,如brickseek和bmsteek等.

小智 6

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

您可以结合其他 walmartlab API 将 sku 转换为 UPC,通过邮政编码获取商店 id 并将其传递给上述 url。

  • 引用的 API 仍然响应,但店内数量不正确。它只返回 10 或 0。还有其他方法可以拉这个吗? (2认同)
  • 维努的答案曾经有效,但遗憾的是现在已经失效了。你关于 10 / 0 的事情是对的。你找到解决办法了吗? (2认同)

kck*_*wei 0

我一直在尝试做同样的事情,但据我所知,你做不到。

因此,Walton(沃尔玛股票查询应用程序)的开发人员分享了他的一些代码

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()); }
Run Code Online (Sandbox Code Playgroud)

看起来我们也必须从他们的官方网站上交叉引用它。

来源:

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