Retail API issue

rifrif Member Posts: 8


I am using API to retrieve ItemMatrix data in json:

What works:




However, if I am requesting ItemMatrix.json?itemMatrixID=6563

which should give me the same object as the last request above I receive:

    "@attributes": {
        "count": "0"

Looks like all the ids above a certain one will not be retrieved using the itemMatrixID=... form

Best Answers


  • gregaricangregarican Member Posts: 625 

    If you look at the API docs ( you will see the URL format that's expected. If the one specified works then why are you trying the query parameter custom URL that's not even listed? Stick with what works, right?

  • rifrif Member Posts: 8

    Unless I am doing something wrong this is a serious bug.

    I am not trying to get all items, I am trying to get one item by ID. Please look at my queries again.

    ItemMatrix/6563.json works but ItemMatrix.json?itemMatrixID=6563 does not. How can this not be a serious bug?

  • rifrif Member Posts: 8

    Also, for another id, both types of queries work. I got the problem in the first place when a query with several IDs using IN (itemMatrixID=IN,[1,2,3]) used to work (and it is still working for lower IDs) but stopped working starting higher ID numbers.

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 656 moderator

    Hi @rif,

    This is not a BUG. When you want to get a single item matrix please use the convention the API is expecting and our docs are telling you. For getting a single item matrix you need to use this convention:

    GET /API/Account/{accountID}/ItemMatrix/{itemMatrixID}.json

    I hope this helps.

  • rifrif Member Posts: 8

    So using queries like itemMatrixID=IN,[1,2,3] or getting an item matrix by any other field are not supported?

    Is the fact that ItemMatrix.json?itemMatrixID=6477 works, just an unsupported/unreliable feature?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 656 moderator

    I just tested it out end itemMatrixID=IN,[1,2,3] is working on my end.

    What do want to achieve?

  • rifrif Member Posts: 8

    That's what I am saying searching for ItemMatrix by itemMatrixID works for some ID but does not for others (using IDs from my account):

    ItemMatrix/6477.json - works

    ItemMatrix.json?itemMatrixID=6477 -works

    ItemMatrix.json?itemMatrixID=IN,[6477] - works

    ItemMatrix/6563.json - works (important)

    ItemMatrix.json?itemMatrixID=6563 - doesn't work

    ItemMatrix.json?itemMatrixID=IN,[6563] - doesn't work

    Looks like that after a certain ID I can no longer use the itemMatrixID=... or itemMatrixID=IN,[...] queries

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 656 moderator

    can you share me your accountID?

  • rifrif Member Posts: 8

    Sure, 188905

  • rifrif Member Posts: 8

    OMG, I did not notice!

    So getting ItemMatrix/6563.json works because it does not care about archived=True, I see now.

    Totally my bad, sorry for wasting your time!

    Thank you

Sign In or Register to comment.