These resources show the subscriptions associated with the current customer
/subscriptions
Lists all subscriptions associated with the current customer
No parameters required (besides your API key of course).
{
status: "ok",
subscriptions:
[
{
"id": 47,
"start_date": "2011-01-31T02:44:30Z",
"end_date": "2012-01-31T02:44:30Z",
"status": "expired",
"active": false,
"expired": true,
"trial_membership": false,
"lapsed": false,
"plan": {
"id": 3,
"name": "Name of Plan",
"class": "name-of-plan",
"description": "<p>Plan description or else nil</p>",
"online_benefits": "<p>Plan online benefits or else nil</p>",
"annotations": "Plan annotations or else nil",
"tags": []
}
},
{
"id": 48,
"start_date": "2012-01-31T02:44:30Z",
"end_date": "2015-01-31T02:44:30Z",
"status": "active",
"active": true,
"expired": false,
"trial_membership": false,
"lapsed": false,
"plan": {
"id": 3,
"name": "Name of Plan",
"class": "name-of-plan",
"description": "<p>Plan description or else nil</p>",
"online_benefits": "<p>Plan online benefits or else nil</p>",
"annotations": "Plan annotations or else nil",
"tags": []
}
}
]
}
{
status: "ok",
subscriptions: []
}
/subscriptions/{id}
Shows details of a specific subscription associated with the current customer
Name | Type | Description |
---|---|---|
id |
url segment | [Required] The ID of the desired subscription for the current customer |
No parameters required (besides your API key of course).
/subscriptions/47
for customer with ID = 203{
status: "ok",
subscription: {
"id": 47,
"start_date": "2011-01-31T02:44:30Z",
"end_date": "2012-01-31T02:44:30Z",
"status": "expired",
"active": false,
"expired": true,
"trial_membership": false,
"lapsed": false,
"plan": {
"id": 3,
"name": "Name of Plan",
"class": "name-of-plan",
"description": "<p>Plan description or else nil</p>",
"online_benefits": "<p>Plan online benefits or else nil</p>",
"annotations": "Plan annotations or else nil",
"tags": []
}
}
}
{
status: "error",
messages: [
"No subscription found"
]
}