Skip to content

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-CN

Request headers ​

http
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json

Path parameters ​

ParameterTypeRequiredDescription
pet_profile_idintegerYesID of the pet profile to update.

Query parameters ​

ParameterTypeRequiredDescription
localestringNoDisplay 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.

FieldTypeRequiredDescription
namestringNoPet name, maximum 64 characters.
avatarstring | nullNoAvatar URL, maximum 500 characters.
birthdaystring(date-time) | nullNoDate of birth.
genderinteger | nullNo1 male, 2 female, null unknown.
pet_typeinteger | nullNo1 cat, 2 dog, 3 exotic pet, null unspecified.
pet_varietystring | nullNoBreed text, maximum 100 characters.
breed_codestring | nullNoStandard breed code, maximum 64 characters; get values from Breed library lookup.
weightstring | nullNoWeight as a string with a unit, such as "10.30kg".
is_neuteredinteger | nullNo0 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 of PUT.
  • To clear an optional field, send null explicitly; omitting it means no change.
最近更新

Qijie Open Platform · API Documentation