Update a pet profile
PATCH
/pet-profiles/{pet_profile_id}Update a pet profile by ID. The request body is a partial update: send only the fields that need to change; fields that are not sent keep their original values.
Prerequisite: when changing
breed_code, use a code returned by Breed library lookup.
Request URL
text
PATCH https://open-api.habitaxx.com/v1/ms-ai-fast/pet-profiles/44?locale=zh-CNRequest headers
http
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/jsonPath parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pet_profile_id | integer | Yes | ID of the pet profile to update. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
locale | string | No | Display language, affecting breed_display_name in the response. |
Request body
json
{
"name": "团子",
"weight": "10.30kg",
"is_neutered": 1
}Request fields
The fields match Create a pet profile, but all of them are optional; submit only the fields that need to change.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Pet name, maximum 64 characters. |
avatar | string | null | No | Avatar URL, maximum 500 characters. |
birthday | string(date-time) | null | No | Date of birth. |
gender | integer | null | No | 1 male, 2 female, null unknown. |
pet_type | integer | null | No | 1 cat, 2 dog, 3 exotic pet, null unspecified. |
pet_variety | string | null | No | Breed text, maximum 100 characters. |
breed_code | string | null | No | Standard breed code, maximum 64 characters; get values from Breed library lookup. |
weight | string | null | No | Weight as a string with a unit, such as "10.30kg". |
is_neutered | integer | null | No | 0 not neutered, 1 neutered, null unknown. |
Response example
json
{
"code": 200,
"message": "success",
"data": {
"id": 44,
"user_uuid": "<USER_UUID>",
"name": "团子",
"avatar": null,
"birthday": "2023-06-01T00:00:00",
"gender": 1,
"pet_type": 2,
"pet_variety": "柴犬",
"breed_code": "dog.shiba-inu",
"locale": "zh-CN",
"breed_display_name": "柴犬",
"weight": "10.30kg",
"is_neutered": 1,
"is_del": 0,
"created_at": "2026-08-27T11:20:31",
"updated_at": "2026-08-28T09:15:02"
}
}Response fields
The complete updated pet-profile object is returned; for the field descriptions see Create a pet profile.
Notes
- Use
PATCH, not the full-overwrite semantics ofPUT. - To clear an optional field, send
nullexplicitly; omitting it means no change.