API "Update a Device" (PUT) not working, but gives back Status Code 200

LocoGPS5 months ago

Hello,

I am trying to update the name and expirationTime of a device with traccar api (https://www.traccar.org/api-reference/#tag/Devices/paths/~1devices~1%7Bid%7D/put)

I get response 200 and the right name and expirationTime back but it does not change -> https://ibb.co/p3rd93D
When I give device ID too in body, it gives error 400 -> https://ibb.co/yV4ZGg8

can someone help me with that?

kind regards

Anton Tananaev5 months ago

Your API request is invalid. You have to include all fields, not just what you want to change.

LocoGPS5 months ago

thank you very much, this works