User Profile API
팔로우
User Profile API
[[인용:위험:보통]] Notice
23년 4월 28일 (금) 업데이트 되는 User Profile API 는 알림수신 동의 항목에 한해서만 조회, 및 업데이트가 가능합니다. 나머지 항목은 차후 업데이트 될 예정입니다.
- 알림 수신 동의 항목
Key | Type | Value | Description |
info_flag | String | "Subscribed" / "Unsubscribed" | 정보성 알림 |
mkt_flag | String | "Subscribed" / "Unsubscribed" | 광고성 알림 |
mkt_push_flag | String | "Subscribed" / "Unsubscribed" | 광고성 알림(푸시) |
mkt_sms_flag | String | "Subscribed" / "Unsubscribed" | 광고성 알림(SMS) |
mkt_kakao_flag | String | "Subscribed" / "Unsubscribed" | 광고성 알림(Kakao) |
night_flag | String | "Subscribed" / "Unsubscribed" | 야간 광고성 알림 |
night_push_flag | String | "Subscribed" / "Unsubscribed" | 야간 광고성 알림(푸시) |
night_sms_flag | String | "Subscribed" / "Unsubscribed" | 야간 광고성 알림(SMS) |
night_kakao_flag | String | "Subscribed" / "Unsubscribed" | 야간 광고성 알림(Kakao) |
[[인용:안내:보통]] User Profile 조회시 설정 이력이 없을 경우 "Undefined" 를 Return 합니다.
User Profile 설정하기
사용자 프로필을 설정 혹은 업데이트 하기 위한 API 입니다.
기본 정보
메서드 | URL | 인증 방식 |
POST | https://openapi.dfinery.io/api/v1/users/profile/update | 액세스 토큰 |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_properties | UserProperty[] | 업데이트할 유저ID, 프로퍼티 배열, 최대 20개 | O |
- UserProperty
Name | Type | Description | Required |
user_id | String | 유저 식별값 | O |
properties | {"key": value} |
업데이트 할 프로퍼티. key 는 string 만 사용 가능. value 는 string, number, boolean 만 사용 가능 * UTF-8 인코딩 가능한 문자열만 지원 |
O |
Example
{ "user_properties": [ { "user_id": "User_1", "properties": { "info_flag": "Subscribed", "mkt_flag": "Subscribed" } }, { "user_id": "User_2", "properties": { "info_flag": "Subscribed", "mkt_flag": "Subscribed" } } ] }
Response Example
- OK
HTTP/1.1 200 OK { "result_code": 2000, "result_msg": null, "result_data": { "successful_user_ids": [ "User_1", "User_2" ], "failure_details": null } }
- 일부 유저 업데이트 성공
HTTP/1.1 200 OK { "result_code": 2000, "result_msg": null, "result_data": { "successful_user_ids": ["User_1"], "failure_details": [ { "code": 5003, "msg": "The server was too busy to handle it. Please try again later.", "user_ids": ["User_2"] } ] } }
- 업데이트 실패
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }
User Profile 조회하기
사용자 프로필을 조회하기 위한 API 입니다.
기본 정보
메서드 | URL | 인증 방식 |
POST | https://openapi.dfinery.io/api/v1/users/profile | 액세스 토큰 |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_ids | String[] | 유저 식별값, 최대 20개 | O |
property_names | String[] | 조회할 프로퍼티명 | X |
Example
- UserID 내 특정 프로퍼티만 조회
{ "user_ids": ["User_1", "User_2"], "property_names": ["info_flag", "mkt_flag"] }
Response Example
- OK
HTTP/1.1 200 OK { "result_code": 2000, "result_msg": null, "result_data": { "successful_user_properties": [ { "user_id": "User_1", "properties": { "info_flag": "Subscribed", "mkt_flag": "Subscribed" } }, { "user_id": "User_2", "properties": { "info_flag": "Subscribed", "mkt_flag": "Unsubscribed" } } ], "failure_details": [] } }
- 조회 실패시
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }
User CI Profile API
[[인용:위험:보통]] Notice
23년 7월 25일 (화) 업데이트 되는 User CI Profile API 는 사용자의 고유 식별자인 CI를 관리하고 업데이트가 가능합니다. 나머지 항목은 차후 업데이트 될 예정입니다.
- CI 목록
Key | Type | Value | Description |
kakao_id | String |
"0123456789" * 형식을 맞춰주어야 카카오톡 전송이 가능합니다. |
카카오 아이디 * 형식: 카카오 싱크 API를 통해 받은 10자리 카카오 ID |
phone_number | String |
"821012345678" * 형식을 맞춰주어야 문자메시지와 카카오톡 전송이 가능합니다. |
전화번호 *형식: 국가코드 + 번호 (예시 : 8210********) |
User CI Profile 설정하기
사용자 CI 프로필을 설정 혹은 업데이트 하기 위한 API 입니다.
기본 정보
메서드 | URL | 인증 방식 |
POST | https://openapi.dfinery.io/api/v1/users/ci/update | 액세스 토큰 |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_ci_properties | UserCIProperty[] | 업데이트할 유저ID, 프로퍼티 배열, 최대 20개 | O |
- UserCIProperty
Name | Type | Description | Required |
user_id | String | 유저 식별값 | O |
properties | {"key": value} |
업데이트 할 프로퍼티. key 는 string 만 사용 가능. value 는 string, number, boolean 만 사용 가능 * UTF-8 인코딩 가능한 문자열만 지원 |
O |
Example
{ "user_ci_properties": [ { "user_id": "User_1", "properties": { "kakao_id": "0123456789", "phone_number": "821012345678" } }, { "user_id": "User_2", "properties": { "kakao_id": "0123456789", "phone_number": "821012345678" } } ] }
Response Example
- OK
HTTP/1.1 200 OK { "result_code": 2000, "result_msg": null, "result_data": { "successful_user_ids": [ "User_1", "User_2" ], "failure_details": null } }
- 일부 유저 업데이트 성공
HTTP/1.1 200 OK { "result_code": 2000, "result_msg": null, "result_data": { "successful_user_ids": ["User_1"], "failure_details": [ { "code": 5003, "msg": "The server was too busy to handle it. Please try again later.", "user_ids": ["User_2"] } ] } }
- 업데이트 실패
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }
User CI Profile 조회하기
사용자 CI 프로필을 조회하기 위한 API 입니다.
기본 정보
메서드 | URL | 인증 방식 |
POST | https://openapi.dfinery.io/api/v1/users/ci | 액세스 토큰 |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_ids | String[] | 유저 식별값, 최대 20개 | O |
user_ci_property_names
|
String[] | 조회할 CI 프로퍼티명 | O |
Example
- UserID 내 특정 CI 프로퍼티만 조회
{ "user_ids": ["User_1", "User_2"], "user_ci_property_names": ["kakao_id", "phone_number"] }
Response Example
- OK
HTTP/1.1 200 OK { "result_code": 2000, "result_msg": null, "result_data": { "successful_user_ci_properties": [ { "user_id": "User_1", "properties": { "kakao_id": "0123456789", "phone_number": "821012345678" } }, { "user_id": "User_2", "properties": { "kakao_id": "0123456789", "phone_number": "821012345678" } } ], "failure_details": [] } }
- 조회 실패시
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }