Skip to content

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

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

URL/Query parameters

N/A

Response

Status codes

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

Success

Body
ParameterTypeDescriptionConditional?
callingPlansarrayList containing the calling plan objectsno
Calling Plan Country Object
ParameterTypeDescriptionConditional?
countryCodestringThe country code of the calling planno
countryRiskstringThe country risk of the calling planno
countrystringThe country of the calling planno
isoCodestringThe ISO code of the calling planno
regionstringThe region of the calling planno
servicesarrayThe list of services assigned to the countryno
typestringThe type of the calling planno
Calling Plan Country Service Object
ParameterTypeDescriptionConditional?
enabledstringThe enabled status of the serviceno
idstringThe id of the serviceno
namestringThe name of the serviceno
riskstringThe risk of the serviceno
typestringThe type of the serviceno
Example
json
{
  "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

ParameterTypeDescription
draas_instancestringSee common parameters

URL/Query parameters

N/A

Response

Status codes

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

Success

Body
ParameterTypeDescriptionConditional?
callingPlansarrayList containing all calling plan objects in the calling planno
nextstringA 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 continuedyes
pageintegerCurrent displayed page from the set of pagesno
pagesintegerTotal number of pages according to pagination settingsno
resultsintegerTotal number of results from the queryno
Calling Plan Object
ParameterTypeDescriptionConditional?Searchable?
classificationstringThe classification of the calling plannono
countryCodestringThe country code of the calling plannono
countrystringThe country of the calling plannono
idstringThe id of the calling plannono
isoCodestringThe ISO code of the calling plannono
namestringThe name of the calling plannono
regionstringThe region of the calling plannono
riskstringThe risk of the calling plannono
typestringThe type of the calling plannono
Example
json
{
  "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

ParameterTypeDescription
draas_instancestringSee common parameters

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
countryCodestringThe country code for the calling planno
countrystringThe country for the calling planno
isoCodestringThe ISO code for the calling planno
namestringThe name for the calling planno
regionstringThe region for the calling planno
typestringThe type of the calling planno

Example

json
{
  "country": "Afghanistan",
  "countryCode": "+93",
  "isoCode": "AF",
  "name": "test",
  "region": "Asia",
  "type": "calling_plan"
}

Response

Status codes

ParameterDescription
200The calling plan was created successfully
400Error while creating the calling plan
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
idintegerThe index of the calling planno
namestringThe name of the calling planno
typestringThe type of the calling planno
countrystringThe country for the calling planno
countryCodestringThe country code for the calling planno
isoCodestringThe ISO code for the calling planno
regionstringThe region for the calling planno
Example
json
{
  "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

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

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
namestringNew name for the calling planno

Example

json
{
  "name": "Belgium BL"
}

Response

Status codes

ParameterDescription
200The calling plan was updated successfully
400Error while updating the calling plan
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 planno
Example
json
{
  "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

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

URL/Query parameters

N/A

Body

N/A

Response

Status codes

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

ParameterTypeDescription
draas_instancestringSee common parameters

URL/Query parameters

N/A

Response

Status codes

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

Success

Body
ParameterTypeDescriptionConditional?
page_sizeintegerUsed for pagination, determines the maximum number of records on one page of results (defaults to 10)no
searchstringUsed to perform a search through all searchable properties of a group that look like the string passedno
prefixesarrayList containing all calling plan prefix objects in the calling planno
Calling Plan Prefix Object
ParameterTypeDescriptionConditional?Searchable?
idstringThe id of the calling plan prefixnono
isExactstringThe is exact status of the calling plan prefixnono
namestringThe name of the calling plan prefixnono
prefixstringThe prefix of the calling plan prefixnono
Example
json
{
  "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

ParameterTypeDescription
draas_instancestringSee common parameters

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
isExactstringThe is exact status for the calling plan prefixno
prefixstringThe prefix for the calling plan prefixno
namestringThe name for the calling plan prefixno

Example

json
{
  "isExact": true,
  "prefix": "456",
  "name": "456"
}

Response

Status codes

ParameterDescription
200The calling plan prefix was updated successfully
400Error while updating the calling plan prefix
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 prefixno
Example
json
{
  "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

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

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
isExactstringThe is exact status for the calling plan prefixno
prefixstringThe prefix for the calling plan prefixno
namestringThe name for the calling plan prefixno

Example

json
{
  "isExact": false,
  "prefix": "324",
  "name": "234"
}

Response

Status codes

ParameterDescription
200The calling plan prefix was updated successfully
400Error while updating the calling plan prefix
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 prefixno
Example
json
{
  "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

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

URL/Query parameters

N/A

Body

N/A

Response

Status codes

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

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringSystem generated universal unique ID (UUID) identifying the tenant
subscription_idintegerIndex of a subscription to retrieve the calling_plan for
trunkgroup_idintegerIndex of a Trunk Group

URL/Query parameters

N/A

Response

Status codes

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

Success

Body
ParameterTypeDescriptionConditional?
callingPlansarrayList containing the calling plan objectsno
Example
json
{
  "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

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringSystem generated universal unique ID (UUID) identifying the tenant
subscription_idintegerIndex of a subscription to retrieve the calling_plan for
trunkgroup_idintegerIndex of a Trunk Group
idintegerID of the calling plan which you would like to modify

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired
plansarrayList containing the plans to be modifiedyes
Plan Object
ParameterTypeDescriptionRequired
countryCodestringThe country codeyes
regionstringThe regionyes
countrystringThe countryyes
prefixstringThe prefixyes
servicesstringThe servicesyes
Example
json
{
  "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

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

Success

Body
ParameterTypeDescriptionConditional?
errorsarrayList of the errorsno
skiparrayList of the not modified itemsno
successarrayList of the successfully modified itemsno
Example
json
{
  "errors": [],
  "skip": [],
  "success": [
    {
      "countryCode": "AO",
      "enabled": true,
      "type": "premium"
    },
    {
      "countryCode": "AO",
      "enabled": false,
      "type": "standard"
    },
    {
      "countryCode": "DZ",
      "enabled": false,
      "type": "premium"
    },
    ...
  ]
}