Allocation by ID
curl --request GET \
--url https://app.magna.so/api/external/v1/allocations/{id} \
--header 'x-magna-api-token: <api-key>'import requests
url = "https://app.magna.so/api/external/v1/allocations/{id}"
headers = {"x-magna-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-magna-api-token': '<api-key>'}};
fetch('https://app.magna.so/api/external/v1/allocations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.magna.so/api/external/v1/allocations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-magna-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.magna.so/api/external/v1/allocations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-magna-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.magna.so/api/external/v1/allocations/{id}")
.header("x-magna-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/allocations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-magna-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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",
"cancelledAt": null,
"walletAddress": "B4uSUKyxdEgCJv6CUrynBAe8NjebnX6A1f6bprQFgZ7f",
"stakeholder": {
"id": "fe2d5104-36d5-4c79-b457-6bfcb1ae498c",
"type": null,
"employeeNumber": null,
"name": null,
"contactEmail": null,
"xHandle": null
},
"customAttributes": [],
"status": "NOT_STARTED",
"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"
}
}Allocations
Allocation by ID
Retrieve a single allocation by ID, including its calculated status and claimable amount.
GET
/
api
/
external
/
v1
/
allocations
/
{id}
Allocation by ID
curl --request GET \
--url https://app.magna.so/api/external/v1/allocations/{id} \
--header 'x-magna-api-token: <api-key>'import requests
url = "https://app.magna.so/api/external/v1/allocations/{id}"
headers = {"x-magna-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-magna-api-token': '<api-key>'}};
fetch('https://app.magna.so/api/external/v1/allocations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.magna.so/api/external/v1/allocations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-magna-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.magna.so/api/external/v1/allocations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-magna-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.magna.so/api/external/v1/allocations/{id}")
.header("x-magna-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/allocations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-magna-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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",
"cancelledAt": null,
"walletAddress": "B4uSUKyxdEgCJv6CUrynBAe8NjebnX6A1f6bprQFgZ7f",
"stakeholder": {
"id": "fe2d5104-36d5-4c79-b457-6bfcb1ae498c",
"type": null,
"employeeNumber": null,
"name": null,
"contactEmail": null,
"xHandle": null
},
"customAttributes": [],
"status": "NOT_STARTED",
"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"
}
}⌘I