Unable to upload Item Image

john_2084john_2084 Member Posts: 20

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.

No problem with the rest of the api, can download/ create items, categories, etc, no problem.


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"}

1 comment

Sign In or Register to comment.