# Resource IDs Every unqiue resource in the ev.energy API has an ID. These are used to reference the resource in response bodies and when making requests. Our requests look like this: ``` xmpl01HQR99ZREJD9285NV25PVCKVG ``` The first four characters are a prefix which identifies the collection that the resource belongs to. For examples, user IDs begin with `user` and vehicle IDs begin with `vhcl`. This means that you can always tell what type of thing an ID references, even with no other context. The remaining 26 characters are a [ULID](https://github.com/ulid/spec), a "Universally Unique Lexicographically Sortable Identifier". These are like the more commonly used UUID, but with some extra features: - They are shorter because they use more characters from the alphabet and aren't written with hyphens - They can be sorted by creation time with no extra information - part of the ULID is a compressed timestamp - Despite being sortable, there are 1.21e+24 unique potential ULIDs per millisecond, so collisions are extremely rare ## Usage in the API Although the ID uniquely references a particular resource, the ev.energy API still uses full URLs to reference one resource from another. This allows clients to avoid needing code to construct URLs and makes it very explicit how to follow links between resources. The same principle applies when sending data to the API, to `PATCH` a vehicle to an "example" resource, you would use the body: ```http PATCH https://api.ev.energy/v2/example/xmpl01HQR99ZREJD9285NV25PVCKVG/ { "vehicle": "https://api.ev.energy/v2/vehicle/vhcl01HQR9XN8CRKNE0M6489KW6FWG/" } ```