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_TOKENthrough Authentication; business requests useAuthorization: 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 thepet_profile_idused by the following endpoints.
Endpoint overview
| Endpoint | Method | Purpose |
|---|---|---|
/pet-profiles | POST | Create a pet profile; name is required. |
/pet-profiles | GET | Query the current user's pet profiles with page + limit pagination. |
/pet-profiles/{pet_profile_id} | GET | Retrieve a profile together with extension records grouped by record_type. |
/pet-profiles/{pet_profile_id} | PATCH | Partially update profile fields. |
/pet-profiles/{pet_profile_id} | DELETE | Soft-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_idis a number, such as44. It is used by the pet-profile, Smart Consultation, and Image Recognition APIs alike. - Weight is a string:
weightlooks like"10.10kg"and carries a unit; it is not a JSON number. - Pagination uses
page+limit:limitdefaults to10and accepts at most200. - 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.
localeonly affects display: it decides the language in whichbreed_display_nameis returned; it is not written to the profile and does not translate text filled in by the caller. See Language andlocalefor details.