Searching Workorders

gregaricangregarican Member Posts: 333 
So as part of our business practices, we put detailed notes into LS Retail Workorders. The challenge is in the web client we can really only search by customer name and description. The note field doesn't appear to be accessible for searching. Now I'm looking to utilize the API for querying.

Would it be possible to construct an API URL with query parameters to accomplish this? For example, say I'm looking for any Workorder that has the words "Cartier watch" in the note field. Doable or not?

5 comments

  • gregaricangregarican Member Posts: 333 
    Just a quick bump, to see if any of the LS folks have feedback about this. Other than getting all Workorders and parsing through them on my end, are there URL query parameters available for pulling only records that match Note field contents?
  • gregaricangregarican Member Posts: 333 
    I am stumbling upon things using query parameters. So this API GET pulls any Workorders that have the exact matching Note value of "Test" defined.

    https://api.merchantos.com/API/Account/{AccountID}/Workorder.json?note=Test

    But the other LIKE and wildcard characters in the query parameters don't work. As is defined in https://developers.lightspeedhq.com/retail/introduction/parameters/

    So if I use ?note~Test or ?note~%Test% this just returns all records. Any suggestions?
  • gregaricangregarican Member Posts: 333 
    Answered my own question. I forgot to include the other query delimiters. In this case a wildcard LIKE search for "Test" would look like this:

    ?note=~,%Test%

    So that answers that!
  • ACHAILEACHAILE Member Posts: 1

    Hey I was really trying to break this down in to a way that I could understand it, and have failed. Work at a bike shop that has the need to search work orders from time to time. Could you offer a slightly more detailed explanation on how to do this?

    I kinda have an idea, but it's hard to get information because you were talking to yourself, which speaks on the customer support of lightspeed. Anyways I would really appreciate it if you ever have time to. It would help us a great deal.


    [email protected]

  • gregaricangregarican Member Posts: 333 

    This involves using the Lightspeed Retail API to get at this information. Here's a link to the documentation --> https://developers.lightspeedhq.com/retail/introduction/introduction/. If you don't have experience in web development it might be tough. :(

    Once you have a token to get access into the API then this URL would search the Lightspeed Retail Workorders to find any WorkOrder that has the word 'Test' in its notes.


    https://api.merchantos.com/API/Account/{AccountID}/Workorder.json?note=~,%Test%

    The {AccountID} represents your own account's ID as defined in Lightspeed Retail. This value is displayed when you click down on the Help section in the web client.


    Like I said, if you aren't familiar with API or web development then it would require recruiting someone to assist.


    Hope this helps a little at least!

Sign In or Register to comment.