Calling Plan: Profiles
This set of APIs are tightly linked to the calling plans. A calling plan profile is a named, reusable set of calling plan settings: for each country (identified by its ISO code) it defines which calling plan services (e.g. standard, premium) are enabled. Profiles are managed at group level and can be consulted from the lower levels (distributors, resellers, tenants and subscriptions) in order to apply them to the calling plan of a trunk group (see Modify a calling plan).
Get the list of calling plan profiles
Retrieves the list of calling plan profiles available at the given level.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/profiles
GET /api/v01/draas/{draas_instance}/distributors/{uuid}/calling_plan/profiles
GET /api/v01/draas/{draas_instance}/resellers/{uuid}/calling_plan/profiles
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/calling_plan/profiles
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/calling_plan/profiles
Authorization
Required role
groups.instance.calling_plans.profiles.list
distributors.instance.calling_plans.profiles.list
resellers.instance.calling_plans.profiles.list
tenants.instance.calling_plans.profiles.list
tenants.instance.subscriptions.instance.calling_plans.profiles.list
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group, distributor, reseller or tenant |
subscription_id | integer | Index of a subscription to retrieve the calling plan profiles for |
URL/Query parameters
| Parameter | Type | Description | Required? |
|---|---|---|---|
page_size | integer | Used for pagination, determines the maximum number of records on one page of results (defaults to 10) | no |
next | string | A token used to get the next records in the list. This token is taken back from the results of the previous call | no |
search | string | Used to filter the calling plan profiles by name | no |
Response
Status codes
| Parameter | Description |
|---|---|
200 | One or more calling plan profiles found |
400 | Error while processing the request |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No calling plan profile found |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
profiles | array | List containing the calling plan profile objects | no |
next | string | A token used for infinite scrolling, to be used in the next call to retrieve subsequent records. Only present if the list has to be continued | yes |
Calling plan profile object
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | The index of the calling plan profile | no |
name | string | The name of the calling plan profile | no |
description | string | The description of the calling plan profile | no |
Example
{
"profiles": [
{
"id": 1,
"name": "Europe only",
"description": "Standard calls allowed to European countries"
},
{
"id": 2,
"name": "Worldwide",
"description": "Standard and premium calls allowed worldwide"
}
]
}Get a specific calling plan profile
Retrieves the details of a calling plan profile, including its full country/service matrix.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/profiles/{id}
GET /api/v01/draas/{draas_instance}/distributors/{uuid}/calling_plan/profiles/{id}
GET /api/v01/draas/{draas_instance}/resellers/{uuid}/calling_plan/profiles/{id}
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/calling_plan/profiles/{id}
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/calling_plan/profiles/{id}
Authorization
Required role
groups.instance.calling_plans.profiles.instance.read
distributors.instance.calling_plans.profiles.instance.read
resellers.instance.calling_plans.profiles.instance.read
tenants.instance.calling_plans.profiles.instance.read
tenants.instance.subscriptions.instance.calling_plans.profiles.instance.read
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group, distributor, reseller or tenant |
subscription_id | integer | Index of a subscription to retrieve the calling plan profile for |
id | integer | ID of the calling plan profile which you would like to retrieve |
URL/Query parameters
N/A
Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan profile was found |
400 | Error while processing the request |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No calling plan profile found with this id |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | The index of the calling plan profile | no |
name | string | The name of the calling plan profile | no |
description | string | The description of the calling plan profile | no |
plans | object | Map with the country ISO code as key and, as value, the list of the calling plan service types enabled for that country. Service types not listed are disabled | no |
Example
{
"id": 1,
"name": "Europe only",
"description": "Standard calls allowed to European countries",
"plans": {
"BE": ["standard", "premium"],
"FR": ["standard"],
"IT": []
}
}Create a calling plan profile
Creates a calling plan profile associated to the group.
Request
Endpoint
POST /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/profiles
Authorization
Required role
groups.instance.calling_plans.profiles.create
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group |
URL/Query parameters
N/A
Body
| Parameter | Type | Description | Required? |
|---|---|---|---|
name | string | The name of the calling plan profile | yes |
description | string | The description of the calling plan profile | no |
plans | array | List containing the profile plan objects | yes |
Profile plan object
| Parameter | Type | Description | Required? |
|---|---|---|---|
countryCode | string | The ISO code of the country (e.g. BE) | yes |
services | array | List of the calling plan services for the country, each one with a type (string) and enabled (boolean) | yes |
Example
{
"name": "Europe only",
"description": "Standard calls allowed to European countries",
"plans": [
{
"countryCode": "BE",
"services": [
{
"type": "standard",
"enabled": true
},
{
"type": "premium",
"enabled": true
}
]
},
{
"countryCode": "FR",
"services": [
{
"type": "standard",
"enabled": true
},
{
"type": "premium",
"enabled": false
}
]
}
]
}Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan profile was created successfully |
400 | Error while creating the calling plan profile |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | The index of the calling plan profile | no |
Example
{
"id": 3
}Modify a calling plan profile
Updates the details of a calling plan profile associated to the group. The full country/service matrix has to be provided.
Request
Endpoint
PUT /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/profiles/{id}
Authorization
Required role
groups.instance.calling_plans.profiles.instance.update
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group |
id | integer | ID of the calling plan profile which you would like to modify |
URL/Query parameters
N/A
Body
Same as for creating a calling plan profile.
| Parameter | Type | Description | Required? |
|---|---|---|---|
name | string | The name of the calling plan profile | yes |
description | string | The description of the calling plan profile | no |
plans | array | List containing the profile plan objects | yes |
Example
{
"name": "Europe only",
"description": "Standard and premium calls allowed to Belgium",
"plans": [
{
"countryCode": "BE",
"services": [
{
"type": "standard",
"enabled": true
},
{
"type": "premium",
"enabled": true
}
]
}
]
}Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan profile was updated successfully |
400 | Error while updating the calling plan profile |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No calling plan profile found with this id |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | The index of the calling plan profile | no |
Example
{
"id": 3
}Delete a calling plan profile
Deletes a calling plan profile associated to the group.
Request
Endpoint
DELETE /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/profiles/{id}
Authorization
Required role
groups.instance.calling_plans.profiles.instance.delete
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group |
id | integer | ID of the calling plan profile which you would like to delete |
URL/Query parameters
N/A
Body
N/A
Response
Status codes
| Parameter | Description |
|---|---|
204 | The calling plan profile was deleted successfully. If the calling plan profile didn't exist, the delete will be considered as being executed successfully |
400 | Error while deleting the calling plan profile |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
N/A
Assign a calling plan profile to a trunk group
Assigns a calling plan profile to a trunk group: the profile is applied to the calling plan of the trunk group. The profile is applied asynchronously, the response returns the ID of the transaction applying it.
Request
Endpoint
POST /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/calling_plan_profile/{profile_id}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the tenant to which the subscription belongs |
subscription_id | integer | Index of the subscription to which the trunk group belongs |
trunkgroup_id | integer | Index of the trunk group to which the calling plan profile has to be assigned |
profile_id | integer | ID of the calling plan profile to assign |
URL/Query parameters
N/A
Body
N/A
Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan profile is being applied to the trunk group |
400 | Error while assigning the calling plan profile |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No trunk group or calling plan profile found with this id |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | The ID of the transaction applying the calling plan profile to the trunk group | no |
Example
{
"id": 99
}Unassign the calling plan profile of a trunk group
Removes the calling plan profile assigned to a trunk group.
Request
Endpoint
DELETE /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/calling_plan_profile
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the tenant to which the subscription belongs |
subscription_id | integer | Index of the subscription to which the trunk group belongs |
trunkgroup_id | integer | Index of the trunk group from which the calling plan profile has to be unassigned |
URL/Query parameters
N/A
Body
N/A
Response
Status codes
| Parameter | Description |
|---|---|
204 | The calling plan profile was unassigned from the trunk group |
400 | Error while unassigning the calling plan profile |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No trunk group found with this id |
500 | Uncatched error on server side |
Success
Body
N/A
