Skip to content

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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the group, distributor, reseller or tenant
subscription_idintegerIndex of a subscription to retrieve the calling plan profiles for

URL/Query parameters ​

ParameterTypeDescriptionRequired?
page_sizeintegerUsed for pagination, determines the maximum number of records on one page of results (defaults to 10)no
nextstringA token used to get the next records in the list. This token is taken back from the results of the previous callno
searchstringUsed to filter the calling plan profiles by nameno

Response ​

Status codes ​

ParameterDescription
200One or more calling plan profiles found
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
404No calling plan profile found
500Uncatched error on server side

Success ​

Body ​
ParameterTypeDescriptionConditional?
profilesarrayList containing the calling plan profile objectsno
nextstringA token used for infinite scrolling, to be used in the next call to retrieve subsequent records. Only present if the list has to be continuedyes
Calling plan profile object ​
ParameterTypeDescriptionConditional?
idintegerThe index of the calling plan profileno
namestringThe name of the calling plan profileno
descriptionstringThe description of the calling plan profileno
Example ​
json
{
  "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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the group, distributor, reseller or tenant
subscription_idintegerIndex of a subscription to retrieve the calling plan profile for
idintegerID of the calling plan profile which you would like to retrieve

URL/Query parameters ​

N/A

Response ​

Status codes ​

ParameterDescription
200The calling plan profile was found
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
404No calling plan profile found with this id
500Uncatched error on server side

Success ​

Body ​
ParameterTypeDescriptionConditional?
idintegerThe index of the calling plan profileno
namestringThe name of the calling plan profileno
descriptionstringThe description of the calling plan profileno
plansobjectMap 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 disabledno
Example ​
json
{
  "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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the group

URL/Query parameters ​

N/A

Body ​
ParameterTypeDescriptionRequired?
namestringThe name of the calling plan profileyes
descriptionstringThe description of the calling plan profileno
plansarrayList containing the profile plan objectsyes
Profile plan object ​
ParameterTypeDescriptionRequired?
countryCodestringThe ISO code of the country (e.g. BE)yes
servicesarrayList of the calling plan services for the country, each one with a type (string) and enabled (boolean)yes

Example ​

json
{
  "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 ​

ParameterDescription
200The calling plan profile was created successfully
400Error while creating the calling plan profile
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success ​

Body ​
ParameterTypeDescriptionConditional?
idintegerThe index of the calling plan profileno
Example ​
json
{
  "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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the group
idintegerID 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.

ParameterTypeDescriptionRequired?
namestringThe name of the calling plan profileyes
descriptionstringThe description of the calling plan profileno
plansarrayList containing the profile plan objectsyes

Example ​

json
{
  "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 ​

ParameterDescription
200The calling plan profile was updated successfully
400Error while updating the calling plan profile
403The API consumer doesn't have sufficient rights to perform this action
404No calling plan profile found with this id
500Uncatched error on server side

Success ​

Body ​
ParameterTypeDescriptionConditional?
idintegerThe index of the calling plan profileno
Example ​
json
{
  "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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the group
idintegerID of the calling plan profile which you would like to delete

URL/Query parameters ​

N/A

Body ​

N/A

Response ​

Status codes ​

ParameterDescription
204The calling plan profile was deleted successfully. If the calling plan profile didn't exist, the delete will be considered as being executed successfully
400Error while deleting the calling plan profile
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched 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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
subscription_idintegerIndex of the subscription to which the trunk group belongs
trunkgroup_idintegerIndex of the trunk group to which the calling plan profile has to be assigned
profile_idintegerID of the calling plan profile to assign

URL/Query parameters ​

N/A

Body ​

N/A

Response ​

Status codes ​

ParameterDescription
200The calling plan profile is being applied to the trunk group
400Error while assigning the calling plan profile
403The API consumer doesn't have sufficient rights to perform this action
404No trunk group or calling plan profile found with this id
500Uncatched error on server side

Success ​

Body ​
ParameterTypeDescriptionConditional?
idintegerThe ID of the transaction applying the calling plan profile to the trunk groupno
Example ​
json
{
  "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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
subscription_idintegerIndex of the subscription to which the trunk group belongs
trunkgroup_idintegerIndex 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 ​

ParameterDescription
204The calling plan profile was unassigned from the trunk group
400Error while unassigning the calling plan profile
403The API consumer doesn't have sufficient rights to perform this action
404No trunk group found with this id
500Uncatched error on server side

Success ​

Body ​

N/A