PATCH
https://api.blockv.io/v1/userOverview
This endpoint updates the current user's profile. Only the submitted fields are updated.
Update Profile Request
HTTP Headers
application/json
{app_id}
Payload Details
Name | Type | Description |
---|
first_name | string | The user's first name. Max. length 64 characters. |
last_name | string | The user's last name. Max. length 64 characters. |
name_public | boolean | Flag to indicate if other users can see the user's first and last name. Default:
true |
password | string | The password that the user uses to login. Only mandatory if one of the tokens uses the password for authentication. Max. length 64 characters. |
avatar_public | boolean | Flag to indicate if other users can see the user's avatar. Default:
true |
birthday | string | The user's birth date. Format:
YYYY-MM-DD |
language | string | The user's preferred language. Two letter language code according to ISO 639-1. |
{
"first_name" : "James",
"last_name" : "Smith",
"name_public": true,
"password": "anotherpassword",
"avatar_public": true,
"birthday": "1970-01-02",
"language": "ru"
}
Update Profile Response
After a successful update the endpoint will return the user object with with the updated fields.
Return & Error Codes
Error | Type | Description |
---|
200 | http | Everything is OK |
400 | http | Bad Request |
403 | http | Not Authorized |
payload Object
Name | Type | Description |
---|
id | string | The user's unique identifier, a 36 character UUID. |
meta | object | The object's meta information (for example the creation timestamp). |
properties | object | The properties of the object. |
system_properites | object | An additional set of properties that cannot be changed by the user. |
{
"payload": {
"id": "001d0933-88e6-4e17-b147-0f672dc016d1",
"meta": {
"data_type": "blockv::user",
"when_created": "2018-01-01T00:00:00+00:00",
"when_modified": "2018-01-02T00:00:00+00:00"
},
"properties": {
"first_name": "James",
"last_name": "Smith",
"name_public": true,
"avatar_uri": "http://example.com/mypic.jpg",
"avatar_public": true,
"birthday": "1970-01-02",
"nonpush_notification": false,
"language": "ru"
},
"system_properties": {
"pub_fqdn": "publisher_fqdn",
"is_admin": false,
"activated": false,
"last_login": "2018-01-02T00:00:00+00:00",
"is_merchant": false,
}
}
}