Create new allocations
curl --request POST \
--url https://api.anchorage-staging.com/v4/accounts/{accountId}/transactions/allocations \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"allocations": [
{
"accountId": "ec761b5e-fd2c-497a-a9a0-f8738ac97bdf",
"assetType": "USD",
"amount": "1000.00"
}
]
}
'import requests
url = "https://api.anchorage-staging.com/v4/accounts/{accountId}/transactions/allocations"
payload = { "allocations": [
{
"accountId": "ec761b5e-fd2c-497a-a9a0-f8738ac97bdf",
"assetType": "USD",
"amount": "1000.00"
}
] }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
allocations: [
{
accountId: 'ec761b5e-fd2c-497a-a9a0-f8738ac97bdf',
assetType: 'USD',
amount: '1000.00'
}
]
})
};
fetch('https://api.anchorage-staging.com/v4/accounts/{accountId}/transactions/allocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"index": 1,
"id": "<string>",
"status": "SUCCESS"
}
]
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Create new allocations
Permissions required: Subaccount Create new allocation of pre-funded values between the Funding and Program Customers’ subaccounts. This is a transactional operation, all transactions will be created successfully or none will.
POST
/
accounts
/
{accountId}
/
transactions
/
allocations
Create new allocations
curl --request POST \
--url https://api.anchorage-staging.com/v4/accounts/{accountId}/transactions/allocations \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"allocations": [
{
"accountId": "ec761b5e-fd2c-497a-a9a0-f8738ac97bdf",
"assetType": "USD",
"amount": "1000.00"
}
]
}
'import requests
url = "https://api.anchorage-staging.com/v4/accounts/{accountId}/transactions/allocations"
payload = { "allocations": [
{
"accountId": "ec761b5e-fd2c-497a-a9a0-f8738ac97bdf",
"assetType": "USD",
"amount": "1000.00"
}
] }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
allocations: [
{
accountId: 'ec761b5e-fd2c-497a-a9a0-f8738ac97bdf',
assetType: 'USD',
amount: '1000.00'
}
]
})
};
fetch('https://api.anchorage-staging.com/v4/accounts/{accountId}/transactions/allocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"index": 1,
"id": "<string>",
"status": "SUCCESS"
}
]
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Headers
Path Parameters
Body
application/json
Was this page helpful?