This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPN Python API empty list or no page index

Other Parts Discussed in Thread: TI-API

Hi team,

I tried to implement the GET /store/products API method (part of TI Inventory and Pricing API)  but I get either an empty list when page = 1, or ERROR: No page index given for TI Store products list when page = 1 or other numbers. Here the code, could you please let me know how to fix it?

y = catalog.get_products(gpn = gpn, page = 0, size = 20, verify=verify_ssl)
  • I just updated the code putting the quotation mark on page and size, and it works. I though it should have been an integer.

    y = catalog.get_products(gpn = gpn, page = "0", size = "20", verify=verify_ssl)
  • Hi Frederico,

    Thanks for your post - for future API requests in E2E, please enter Part Number = TI-API so your thread is automatically routed to the experts as soon as you create it.

    Have a good day,


    Manager, Online Support

  • Hello! Thank you for raising this issue. The code for the wrapper was checking if an argument for the function did not exist, but Python considers integer values of 0 as being 'falsy' (somewhat equivalent to null in other languages). I have corrected the code by removing that logic since, if you are calling a method, then you are necessarily passing arguments for those parameters anyway. Your program should work now if you pull the latest changes from the remote Git repository!

**Attention** This is a public forum