Searching for items by exact match will include partial matched systemSkus

rcojoercojoe Member Posts: 3
edited October 21 in Development

https://api.lightspeedapp.com/API/Account/{{account}}/Item.json?or=upc%3D1234|ean%3D1234|customSku%3D1234|manufacturerSku%3D1234|systemSku%3D1234

Hey Lightspeed, I have a requirement to return exact matched products but discovered that a partial match of the systemsku is included in my result set which is a different behavior than how the UI search works.

Product 1 : customSku = 44444

Product 1: systemSku = 210000001234

Product 2: customSku = 1234

Product 2: systemSku = 210000269953


Why would the above search return both items?


I would expect product 2 to be the only returned product.


Joe

Post edited by rcojoe on

2 comments

  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 573 moderator

    Hey @rcojoe,

    I think you'll find that you have three results for this query:

    "210000001234, 210000269953, 210000269954"

    Two of them have manufacturer skus that match your query.

    The final item in question with the: 210000001234 is returned in the search. My belief is because of the final path of the systemSku contains the match and since systemSkus cannot be that short, the system "helps" you by partially matching the distinguishing might be the relevant part of the sku


    Hope this helps!

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.