Item query with like wildcard description

jbrownjbrown Posts: 6Member

Hi,

i'm trying to put together a query for items with a similar description and i'm trying to use the ~ and % wildcards in the query string parameter but i'm not getting anywhere.

If I query on direct match:

{{base_url}}{{account_number}}/Item.json?description=shipping

the returned results are perfect and I get the item i expect, but if I try:

{{base_url}}{{account_number}}/Item.json?description=~%shipping%

I get 0 results and if I try url encoding the wildcard %, again 0.

{{base_url}}{{account_number}}/Item.json?description=~%25shipping%25


Can someone please clue me in to what i'm doing wrong here ?

Thanks!

2 comments

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

    Hey @jbrown,

    Great question!

    To get the wildcard to work, try adding a comma after the wildcard symbol like this:

    {{base_url}}{{account_number}}/Item.json?description=~,%shipping%

    Hope this helps!

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • jbrownjbrown Posts: 6Member

    thats it! and it is mentionned too.. if i read close enough.


    Thanks!

Sign In or Register to comment.