import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: 'My API Key',
});
const subscriptions = await client.organizations.subscriptions.list('id');
console.log(subscriptions);
{
"data": [
{
"org_id": "<string>",
"status": "active",
"type": "plan",
"plan": "free",
"addon": "dedicated-ips",
"quota": {
"monthly": {
"transac_emails": 123
},
"daily": {
"transac_emails": 123
}
},
"price": {
"unit_amount": 123,
"currency": "<string>",
"recurring": {
"interval": "day",
"interval_count": 123
}
},
"schedule": {
"created": "<string>",
"phases": [
{
"price": {
"unit_amount": 123,
"currency": "<string>",
"recurring": {
"interval": "day",
"interval_count": 123
},
"type": "plan",
"plan": "free",
"quota": {
"monthly": {
"transac_emails": 123
},
"daily": {
"transac_emails": 123
}
}
}
}
]
},
"current_period_start": "<string>",
"current_period_end": "<string>",
"cancel_at": "<string>",
"cancel_at_period_end": true
}
]
}
Return the organization subscriptions
import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: 'My API Key',
});
const subscriptions = await client.organizations.subscriptions.list('id');
console.log(subscriptions);
{
"data": [
{
"org_id": "<string>",
"status": "active",
"type": "plan",
"plan": "free",
"addon": "dedicated-ips",
"quota": {
"monthly": {
"transac_emails": 123
},
"daily": {
"transac_emails": 123
}
},
"price": {
"unit_amount": 123,
"currency": "<string>",
"recurring": {
"interval": "day",
"interval_count": 123
}
},
"schedule": {
"created": "<string>",
"phases": [
{
"price": {
"unit_amount": 123,
"currency": "<string>",
"recurring": {
"interval": "day",
"interval_count": 123
},
"type": "plan",
"plan": "free",
"quota": {
"monthly": {
"transac_emails": 123
},
"daily": {
"transac_emails": 123
}
}
}
}
]
},
"current_period_start": "<string>",
"current_period_end": "<string>",
"cancel_at": "<string>",
"cancel_at_period_end": true
}
]
}
Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>
The organization id previously created
A successful response
The response is of type object
.