# Post Postpaid ActivationInfo

This request is used to send a Postpaid activation request.

# Request Configuration

# Request Endpoint

/api/Activation/PostActivationInfoPostpaid

# Request Method

POST

# Request Headers

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

# Request Parameters:

None

# Request Body

Name (39) Type Description
SIM Card Related (2)
simcardOrder boolean
  • If not ordering the SIM card, use False.
  • If using this Service for individual client to order the SIM card, use True.
  • If it's a bulk corporate ordering SIM Cards, please contact PhoneBox Account managers for SIM cards ordering.
simcard_no string
  • If not ordering the SIM card, use SIM Card number located on the back of the SIM Card.
  • If using this Service for individual client to order the SIM card, leave empty (use "").
  • If it's a bulk corporate ordering SIM Cards, please contact PhoneBox Account managers for SIM cards ordering.
Service Related (10)
startDate DateTime
  • Use format YYYY-MM-DD
  • If already have a SIM Card, then use a date that is not in the past
  • If using this Service for individual client to order the SIM card
    • For develivery within Canada or US must use a minimum date of currentDate plus 7 days
    • For develivery outside Canada or US, must use a minimum date of currentDate plus 20 days
endDate DateTime Leave empty (use "")
serviceType string Leave empty (use "")
service_countryId int Service country ID, must use 42.
service_province string Use the Two-Letter Postal Abbreviation for Canadian provinces (opens new window), e.g., BC, QC.
service_city string Use the Canadian city's name, e.g., Vancouver, Toronto.
firstName string Use the client's first name
lastName string Use the client's last name
email string If do not want your own clients to receive any email communication from PhoneBox, DO NOT use your client's email address here, use your corporate's business email.
over18 boolean Use True if client is ove 18 years old, otherwise use False
Port-In Related (4) For below services, leave empty ("") if not port-in.
portin_carrier string If portin, use the Canadian Carrier's name, e.g., Rogers, Freedmom.
portin_accountNo string If portin, use the account number of the account needs to be ported-in. This number can be retrieved by contacting the current carrier.
portin_phoneNo string If portin, use the current phoneNumber, in the format of 77886665678
portin_other string If portin, this is used for Rogers Ownership Transfer, use the InteractionID obtained from Rogers.
Plan Related (4)
planId int Use the pfId returned from Get Postpaid Plans
plan_fee decimal Use plan_Amt returned from Get Postpaid Fee
promocode string Use PromoCode returned from Verify Simcard
bizId decimal Use bID returned from Login
Prorate Related (4)
prorateDataCap string Use prorateDataCap returned from Get Postpaid Fee
prorateEndDate DateTime Use prorateEndDate returned from Get Postpaid Fee
proratePct decimal Use prorate_Pct returned from Get Postpaid Fee
prorate_duration string Use prorate_duration returned from Get Postpaid Fee
Fee Related (11)
currency string Use CAD
simcard_fee decimal Use simcard_amt returned from Get Postpaid Fee
prorate_fee decimal Use prorate_amt returned from Get Postpaid Fee
charge_duration string Use charge_duration returned from Get Postpaid Fee
gst_rate decimal Use gst_rate returned from Get Postpaid Fee
pst_rate decimal Use pst_rate returned from Get Postpaid Fee
gst_amt decimal Use gst_Amt returned from Get Postpaid Fee
pst_amt decimal Use pst_Amt returned from Get Postpaid Fee
subtotal decimal Use subtotal returned from Get Postpaid Fee
promocredit decimal Use promo_Amt returned from Get Postpaid Fee
total decimal Use total returned from Get Postpaid Fee
Shipment Related (4)
delivery_countryId int
  • If not ordering the SIM card, use 0.
  • If using this Service for individual client to order the SIM card, use countryIDreturned from GetCountryID.
  • If it's a bulk corporate ordering SIM Cards, please contact PhoneBox Account managers for SIM cards ordering.
delivery_province string
delivery_address string
  • If not ordering the SIM card, leave empty (use "").
  • If using this Service for individual client to order the SIM card, use delivery_address client has entered.
  • If it's a bulk corporate ordering SIM Cards, please contact PhoneBox Account managers for SIM cards ordering.
delivery_postal string
  • If not ordering the SIM card, leave empty (use "").
  • If using this Service for individual client to order the SIM card, use postal_code client has entered.
  • If it's a bulk corporate ordering SIM Cards, please contact PhoneBox Account managers for SIM cards ordering.
ESIM Related (1)
esim boolean Must either
  1. Provide your client's email address in email above.
  2. Or forward activation email contains ESIM Activation QR Code to your client's email if provided corporate email in email above.

# Sample Reqeust

# Sample Request Body

{
    // Sim card related: 2
    "simcardOrder": false,
    "simcard_no": "89302720523088700001",

    //service related: 9
    "startDate": "2020-05-10",
    "endDate": "",
    "serviceType": "",
    "service_countryId": 42,
    "service_province": "BC",
    "service_city": "vancouver",
    "firstName": "IT",
    "lastName": "Teamtest",
    "email": "test@gophonebox.com",  
    "over18": false,

    //port-in related: 4
    "portin_carrier": "Rogers",
    "portin_accountNo": "",
    "portin_phoneNo": "",
    "portin_other": "",

    //plan related: 4
    "planId": 740,
    "plan_fee": 45,
    "promocode": "myPromo",
    "bizId": 0,

    //prorate related: 4
    "prorateDataCap": "5.19 GB",
    "prorateEndDate": "Jun 01, 2020",
    "proratePct": 0.74,
    "prorate_duration": "May 10, 2020~Jun 01, 2020",

    //fee related: 10
    "currency": "CAD",
    "simcard_fee": 10,
    "prorate_fee": 33.39,
    "charge_duration": "Jun 02, 2020~Jul 01, 2020",
    "gst_rate": 5,
    "pst_rate": 7,
    "gst_amt": 4.42,
    "pst_amt": 6.19,
    "subtotal": 88.39,
    "promocredit": 0,
    "total": 99,

    //shipment related: 4
    "delivery_countryId": 0,
    "delivery_province": "",
    "delivery_address": "",
    "delivery_postal": "V6K 1A1"

     //ESIM related: 1
    "esim": true,
}

# cURL

curl --location --request POST 'BASE-URL/api/Activation/PostActivationInfoPostpaid' \
--header 'Content-Type: application/json' \
--header 'client: TestAPI' \
--header 'apitoken: pbx123678testApi' \
--data-raw '{
    "simcardOrder": false,
    "simcard_no": "89302720523088700001",
    "startDate": "2020-05-10",
    "endDate": "",
    "serviceType": "",
    "service_countryId": 42,
    "service_province": "BC",
    "service_city": "vancouver",
    "firstName": "IT",
    "lastName": "Teamtest",
    "email": "test@gophonebox.com",  
    "over18": false,
    "portin_carrier": "Rogers",
    "portin_accountNo": "",
    "portin_phoneNo": "",
    "portin_other": "",
    "planId": 740,
    "plan_fee": 45,
    "promocode": "myPromo",
    "bizId": 0,
    "prorateDataCap": "5.19 GB",
    "prorateEndDate": "Jun 01, 2020",
    "proratePct": 0.74,
    "prorate_duration": "May 10, 2020~Jun 01, 2020",
    "currency": "CAD",
    "simcard_fee": 10,
    "prorate_fee": 33.39,
    "charge_duration": "Jun 02, 2020~Jul 01, 2020",
    "gst_rate": 5,
    "pst_rate": 7,
    "gst_amt": 4.42,
    "pst_amt": 6.19,
    "subtotal": 88.39,
    "promocredit": 0,
    "total": 99,
    "delivery_countryId": 0,
    "delivery_province": "",
    "delivery_address": "",
    "delivery_postal": "V6K 1A1",
    "esim": true
}'

# Python - Requests

import requests

url = "https://testmyaccount.azurewebsites.net/api/Activation/PostActivationInfoPostpaid"

payload = "{\n    \"simcardOrder\": false,\n    \"simcard_no\": \"89302720523088700001\",\n    \"startDate\": \"2020-05-10\",\n    \"endDate\": \"\",\n    \"serviceType\": \"\",\n    \"service_countryId\": 42,\n    \"service_province\": \"BC\",\n    \"service_city\": \"vancouver\",\n    \"firstName\": \"IT\",\n    \"lastName\": \"Teamtest\",\n    \"email\": \"test@gophonebox.com\",  \n    \"over18\": false,\n    \"portin_carrier\": \"Rogers\",\n    \"portin_accountNo\": \"\",\n    \"portin_phoneNo\": \"\",\n    \"portin_other\": \"\",\n    \"planId\": 740,\n    \"plan_fee\": 45,\n    \"promocode\": \"myPromo\",\n    \"bizId\": 0,\n    \"prorateDataCap\": \"5.19 GB\",\n    \"prorateEndDate\": \"Jun 01, 2020\",\n    \"proratePct\": 0.74,\n    \"prorate_duration\": \"May 10, 2020~Jun 01, 2020\",\n    \"currency\": \"CAD\",\n    \"simcard_fee\": 10,\n    \"prorate_fee\": 33.39,\n    \"charge_duration\": \"Jun 02, 2020~Jul 01, 2020\",\n    \"gst_rate\": 5,\n    \"pst_rate\": 7,\n    \"gst_amt\": 4.42,\n    \"pst_amt\": 6.19,\n    \"subtotal\": 88.39,\n    \"promocredit\": 0,\n    \"total\": 99,\n    \"delivery_countryId\": 0,\n    \"delivery_province\": \"\",\n    \"delivery_address\": \"\",\n    \"delivery_postal\": \"V6K 1A1\"\n, \n    \"esim\": true\n }"
headers = {
  'Content-Type': 'application/json',
  'client': 'TestAPI',
  'apitoken': 'pbx123678testApi'
}

response = requests.request("POST", url, headers=headers, data = payload)

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

# NodeJs -Axios

var axios = require('axios');
var data = JSON.stringify({
    "simcardOrder": false,
    "simcard_no": "89302720523088700001",
    "startDate": "2020-05-10",
    "endDate": "",
    "serviceType": "",
    "service_countryId": 42,
    "service_province": "BC",
    "service_city": "vancouver",
    "firstName": "IT",
    "lastName": "Teamtest",
    "email": "test@gophonebox.com",  
    "over18": false,
    "portin_carrier": "Rogers",
    "portin_accountNo": "",
    "portin_phoneNo": "",
    "portin_other": "",
    "planId": 740,
    "plan_fee": 45,
    "promocode": "myPromo",
    "bizId": 0,
    "prorateDataCap": "5.19 GB",
    "prorateEndDate": "Jun 01, 2020",
    "proratePct": 0.74,
    "prorate_duration": "May 10, 2020~Jun 01, 2020",
    "currency": "CAD",
    "simcard_fee": 10,
    "prorate_fee": 33.39,
    "charge_duration": "Jun 02, 2020~Jul 01, 2020",
    "gst_rate": 5,
    "pst_rate": 7,
    "gst_amt": 4.42,
    "pst_amt": 6.19,
    "subtotal": 88.39,
    "promocredit": 0,
    "total": 99,
    "delivery_countryId": 0,
    "delivery_province": "",
    "delivery_address": "",
    "delivery_postal": "V6K 1A1",
    "esim": true,
});

var config = {
  method: 'post',
  url: 'https://testmyaccount.azurewebsites.net/api/Activation/PostActivationInfoPostpaid',
  headers: { 
    'Content-Type': 'application/json', 
    'client': 'TestAPI', 
    'apitoken': 'pbx123678testApi'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

# Response

Use the 🎉 💯🔥 referenceID 🎉 💯🔥 returned from the response when contacting your PhoneBox Account Executive

# Success

Return non-zero referenceID

62233

# Non-Success

Return 0 referenceID

0

# Fail

Failed Authorization

{
    "Message": "Authorization has been denied for this request."
}
LastUpdated: 6/29/2021, 10:21:36 PM