# 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:

```sh
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:

```json
{
  "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
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.magna.so/magna-api-documentation/allocations/allocation-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
