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

  1.    postRequest({
  2.      method: 'posiosApi.voidReceipt',
  3.      params: [
  4.        token,
  5.        receiptId
  6.      ]
  7.    }, function (error, response) {
  8.      if (error) return console.log(error)
  9.      console.log('void receipt response: ', response)
  10.    })

Any ideas? Did the API change in the meantime?

Thanks

5 comments

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

    @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

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • jimvercoelenjimvercoelen Posts: 7Member

    Hey Andrian,

    I am actually not sure.

    POSIOS public api, does that mean anything to you?

    This is the method I am referring to.


  • jimvercoelenjimvercoelen Posts: 7Member

    Any update on this?

    I've attached the JavaDocs


  • jimvercoelenjimvercoelen Posts: 7Member

    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

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

    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

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.