Magna API Documentation
  • Introduction
  • Authentication
  • Allocations
    • Allocation List
    • Allocation by ID
    • Claim Allocation Tokens
    • Schedule
  • Transactions
    • Transaction Signing Parameters
    • Indexing Transaction
  • Tokens
    • Tokens List
    • Token Summary
  • Nodes
  • Use Cases
  • Security Considerations
  • Webhooks
    • Getting Started
    • Register Webhooks
    • Security
    • Payload Schemas
    • FAQs
  • Claim Portal API
    • Allocations
    • Parameters
  • Protocol Hooks
Powered by GitBook
On this page

Was this helpful?

  1. Allocations

Allocation List

Retrieve a list of all allocation objects containing details such as allocation ID, wallet address, total amount to be distributed, funded amount, received(claimed) amount, state, stakeholder data and any additional metadata. As the allocations are obtained they can be used for processing by claiming the tokens using the allocation's unique identifier (ID).

State values:

  • MISSING_WALLET - The wallet for allocation is missing. One needs to be assigned before distribution can occur.

  • NOT_STARTED - Allocation has not yet started. It needs to be triggered and funded.

  • CANCELED - The allocation has been canceled.

  • COMPLETED - The allocation is fully distributed.

  • UP_TO_DATE - Everything is set and in order.

Request example:

curl -X POST <https://app.magna.so/api/external/v1/allocations> \\
-H 'Content-Type: application/json' \\
-H 'x-magna-api-token: magna_project_api_token' \\
-d '{
"tokenId": "your_tokenId_id",
"cursor": "cursor",
"limit": 100
}'
  • magna_project_api_token (required) - replace with your actual Magna API token

  • your_tokenId_id (required) - with your project's token id

  • cursor (optional) - is specifically designed for pagination and represents the last allocation id in the list.

  • limit (optional) - is the maximum number of items in the query, with a maximum of 100 items per query.

  • walletAddress (optional) - search parameter to filter allocations by wallet address

Response example:

{
  "isProcessed": true,
  "result": {
    "items": [
      {
        "id": "7eb179c5-d86a-4c0c-be29-198ad0cb39b0",
        "key": "A-SMJ7LTO1GS",
        "description": null,
        "amount": "12000",
        "funded": "0",
        "received": "0",
        "walletAddress": "B4uSUKyxdEgCJv6CUrynBAe8NjebnX6A1f6bprQFgZ7f",
        "createdAt": "2024-04-15T21:26:21.000Z",
        "updatedAt": "2024-04-15T21:26:21.000Z",
        "cancelledAt": null,
        "state": "NOT_STARTED",
        "stakeholder": {
            "id": "fe2d5104-36d5-4c79-b457-6bfcb1ae498c",
            "type": null,
            "employeeNumber": null,
            "name": null,
            "contactEmail": null
        },
        "customAttributes": [],
        "category": {
            "id": "3451cadc-dd25-4aee-b000-453756796a06",
            "name": "Category-Name"
        },
        "unlockStartAt": "2024-04-15T21:26:21.000Z",
        "vestingStartAt": "2024-04-15T21:26:21.000Z"
      }
    ],
    "total": 1
  }
}
PreviousAllocationsNextAllocation by ID

Last updated 3 months ago

Was this helpful?