Empty results from "Order" endpoint

jeffreymbjeffreymb Member Posts: 4
Every time a make a request to the Orders endpoint for a specific account I get an empty message body. Below is the full (sanitized) URL I'm requesting. I have several other accounts that I have been able to access for years using the exact same URL with no problems.

I'm inclined to think that and unhandled exception or something is happening on the API server. Any suggestions or feedback?

GET https://api.merchantos.com/API/Account/135xxx/Order?version=2&archived=1&load_relations=["OrderLines"]&offset=0&limit=100

Tags:

2 comments

  • Michael CareyMichael Carey Administrator, Lightspeed Staff Posts: 68 moderator
    Hi Jeffrey,

    It looks like in this case the customer has hundreds of Order Lines on each Order. This is causing a memory error on our servers and generating an error 500. For some reason that error is not being returned to you when the requested limit is high and is passing an empty response instead. I'll need to look into that issue separately.

    I've tested a few different limit sizes and it seems for this customer you would need to drastically reduce the limit on the request (ie. between 10 and 20). Alternatively you could remove the Order Lines relation from the request to receive all of the Orders and query them individually to get the Order Line details.

    Thanks,
    Michael Carey

    Product Manager
    Lightspeed HQ
  • jeffreymbjeffreymb Member Posts: 4
    Thanks for your help. That is exactly what I was suspicious of!

    I'll see what I can work out.
Sign In or Register to comment.