How to properly get all receipts

JeffJeff Posts: 5Member

My app requires us to get all receipts for a merchant during the initial integration sync. Up until yesterday, it was possible to get all receipts by hitting /rest/financial/receipt and specifying a modifiedSince with the beginning of time. This morning I noticed this no longer works. We get 400 responses back saying we can only request up to 7 days of receipts at a time.


In the meantime I've altered the code to look back 5 years, asking for periods of 7 days at a time and am going to try that out until I have a better solution.


What I'd really like is a way to know when the merchant was created so I could go back to exactly that date. I can't seem to find any endpoint that returns this info. Does it exist? Or is there some better way to get all receipts that I'm overlooking?

Tags:

4 comments

  • gregaricangregarican Posts: 241Member 

    While our companies use Lightspeed Retail and not Lightspeed Restaurant, this echoes a concern I raised recently --> https://community.lightspeedhq.com/en/discussion/2029/scheduled-maintenance-updates#Item_1. There seemingly has been an impacting change on the API back-end in your case.

    That's why I think it's important that there is a transparent method of announcing future release details. Even if nothing is changed from the front-end user's perspective, any potential API breaking changes or new endpoint behavior should be detailed. Otherwise a key segment of the consumer community has to scramble to pick up the pieces.

    I have a prior heads-up from other service providers such as Shopify, Twilio, Microsoft Office 365, etc. that I have API integrations with. Likewise having a heads-up from Lightspeed would be just as important. Not saying this 100% was the case in what you are experiencing, but it sure sounds like it...

  • Alex LugoAlex Lugo Posts: 119Administrator, Lightspeed Staff moderator

    Hello @Jeff,

    Are you using the below API call?

    GET /rest/financial/receipt?modifiedSince={date}

    Alex Lugo
    API Support Specialist
    Lightspeed HQ
  • JeffJeff Posts: 5Member

    Yes, that's the endpoint.

    Right now I have to use from/to query params with the useModification param in 7 day increments to get everything, whereas before I could just use modifiedSince from beginning of time.

  • Alex LugoAlex Lugo Posts: 119Administrator, Lightspeed Staff moderator

    Hi @Jeff,

    I was able to track down this behaviour, and you are correct until May 22nd this was possible, but our Development were working on that behaviour and deployed the fix this day, allowing to fetch only 7 days.

    I'm notifying our Product Management so we can prevent this kind of changes to cause problem to our API consumer.

    Alex Lugo
    API Support Specialist
    Lightspeed HQ
Sign In or Register to comment.