PetSmart
PetSmart Availability API
Unit counts for up to 20 store and SKU pairs in one call, mixing stores and SKUs freely: one SKU at 20 stores, 20 SKUs at one store, or any mix. Each result has store_id, sku, quantity and in_stock. An unknown store or SKU reads 0, the same as out of stock. Costs 1 credit per request.
POST/api/v1/petsmart/availability
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/jsonpairsobject[]required1-20 { store_id, sku } pairs. store_id is a PetSmart store number (from /api/v1/petsmart/stores); sku is the sku of a search result or a product variant. Duplicate pairs are dropped.
Example: [{"store_id": "1658", "sku": "5252900"}, {"store_id": "2528", "sku": "5252900"}]
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
res = client.petsmart.availability(pairs=[
{"store_id": "1658", "sku": "5252900"},
{"store_id": "2528", "sku": "5252900"},
])["data"]
for r in res["results"]:
print(r["store_id"], r["sku"], r["quantity"], r["in_stock"])Response
"count": 2,
"in_stock_count": 2,
},
"response_time": 3257
}