Numbering Plan API

1. Introduction

The HORISEN Numbering Plan API is used for SMS MT Inbound Numbering Plan via HTTP.

This API belongs to the SS7 domain. The subject domain of an endpoint URL is:

{address}:{port}/smsmtinbound/v1

2. Methods Overview

2.1 Method Operator

Endpoints for working with Method Operator.

POST/vhlrdb-operator
Creates a new Operator.Read More
GET/vhlrdb-operator
Gets a list of Operators.Read More
GET/vhlrdb-operator/{id}
Gets an Operator by ID.Read More
PUT/vhlrdb-operator/{id}
Updates an Operator by ID.Read More
DELETE/vhlrdb-operator/{id}
Deletes an Operator by ID.Read More

2.2 Method Country

Endpoints for working with Method Country.

POST/vhlrdb-country
Creates a new Country.Read More
GET/vhlrdb-country
Gets a list of Countries.Read More
GET/vhlrdb-country/{id}
Gets a Country by ID.Read More
PUT/vhlrdb-country/{id}
Updates a Country by ID.Read More
DELETE/vhlrdb-country/{id}
Deletes a Country by ID.Read More

2.3 Method CCNDC Prefixes

Endpoints for working with Method CCNDC prefixes.

POST/vhlrdb-ccndc
Creates a new CCNDC.Read More
GET/vhlrdb-ccndc
Gets a list of CCNDC.Read More
GET/vhlrdb-ccndc/{id}
Gets a CCNDC by ID.Read More
PUT/vhlrdb-ccndc/{id}
Updates a CCNDC by ID.Read More
DELETE/vhlrdb-ccndc/{id}
Deletes a CCNDC by ID.Read More

3. Methods Details

3.1 Method Operator

Endpoints for working with Method Operator.

POST/vhlrdb-operator
Creates a new Operator.Up
Method Overview

The method creates a new Operator.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
data (required) object (body) Method Operator object. Find below VirtualHLRDBOperator data model description.
Data Parameters

Post data object example

{
  "id": 0,
  "operator_id": 0,
  "operator_name": "string",
  "country_id": "string",
  "mnc": "string",
  "ndc": "string",
  "imsi": "string"
}
Responses
Code Description Links
200 Operator created successfully. No links.
default Unexpected Error. No links.
Success Response 200: Operator created successfully
Error Response Unexpected Error: Default
{
  "Code": "string",
  "Message": "string"
}
GET/vhlrdb-operator
Gets a list of Operators.Up
Method Overview

The method retrieves a list of all Operators.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
Responses
Code Description Links
200 List of Operators successfully retrieved. No links.
Success Response 200: List of Operators successfully retrieved
[
  {
    "id": 0,
    "operator_id": 0,
    "operator_name": "string",
    "country_id": "string",
    "mnc": "string",
    "ndc": "string",
    "imsi": "string"
  }
]
GET/vhlrdb-operator/{id}
Gets an Operator by ID.Up
Method Overview

The method retrieves an Operator details by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of an Operator.
Responses
Code Description Links
200 Operator data successfully retrieved. No links.
404 Operator not found. No links.
Success Response 200: Operator data successfully retrieved
{
  "id": 0,
  "operator_id": 0,
  "operator_name": "string",
  "country_id": "string",
  "mnc": "string",
  "ndc": "string",
  "imsi": "string"
}
Error Response 404: Operator not found
PUT/vhlrdb-operator/{id}
Updates an Operator by ID.Up
Method Overview

The method updates an Operator details by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of an Operator to be updated.
data (required) object (body) Updated Operator object.
Data Parameters

Put data object example

{
  "id": 0,
  "operator_id": 0,
  "operator_name": "string",
  "country_id": "string",
  "mnc": "string",
  "ndc": "string",
  "imsi": "string"
}
Responses
Code Description Links
200 Operator updated successfully. No links.
400 Invalid request data. No links.
404 Operator not found. No links.
Success Response 200: Operator updated successfully
Error Response 400: Invalid request
Error Response 404: Resource not found
DELETE/vhlrdb-operator/{id}
Deletes an Operator by ID.Up
Method Overview

The method deletes an Operator by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of an Operator to be deleted.
Responses
Code Description Links
200 Operator deleted successfully. No links.
404 Operator not found. No links.
Success Response 200: Operator deleted successfully
Error Response 404: Operator not found

3.2 Method Country

Endpoints for working with Method Country.

POST/vhlrdb-country
Creates a new Country.Up
Method Overview

The method creates a new Country.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
data (required) object (body) Method Country object. Find below VirtualHLRDBCountry data model description.
Data Parameters

Post data object example

{
  "id": 0,
  "country": "string",
  "mcc": "string",
  "cc": "string"
}
Responses
Code Description Links
200 Country created successfully. No links.
default Unexpected Error. No links.
Success Response 200: Country created successfully
{
  "id": 0,
  "country": "string",
  "mcc": "string",
  "cc": "string"
}
Error Response Unexpected Error: Default
{
  "Code": "string",
  "Message": "string"
}
GET/vhlrdb-country
Gets a list of Countries.Up
Method Overview

The method retrieves a list of Countries.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
Responses
Code Description Links
200 List of Countries successfully retrieved. No links.
Success Response 200: List of Countries successfully retrieved
[
  {
    "id": 0,
    "country": "string",
    "mcc": "string",
    "cc": "string"
  }
]
GET/vhlrdb-country/{id}
Gets a Country by ID.Up
Method Overview

The method retrieves a Country details by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of a Country.
Responses
Code Description Links
200 Country data successfully retrieved. No links.
404 Country was not found. No links.
Success Response 200: Country data successfully retrieved
{
  "id": 0,
  "country": "string",
  "mcc": "string",
  "cc": "string"
}
Error Response 404: Country not found
PUT/vhlrdb-country/{id}
Updates a Country by ID.Up
Method Overview

The method updates a Country by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of a Country to be updated.
data (required) object (body) Updated Country object.
Data Parameters

Put data object example

{
  "id": 0,
  "country": "string",
  "mcc": "string",
  "cc": "string"
}
Responses
Code Description Links
200 Country updated successfully. No links.
400 Invalid request data. No links.
404 Country not found. No links.
Success Response 200: Country updated successfully
Error Response 400: Invalid request
Error Response 404: Resource not found
DELETE/vhlrdb-country/{id}
Deletes a Country by ID.Up
Method Overview

The method deletes a Country by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of a Country to be deleted.
Responses
Code Description Links
200 Country deleted successfully. No links.
404 Country not found. No links.
Success Response 200: Country deleted successfully
Error Response 404: Resource not found

3.3 Method CCNDC Prefixes

Endpoints for working with Method CCNDC prefixes.

POST/vhlrdb-ccndc
Creates a new CCNDC.Up
Method Overview

The method creates a new CCNDC.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
data (required) object (body) CCNDC object. Find below VirtualHLRDBCCNDC data model description.
Data Parameters

Post data object example

{
  "id": 0,
  "country": "string"
}
Responses
Code Description Links
200 CCNDC created successfully. No links.
default Unexpected Error. No links.
Success Response 200: CCNDC created successfully
{
  "id": 0,
  "country": "string"
}
Error Response Unexpected Error: Default
{
  "Code": "string",
  "Message": "string"
}
GET/vhlrdb-ccndc
Gets a list of CCNDC.Up
Method Overview

The method retrieves a list of CCNDC.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
Responses
Code Description Links
200 List of CCNDC successfully retrieved. No links.
Success Response 200: List of CCNDC successfully retrieved
[
  {
    "id": 0,
    "country": "string"
  }
]
Error Response 404: Resource not found
GET/vhlrdb-ccndc/{id}
Gets a CCNDC by ID.Up
Method Overview

The method retrieves a CCNDC details by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of a CCNDC.
Responses
Code Description Links
200 CCNDC data successfully retrieved. No links.
404 CCNDC not found. No links.
Success Response 200: CCNDC data successfully retrieved
{
  "id": 0,
  "country": "string"
}
Error Response 404: Resource not found
PUT/vhlrdb-ccndc/{id}
Updates a CCNDC by ID.Up
Method Overview

The method updates a CCNDC by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of a CCNDC to be updated.
data (required) object (body) Updated CCNDC object.
Data Parameters

Put data object example

{
  "id": 0,
  "country": "string"
}
Responses
Code Description Links
200 CCNDC updated successfully. No links.
400 Invalid request data. No links.
404 CCNDC not found. No links.
Success Response 200: CCNDC updated successfully
Error Response 400: Invalid request
Error Response 404: Resource not found
DELETE/vhlrdb-ccndc/{id}
Deletes a CCNDC by ID.Up
Method Overview

The method deletes a CCNDC by a given ID.

Parameters
Name Type Description
X‑API‑Key (required) string (header) API key for authentication. Default value: 1111.
id (required) integer($int64) (path) ID of a CCNDC to be deleted.
Responses
Code Description Links
200 CCNDC deleted successfully. No links.
404 CCNDC not found. No links.
Success Response 200: CCNDC deleted successfully
Error Response 404: Resource not found

4. Data Models

Data Models define the structure of a JSON document and describe the data related to the Numbering Plan API.

4.1 VirtualHLRDBOperator

VirtualHLRDBOperator object properties:

Name Type Description
id integer ID of a vHLRDB Operator.
operator_id integer Operator ID.
operator_name string Name of an Operator.
country_id integer Country ID from the table country.
mnc string MNC (Mobile Network Code) of an Operator.
ndc string NDC (National Destination Code) of an Operator.
imsi string IMSI (International Mobile Subscriber Identity) of an Operator.
JSON Example
{
  "id": 0,
  "operator_id": 0,
  "operator_name": "string",
  "country_id": "integer",
  "mnc": "string",
  "ndc": "string",
  "imsi": "string"
}

4.2 VirtualHLRDBCountry

VirtualHLRDBCountry object properties:

Name Type Description
id integer($int64) ID of a vHLRDB Country.
country integer Name of a Country.
mcc string Mobile Country Code.
cc string Country Code.
JSON Example
{
  "id": 0,
  "country": "string",
  "mcc": "string",
  "cc": "string"
}

4.3 VirtualHLRDBCCNDC

VirtualHLRDBCCNDC object properties:

Name Type Description
id integer($int64) ID of a vHLRDB CCNDC.
country string Country code with national destination code.
JSON Example
{
  "id": 0,
  "country": "string"
}

4.4 Error

Error object properties:

Name Type Description
code (required) string Error code.
message (required) string Error message.
JSON Example
{
  "Code": "string",
  "Message": "string"
}

5. API Call Examples

This section presents a set of sample cURL API calls that shows some of use cases for the API.

5.1 Method Operator

1. An example of how to get a list of Operators:

curl -H "X-API-Key: 1111" -X GET http://{address}:{port}/smsmtinbound/v1/vhlrdb-operator

2. An example of how to get an Operator by ID:

curl -H "X-API-Key: 1111" -X GET http://{address}:{port}/smsmtinbound/v1/vhlrdb-operator/1

3. An example of how to create a new Operator:

curl -H "X-API-Key: 1111" -X POST -H "Content-Type: application/json" -d 
'{
  "operator_id": 16971,
  "name": "Company1",
  "country_id": 1,
  "mnc": "11",
  "ndc": "11111",
  "imsi": "11111"
  }' http://{address}:{port}/smsmtinbound/v1/vhlrdb-operator

4. An example of how to update an Operator by ID:

curl -H "X-API-Key: 1111" -X PUT -H "Content-Type: application/json" -d 
'{
  "operator_id": 16971,
  "name": "A&T",
  "country": "USA",
  "mnc": "67",
  "ndc": "79409",
  "imsi": "28967"
  }' http://{address}:{port}/smsmtinbound/v1/vhlrdb-operator/1

5. An example of how to delete an Operator by ID:

curl -H "X-API-Key: 1111" -X DELETE http://{address}:{port}/smsmtinbound/v1/vhlrdb-operator/1

5.2 Method Country

1. An example of how to get a list of Countries:

curl -H "X-API-Key: 1111" -X GET http://{address}:{port}/smsmtinbound/v1/vhlrdb-country

2. An example of how to get a Country by ID:

curl -H "X-API-Key: 1111" -X GET http://{address}:{port}/smsmtinbound/v1/vhlrdb-country/1

3. An example of how to create a new Country:

curl -H "X-API-Key: 1111" -X POST -H "Content-Type: application/json" -d
'{
  "country": "USA",
  "mcc": "11",
  "cc": "11111"
  }' http://{address}:{port}/smsmtinbound/v1/vhlrdb-country

4. An example of how to update a Country by ID:

curl -H "X-API-Key: 1111" -X PUT -H "Content-Type: application/json" -d
'{
  "country": "USA",
  "mcc": "11",
  "cc": "11111"
  }' http://{address}:{port}/smsmtinbound/v1/vhlrdb-country/1

5. An example of how to delete a Country by ID:

curl -H "X-API-Key: 1111" -X DELETE http://{address}:{port}/smsmtinbound/v1/vhlrdb-country/1

5.3 Method CCNDC Prefixes

1. An example of how to get a list of CCNDC Prefixes:

curl -H "X-API-Key: 1111" -X GET http://{address}:{port}/smsmtinbound/v1/vhlrdb-ccndc

2. An example of how to get an CCNDC Prefix by ID:

curl -H "X-API-Key: 1111" -X GET http://{address}:{port}/smsmtinbound/v1/vhlrdb-ccndc/1

3. An example of how to create a new CCNDC Prefix:

curl -H "X-API-Key: 1111" -X POST -H "Content-Type: application/json" -d 
'{
  "ccndc": "11111"
  }' http://{address}:{port}/smsmtinbound/v1/vhlrdb-ccndc

4. An example of how to update an CCNDC Prefix by ID:

curl -H "X-API-Key: 1111" -X PUT -H "Content-Type: application/json" -d 
'{
  "ccndc": "11111"
  }' http://{address}:{port}/smsmtinbound/v1/vhlrdb-ccndc/1

5. An example of how to delete an CCNDC Prefix by ID:

curl -H "X-API-Key: 1111" -X DELETE http://{address}:{port}/smsmtinbound/v1/vhlrdb-ccndc/1