JSON API for Managing Number Portability

Request: get_series

Retrieve series of ported numbers.
This request has multiple formats in which it can be sent:
{
    "request": "get_series",
    "node": "npdb",
    "params": {}
}
{ "request": "get_series", "node": "npdb", "params": { "limit": "Integer. Number of series to return.", "offset": "Optional, integer, default is 0. The starting point to return series." } }
{ "request": "get_series", "node": "npdb", "params": { "series_start": "Integer. The starting MSISDN for this series.", "series_end": "Integer. The ending MSISDN for this series." } }
Examples: get_series
Retrieve count of series.
{
    "request": "get_series",
    "node": "npdb",
    "params": {}
}
Retrieve a list of series by specifying 'limit' and 'offset'.
Series are ordered ascending by series start.
{
    "request": "get_series",
    "node": "npdb",
    "params": {
        "limit": 2,
        "offset": 1
    }
}
Retrieve a single series of ported numbers by specifying 'series_start' and 'series_end'.
If not found, empty array will be returned.
{
    "request": "get_series",
    "node": "npdb",
    "params": {
        "series_start": "40744334420",
        "series_end": "40744334429"
    }
}

Request: set_series

Add or edit series of ported numbers.
If the series exist, it will be edited, othwerise it will be added.
Series must not overlap and must be unique.
{
    "request": "set_series",
    "node": "npdb",
    "params": {
        "series_start": "Mandatory, integer. The starting MSISDN for this series.",
        "series_end": "Mandatory, integer. The ending MSISDN for this series.",
        "target": "Mandatory, string, max 20 characters. The code associated to the operator where the number was ported.",
        "comment__target": "Example of operator codes: RO: '1875', NL: '015', DE: 'D250', RU: '710'",
        "description": "Optional, string, max 200 characters. A short description about this series."
    }
}
Examples: set_series
Add a series of ported numbers.
{
    "request": "set_series",
    "node": "npdb",
    "params": {
        "series_start": "40744334410",
        "series_end": "40744334419",
        "target": "18750"
    }
}
Edit 'description' at a series of ported numbers by specifying 'series_start' and 'series_end'.
{
    "request": "set_series",
    "node": "npdb",
    "params": {
        "series_start": "40744334410",
        "series_end": "40744334419",
        "description": "Romania Operator Code"
    }
}

Request: del_series

Delete a series of ported numbers by specifying 'series_start' and 'series_end'.
{
    "request": "del_series",
    "node": "npdb",
    "params": {
        "series_start": "Mandatory, integer. The starting MSISDN for this series.",
        "series_end": "Mandatory, integer. The ending MSISDN for this series."
    }
}
Examples: del_series
Delete a series of ported numbers.
{
    "request": "del_series",
    "node": "npdb",
    "params": {
        "series_start": "40744334410",
        "series_end": "40744334420"
    }
}

Request: get_ported

Retrieve ported numbers.
This request has multiple formats in which it can be sent:
{
    "request": "get_ported",
    "node": "npdb",
    "params": {}
}
{ "request": "get_ported", "node": "npdb", "params": { "limit": "Number of ported numbers to return.", "offset": "Optional, integer, default is 0. The starting point to return ported numbers." } }
{ "request": "get_ported", "node": "npdb", "params": { "number": "String. The phone number." } }
Examples: get_ported
Retrieve count of ported numbers.
{
    "request": "get_ported",
    "node": "npdb",
    "params": {}
}
Retrieve a list of ported numbers by specifying 'limit' and 'offset'.
{
    "request": "get_ported",
    "node": "npdb",
    "params": {
        "limit": 2,
        "offset": 1
    }
}
Retrieve a single ported number.
{
    "request": "get_ported",
    "node": "npdb",
    "params": {
        "number": "40744334456"
    }
}

Request: set_ported

Add or edit a ported number
If the ported number exist, it will be edited, othwerise it will be added.
{
    "request": "set_ported",
    "node": "npdb",
    "params": {
        "number": "Mandatory, string. The phone number.",
        "target": "Mandatory, string, max 20 characters. The code associated to the operator where the number was ported.",
        "comment__target": "Example of operator codes: RO: '1875', NL: '015', DE: 'D250', RU: '710'"
    }
}
Examples: set_ported
Add/Edit a ported number.
{
    "request": "set_ported",
    "node": "npdb",
    "params": {
        "number": "40744334455",
        "target": "18750"
    }
}

Request: del_ported

Delete a ported number by specifying the phone 'number'.
{
    "request": "del_ported",
    "node": "npdb",
    "params": {
        "number": "Mandatory, string. Phone number."
    }
}
Examples: del_ported
Delete a ported number.
{
    "request": "del_ported",
    "node": "npdb",
    "params": {
        "number": "40744334455"
    }
}
This documentation was generated on 26 September 2020