Use Case: Get subscription Information, activate the SIM and get activation status using REST API

This use case shows how to flip the status of a given subscription (from Active to Pause or vice versa) by checking its initial status, change it, and then verifying the final status. This is done by implementing a sample application flow in NodeRed® and Postman which combines three IoT Accelerator APIs. The sample flows are available and downloadable from the "Available resources" section of this page.

The flow orchestrates the three IoT Accelerator native API calls and assembles their result into a single body response.

API in scope
API exposed by the sample flow Change SIM subscription state and get result
Method GET
IoTA APIs in scope
  • GET /iot/api/sica/subscriptions/sims/{id}
  • POST /iot/api/sica/subscriptions/requests/state-changes
  • GET /dcpapi/rest/subscriptionManagement/v1/subscriptions/requests/{request-id}
Endpoint http://localhost:1880/legacy_get_sim_info/activate_sim?filterKey=<imsi|msisdn>&subscriptionStatus=<Active|Pause>
Headers
  • username
  • password
  • filterValue – value of the filterKey set in the parameters
Parameters
  • filterKey: imsi|msisdn
  • subscriptionStatus: Active|Pause
REQUEST
GET /legacy_get_sim_info/activate_sim?filterKey=imsi&subscriptionStatus=Activate HTTP/1.1 
Host: localhost:1880
X-Username: xxxxx
X-Password: xxxxx
filterValue: yyyyyyyyyyyyyyy
RESPONSE
{ 
    "RequestId": "REQXXXXXXXXXXXXXXX", 
    "SubscriptionRequestState": "COMPLETED", 
    "SIMSubscriptionState": "PAUSE", 
    "AdditionalSIMInfo": {         
            "sims": [ 
            { 
                "fixed_ips": [], 
                "access_control_class": "0080", 
                "apns": [ 
                    { 
                        "name": "XXXXXXXXXXXXXXX", 
                        "description": "XXXXXXXXXXXXXXX" 
                    }, 
                    { 
                        "name": "XXXXXXXXXXXXXXX", 
                        "description": "XXXXXXXXXXXXXXX" 
                    }, 
                    { 
                        "name": "XXXXXXXXXXXXXXX", 
                        "description": "XXXXXXXXXXXXXXX" 
                    } 
                ], 
                "charge_code_for_pp_move": false, 
                "charge_code_non_pp_move": false, 
                "clip": false, 
                "csd": false, 
                "customer_label": "XXXXXXXXXXXXXXX", 
                "customer_no": "XXXXXXXXXXXXXXX", 
                "first_activation_date": "2019-11-19T12:47:02.844+00:00", 
                "freeze_duration": "0", 
                "gprs": true, 
                "icc": "XXXXXXXXXXXXXXX", 
                "imei": "XXXXXXXXXXXXXXX", 
                "imsi": "XXXXXXXXXXXXXXX", 
                "installation_date": "2019-11-19T12:47:02.844+00:00", 
                "last_subscription_date_change": "2022-10-06T06:23:12.997+00:00", 
                "move_to_permitted": true, 
                "msisdn": "XXXXXXXXXXXXXXX", 
                "pbr_exit_date": "2019-11-19T12:47:03.000+00:00", 
                "pin1": "0000", 
                "pin2": "0000", 
                "price_profile_name": "XXXXXXXXXXXXXXX", 
                "product_offer_name": "XXXXXXXXXXXXXXX-XXXXXXXXXXXXXXX", 
                "puk1": "00000000", 
                "puk2": "00000000", 
                "roam_profile_name": "1438", 
                "sim_specification": "XXXXXXXXXXXXXXX", 
                "sim_subscription_status": "PAUSE", 
                "sms_mo": true, 
                "sms_mt": true, 
                "voice": false, 
                "lte": true, 
                "user_profile_id": "TSM1619", 
                "tenant_id": "91", 
                "customer_name": "XXXXXXXXXXXXXXX", 
                "subscription_package_description": "XXXXXXXXXXXXXXX", 
                "operator_id": "XXXXXXXXXXXXXXX", 
                "enable_5g": false 
            } 
        ] 
    } 
}
AVAILABLE RESOURCES

NodeRed® Flows

The described flow is available for download, ready to be imported and used in your NodeRed® client. If you want to know more about how to import flows in NodeRed, visit the dedicated instructions available here.

Download

Postman Flow

The described flow is available for download, ready to be imported and used in your Postman client. If you want to know more about how to import flows in Postman, visit the dedicated instructions available here.

Download