# Get Postpaid Plans

This service is used to query all postpaid plans belong to the certain partner.

# Request Configuration

# Request Endpoint

/api/Activation/PostpaidPlans

# 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
carrier string Use R for Rogers, T for Telus, and B for Bell.
promocode string Use PromoCode returned from VerifySimcard

# Request Body

None

# Sample Reqeust

# Sample Request URL

http://localhost:8080/api/Activation/PostpaidPlans?carrier=R&promocode=MyPromoCode

# cURL

curl --location --request POST 'http://localhost:8080/api/Activation/PostpaidPlans?carrier=T&promocode=MyPromoCode' \
--header 'client: 1234' \
--header 'apitoken: foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'

# Python - Requests

import requests
url = "https://testmyaccount.azurewebsites.net/api/Activation/PostpaidPlans"

params = {'carrier': 'R', 'promocode': 'myPromoCode'}

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({
    carrier: 'R',
    promocode: 'MyPromoCode'
}).toString();

const url =
    "https://testmyaccount.azurewebsites.net/api/Activation/PostpaidPlans" +
    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 list of JSON containing below information

[
    {
        "pfId": 6666666,
        "pfCode": "BOXR66666-6G-Fortune",
        "pfAmt": 66666.00,
        "calling": "Unlimited Nationwide Calling",
        "callBoundary": "Nationwide",
        "calladdon": "",
        "callingRate": 0.00,
        "ldRate": 0.00,
        "dataCap": "6.00 GB",
        "dataOverRate": "$6.00 / 6MB",
        "messages": "Unlimited Messages",
        "intlMessageRate": 0.00,
        "mmsRate": 0.00,
        "currencySymbol": "$",
        "planType": "Month",
        "airoverage": "",
        "rogersplan": true,
        "telusplan": false,
        "bellplan": false
    },
    {
        "pfId": 8888888,
        "pfCode": "BOXR888888CH-8G-Wealth",
        "pfAmt": 88888.00,
        "calling": "Unlimited Nationwide Calling",
        "callBoundary": "Nationwide",
        "calladdon": "",
        "callingRate": 0.00,
        "ldRate": 0.00,
        "dataCap": "8.00 GB",
        "dataOverRate": "$8.00 / 8MB",
        "messages": "Unlimited Messages",
        "intlMessageRate": 0.00,
        "mmsRate": 0.00,
        "currencySymbol": "$",
        "planType": "Month",
        "airoverage": "",
        "rogersplan": false,
        "telusplan": true,
        "bellplan": false
    }
]

# Fail

Failed Authorization

reason: wrong login credential

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