Get a subscription's seats
Get the list of seats that are on the provided subscription. One common usage of this data is to show your users the list of people on their team.
- Node.js
- cURL
const params = {
subscriptionUuid: 'your-subscription-uuid',
status: 'active', // this can be any valid subscription status
};
const response = await fetch(
'https://api.salable.app/licenses?' + new URLSearchParams(params),
{
headers: {
version: 'beta',
'x-api-key': 'your-salable-api-key',
},
}
);
const subscriptionSeats = await response.json();
curl
-XGET
-H 'x-api-key: your-salable-api-key'
-H 'version: beta'
'https://api.salable.app/licenses?subscriptionUuid=your-subscription-uuid&status=active'
Get seat count
Obtain the aggregate count of seats, as well as the amount that are assigned or unassigned. This data can be used in many ways, one common usage is to show your users how many of their remaining seats are available to be filled.
- Node.js
- cURL
import { Salable } from '@salable/node-sdk';
const salable = new Salable('your-salable-api-key');
const licenseCount = await api.licenses.getCount('your-subscription-uuid');
curl
-XGET
-H 'x-api-key: your-salable-api-key'
'https://api.salable.app/licenses/count?subscriptionUuid=:subscriptionUuid'