Creating/updating my own created entity?

I want to build a “GPS Tracker” entity. The device will be a small cellular modem/router in a vehicle. I’d use a script in the router to update the Vehicle-GPS entity (probably via REST) every X minutes. Ideally, it would mimic the function of the GPS tracking in the iOS/Android apps.

Why not just use the Android/iOS apps? Well, primarily because that’s not quite as fun, and because the iOS app seems to do a terrible job at updating the entity, and also because at some point, I will use the router to update a separate database to track the vehicle as well.

What I can’t find is documentation on how to actually update the entity.

From the documentation, I’ve tried the example REST JSON of

    "state": "vehicle_on",
    "attributes": {
        "latitude":"33.XXXXXX, ",

How should this work, in theory? If I successfully POST via the API, HomeAssistant takes care of logging the state/attributes into the database?

Correct. The entity does not even have to exist prior to POSTing.

Thanks for the input.

So, then I could make 10 of these GPS tracker/routers, each of them POSTing to my HA instance, and HA will do everything else, including creating the entity from scratch?

How does HA handle entities with the same entity_id? What would happen if I made two identical devices/entities/routers, both trying to post the same entity ID? Would HA just assume that they were the same entity?