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 by ID

Retrieve a specific allocation by its unique identifier (ID). The Allocation object contains detailed information about the specified allocation, including allocation ID, wallet address, total amount to be distributed, funded amount, received(claimed) amount, stakeholder data and any additional metadata.

In a difference from the allocations list this query contains the status of the allocation and the claimable tokens.

Status 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.

  • PENDING_AIRDROP - An airdrop is pending (this is only applicable for airdrops, not for claims).

  • UP_TO_DATE - Everything is set and in order.

  • CLAIM_AVAILABLE - A claim is available and can be triggered to claim the tokens.

  • PENDING_FUNDING - Allocation has started, but funding is still missing.

Request example:

curl -X GET <https://app.magna.so/api/external/v1/allocations/{your_allocation_id}> \\\\
-H 'Content-Type: application/json' \\\\
-H 'x-magna-api-token: magna_project_api_token'
  • magna_project_api_token (required) - replace with your actual Magna API token

  • your_allocation_id (required) - replace with the actual allocation id that you want to get

Response example:

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

In a difference from the query of allocation list the query by id contains the allocation status as well as claimable amount. You can use it to know if theres an amount to be claimed for the allocation.

PreviousAllocation ListNextClaim Allocation Tokens

Last updated 3 months ago

Was this helpful?