Calling Plan
Calling Plan
Get the services by countries of calling plan
Retrieves the services by countries of calling plan for a group.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan
Authorization
Required role
groups.instance.calling_plans.list
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated universal unique ID (UUID) identifying the group |
URL/Query parameters
N/A
Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan 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 found with this uuid |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
callingPlans | array | List containing the calling plan objects | no |
Calling Plan Country Object
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
countryCode | string | The country code of the calling plan | no |
countryRisk | string | The country risk of the calling plan | no |
country | string | The country of the calling plan | no |
isoCode | string | The ISO code of the calling plan | no |
region | string | The region of the calling plan | no |
services | array | The list of services assigned to the country | no |
type | string | The type of the calling plan | no |
Calling Plan Country Service Object
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
enabled | string | The enabled status of the service | no |
id | string | The id of the service | no |
name | string | The name of the service | no |
risk | string | The risk of the service | no |
type | string | The type of the service | no |
Example
{
"callingPlans": [
{
"country": "United Kingdom",
"countryCode": "+44",
"countryRisk": 1,
"isoCode": "GB",
"region": "Europe",
"services": [
{
"enabled": false,
"id": 5,
"name": "UK PREMIUM",
"risk": 2,
"type": "premium"
},
{
"enabled": false,
"id": 4,
"name": "UK MOBILE",
"risk": 1,
"type": "standard"
},
{
"enabled": false,
"id": 220,
"name": "UK FIXED",
"risk": 1,
"type": "standard"
}
],
"type": "calling_plan"
},
{
"country": "Belgium",
"countryCode": "+32",
"countryRisk": 2,
"isoCode": "BE",
"region": "Europe",
"services": [
{
"enabled": false,
"id": 6,
"name": "Belgium Premium",
"risk": 3,
"type": "premium"
},
{
"enabled": false,
"id": 1,
"name": "Belgium fix",
"risk": 1,
"type": "standard"
}
],
"type": "calling_plan"
},
{
"country": "Italy",
"countryCode": "+39",
"countryRisk": 1,
"isoCode": "IT",
"region": "Europe",
"services": [
{
"enabled": false,
"id": 16,
"name": "Italy Mobile",
"risk": 1,
"type": "standard"
}
],
"type": "calling_plan"
},
...
]
}Get the calling plan services by country
Retrieves the calling plan list associated to the group.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/list
Authorization
Required role
groups.instance.calling_plans.list
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
URL/Query parameters
N/A
Response
Status codes
| Parameter | Description |
|---|---|
200 | One or more groups found |
400 | Error while processing the request |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No trunk calling plan found |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
callingPlans | array | List containing all calling plan objects in the calling plan | 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 of calling plans has to be continued | yes |
page | integer | Current displayed page from the set of pages | no |
pages | integer | Total number of pages according to pagination settings | no |
results | integer | Total number of results from the query | no |
Calling Plan Object
| Parameter | Type | Description | Conditional? | Searchable? |
|---|---|---|---|---|
classification | string | The classification of the calling plan | no | no |
countryCode | string | The country code of the calling plan | no | no |
country | string | The country of the calling plan | no | no |
id | string | The id of the calling plan | no | no |
isoCode | string | The ISO code of the calling plan | no | no |
name | string | The name of the calling plan | no | no |
region | string | The region of the calling plan | no | no |
risk | string | The risk of the calling plan | no | no |
type | string | The type of the calling plan | no | no |
Example
{
"callingPlans": [
{
"classification": "standard"
"country": "Belgium",
"countryCode": "+32",
"id": 2,
"isoCode": "BE",
"name": "Belgium BL",
"region": "Europe",
"risk": -1,
"type": "calling_plan",
},
{
"classification": ""
"country": "Italy",
"countryCode": "+39",
"id": 15,
"isoCode": "IT",
"name": "Italy BL",
"region": "Europe",
"risk": -1,
"type": "calling_plan",
}
],
"page": 1,
"pages": 1,
"results": 2
}Create a calling plan
Creates a calling plan list associated to the group.
Request
Endpoint
POST /api/v01/draas/{draas_instance}/groups/calling_plan/list
Authorization
Required role
groups.instance.calling_plans.create
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
URL/Query parameters
N/A
Body
| Parameter | Type | Description | Required? |
|---|---|---|---|
countryCode | string | The country code for the calling plan | no |
country | string | The country for the calling plan | no |
isoCode | string | The ISO code for the calling plan | no |
name | string | The name for the calling plan | no |
region | string | The region for the calling plan | no |
type | string | The type of the calling plan | no |
Example
{
"country": "Afghanistan",
"countryCode": "+93",
"isoCode": "AF",
"name": "test",
"region": "Asia",
"type": "calling_plan"
}Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan was created successfully |
400 | Error while creating the calling plan |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | The index of the calling plan | no |
name | string | The name of the calling plan | no |
type | string | The type of the calling plan | no |
country | string | The country for the calling plan | no |
countryCode | string | The country code for the calling plan | no |
isoCode | string | The ISO code for the calling plan | no |
region | string | The region for the calling plan | no |
Example
{
"id": 335,
"name": "test",
"country": "Afghanistan",
"countryCode": "+93",
"isoCode": "AF",
"region": "Asia",
"type": "calling_plan"
}Modify a calling plan
Updates the details a calling plan list associated to the group.
Request
Endpoint
PUT /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/list/{id}
Authorization
Required role
groups.instance.calling_plans.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 which you would like to modify |
URL/Query parameters
N/A
Body
| Parameter | Type | Description | Required? |
|---|---|---|---|
name | string | New name for the calling plan | no |
Example
{
"name": "Belgium BL"
}Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan was updated successfully |
400 | Error while updating the calling plan |
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 | no |
Example
{
"id":2
}Delete a calling plan
Deletes a calling plan list associated to the group.
Request
Endpoint
DELETE /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/list/{id}
Authorization
Required role
groups.instance.calling_plans.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 which you would like to delete |
URL/Query parameters
N/A
Body
N/A
Response
Status codes
| Parameter | Description |
|---|---|
204 | The calling plan was deleted successfully. If the calling plan didn't exist, the delete will be considered as being executed successfully |
400 | Error while deleting the calling plan |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
N/A
Get the list of calling plan prefixes
Retrieves the calling plan prefix list associated to the group.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/list/{id}/prefixes
Authorization
Required role
groups.instance.calling_plans.instance.prefixes.list
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
URL/Query parameters
N/A
Response
Status codes
| Parameter | Description |
|---|---|
200 | One or more groups found |
400 | Error while processing the request |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No trunk calling plan prefix found |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
page_size | integer | Used for pagination, determines the maximum number of records on one page of results (defaults to 10) | no |
search | string | Used to perform a search through all searchable properties of a group that look like the string passed | no |
prefixes | array | List containing all calling plan prefix objects in the calling plan | no |
Calling Plan Prefix Object
| Parameter | Type | Description | Conditional? | Searchable? |
|---|---|---|---|---|
id | string | The id of the calling plan prefix | no | no |
isExact | string | The is exact status of the calling plan prefix | no | no |
name | string | The name of the calling plan prefix | no | no |
prefix | string | The prefix of the calling plan prefix | no | no |
Example
{
"prefixes": [
{
"id": 4,
"isExact": false,
"name": "234",
"prefix": "234"
}
]
}Create a calling plan prefix
Creates a calling plan prefix list associated to the group.
Request
Endpoint
POST /api/v01/draas/{draas_instance}/groups/calling_plan/{id}/prefixes
Authorization
Required role
groups.instance.calling_plans.instance.prefixes.create
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
URL/Query parameters
N/A
Body
| Parameter | Type | Description | Required? |
|---|---|---|---|
isExact | string | The is exact status for the calling plan prefix | no |
prefix | string | The prefix for the calling plan prefix | no |
name | string | The name for the calling plan prefix | no |
Example
{
"isExact": true,
"prefix": "456",
"name": "456"
}Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan prefix was updated successfully |
400 | Error while updating the calling plan prefix |
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 prefix | no |
Example
{
"id": 34
}Modify a calling plan prefix
Updates the details a calling plan prefix list associated to the group.
Request
Endpoint
PUT /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/{id}/prefixes/{pid}
Authorization
Required role
groups.instance.calling_plans.instance.prefixes.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 prefix which you would like to modify |
URL/Query parameters
N/A
Body
| Parameter | Type | Description | Required? |
|---|---|---|---|
isExact | string | The is exact status for the calling plan prefix | no |
prefix | string | The prefix for the calling plan prefix | no |
name | string | The name for the calling plan prefix | no |
Example
{
"isExact": false,
"prefix": "324",
"name": "234"
}Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan prefix was updated successfully |
400 | Error while updating the calling plan prefix |
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 prefix | no |
Example
{
"id": 4
}Delete a calling plan prefix
Deletes a calling plan prefix list associated to the group.
Request
Endpoint
DELETE /api/v01/draas/{draas_instance}/groups/{uuid}/calling_plan/{id}/prefixes/{pid}
Authorization
Required role
groups.instance.calling_plans.instance.prefixes.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 prefix which you would like to delete |
URL/Query parameters
N/A
Body
N/A
Response
Status codes
| Parameter | Description |
|---|---|
204 | The calling plan prefix was deleted successfully. If the calling plan prefix didn't exist, the delete will be considered as being executed successfully |
400 | Error while deleting the calling plan prefix |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
N/A
Get the list of calling plans
Retrieves the calling plan list associated to the trunk group.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/calling_plan
Authorization
Required role
tenants.instance.subscriptions.instance.calling_plans.instance.prefixes.list
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | System generated universal unique ID (UUID) identifying the tenant |
subscription_id | integer | Index of a subscription to retrieve the calling_plan for |
trunkgroup_id | integer | Index of a Trunk Group |
URL/Query parameters
N/A
Response
Status codes
| Parameter | Description |
|---|---|
200 | One or more groups found |
400 | Error while processing the request |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No trunk calling plan found |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
callingPlans | array | List containing the calling plan objects | no |
Example
{
"callingPlans": [
{
"country": "United Kingdom",
"countryCode": "+44",
"countryRisk": 1,
"isoCode": "GB",
"region": "Europe",
"services": [
{
"enabled": false,
"id": 5,
"name": "UK PREMIUM",
"risk": 2,
"type": "premium"
},
{
"enabled": false,
"id": 4,
"name": "UK MOBILE",
"risk": 1,
"type": "standard"
},
{
"enabled": false,
"id": 220,
"name": "UK FIXED",
"risk": 1,
"type": "standard"
}
],
"type": "calling_plan"
},
{
"country": "Belgium",
"countryCode": "+32",
"countryRisk": 2,
"isoCode": "BE",
"region": "Europe",
"services": [
{
"enabled": false,
"id": 6,
"name": "Belgium Premium",
"risk": 3,
"type": "premium"
},
{
"enabled": false,
"id": 1,
"name": "Belgium fix",
"risk": 1,
"type": "standard"
}
],
"type": "calling_plan"
},
{
"country": "Italy",
"countryCode": "+39",
"countryRisk": 1,
"isoCode": "IT",
"region": "Europe",
"services": [
{
"enabled": false,
"id": 16,
"name": "Italy Mobile",
"risk": 1,
"type": "standard"
}
],
"type": "calling_plan"
},
...
]
}Modify a calling plan
Updates the details a calling plan list associated to the trunk group.
Request
Endpoint
PUT /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/calling_plan
Authorization
Required role
tenants.instance.subscriptions.instance.calling_plans.instance.prefixes.instance.update
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | System generated universal unique ID (UUID) identifying the tenant |
subscription_id | integer | Index of a subscription to retrieve the calling_plan for |
trunkgroup_id | integer | Index of a Trunk Group |
id | integer | ID of the calling plan which you would like to modify |
URL/Query parameters
N/A
Body
| Parameter | Type | Description | Required |
|---|---|---|---|
plans | array | List containing the plans to be modified | yes |
Plan Object
| Parameter | Type | Description | Required |
|---|---|---|---|
countryCode | string | The country code | yes |
region | string | The region | yes |
country | string | The country | yes |
prefix | string | The prefix | yes |
services | string | The services | yes |
Example
{
"plans": [
{
"countryCode": "AO",
"region": "Africa",
"country": "Angola",
"prefix": "+244",
"services": [
{
"type": "premium",
"enabled": true
},
{
"type": "standard",
"enabled": false
}
]
},
{
"countryCode": "DZ",
"region": "Africa",
"country": "Algeria",
"prefix": "+213",
"services": [
{
"type": "premium",
"enabled": false
},
{
"type": "standard",
"enabled": true
}
]
},
{
"countryCode": "AW",
"region": "Africa",
"country": "Aruba",
"prefix": "+297",
"services": [
{
"type": "premium",
"enabled": true
},
{
"type": "standard",
"enabled": false
}
]
},
...
]
}Response
Status codes
| Parameter | Description |
|---|---|
200 | The calling plan was updated successfully |
400 | Error while updating the calling plan |
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? |
|---|---|---|---|
errors | array | List of the errors | no |
skip | array | List of the not modified items | no |
success | array | List of the successfully modified items | no |
Example
{
"errors": [],
"skip": [],
"success": [
{
"countryCode": "AO",
"enabled": true,
"type": "premium"
},
{
"countryCode": "AO",
"enabled": false,
"type": "standard"
},
{
"countryCode": "DZ",
"enabled": false,
"type": "premium"
},
...
]
}