# 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 Carrier returned from VerifySimcard
promocode string Use PromoCode returned from VerifySimcard

# Request Body

None

# Sample Reqeust

# Sample Request URL

https://phoneboxapi.azurewebsites.net/api/Activation/PostpaidPlans?carrier=R&promocode=MyPromoCode

# cURL

curl --location --request POST 'https://phoneboxapi.azurewebsites.net/api/Activation/PostpaidPlans?carrier=T&promocode=MyPromoCode' \
--header 'client: 1234' \
--header 'apitoken: foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'

# Python - Requests

import requests
url = "https://phoneboxapi.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://phoneboxapi.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": 1343,
    "pfCode": "BOXRYOC0-2G",
    "pfAmt": 30,
    "calling": "Unlimited Nationwide Calling",
    "callBoundary": "Nationwide",
    "calladdon": "",
    "callingRate": 0,
    "ldRate": 0,
    "dataCap": "2.00 GB",
    "dataOverRate": "$15.00 / 1GB",
    "messages": "Unlimited Messages",
    "intlMessageRate": 0,
    "mmsRate": 0,
    "currencySymbol": "$",
    "planType": "Month",
    "airoverage": "",
    "rogersplan": true,
    "telusplan": false
  },
  {
    "pfId": 1345,
    "pfCode": "BOXRYOE0-35G",
    "pfAmt": 50,
    "calling": "Unlimited Nationwide Calling",
    "callBoundary": "Nationwide",
    "calladdon": "",
    "callingRate": 0,
    "ldRate": 0,
    "dataCap": "35.00 GB",
    "dataOverRate": "$15.00 / 1GB",
    "messages": "Unlimited Messages",
    "intlMessageRate": 0,
    "mmsRate": 0,
    "currencySymbol": "$",
    "planType": "Month",
    "airoverage": "",
    "rogersplan": true,
    "telusplan": false
  }
]

# Fail

Failed Authorization

reason: wrong login credential

{
    "Message": "Authorization has been denied for this request."
}
LastUpdated: 5/30/2024, 1:34:33 PM