Subscriptions

These resources show the subscriptions associated with the current customer

GET /subscriptions

Lists all subscriptions associated with the current customer

Request

No parameters required (besides your API key of course).

Responses

Success: Get all subscriptions for customer with ID = 203

{
    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": []
                }
            }
        ]
}

Failure: Customer has no active subscription

{
    status: "ok",
    subscriptions: []
}

GET /subscriptions/{id}

Shows details of a specific subscription associated with the current customer

Request

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).

Responses

Success: After GET request to /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": []
        }
    }
}

Failure: Invalid subscription ID

{
    status: "error",
    messages: [
        "No subscription found"
    ]
}