Skip to content

Pet Profiles ​

Pet profiles maintain the basic information of an end user's pet. They are a supporting resource for pet AI: both Smart Consultation and Image Recognition require a pet_profile_id before a session can start.

Before you begin ​

  • Exchange an ACCESS_TOKEN through Authentication; business requests use Authorization: Bearer <ACCESS_TOKEN>.
  • Gateway base URL: https://open-api.habitaxx.com/v1/ms-ai-fast
  • Call List pet profiles or Create a pet profile first to obtain the profile id; that value is the pet_profile_id used by the following endpoints.

Endpoint overview ​

EndpointMethodPurpose
/pet-profilesPOSTCreate a pet profile; name is required.
/pet-profilesGETQuery the current user's pet profiles with page + limit pagination.
/pet-profiles/{pet_profile_id}GETRetrieve a profile together with extension records grouped by record_type.
/pet-profiles/{pet_profile_id}PATCHPartially update profile fields.
/pet-profiles/{pet_profile_id}DELETESoft-delete a profile.

For complete fields, validation rules, and error handling, see the API reference.

Typical call chain ​

text
1  (when a standard breed is needed) GET /pets/pet-info   <- get breed_code first
        ↓  items[].breed_code
2  POST /pet-profiles (create) or GET /pet-profiles (list)
        ↓  obtain the id
3  GET /pet-profiles/{pet_profile_id} (verify the data)
        ↓  pet_profile_id
4  POST /session-records/sessions (create a consultation session)

breed_code is not free text: only codes returned by Breed library lookup can be written to a profile. Without a standard breed (for example exotic pets), send the pet_variety text only.

Key conventions ​

  • IDs are numeric: pet_profile_id is a number, such as 44. It is used by the pet-profile, Smart Consultation, and Image Recognition APIs alike.
  • Weight is a string: weight looks like "10.10kg" and carries a unit; it is not a JSON number.
  • Pagination uses page + limit: limit defaults to 10 and accepts at most 200.
  • Deletion is soft: after deletion the profile and its extension records are no longer readable by the current user, but historical consultation sessions and reports remain queryable by session ID.
  • locale only affects display: it decides the language in which breed_display_name is returned; it is not written to the profile and does not translate text filled in by the caller. See Language and locale for details.
最近更新

Qijie Open Platform · API Documentation