Get subscriptions
Get all subscriptions for your salable organisation. The response uses cursor pagination.
tip
You can group returned subscriptions by their owner by providing the
owner
param. Useful for listing a customer's subscriptions in an account area in your app.
- Node SDK
- Fetch
- cURL
import { initSalable } from '@salable/node-sdk';
const salable = initSalable('your-salable-api-key', 'v3');
await salable.subscriptions.getAll({
owner: 'owner-id',
});
const params = new URLSearchParams();
params.append("owner", "owner-id");
const response = await fetch(`https://api.salable.app/subscriptions?${params}`, {
headers: {
"x-api-key": "your-salable-api-key",
version: "v3"
}
});
const subscriptions = await response.json();
curl
-XPOST
-H 'x-api-key: your-salable-api-key'
-H 'version: v3'
'https://api.salable.app/subscriptions?owner=owner-id'