# Verify SimCard

This service is used to verify if the SIMCard is valid.

# Request Configuration

# Request Endpoint

/api/Activation/VerifySimcard

# Request Method

Post

# Request Headers

Name Type Description
client string Use bid returned from Login
apitoken string Use token returned from Login

# Request Parameters:

Name Type Description
simnum string Use SIM Card number located on the back of the SIM Card.
CountryId int Service country ID, must use 42.
verifytype string
  • If verifying for Prepaid service, use prepaid.
  • If verifying for Postpaid service, use postpaid

# Request Body

None

# Sample Reqeust

# Sample Request URL

http://localhost:60904/api/Activation/VerifySimcard?simnum=66666666668888888888&countryid=42&verifytype=prepaid

# cURL

curl --location --request POST 'http://localhost:60904/api/Activation/VerifySimcard?simnum=66666666668888888888&countryid=42&verifytype=prepaid' \
--header 'client: 1234' \
--header 'apitoken: 1eMPGml82EhtyH0CSAw4RrLbEi3jjWA0'

# Python - Requests

import requests
url = "http://localhost:60904/api/Activation/VerifySimcard"
params = {
    'simnum': '66666666668888888888', 
    'countryid': '42',
    'verifytype': 'prepaid'
}

headers = {
    'client': '1234',
    'apitoken': 'foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'
}
response = requests.post(url, headers=headers, params=params)

print(response.text.encode('utf8'))

# NodeJs -Axios

var axios = require('axios');

var data = {};

const params = new URLSearchParams({
    simnum: '66666666668888888888', 
    countryid: '42',
    verifytype: 'prepaid'
}).toString();

const url =
    url = "http://localhost:60904/api/Activation/VerifySimcard" +
    params;

axios
    .post(url, data, {
    headers: {
        client: '1234',
        apitoken: 'foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'
    }
    })
    .then(res => {
        console.log(JSON.parse(res.data));
    })
    .catch(err => {
        console.log(err);
    });

# Response

# Success

return a JSON object containing below information

{
    "PromoCode": "MyPromoCode",
    "SimNum": "66666666668888888888",
    "Carrier": "R",
    "Type": "Prepaid",
    "CountryId": 42,
    "Currency": "CAD",
    "PlanId": 0,
    "PlanType": null,
    "PlanTypeD": null
}

# Non-Success

Return null

reason: verifytype doesnt match with the SIM number

null

# Fail

Failed Authorization

reason: wrong login credential

{
    "Message": "Authorization has been denied for this request."
}
LastUpdated: 11/5/2020, 2:36:22 AM