Hi
If I understand the standard correctly then the id is always the id of the resource on the server?
Or can it be the id on the client?
What I’d really like to do is allow the client to send its own identifier for the resource in all calls and have the server use that (and a client identifier) to uniquely identify the resource on the server?
Is that totally going against the spec? I see it is possible in a post by using lid, but that for a get or patch the client must provide the id?
I’m not fully sure if I got your question. Maybe it helps if I elaborate on resource’s IDs a little bit. Feel free to ask follow-up questions.
Every resource has an ID. The ID is identifying the resource together with the resource’s type.
The ID is immutable. It’s set by the client or server when creating the resource. IDs generated by the client are discussed in 9.1.1 Client-Generated IDs.
The local identifier (lid) allow to identify resources within a JSON:API document which don’t have an ID yet. This is the case for creating resources if using server-generated IDs.