Home Location

RATE THIS PAGE
A simple API that allows you to know which country or network a phone number belongs to.

Overview

The home location API allows you to determine the Mobile Network Code (MNC) and Mobile Country Code of the supplied phone number. It returns the phone number's home network and country.

Common use cases of this API is to determine the best route for SMS message delivery or finding out which country a phone number belongs to in order apply local billing on the mobile wallet.

Specifications

POST client-credentials/accesstoken
https://staging.api.chenosis.io/client-credentials/accesstoken?grant_type=client_credentials

Overview

The OAuth2 request.

Header parameters

Content-Type application/x-www-form-urlencoded

Query parameters

grant_type string

Body parameters

client_id string required
The client id fromt your app.
client_secret string required
The client secret fromt your app.

Request


curl --location --request POST 'https://staging.api.chenosis.io/client-credentials/accesstoken?grant_type=client_credentials'
    --header 'Authorization: token // https://staging.api.chenosis.io/client-credentials/accesstoken?grant_type=client_credentials'
    --header 'Content-Type: application/x-www-form-urlencoded'
    --data-raw '{
        "client_id": "xxxxxxxxxxxxxxx",
        "client_secret": "xxxxxxxxxxxxxxx",
    }'

Responses

200OK
refresh_token_expires_in string

When the token will expire

api_product_list string

The products associated

api_product_list_json json

The products associated

organization_name string

The organisation that is beign called against

developer.email string

The developer email

token_type string

The type of authorization

issued_at string

When the token was issued

client_id string

The Client ID from the app

access_token string

The Client Secret from the app

application_name string

The application ID

scope string

What scope has been applied

expires_in string

When the token will expire

refresh_count string

How many refreshes available

status string

The status of the request

{
    "refresh_token_expires_in": "0",
    "api_product_list": "[product_verify_experience]",
    "api_product_list_json": [
        "product_verify_experience"
    ],
    "organization_name": "prod",
    "developer.email": "[email protected]",
    "token_type": "BearerToken",
    "issued_at": "1617003906435",
    "client_id": "HJFGT565435GGh87qi6n88zstxiL26BG",
    "access_token": "wwNJdSTHF54RD476HMI8plZuwLp3",
    "application_name": "7879798543g-98jh-6yg5-7876-876hg5df4sd2",
    "scope": "USER-VERIFICATION",
    "expires_in": "3599",
    "refresh_count": "0",
    "status": "approved"
}
GET mobile/subscriber/{phoneNumber}/home-location
api.host.com/mobile/subscriber/{phoneNumber}/home-location

Overview

Retrieve network related information of subscriber as identified by phoneNumber.

Auth type

oauth2 authorisation required
Please checkout the documentation to review how to access the endpoint via oAuth 2.

Header parameters

Content-Type application/json

URL variable parameters

phoneNumber string
ID of the subscriber is the MSISDN of the subscriber represented as International ITU-T E.164.

Request


curl --location --request GET 'https://api.host.com/mobile/subscriber/{phoneNumber}/home-location'
    --header 'Authorization: token // https://staging.api.chenosis.io/client-credentials/accesstoken?grant_type=client_credentials'
    --header 'Content-Type: application/json'

Responses

200OK
statusCode string

HTTP error code extension

statusMessage string

Message.

phoneNumber string

phoneNumber provided in the input

data
country string

Country of origin of the phoneNumber provided.

mobileNetwork string

Mobile Network Operator of the phoneNumber provided.

subscriberIsActive string

TRUE,FALSE,NONE

simIsPorted string

TRUE,FALSE,NONE

roamingIsEnabled string

TRUE,FALSE,NONE

transactionId string

transaction ID for tracing.

{
    "statusCode": "string",
    "statusMessage": "string",
    "phoneNumber": "string",
    "data": {
        "country": "string",
        "mobileNetwork": "string",
        "subscriberIsActive": "string",
        "simIsPorted": "string",
        "roamingIsEnabled": "string"
    },
    "transactionId": "string"
}
400Bad Request
statusCode integer

HTTP error code extension

statusMessage string

More details and corrective actions related to the error which can be shown to a client.

SupportMessage string

Support Message

{
    "statusCode": 1,
    "statusMessage": "string",
    "SupportMessage": "string"
}
401Unauthorized
statusCode integer

HTTP error code extension

statusMessage string

More details and corrective actions related to the error which can be shown to a client.

SupportMessage string

Support Message

{
    "statusCode": 1,
    "statusMessage": "string",
    "SupportMessage": "string"
}
403Forbidden
statusCode integer

HTTP error code extension

statusMessage string

More details and corrective actions related to the error which can be shown to a client.

SupportMessage string

Support Message

{
    "statusCode": 1,
    "statusMessage": "string",
    "SupportMessage": "string"
}
404Not Found
statusCode integer

HTTP error code extension

statusMessage string

More details and corrective actions related to the error which can be shown to a client.

SupportMessage string

Support Message

{
    "statusCode": 1,
    "statusMessage": "string",
    "SupportMessage": "string"
}
405Method Not Allowed
statusCode integer

HTTP error code extension

statusMessage string

More details and corrective actions related to the error which can be shown to a client.

SupportMessage string

Support Message

{
    "statusCode": 1,
    "statusMessage": "string",
    "SupportMessage": "string"
}
406Not Acceptable
statusCode integer

HTTP error code extension

statusMessage string

More details and corrective actions related to the error which can be shown to a client.

SupportMessage string

Support Message

{
    "statusCode": 1,
    "statusMessage": "string",
    "SupportMessage": "string"
}
500Internal Server Error
statusCode integer

HTTP error code extension

statusMessage string

More details and corrective actions related to the error which can be shown to a client.

SupportMessage string

Support Message

{
    "statusCode": 1,
    "statusMessage": "string",
    "SupportMessage": "string"
}

Pricing

100 Free Daily

A simple API that allows you to know which country or network a phone number belongs to.

$ 0 .00 PER
CALL
SUBSCRIBE

Other customer information products

Icon for the partner

Mobile Customer Information

Easily retrieve detailed up to date information ab...

Icon for the partner

SIM Swap Date

One simple API to determine the most recent sim sw...

Icon for the partner

Call Forward Status

A simple and easy way to know if calls to...

VIEW ALL
VIEW ALL