Apinoa Docs

Categories

Walmart categories — accepted parameters and what comes back.

원본 .mdx 보기

이 페이지는 아직 번역되지 않아 영어로 표시됩니다. 코드 예제는 모든 언어에서 동일합니다.

GET|POST /v1/walmart/categories

Price $0.001 per call. List price; the rate steps down above 1,000 calls a day.

ParameterTypeRequiredNotes
categoryIdstringOmit for the 42 departments; give a bare department id (4171) or an underscore chain to list that category's children. Unlike browse, a bare id is accepted here — descending from one is how a client reaches the chains browse takes.
regionstringBuyer country as ISO 3166-1 alpha-2; sets availability, shipping and price.

The sub-categories under a Walmart category -- and the way to turn a cat_id into something browse accepts.

# the departments
curl "https://gateway.apinoa.com/v1/walmart/categories" -H "x-api-key: YOUR_API_KEY"
# what is under Toys
curl "https://gateway.apinoa.com/v1/walmart/categories?categoryId=4171" -H "x-api-key: YOUR_API_KEY"

Walmart is the one marketplace where the two operations take different kinds of id, and this endpoint is the bridge:

  • search?categoryId=4171 -- a bare department id. Valid.
  • browse?categoryId=4171 -- not valid. Toys is not browsable, so it answers 400 CATEGORY_NOT_BROWSABLE.
  • categories?categoryId=4171 -- valid, and every child it returns is an underscore chain (4171_4186), which browse does accept.

So: take a cat_id from a search response's filter rail, pass it here, and browse what comes back.

Omit categoryId for the 42 departments.

Departments do not report browsable, and that is deliberate rather than an omission: some departments are not browsable. Electronics (3944) lists products, while Toys (4171) does not. Nothing distinguishes them up front, so descend one level and use the chains — those always browse.

If you do browse a department directly, a hub answers 400 CATEGORY_NOT_BROWSABLE rather than an empty list, which is the same answer eBay's navigation hubs give.