User Profile API
Follow
User Profile API
[[Quote:Risk:Moderate]]
Notice
In May 24, the user property items were also updated to be settable and viewable.
- User property items
Key | Type | Value | Description |
user_id | String | ex) user_1 | user identification value |
user_name | String | ex) lucas | username |
age | String | ex) 30 | age |
gender | String | ex) male | gender |
- Items for consent to receive notifications
Key | Type | Value | Description |
info_flag | String | “Subscribed” / “Unsubscribed” | Informational Notice |
mkt_flag | String | “Subscribed” / “Unsubscribed” | Advertising notifications |
mkt_push_flag | String | “Subscribed” / “Unsubscribed” | Advertising notification (push) |
mkt_sms_flag | String | “Subscribed” / “Unsubscribed” | Advertising notifications (SMS) |
mkt_kakao_flag | String | “Subscribed” / “Unsubscribed” | Advertising notification (Kakao) |
night_flag | String | “Subscribed” / “Unsubscribed” | Nightly advertising notifications |
night_push_flag | String | “Subscribed” / “Unsubscribed” | Nightly advertising notification (push) |
night_sms_flag | String | “Subscribed” / “Unsubscribed” | Nightly advertising notification (SMS) |
night_kakao_flag | String | “Subscribed” / “Unsubscribed” | Nightly advertising notification (Kakao) |
[[Quote:Guide:Normal]] When searching for a User Profile, if there is no setting history, "Undefined" is returned.
Setting up User Profile
This is an API for setting or updating user profiles.
Basic Information
method | URL | Authentication method |
POST | https://openapi.dfinery.io/api/v1/users/profile/update | access token |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_properties | UserProperty[] | User ID to update, property array, maximum 20 | O |
- UserProperty
Name | Type | Description | Required |
user_id | String | user identification value | O |
properties | {"key": value} |
Property to update. Key can only be used as a string. value can only be string, number, or boolean. null cannot be updated. * Only UTF-8 encodable strings are supported |
O |
Example
{ "user_properties": [ { "user_id": "User_1", "properties": {
"user_name": "lucas",
"age": "30:,
"gender": "male", "info_flag": "Subscribed", "mkt_flag": "Subscribed" } }, { "user_id": "User_2", "properties": {
"user_name": "max",
"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 } }
- Some users update successfully
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"] } ] } }
- Update failed
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }
View User Profile
This is an API for viewing user profiles.
Basic Information
method | URL | Authentication method |
POST | https://openapi.dfinery.io/api/v1/users/profile | access token |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_ids | String[] | User identification, maximum 20 | O |
property_names | String[] | Property name to search | X |
Example
- Search only specific properties within UserID
{ "user_ids": ["User_1", "User_2"], "property_names": ["user_name", "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": {
"user_name": "lucas", "info_flag": "Subscribed", "mkt_flag": "Subscribed" } }, { "user_id": "User_2", "properties": {
"user_name": "max", "info_flag": "Subscribed", "mkt_flag": "Unsubscribed" } } ], "failure_details": [] } }
- When inquiry fails
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }
User CI Profile API
[[Quote:Risk:Moderate]]
Notice
The User CI Profile API, which will be updated on Tuesday, July 25, 2023, can manage and update the user's unique identifier, CI. The remaining items will be updated in the future.
- CI list
Key | Type | Value | Description |
kakao_id | String |
"0123456789" * You must match the format to send to KakaoTalk. |
Kakao ID * Format: 10-digit Kakao ID received through Kakao Sync API |
phone_numbe | String |
"821012345678" * You must format correctly to send text messages and KakaoTalk. |
phone number *Format: Country code + number (Example: 8210********) |
Setting up User CI Profile
This is an API for setting or updating user CI profiles.
Basic Information
method | URL | Authentication method |
POST | https://openapi.dfinery.io/api/v1/users/ci/update | access token |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_ci_properties | UserCIProperty[] | User ID to update, property array, maximum 20 | O |
- UserCIProperty
Name | Type | Description | Required |
user_id | String | user identification value | O |
properties | {"key": value} |
Property to update. Key can only be used as a string. Value can only use string, number, and boolean. * Only UTF-8 encodable strings are supported |
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 } }
- Some users update successfully
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"] } ] } }
- Update failed
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }
View User CI Profile
This is an API for viewing user CI profiles.
Basic Information
method | URL | Authentication method |
POST | https://openapi.dfinery.io/api/v1/users/ci | access token |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_ids | String[] | User identification, maximum 20 | O |
user_ci_property_names
|
String[] | CI property name to search | O |
Example
- Search only specific CI properties within UserID
{ "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": [] } }
- When inquiry fails
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }
Deleting User CI Profile
This is an API for deleting user CI profile settings.
Basic Information
method | URL | Authentication method |
POST | https://openapi.dfinery.io/api/v1/users/ci/delete | access token |
Headers
Key | Value |
Authorization | Bearer ${API Token} |
Content-Type | application/json |
Body
- Parameter
Name | Type | Description | Required |
user_ids | List | List of user IDs to remove CI properties, maximum 20 | O |
user_ci_property_names | List | List of CI property names to remove | O |
Example
{ "user_id": ["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_ids": [ "User_1", "User_2" ], "failure_details": null } }
- Successfully deleted some user CI profiles
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"] } ] } }
- Deletion failed
HTTP/1.1 400 BadRequest { "result_code": 4002, "result_msg": "Too many user ids in request.", "result_data": null }