Get all user subscriptions
GET
/user/{userId}/subscriptions
const url = 'https://example.com/user/example/subscriptions';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/user/example/subscriptions \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
Responses
Section titled “Responses”User subscriptions returned.
Media typeapplication/json
Array<object>
A period of access to the configured Abi service for a user.
object
subscriptionId
The unique identifier for the subscription.
string
userId
The Abi user identifier associated with the subscription.
string
active
Whether the subscription is active.
integer
startSubscription
The UTC date on which the subscription starts.
string
endSubscription
The UTC date on which the subscription expires.
string
createdAt
The date and time the subscription was created in Abi.
string
canceledAt
The date and time the subscription was cancelled
string
renewFrom
The previous expired subscription that caused this renewal
string
Example
[ { "subscriptionId": "8910zyx321cba", "userId": "abi12345", "active": 0, "startSubscription": "2020-11-27", "endSubscription": "2020-12-29", "createdAt": "2020-11-27", "canceledAt": "2020-12-13", "renewFrom": "8910zyx123xxx" }]