Get 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. Seats that
have a status of CANCELED
are not included in the response. The response uses cursor pagination.
- Node SDK
- Fetch
- cURL
import { Salable } from '@salable/node-sdk';
const salable = new Salable('your-salable-api-key', 'v2');
const seats = await salable.subscription.getSeats('your-subscription-uuid');
const response = await fetch(
'https://api.salable.app/subscriptions/your-subscription-uuid/seats',
{
headers: {
version: 'v2',
'x-api-key': 'your-salable-api-key',
},
}
);
const seats = await response.json();
curl
-XGET
-H 'x-api-key: your-salable-api-key'
-H 'version: v2'
'https://api.salable.app/subscriptions/your-subscription-uuid/seats'
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. Seats that
have a status of CANCELED
are ignored in the count.
- Node SDK
- Fetch
- cURL
import { Salable } from '@salable/node-sdk';
const salable = new Salable('your-salable-api-key', 'v2');
const count = await api.subscriptions.getSeatCount('your-subscription-uuid');
const response = await fetch(
'https://api.salable.app/subscriptions/your-subscription-uuid/seats/count',
{
headers: {
version: 'v2',
'x-api-key': 'your-salable-api-key',
},
}
);
const count = await response.json();
curl
-XGET
-H 'x-api-key: your-salable-api-key'
-H 'version: v2'
'https://api.salable.app/subscriptions/your-subscription-uuid/seats/count'