사용자 정보를 업데이트할 수 있습니다.
PUT
https://api.asleep.ai/ai/v1/users/{userid}
Field | Type | Required | Description |
---|
x-api-key | String | O | API Key |
Field | Type | Required | Description |
---|
metadata | Metadata Object | O | 사용자 메타 정보 |
Field | Type | Required | Description |
---|
birth_year | Int | X | 출생 연도 (1900 년부터 현재 연도) |
birth_month | Int | X | 출생 달 (1 ~ 12 월) |
birth_day | Int | X | 출생 일 (1 ~ 31 일, 월/윤년에 따라 실제 유효 범위 상이) |
gender | String (male , female , non_binary , other , prefer_not_to_say ) | X | 성별 |
height | Float | X | 키 (0 ~ 300 cm, 소수점 한자리까지 허용) |
weight | Float | X | 체중 (0 ~ 1000 kg, 소수점 한자리까지 허용) |
curl "https://api.asleep.ai/ai/v1/users/<USER_ID>" -X PUT \
-H "x-api-key: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"birth_year": 2001,
"birth_month": 1,
"birth_day": 1,
"gender": "male",
"height": 178.6,
"weight": 62.1
}
}'
Field | Type | Description |
---|
user_id | String | user id |
metadata | Metadata Object | 사용자 메타 정보 |
Field | Type | Description |
---|
birth_year | Int? | 출생 연도 (1900 년부터 현재 연도) |
birth_month | Int? | 출생 달 (1 ~ 12 월) |
birth_day | Int? | 출생 일 (1 ~ 31 일, 월/윤년에 따라 실제 유효 범위 상이) |
gender | String (male , female , non_binary , other , prefer_not_to_say )? | 성별 |
height | Float? | 키 (0 ~ 300 cm, 소수점 한자리까지 허용) |
weight | Float? | 체중 (0 ~ 1000 kg, 소수점 한자리까지 허용) |
{
"detail": "sucess",
"result": {
"user_id": "<USER_ID>",
"metadata": {
"birth_year": 2001,
"birth_month": 1,
"birth_day": 1,
"gendar": "male",
"height": 178.6,
"weight": 62.1
}
}
}
{
"detail": "user not exist"
}