Master Award Controls

About Master Award Controls

Warning: We strongly advise you to use Program & Rule logic wherever possible instead of Master Award Controls.

Master Controls do not provide the means for automated Award distribution and they do not allow for effective auditing in the way that Activity-driven Rules do.

Master Award Controls are essentially master create/update/delete tools that allow you to override any other Village-based business logic. There are four POST API types in this category:

  1. Issue - Immediately issues a specified Award type and amount into an end-user's digital wallet

  2. Burn - Immediately deletes a specified Award type and amount from an end-user's digital wallet

  3. Transfer - Moves a specified Award type and amount from one user's digital wallet to another's

  4. Exchange - Effectively a double transfer in one API request; trades an Award type for another Award type between two users' digital wallets.

The most common functional use case for Master Award Controls:

  1. Supporting customer service escalations which require award adjustments

  2. Rectifying production outages on your system

Note: the Village Admin Dashboard allows for the similar manual adjustment of Award balances if you wish to use a no-code option for your customer service and/or operations teams.

Issue API

Endpoint

POST/networks/YOUR_NETWORK_ID/issue

Where 'YOUR_NETWORK_ID' is replaced with your actual Network ID.

Body Fields

Metadata

Example Body

// Example Issue Body
{
  "user": "jane.issue@villagelabs.co",
  "asset_short_name": "XPOINT",
  "issue_amount": "800.404",
  "metadata": {
    "reference_id": "dpi_Ylo2Cfr8US8u1JIdAl2eZvKB",
    "issue_timestamp": 1664900628,
    "description": "Standard issuance of XPOINTs for off-platform activity."
  }
}

Burn API

Endpoint

POST/networks/YOUR_NETWORK_ID/burn

Where 'YOUR_NETWORK_ID' is replaced with your actual Network ID.

Body Fields

Metadata

Example Body

// Example Burn Body
{
  "user": "jane.issue@villagelabs.co",
  "asset_short_name": "XPOINT",
  "burn_amount": "800.404",
  "metadata": {
    "reference_id": "dpi_Ylo2Cfr8US8u1JIdAl2eZvKB",
    "burn_timestamp": 1664900628,
    "description": "Standard issuance of XPOINTs for off-platform activity."
  }
}

Transfer API

Endpoint

POST/networks/YOUR_NETWORK_ID/transfer

Where 'YOUR_NETWORK_ID' is replaced with your actual Network ID.

Body Fields

Transfer Array

Metadata

Example Body

// Example Transfer Body
{
    "sender": "john.sender@villagelabs.co",
    "recipient": "jane.recipient@villagelabs.co",
    "transfer_assets": [
        {
            "asset_short_name": "VUSD",
            "amount": "2.5"
        },
        {
            "asset_short_name": "XPOINT",
            "amount": "500"
        }
    ],
    "metadata": {
        "reference_id": "dpi_Ylo2Cfr8US8u1JIdAl2eZvKB",
        "transfer_timestamp": 1664900628,
        "description": "Transfer of assets for services rendered"
    }
}

Exchange API

Endpoint

POST/networks/YOUR_NETWORK_ID/exchange

Where 'YOUR_NETWORK_ID' is replaced with your actual Network ID.

Body Fields

Exchange Array Fields

Metadata

Example Body

// Example Exchange Body
{
    "user_1": "jane.swap@villagelabs.co",
    "user_1_assets": [
        {
            "asset_short_name": "VUSD",
            "amount": "5.00"
            "burn": false
        },
        {
            "asset_short_name": "VEUR",
            "amount": "1.50"
        }

    ],
    "user_2": "john.exchange@villagelabs.co",
    "user_2_assets": [
        {
            "asset_short_name": "XPOINT",
            "amount": "100.00"
            "burn": true
        },
        {
            "asset_short_name": "EPOINT",
            "amount": "35.00"
            "burn": false
        }

    ],
    "metadata": {
        "reference_id": "dpi_Ylo2Cfr8US8u1JIdAl2eZvKB",
        "exchange_timestamp": 1664900628,
        "description": "Standard exchange rewards points for dollars & euros."
    }
}
    "sender": "john.sender@villagelabs.co",
    "recipient": "jane.recipient@villagelabs.co",
    "transfer_assets": [
        {
            "asset_short_name": "VUSD",
            "amount": "2.5"
        },
        {
            "asset_short_name": "XPOINT",
            "amount": "500"
        }
    ],
    "metadata": {
        "reference_id": "dpi_Ylo2Cfr8US8u1JIdAl2eZvKB",
        "transfer_timestamp": 1664900628,
        "description": "Transfer of assets for services rendered"
    }
}

Last updated