Documentation
Migrate from v2
A guide to help you migrate from SneakersAPI v2 to v3.
This guide will help you migrate from SneakersAPI v2 to v3. As the v2 support only StockX, we will focus on the changes to the StockX endpoints.
Searching for products
Endpoints
- Old endpoint:
/api/v2/products/
- New endpoint:
/api/v3/stockx/products/
Parameters
Modified parameters:
search
is nowquery
url_key
is nowslugs
under_price
is nowmax_price
sort
acceptsrank
andrelease_date
(instead ofdate
)
Removed parameters:
trending
category
Object: Product
Old | New | Note |
---|---|---|
id | id | |
slug | slug | This is now the same StockX URL key. |
title | title | |
brand | brand | |
description | description | |
color | traits.*.value | Must be matched with a trait of Colorway |
sku | sku | |
image | image | |
avg_price | avg_price | |
min_price | min_price | |
max_price | max_price | |
currency | - | Removed, all prices are in USD |
release_date | traits.*.value | Must be matched with a trait of Release Date |
retail_price | traits.*.value | Must be matched with a trait of Retail Price |
weekly_rank | rank | |
weekly_orders | weekly_orders | |
link | link | |
variants | variants | Structure changed, see Variants section below |
Object: Variant
Old | New | Note |
---|---|---|
size | size | |
price | lowest_ask | Renamed to better reflect the price meaning |
- | size_type | New field, typically “us m” for US Men’s |
- | total_asks | New field showing number of asks available |
- | id | New unique identifier for the variant |
- | product_id | New field referencing parent product |
- | updated_at | New timestamp of last price update |
Getting product details
Endpoints
- Old endpoint:
/api/v2/products/{id}
- New endpoint:
/api/v3/stockx/products/{id}
Path parameters
id
is the same as theid
parameter in the search endpoint.
Query parameters
There are no query parameters in the v2 endpoint, however, we added display[*]
parameters allowing you to control what data you want to receive. Requesting less data will make the response faster.
display[traits]
: Include traits in the response.display[variants]
: Include variants in the response.display[sizes]
: Include sizes conversions in the response.display[identifiers]
: Include identifiers (barcodes) in the response.display[asks]
: Include asks in the response.display[goat]
: Include GOAT product in the response (if found).display[stadium_goods]
: Include Stadium Goods product in the response (if found).display[kickscrew]
: Include Kickscrew product in the response (if found).
Response
The response is using the same object as the search endpoint above.