Information
Entitlements. Each entitlement is built up of a name and a key. There can be many with the same name so they need to have both the name and they key.
If there is a null end date it means the entitlement does not end.
If there is a null start date it means the entitlement will come into effect immediately. All entitlements coming back should have a date returned.
Get Account Entitlements
GET /axis/account/entitlements/v1/{product}/{accountId}
Retrieves entitlements for a given account.
Request URL Parameters
| Name | Type | Description |
|---|---|---|
| product | string | The key of the product the account is associated with |
| accountId | string | The primary key of the account |
Response
HTTP 200
Indicates that zero or more entitlements were found associated with the account.
{
"success": true,
"message": null,
"items": [{
"name": "DDL_DEMO_EXTRAS",
"key": "DDLDEMO",
"startDate": 1481187680000,
"endDate": null,
"accountId": "{4CDBAD44-3CF3-4CF2-A0EA-1D3C938D4DA1}"
}],
"count": 1
}
The Entitlement model is as follows
| Name | Type | Required | Description |
|---|---|---|---|
| name | String | yes | See the get all entitlements call for this String value |
| key | String | yes | See the get all entitlements call for this String value |
| startDate | Long | No | If start date is null it means it starts effective immediately. Epoch in milliseconds |
| endDate | Long | No | If end date is null it means that there is no ending to the entitlement. Epoch in milliseconds |
| accountId | String | yes | The account Id. |
HTTP 400
Indicates the request failed due to bad input. The message will contain details of what was invalid.
HTTP 401
Indicates that the user is not logged in
HTTP 403
Indicates the user is logged in but not allowed to view entitlements on this account
HTTP 500
Indicates that the server was unable to fulfill the request for an unknown reason
Get Entitlement Options
GET /axis/account/entitlements/v1/{product}/entitlements/all
{
"success": true,
"message": null,
"items": [{
"key": "DDLDEMO",
"name": "DDL_DEMO_EXTRAS"
}, {
"key": "PCS561284",
"name": "DISNEYXD_SPRINT_SPRINTTV"
}, {
"key": "wapapjvs650299",
"name": "ESPN_ATT_MVP_THREE"
}
}
Add Entitlement
POST /axis/account/entitlements/v1/{Product}/{AccountId}
Adds an entitlement to an account.
Request URL Parameters
| Name | Type | Description |
|---|---|---|
| product | string | The key of the product the account is associated with |
| accountId | string | The primary key of the account |
Request Body
{
"name":"DISNEYXD_SPRINT_SPRINTTV",
"key":"PCS561284",
"accountId": "{4CDBAD44-3CF3-4CF2-A0EA-1D3C938D4DA1}",
"startDate": 1481087680000,
"endDate": 1481187640000
}
Alternate request body:
{
"name":"DISNEYXD_SPRINT_SPRINTTV",
"key":"PCS561284",
"accountId": "{4CDBAD44-3CF3-4CF2-A0EA-1D3C938D4DA1}",
"startDate": null,
"endDate": null
}
Remove Entitlement
DELETE /axis/account/entitlements/v1/{Product}/{AccountId}/{Name}/{Key}
HTTP 404
Indicates the entitlement could not be located for deletion