Skip to content

创建宠物档案 ​

为用户录入并创建新的宠物健康档案。档案 ID 将作为后续所有健康问诊和图片分析的核心上下文载体。

请求地址 ​

POST
/v1/ms-ai-fast/pet-profiles

请求参数 ​

请求头 ​

请求头类型必填说明
Authorizationstring是访问凭证,采用 Bearer Token 规范,格式为 Bearer <ACCESS_TOKEN>。
Content-Typestring是请求体格式,固定为 application/json。

请求体 (Body) ​

json
{
  "name": "糯米",
  "pet_type": 1,
  "breed_code": "cat.british-shorthair",
  "pet_variety": "英国短毛猫",
  "pet_sex": 1,
  "birthday": "2024-05-01",
  "weight": "4.5",
  "is_neutered": 1,
  "avatar": "https://cdn.habitaxx.com/pets/44.jpg"
}
参数名类型必填说明
namestring是宠物昵称(长度限制 1~32 个字符)。
pet_typeinteger是物种类型:1 猫 (cat)、2 狗 (dog)、3 异宠 (other)。
breed_codestring否标准品种编码(通过品种库接口查询获取,如 cat.british-shorthair)。猫狗推荐必填。
pet_varietystring否自定义品种文本(异宠或未收录品种时填写)。
pet_sexinteger否性别:1 公、2 母、null 未知。
birthdaystring否出生日期(格式 YYYY-MM-DD)。
weightstring否体重数值(kg,如 "4.5")。
is_neuteredinteger否绝育状态:0 未绝育、1 已绝育。
avatarstring否头像图片公网 URL。

响应示例 ​

json
{
  "code": 200,
  "message": "success",
  "data": {
    "id": 44,
    "name": "糯米",
    "pet_type": 1,
    "breed_code": "cat.british-shorthair",
    "pet_sex": 1,
    "birthday": "2024-05-01"
  }
}
参数名类型说明
codeinteger业务状态码,200 表示创建成功。
messagestring状态提示信息:成功固定为 "success"(网关统一归一化),失败时为安全的中文提示。不要用它做程序判断。
dataobject新建成功的宠物档案对象。
idinteger系统生成的宠物档案唯一自增 ID。请妥善保存用于后续问诊与识别。
namestring宠物昵称。
pet_typeinteger物种类型:1 猫、2 狗、3 异宠。
breed_codestring绑定的标准品种编码。
pet_sexinteger性别代码。
birthdaystring出生日期。
最近更新

栖界开放平台 · API Documentation