Problem with updating Item TagRelations.Tag

BillHuBillHu Member Posts: 3
Hello Everyone,

I am currently experiencing a problem with trying to update the tags of items through the API.

The query string is: "{"Tags": {"Tags": ["a", "b"]}}"

And the error returned is: "{'httpCode': '500', 'httpMessage': 'Internal Server Error', 'message': 'Can not convert an array to XML when array has numeric indexed values.', 'errorClass': 'Exception'}"

If I only put one tag in the query which looks like:  "{"Tags": {"Tags": "a"]}}", the update is successful. So as the error suggests, there is a problem with the array.

I have searched all the documentation but did not find an answer.

Please advise the correct way to update multiple tags or append tags to existing ones.

Thank you.


  • BillHuBillHu Member Posts: 3
    Please advise, thank you!
  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 569 moderator
    edited February 8
    Hey @BillHu,

    There is a bug in our API that doesn't allow you to add multiple tags using a JSON formatted request. You have to enter it in via XML like this:

    Request URL:{{accountID}}/Item/{{itemID}}

    Request Method: PUT
    Request Payload:


    Hope this helps!
    Post edited by Adrian Samuel on

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • BillHuBillHu Member Posts: 3
    Using XML solved the problem.

    Thank you for the quick response!
Sign In or Register to comment.