import requests
url = "https://platform.ankra.app/api/v1/org/billing/aws-marketplace/link"
payload = { "token": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/billing/aws-marketplace/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/billing/aws-marketplace/link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'{
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_aws_account_id": "<string>",
"status": "pending",
"dimension": "startup_vcpu",
"contracted_vcpu": 123,
"plan_name": "startup"
}Attach an AWS Marketplace subscription to the organisation
Requires billing.manage. Consumes the single-use link token the AWS Marketplace registration redirect carried and attaches that license to the caller’s organisation. Once AWS confirms the contract, the organisation moves to the plan its contract dimension maps to (startup_vcpu to Startup, enterprise_vcpu to Enterprise), and its usage is collected by AWS Marketplace: worker vCPU above the 30 free and the contracted quantity is metered to AWS hourly. An organisation holds at most one live AWS Marketplace subscription, and one already paying Ankra on a paid plan or by invoice is refused. Repeating the call from the organisation that already holds the license answers the same outcome.
import requests
url = "https://platform.ankra.app/api/v1/org/billing/aws-marketplace/link"
payload = { "token": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/billing/aws-marketplace/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/billing/aws-marketplace/link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'{
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_aws_account_id": "<string>",
"status": "pending",
"dimension": "startup_vcpu",
"contracted_vcpu": 123,
"plan_name": "startup"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Expected current organisation; mismatch is rejected, never used to switch scope.
Body
The link token from the registration redirect's URL fragment.
Response
Successful Response
The buyer's AWS account.
pending until AWS confirms the contract; active once it has.
pending, active, deprovisioned, ended The contract dimension, once known.
startup_vcpu, enterprise_vcpu, null Worker vCPU the contract covers, on top of the 30 free.
The Ankra plan the contract maps to, once known.
startup, enterprise, null