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
Geo Discover Groups
Search vAtoms
Geo Discover vAtoms
Update vAtoms
Perform Action
Trash vAtom

User Activity

Get My Thread Messages
Get My Threads

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

Perform Action

POST
https://api.blockv.io/v1/user/vatom/action/:action

Overview

Executes an action for the currently logged in user.

The following built-in actions are available:

Perform Actions Request

HTTP Headers

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

Transfer

The Transfer Action transfers a vAtom (if transferable) specified with this.id to a new owner. The recipient can be given as new.owner.phone_number, new.owner.email or new.owner.id.

Sample Request: Transfer by phone number

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93",
    "new.owner.phone_number": "+1234567890"
}

Sample Request: Transfer by email

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93",
    "new.owner.email": "testuser1@example.com"
}

Sample Request: Transfer by ID

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93",
    "new.owner.id": "29828993-c2b4-4f6b-a289-f4bdd965d068"
}

Clone

The clone action clones a vAtom based on its vAtom ID (if cloneable) specified as this.id and transfers the copy to another user. The recipient can be given as new.owner.phone_number, new.owner.email or new.owner.id.

Sample Request: Clone by phone number

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93",
    "new.owner.phone_number": "+1234567890"
}

Sample Request: Clone by email

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93",
    "new.owner.email": "testuser1@example.com"
}

Sample Request: Clone by ID

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93",
    "new.owner.id": "29828993-c2b4-4f6b-a289-f4bdd965d068"
}

Drop

The drop action allows a user to drop a vAtom at a specific location. "geo_pos" specifies the geo coordinates of the vAtom to be dropped. The user still owns it until another user picks the vAtom up.

Sample Request: Drop

{
  "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93",
    "geo.pos": {
        "Lon": 8.515284063931858,
        "Lat": 47.166601832822856
    }
}

Pickup

The Pickup Action allows a user to pick up a vAtom specified by this.id from the map.

Sample Request: Pickup

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93"
}

Acquire

The acquire action acquires the vAtom based on its vAtom ID (if acquirable), specified as this.id in the Action

Sample Request: Acquire

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93"
}

AcquirePubVariation

The acquire pub. variation action acquires a vAtom of a template variation (if acquirable) of an existing vAtom based on its vAtom ID, specified as this.id in the Action

Sample Request: AcquirePubVariation

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93"
}

Redeem

The redeem action redeems the vAtom based on its vAtom ID (if redeemable), specified as this.id in the Action. New owner indicates the redeeming recipient, who must be accepting the redeemable.

Sample Request: Redeem

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93",
    "new.owner.id": "29828993-c2b4-4f6b-a289-f4bdd965d068"
}

Discover

The discover action reveals vAtoms, faces and actions associated with a Discover Container vAtom by using the discover query of the vAtoms defined by this.id.

Sample Request: Discover

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93"
}

Activate

The activate action unpacks a package specified by this.id.

Sample Request: Activate

{
    "this.id": "0000374c-2e55-4868-9db8-c0a6df5ced93"
}

Perform Action Response

Return & Error Codes

ErrorTypeDescription
200httpEverything is OK
400httpInvalid request
401httpNot an owner or bad recipient
403httpNot Authorized
404httpAction not found

Sample Response

{
    "payload": {
        "success_message": "v1::transfer successfully executed"
    }
}
©2018 BLOCKv
Info