getAllSubscriptions
Get all product subscriptions. 🔐 This method requires authorization.
Description
Fetches the authenticated user's product subscriptions and resolves to an ISubscriptions object.
.getAllSubscriptions(
,
);
Parameters schema
Schema
offset: number
Number of records to skip. Default: 0. offset + limit must not exceed 200; a larger window is rejected with 400.
example: 0
limit: number
Maximum number of records to return. Default: 30.
example: 30
Record limit. If the user group's permission for this method allows only restricted reading, the API returns at most the number of records set in the project settings (10 by default), whatever limit you pass. With full read access, limit works as usual. See Module permissions (opens in a new tab).
Examples
Minimal example
const response = await Events.getAllSubscriptions();
Example with optional parameters
const response = await Events.getAllSubscriptions(0, 30);
Example response
{
"total": 1,
"items": [
{
"eventMarker": "lessPrice",
"productId": 2954
}
]
}
Response schema
Schema: ISubscriptions
total: number
Total number of found records.
example: 100
items: ISubscriptionItem[]
Subscriptions, each with an event marker and a product ID.
example:
[
{
eventMarker: 'product_price_change',
productId: 12345
},
{
eventMarker: 'product_stock_update',
productId: 67890
}
]
items.productId: number
Product ID.
items.eventMarker: string
Event marker.