Skip to main content
Vindicia Knowledge Center

List Entitlements

List Entitlements

Retrieves a list of all Entitlements. The list can be constrained to a particular Account (or Account family), limited to only active Entitlements, and/or presented across all Accounts.

Route (URL) Parameters

None.

Query Parameters

Parameter Default Description Required
limit 20 A limit on the number of objects to be returned, between 1 and 100. No
starting_after none A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. No
ending_before none A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. No
include_children false Indicates whether or not to return any existing child accounts’ entitlements when an account is specified.  
show_all false Indicates whether or not to return expired/historical entitlements.  
account none Limit the entitlement list to a specified account - if specified, all Entitlements associated with that Account. No

Accepts

None.

Returns

JSON A list array with a data property that contains an array of up to limit entitlements, starting after the specified starting_after entitlement (or ending before the specified ending_before entitlement). Each entry in the array is a full entitlement object. If no more objects are available, the resulting array will be empty. This request should never throw an error.

A list of objects matching the query. Also:

  • “total_count”: Integer count of the number of objects in the returned list.
  • “url”: The query string provided in the request
  • “next”: The route (partial URL) to the next entitlement object (string to select the “next”); included id should match that of the last object returned here
  • “previous”: The route (partial URL) to the previous entitlement object (string to select the “previous”); included id should match that of the first object returned here
  • cURL
  • Java
Example Request
curl -X GET  \
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \
"https://api.prodtest.vindicia.com/entitlements?account=cust_2234"
The above command returns JSON structured like this:
{
    "object": "List",
    "data": [
        {
            "object": "Entitlement",
            "id": "ent_1234",
            "description": "Sample Entitlement",
            "account": {
                "object": "Account",
                "id": "cust_2234",
                "vid": "07ac3365421741777c1f936480918c61aba85759"
            },
            "subscription": {
                "object": "Subscription",
                "id": "sub_1234",
                "vid": "400dc2e6524e754914d8bd40e495f05f53939ddc"
            },
            "subscription_item": {
                "object": "SubscriptionItem",
                "id": "sub_1234.1",
                "vid": "7fb1cdb3fcfa1541c5d31b70332e97cc38cfeab8"
            },
            "product": {
                "object": "Product",
                "id": "prod_1234",
                "vid": "63143baaeb00f89c796681ea1c3298a8b66f6d5e"
            },
            "starts": "2016-05-27T05:52:02-07:00",
            "ends": "2016-08-04T00:00:00-07:00",
            "active": true
        }
    ],
    "total_count": 1,
    "url": "/entitlements?account=cust_2234",
    "next": "/entitlements?account=cust_2234&starting_after=plan_2234",
    "previous": "/entitlements?account=cust_2234&ending_before=plan_1234"
}
import com.vindicia.client.CashBox;

CashBox.apiKey = "acaff38d462f9430d5cbcbaf:a575771fc679b9de";

Map<string,> params = new HashMap<string,>();
params.put("account",  "cust_2234");

Entitlement.list(params);
The above command returns JSON structured like this:
{
    "object": "List",
    "data": [
        {
            "object": "Entitlement",
            "id": "ent_1234",
            "description": "Sample Entitlement",
            "account": {
                "object": "Account",
                "id": "cust_2234",
                "vid": "07ac3365421741777c1f936480918c61aba85759"
            },
            "subscription": {
                "object": "Subscription",
                "id": "sub_1234",
                "vid": "400dc2e6524e754914d8bd40e495f05f53939ddc"
            },
            "subscription_item": {
                "object": "SubscriptionItem",
                "id": "sub_1234.1",
                "vid": "7fb1cdb3fcfa1541c5d31b70332e97cc38cfeab8"
            },
            "product": {
                "object": "Product",
                "id": "prod_1234",
                "vid": "63143baaeb00f89c796681ea1c3298a8b66f6d5e"
            },
            "starts": "2016-05-27T05:52:02-07:00",
            "ends": "2016-08-04T00:00:00-07:00",
            "active": true
        }
    ],
    "total_count": 1,
    "url": "/entitlements?account=cust_2234",
    "next": "/entitlements?account=cust_2234&starting_after=plan_2234",
    "previous": "/entitlements?account=cust_2234&ending_before=plan_1234"
}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top