Easy way to delete images with an itemID

meatcomputermeatcomputer Member Posts: 23

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 Moderator, Lightspeed Staff Posts: 625 moderator
    edited May 2019

    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

    Integrations & Solutions Developer - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.