Update persona
Partial update. TWO THINGS THIS ROUTE CANNOT DO. (1) IT CANNOT DEACTIVATE A PERSONA, AND IT CANNOT CLEAR A FIELD. The update is issued as Updates(struct), and GORM skips every zero-valued member of a struct — so active: false is indistinguishable from active omitted, and "first_name": "" leaves the stored name alone. Only non-zero values are written. date_of_birth and date_of_death are pointers and are copied only when present, which is the same rule stated differently. (2) IT DOES NOT VALIDATE. validateCreatePersonaInput runs on POST only, so this route will happily write a name over the length limit, a future date of birth, or an age under 18 — all of which the create refuses. The 200 body is the struct read before the update with the written columns assigned back into it: GORM points its update at the model it was handed and assigns each column it sets, so the fields the request changed do come back with their new values. It is NOT a fresh read, so anything the database produced on its own — a trigger, a default, a computed column — is not reflected.
Authorization
bearerAuth In: header
Path Parameters
Persona id. A value that does not parse is 400 personas_m.invalid_persona_id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Body of both PUT routes. Sent as Updates(struct), so GORM SKIPS EVERY ZERO VALUE: active: false cannot deactivate, and an empty string cannot clear a name or a nationality. The address members are dropped here too, and their house-number keys are actual_house and reg_house, not actual_house_number and reg_house_number. No validator runs on either PUT.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/personas/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "first_name": "string", "last_name": "string", "date_of_birth": "2019-08-24" }'{
"first_name": "string",
"last_name": "string",
"date_of_birth": "2019-08-24",
"date_of_death": "2019-08-24",
"nationality": "string",
"hash_id": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"active": true,
"metadata": {},
"created_at": "2019-08-24T14:15:22Z",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"modified_at": "2019-08-24T14:15:22Z",
"modified_by": "e8d4374d-93a1-4e98-a6c6-fdcf00c5059f"
}{
"status": 400,
"message": "Invalid persona ID",
"code": "personas_m.invalid_persona_id",
"class": "validation"
}{
"status": 401,
"message": "Unauthorized",
"code": "common.unauthorized",
"class": "business"
}{
"status": 403,
"message": "No access to the record",
"code": "common.rbac_no_rec_access",
"class": "business"
}{
"status": 404,
"message": "Record not found",
"code": "common.record_not_found",
"class": "business"
}{
"status": 429,
"message": "Rate limit exceeded",
"code": "rate_limits_m.exceeded",
"class": "temporary",
"retryable": true
}{
"status": 500,
"message": "Internal server error",
"code": "common.server_error",
"class": "business"
}{
"overall_status": "unhealthy",
"message": "Service is shutting down",
"timestamp": "2026-08-27T15:04:05Z"
}Delegates to the shared common/links helper, whose body is links.UpdateLinkInput. THE 200 ABOVE IS UNREACHABLE TODAY. Before the link row is read, UpdateLink calls validateRecordExistence, which hands checkRecExistence the RECORD-TYPE id — not rec_idx or rec_idy — and that counts rows with that id in the table <type>.<type>. A record-type id is never a row id in the entity table, so the count is zero and every well-formed body ends as 404 common.record_not_found without the link being touched. What the body must still satisfy to get that far, and what will apply once the handler is fixed: each side needs exactly one record-type selector — neither and both are the same 400 common.invalid_input, so a body of only {"active": false} is refused earlier still — and the write is a full replace, not a patch, since updateLinkFields assigns rec_idx, rec_idy, metadata and active unconditionally before Save.
Deletes the link. ANSWERS 200, NOT 204: the shared helper finishes with apireply.Ok200, so the body is {"status": 200, "message": "OK"}. The 204 this operation used to document was never written by the code.