400 UPDATE error with valid JSON

programmeuropwielenprogrammeuropwielen Member Posts: 13

Hi,

I get the follow error from the Lightspeed eCom API when I want to set a memo field of a order.

{"error":{"request":"/nl/orders/147053866.json","code":400,"method":"UPDATE","message":"Invalid data input."}}

this is the payoad:

{"memo":"9-2: Klant geïnformeerd over levertijd (medio juni). Nog niet besteld. In afwachting van reactie van de klant.\r\n9--2: Klant is akkoord. Lamp is nog niet besteld\r\n\n<never delete this or the line below, and always type additional messages above this line>\n\n${{processed}}"}


thx in advance! Remon

3 comments

  • Alex LugoAlex Lugo Administrator, Lightspeed Staff Posts: 174 moderator

    Hello @programmeuropwielen ,


    {
      "order": {
          "memo": "9-2: Klant geïnformeerd over levertijd (medio juni). Nog niet besteld. In afwachting van reactie van de klant.\r\n9--2: Klant is akkoord. Lamp is nog niet besteld\r\n\n<never delete this or the line below, and always type additional messages above this line>\n\n${{processed}}",
      }
    }
    

    Please check if sending the above JSON works.

    Alex Lugo
    API Support Specialist
    Lightspeed HQ
  • programmeuropwielenprogrammeuropwielen Member Posts: 13

    Hi alex,

    I figured out why it didn't come through.. it was the special character ï
    


  • programmeuropwielenprogrammeuropwielen Member Posts: 13

    Now I have an other bug for you :)

    When I try to set only the memo field of a order.

    The customStatusId is also set to null.

    I think it's a bug in the API, because null is a actual value for customStatusId, and it checks the payload for the customStatusId wich results into null and sets the value

Sign In or Register to comment.