voidReceipt not working

Hi there,
According to the API documentation we've got the voidReceipt method should receive two params:
apiToken
&receiptId
But it returns an error
Code snippet
- postRequest({
- method: 'posiosApi.voidReceipt',
- params: [
- token,
- receiptId
- ]
- }, function (error, response) {
- if (error) return console.log(error)
- console.log('void receipt response: ', response)
- })
Any ideas? Did the API change in the meantime?
Thanks
5 comments
@jimvercoelen could you please cite the documentation you are referring to that allows you to void the receipt?
All our public endpoints have the token in the header and not the body of a payload. Are you using our non-public JSON RPC API?
Adrian Samuel
Software Developer
Lightspeed HQ
Hey Andrian,
I am actually not sure.
POSIOS public api, does that mean anything to you?
This is the method I am referring to.
Any update on this?
I've attached the JavaDocs
Hey guys and girls from LightSpeed,
Is there anyone that could assist me in this matter? It's kind of an urgent matter but I don't want to lay pressure or anything.
Thanks,
Jim
Hey @Jimvercoelen,
A public class is a code specification in object orientated languages; it does not refer to whether an API is available for public consumption. What you have found is documentation that shouldn't be public, meaning the use of it would constitute an illegal integration.
As such you will have to refer to our public documentation here: https://developers.lightspeedhq.com/resto-api/introduction/introduction/
Our REST API which is open to partners does not allow you to void receipts.
Adrian Samuel
Software Developer
Lightspeed HQ