# Update a parent `PATCH / PUT / POST /api/v1/parents/{id}` Updates a parent by ID. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Parents → Write**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## Path parameters - `id` (integer, required) — ID of the parent. ## Body parameters - `athlete_id` (integer) — ID of the athlete in the selected sport. - `firstname` (string, required) — Given name, up to 60 characters. - `surname` (string, required) — Family name, up to 60 characters. - `taxcode` (string, required) — Tax identification code, up to 16 characters. - `relationship` (string or null) — Relationship to the athlete. - `email` (string or null) — Contact email. - `phone` (string or null) — Contact phone, up to 15 characters. - `birthday` (integer or date string or null) — Date of birth as Unix seconds or an ISO date. - `birth_city` (string or null) — Place of birth. - `birth_province` (string or null) — Province or region of birth. - `birth_country` (string or null) — Country of birth. Stored in metadata. - `address` (string or null) — Street address. Stored in metadata. - `city` (string or null) — City of residence. Stored in metadata. - `zip` (string or null) — Postal code. Stored in metadata. - `province` (string or null) — Province or region of residence. Stored in metadata. - `country` (string or null) — Country of residence. Stored in metadata. - `nationality` (string or null) — Nationality. Stored in metadata. - `is_primary` (boolean) — Set true to mark the parent as primary. Omission on update defaults to false. - `to_notify` (boolean or null) — Whether this contact receives notifications. - `metadata` (map or null) — Additional fields, including residence details. Include the contact and profile values you want to keep. Omitted editable details can be cleared. A minor athlete must retain a primary parent. ## Request (PATCH) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PATCH \ --url "https://api.asdincloud.com/api/v1/parents/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"firstname":"Sam","surname":"Example","taxcode":"DEMO000000000001","relationship":"parent","email":"guardian@example.com","is_primary":true,"to_notify":false}' ``` ## Request (PUT) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PUT \ --url "https://api.asdincloud.com/api/v1/parents/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"firstname":"Sam","surname":"Example","taxcode":"DEMO000000000001","relationship":"parent","email":"guardian@example.com","is_primary":true,"to_notify":false}' ``` ## Request (POST) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/parents/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"firstname":"Sam","surname":"Example","taxcode":"DEMO000000000001","relationship":"parent","email":"guardian@example.com","is_primary":true,"to_notify":false}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "message_key": "entities.parent.messages.updated" } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `422` — The record failed validation or the change would leave a minor athlete without a primary parent.