API

Common

Getting Started

User

Register New User
Login
Logout
Refresh Access Token
Get User Profile
Update Profile
Upload Avatar
Delete User
Reset Password
Reset Password by ID

User Token

List User Tokens
Add User Token
Update Default User Token
Delete User Token
Verify User Token
Reset Verification Code

User vAtom

Get vAtom
Get vAtoms by Ids
Get vAtom Inventory
Search vAtoms
Geo Discover Groups
Geo Discover vAtoms
Update vAtoms
Perform Action
Trash vAtom

User Activity

Get My Threads
Get My Thread Messages

Template

List Templates
Get Template
Create Template
Update Template
Delete Template

Template Variation

List Variations
Get Variation
Create Variation
Update Variation
Delete Variation

vAtom

Emit vAtom

Template Action

List Actions
Get Action
Register Action Handler
Register Action
Update Action
Delete Action

Template Face

List Faces
Register Face
Update Face
Delete Face

Asset

Upload Assets
Get Assets
Delete Assets

Update Profile

PATCH
https://api.blockv.io/v1/user

Overview

This endpoint updates the current user's profile. Only the submitted fields are updated.

Update Profile Request

HTTP Headers

Content-Type: application/json App-Id: {app_id}

Payload Details

NameTypeDescription
first_namestringThe user's first name. Max. length 64 characters.
last_namestringThe user's last name. Max. length 64 characters.
name_publicbooleanFlag to indicate if other users can see the user's first and last name. Default: true
passwordstringThe password that the user uses to login. Only mandatory if one of the tokens uses the password for authentication. Max. length 64 characters.
avatar_publicbooleanFlag to indicate if other users can see the user's avatar. Default: true
birthdaystringThe user's birth date. Format: YYYY-MM-DD
languagestringThe user's preferred language. Two letter language code according to ISO 639-1.

Sample Request

{
  "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

ErrorTypeDescription
200httpEverything is OK
400httpBad Request
403httpNot Authorized

payload Object

NameTypeDescription
idstringThe user's unique identifier, a 36 character UUID.
metaobjectThe object's meta information (for example the creation timestamp).
propertiesobjectThe properties of the object.
system_properitesobjectAn additional set of properties that cannot be changed by the user.

Sample Response

{
    "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,
        }
    }
}
©2020 BLOCKv
Info