Skip to content

Create a pet profile ​

POST/pet-profiles

Create a pet profile. The id returned on success is the pet_profile_id used by the detail, update, and delete endpoints, as well as by Smart Consultation and Image Recognition.

Prerequisite: get breed_code from Breed library lookup first; do not invent it. When there is no standard breed, send the pet_variety text only.

Request URL ​

text
POST https://open-api.habitaxx.com/v1/ms-ai-fast/pet-profiles?locale=zh-CN

Request headers ​

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

Query parameters ​

ParameterTypeRequiredDescription
localestringNoResponse display language, such as zh-CN or en-US. Affects the returned breed_display_name. When omitted, the default language is used.

Request body ​

json
{
  "name": "团子",
  "pet_type": 2,
  "gender": 1,
  "birthday": "2023-06-01T00:00:00",
  "pet_variety": "柴犬",
  "breed_code": "dog.shiba-inu",
  "weight": "10.10kg",
  "is_neutered": 1,
  "avatar": null
}

Request fields ​

FieldTypeRequiredDescription
namestringYesPet name, maximum 64 characters.
avatarstring | nullNoAvatar URL, maximum 500 characters.
birthdaystring(date-time) | nullNoDate of birth, such as 2023-06-01T00:00:00.
genderinteger | nullNo1 male, 2 female; omit for unknown.
pet_typeinteger | nullNo1 cat, 2 dog, 3 exotic pet; omit for unspecified.
pet_varietystring | nullNoBreed text, maximum 100 characters.
breed_codestring | nullNoStandard breed code, maximum 64 characters. Get values from Breed library lookup; the prefix must match pet_type (cat. / dog.).
weightstring | nullNoWeight, a string with a unit, such as "10.10kg", maximum 20 characters.
is_neuteredinteger | nullNo0 not neutered, 1 neutered; omit for 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.10kg",
    "is_neutered": 1,
    "is_del": 0,
    "created_at": "2026-08-27T11:20:31",
    "updated_at": "2026-08-27T11:20:31"
  }
}

Response fields ​

FieldTypeDescription
idintegerPet-profile ID. Later endpoints use this value as their pet_profile_id.
namestringPet name.
avatarstring | nullAvatar URL.
birthdaystring(date-time) | nullDate of birth.
genderinteger | null1 male, 2 female, null unknown.
pet_typeinteger | null1 cat, 2 dog, 3 exotic pet, null unspecified.
pet_varietystring | nullBreed text supplied by the caller.
breed_codestring | nullStandard breed code.
localestringDisplay language actually used for this response.
breed_display_namestring | nullStandard breed display name returned according to locale.
weightstring | nullCurrent weight (a string with a unit).
is_neuteredinteger | null0 not neutered, 1 neutered, null unknown.
created_at / updated_atstring(date-time)Creation and update time.
user_uuidstringPlatform-internal user identifier. Do not pass it as a business parameter or expose it externally.
is_delintegerPlatform soft-delete flag. Do not rely on this field to determine business state.

Next steps ​

最近更新

Qijie Open Platform · API Documentation