TokenOS
  • Overview
    • Introduction
    • Authentication
    • User & Wallet Identification
    • Errors
    • Versioning
  • Guides
    • How our system works
    • Rewarding your audience
      • In exchange for completing an incentive
      • In exchange for your own points
      • As a credit
  • Wallet API
    • Balances
    • Allocations
  • Management API
    • Token Selection
    • Campaigns
    • Subscriptions
    • Codes
  • Payments API
    • Introduction
    • Payments
    • Deliveries
    • Relayer
Powered by GitBook
On this page
  1. Wallet API

Allocations

PreviousBalancesNextToken Selection

Last updated 2 years ago

The allocation object

The TokenOS distribution system is based upon the concept of allocations. An allocation represents an entry inside our distribution contract.

Once forged, an allocation (or airdrop) is immutable. It cannot be changed.

Retrieve allocation

Transfer allocation to user's wallet

After the airdrop is created for a user, they must claim their airdrop - a process that requires the payment of gas fees.

If you would like to provide a more seamless experience for your users and directly deposit tokens into your users' wallets, you can use the following endpoint to pay the gas fees for the user's airdrop. This will require you to have ETH in a wallet, that you'll continuously need to top up as gas fees are paid.

Get one allocation detail

get
Authorizations
Path parameters
allocationIdstringRequired
Responses
200
Ok
application/json
get
GET /v1/allocations/{allocationId} HTTP/1.1
Host: localhost:8080
Accept: */*
200

Ok

{
  "id": "text",
  "status": "PENDING",
  "userId": "text",
  "amount": 1,
  "vesting": {
    "start": 1,
    "cliff": 1,
    "duration": 1
  },
  "deployment": {
    "recipient": "text",
    "transactionId": "text"
  }
}

Search for allocations

get
Authorizations
Query parameters
userIdstringRequired
identifierTypestring ยท enumRequiredPossible values:
Responses
200
Allocations list
application/json
get
GET /v1/allocations HTTP/1.1
Host: localhost:8080
Accept: */*
200

Allocations list

{
  "allocations": [
    {
      "id": "text",
      "status": "PENDING",
      "userId": "text",
      "amount": 1,
      "vesting": {
        "start": 1,
        "cliff": 1,
        "duration": 1
      },
      "deployment": {
        "recipient": "text",
        "transactionId": "text"
      }
    }
  ]
}

Execute allocation for user, paying from your gas wallet

post
Authorizations
Path parameters
allocationIdstringRequired
Responses
201
Accepted
post
POST /v1/allocations/{allocationId}/transfer HTTP/1.1
Host: localhost:8080
Accept: */*
201

Accepted

No content

  • The allocation object
  • Retrieve allocation
  • GETGet one allocation detail
  • GETSearch for allocations
  • Transfer allocation to user's wallet
  • POSTExecute allocation for user, paying from your gas wallet