Unable to upload Item Image

john_2084john_2084 Member Posts: 20
edited April 14 in Products & Inventory

I am having problems uploading item images to LS.

Calling the API from c#, I get the following error message.

{"httpCode":"405","httpMessage":"Method Not Allowed","message":"PUT, POST require an input body.","errorClass":"Exception"}


What does that mean?

I have tried this so many different ways and have had no success. Could really use some help here.



If I try an upload using CURL based on the docs.

curl -v -X POST -H 'Authorization: Bearer xxxxxxxx' -H 'Accept: application/json' -H 'Content-Type: multipart/form-data' --form-string 'data={"description":"test","ordering":"1"}' -F 'image=c:\development\test.jpg' https://api.lightspeedapp.com/API/Account/xxxxxx/Item/13/Image.json


I get "Invalid access token", even though I used the same token, I know it's valid.

{"httpCode":"401","httpMessage":"Unauthorized","message":"Invalid access token."

,"errorClass":"AuthException"}

Post edited by john_2084 on
Sign In or Register to comment.