HTTP API lnp mnp

Performs LNP/MNP dipping and returns the result.

Arguments

argument mandatory description
_login yes coincides with the user / company login to the personal account
_password yes matches the user / company password to the personal account
number yes number in E.164 format
request_id no Value, assigned by client.
Will be returned to client in response

Returned data

Server returns response in JSON API format.
Response will contain one of:

errors and data will not be present in 1 response simultaneously.
Each response contains either errors, or data.

data can contain following attributes:
attribute mandatory description
id yes response ID assigned by server
type yes "lnp_mnp"
number yes requested number
status yes ок - information has been successfully retrieved, balance has been charged for the request,
error - information hasn't been retrieved, balance hasn't been charged for the request
lrn no empty - the requested E.164 number is not ported,
not empty - the requested E.164 number is ported, the "lrn" number should be used for routing and billing
request_id yes, if client has passed request_id inside the request argument that has been passed by the client
errors can contain following attributes:
attribute mandatory description
code yes Short error code.
Can be used by a client for conditional error handling.
It doesn't depend on a client's locale.
detail yes Error details.
Can be used by a client to display inside contents of a error dialog.
Can be returned by the server in a locale of a client.
title yes Error title.
Can be used by a client to display in the header of the error dialog.
Can be returned by the server in a locale of a client.

Examples

Dipping 1 number

request GET "https://your.server.name/api/lnp_mnp?number=79183035536&request_id=1&_login=LOGIN&_password=PASSWORD"
response
{
    "data" : {
        "attributes" : {
            "lrn" : "79800000000",
            "number" : "79183035536",
            "status" : "ok" 
        },
        "id" : "1561370632513",
        "meta" : {
            "request_id" : "1" 
        },
        "type" : "lnp_mnp" 
    }
}

Dipping 2 numbers

request GET "https://your.server.name/api/lnp_mnp?number=79183035536&request_id=1&number=79183035537&request_id=2&_login=LOGIN&_password=PASSWORD"
response
{
    "data" : [
        {
            "attributes" : {
                "lrn" : "79800000000",
                "number" : "79183035536",
                "status" : "ok" 
            },
            "id" : "1561371433517",
            "meta" : {
                "request_id" : "1" 
            },
            "type" : "lnp_mnp" 
        },
        {
            "attributes" : {
                "lrn" : "",
                "number" : "79183035537",
                "status" : "ok" 
            },
            "id" : "1561371433518",
            "meta" : {
                "request_id" : "2" 
            },
            "type" : "lnp_mnp" 
        }
    ]
}

Error

request GET "https://your.server.name/api/lnp_mnp?number=79183035536&request_id=1&_login=LOGIN&_password=PASSWORD"
response
{
    "errors" : [
        {
            "code" : "authentication",
            "detail" : "Please check your login and password",
            "title" : "Authentication error" 
        }
    ]
}

Русский перевод