Easy way to delete images with an itemID

meatcomputermeatcomputer Posts: 23Member

Hey is there an easy request to delete every image associated with an itemID?

I have not been able to locate one in the api documentation

All the best,

meatcomputer

1 comment

  • Adrian SamuelAdrian Samuel Posts: 515Moderator, Lightspeed Staff moderator
    edited May 16

    Hey @meatcomputer,

    You could have a query like this:

    https://api.lightspeedapp.com/API/Account/{{accountID}}/Image.json?itemID =>,1

    This will give you a list of all your images associated to an itemID.

    Then you would take the imageID and make a DELETE request to the Image API for every one of those ImageIDs like so

    https://api.lightspeedapp.com/API/Account/{{accountID}}/Image/{{imageID}}.json

    Hope this helps!

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.