Petco
Petco Store Inventory API
Units on hand at one Petco store for up to 10 products in one call: qty_available, alert_level (GREEN, YELLOW, RED) and in_stock per cat_entry_id. Pass a store_id from the store locator, or a zip to use the nearest store. Takes catalog entry ids (cat_entry_id from search, category or product), not part numbers. Costs 1 credit per request.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsoncat_entry_idsstring[]required1-10 catalog entry ids: the cat_entry_id of a search result, variation or product variant. NOT the part number. One unknown id makes the whole answer a 404.
Example: ["6131012", "531503"]
store_idstringPetco store id: the store_id of /api/v1/petco/stores (not the store number). Pass this or zip.
Example: 715931384
zipstringUS ZIP code: stock is read at the nearest store to it, which is returned as store.
Example: 10001
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
res = client.petco.store_inventory(cat_entry_ids=["6131012"], store_id="715931384")["data"]
for i in res["items"]:
print(i["cat_entry_id"], "on hand:", i["qty_available"], i["alert_level"])Response