Skip to main content

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.

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();

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.

import { Salable } from '@salable/node-sdk';

const salable = new Salable('your-salable-api-key');
const licenseCount = await api.licenses.getCount('your-subscription-uuid');