Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing sizes for some products when calling getProduct() #3

Open
jblachparty opened this issue Mar 28, 2022 · 2 comments
Open

Missing sizes for some products when calling getProduct() #3

jblachparty opened this issue Mar 28, 2022 · 2 comments

Comments

@jblachparty
Copy link

When using a simple getProduct() call, I've noticed that most products do not return the full size list shown on the StockX website.

For example, if I call getProduct("CT8012-005"), I would expect to see the sizes range from a 3.5 to an 18, which is what I see on the actual website: https://stockx.com/air-jordan-11-retro-cool-grey-2021

However, the object returned has only sizes 3.5 through 13 (see below for the full JSON printout)

Is this an issue on the API side, or am I doing something wrong while calling getProduct()?

{
  name: 'Jordan 11 Retro Cool Grey (2021)',
  description: 'Air-Jordan-11-Retro-Cool-Grey-2021',
  image: 'https://images.stockx.com/images/Air-Jordan-11-Retro-Cool-Grey-2021-Product.jpg?fit=fill&bg=FFFFFF&w=140&h=100&fm=webp&auto=compress&trim=color&q=90&dpr=2&updated_at=1631898423',
  url: 'https://stockx.com/air-jordan-11-retro-cool-grey-2021',
  uuid: '443d1c8c-f2a8-482c-b6e2-52891c48daa3',
  seller: 'Jordan',
  colorway: 'Medium Grey/Multi-Color/Multi-Color',
  lastSale: 382,
  '72hvolume': 638,
  totalSales: 105681,
  retail: 225,
  sku: 'CT8012-005',
  releaseDate: '2021-12-11',
  sizes: [
    {
      sizeUS: '3.5',
      sizeEU: '35.5',
      sizeType: '',
      lowestAsk: 272,
      highestBid: 178,
      lastSale: 265
    },
    {
      sizeUS: '4',
      sizeEU: '36',
      sizeType: '',
      lowestAsk: 249,
      highestBid: 190,
      lastSale: 251
    },
    {
      sizeUS: '4.5',
      sizeEU: '36.5',
      sizeType: '',
      lowestAsk: 275,
      highestBid: 220,
      lastSale: 276
    },
    {
      sizeUS: '5',
      sizeEU: '37.5',
      sizeType: '',
      lowestAsk: 270,
      highestBid: 220,
      lastSale: 255
    },
    {
      sizeUS: '5.5',
      sizeEU: '38',
      sizeType: '',
      lowestAsk: 307,
      highestBid: 251,
      lastSale: 308
    },
    {
      sizeUS: '6',
      sizeEU: '38.5',
      sizeType: '',
      lowestAsk: 312,
      highestBid: 270,
      lastSale: 312
    },
    {
      sizeUS: '6.5',
      sizeEU: '39',
      sizeType: '',
      lowestAsk: 350,
      highestBid: 281,
      lastSale: 348
    },
    {
      sizeUS: '7',
      sizeEU: '40',
      sizeType: '',
      lowestAsk: 307,
      highestBid: 272,
      lastSale: 306
    },
    {
      sizeUS: '7.5',
      sizeEU: '40.5',
      sizeType: '',
      lowestAsk: 300,
      highestBid: 287,
      lastSale: 288
    },
    {
      sizeUS: '8',
      sizeEU: '41',
      sizeType: '',
      lowestAsk: 300,
      highestBid: 275,
      lastSale: 296
    },
    {
      sizeUS: '8.5',
      sizeEU: '42',
      sizeType: '',
      lowestAsk: 287,
      highestBid: 275,
      lastSale: 285
    },
    {
      sizeUS: '9',
      sizeEU: '42.5',
      sizeType: '',
      lowestAsk: 296,
      highestBid: 280,
      lastSale: 295
    },
    {
      sizeUS: '9.5',
      sizeEU: '43',
      sizeType: '',
      lowestAsk: 301,
      highestBid: 275,
      lastSale: 300
    },
    {
      sizeUS: '10',
      sizeEU: '44',
      sizeType: '',
      lowestAsk: 311,
      highestBid: 290,
      lastSale: 310
    },
    {
      sizeUS: '10.5',
      sizeEU: '44.5',
      sizeType: '',
      lowestAsk: 340,
      highestBid: 305,
      lastSale: 340
    },
    {
      sizeUS: '11',
      sizeEU: '45',
      sizeType: '',
      lowestAsk: 352,
      highestBid: 330,
      lastSale: 340
    },
    {
      sizeUS: '11.5',
      sizeEU: '45.5',
      sizeType: '',
      lowestAsk: 399,
      highestBid: 345,
      lastSale: 395
    },
    {
      sizeUS: '12',
      sizeEU: '46',
      sizeType: '',
      lowestAsk: 380,
      highestBid: 336,
      lastSale: 385
    },
    {
      sizeUS: '12.5',
      sizeEU: '47',
      sizeType: '',
      lowestAsk: 395,
      highestBid: 335,
      lastSale: 336
    },
    {
      sizeUS: '13',
      sizeEU: '47.5',
      sizeType: '',
      lowestAsk: 398,
      highestBid: 360,
      lastSale: 397
    }
  ]
}
@iyarsius
Copy link
Owner

Hi, thanks for your report, this is due to the size converter file which is capped at US size 13. This will be solved in next version

@jblachparty
Copy link
Author

Thanks for the quick update, I appreciate it!

Just another heads up that I also saw the issue for some other size ranges that it looks like weren't fixed in your last commit:

For example, this product (PS sizes) only shows sizes 10.5C-13.5C and 3.5Y from getProduct(), when the full range of 1Y-3.5Y should also be included.

Also, this product (TD sizes) should only show sizes 2C-10C, but instead getProduct() shows 4C-10C, 3.5Y, as well as 10.5K-13.5K (not sure what these match up with but they're there).

Should hopefully be another easy fix though. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants