Reseller API Documentation

  • Home
  • Reseller API Documentation

Authentication

To generate the access token for all subsequent API requests

URL:   https://nonvoip.com/reseller/api/authentication/   POST

Parameters
client_key : YOUR_CLIENT_KEY
client_secret: YOUR_CLIENT_SECRET
NOTE : Obtain your client key & secret from dashboard and pass to the API to generate access token.
If you don't see the one click on GENERATE button to create new client key & secret.

Sample Response
                                            
                                                {
                                                    "bearer_token": "eyJ0eXAiOiJKV1Q.eyJpYXQ1YzI4MTY2ZGM5Y2QifQ.dzVQ-0gEo9otknLMCyymt-5M8KzvxQ",
                                                    "expiration": 1573064855
                                                }
                                            
                                        
RESPONSE SCHEMA
bearer_token - to be used in all other coming API requests.
expiration - token expires at this time.

Verification Target

To retrieve the list of targets.
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.

URL:    https://nonvoip.com/reseller/verification/targets/   POST

Sample Response
                                        
                                            [{
                                                
                                                "targetId": 0,
                                                "name": "Service not listed",
                                                "cost": 30,
                                                "status": 4,
                                                "pricingMode": 1
                                            },
                                            {
                                                "targetId": 3,
                                                "name": "Airbnb",
                                                "cost": 17.5,
                                                "status": 4,
                                                "pricingMode": 1
                                            },
                                            {
                                                "targetId": 90,
                                                "name": "Gmail",
                                                "cost": 25,
                                                "status": 4,
                                                "pricingMode": 1
                                            }]
                                        
                                    
RESPONSE SCHEMA
targetId - integer
name - string
cost - number
status - integer (Possible Values - 1 | 2 | 4 | 8 | 128)
                                        
                                            1   = NotAvailable
                                            2   = Used
                                            4   = New
                                            8   = SurgePricingBlocked
                                            128 = QuotaExceeded
                                        
                                    

Create Verification

To create / initiat the SMS verification
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.
URL :    https://nonvoip.com/reseller/verification/create/   POST
Parameter:
target_id:3
Sample Response
                                    
                                        {
                                            "error": "false;",
                                            "data": {
                                                "id": "7010cdfa-85fe-46d0-a964-1b79e329c9e5",
                                                "cost": 17.5,
                                                "target_name": "Airbnb",
                                                "number": "8382000027",
                                                "time_remaining": "00:04:59.9726782",
                                                "reuse_window": "00:00:00",
                                                "status": "Pending",
                                                "sms": ""
                                            }
                                        }
                                    
                                
RESPONSE SCHEMA
id - Unique identifier for the verification
cost - number
target_name - string
time_remaining - string - Time remaining before the verification transitions to the "Timed Out" state
reuse_window - string - Time remaining before the verification can no longer be reused (use the same number again for the same service).Only verifications in the "Completed" state and within the reuse time window can be reused.
status - string - State of the verification.
                                    
                                        {
                                            Pending     // Waiting for SMS
                                            Completed   // SMS received
                                            Timed Out   // Verification expired
                                            Reported    // Verification was reported by user
                                            Cancelled   // Verification was cancelled by user or system
                                        }
                                    
                                

Verification Detail

To get the SMS verification Detail
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.
URL:    https://nonvoip.com/reseller/verification/details/   POST

Parameters
verification_id : 7010cdfa-85fe-46d0-a964-1b79e329c9e5
Sample Response
                                    
                                        {    
                                            "error": false,
                                            "data": {
                                                "id": "7010cdfa-85fe-46d0-a964-1b79e329c9e5",
                                                "cost": 17.5,
                                                "target_name": "Amazon",
                                                "number": "9285658286",
                                                "time_remaining": "00:04:59.9726782",
                                                "reuse_window": "00:00:00",
                                                "status": "Completed",
                                                "sms": "259160 is your Amazon OTP. OTP is confidential. For security reasons, DO NOT share this OTP with anyone."
                                            }
                                        }
                                    
                                
RESPONSE SCHEMA
id - Unique identifier for the verification
cost - number
target_name - string
time_remaining - string - Time remaining before the verification transitions to the "Timed Out" state
reuse_window - string - Time remaining before the verification can no longer be reused (use the same number again for the same service). Only verifications in the "Completed" state and within the reuse time window can be reused.
status - string - State of the verification.
                                    
                                        {
                                            Pending     // Waiting for SMS
                                            Completed   // SMS received
                                            Timed Out   // Verification expired
                                            Reported    // Verification was reported by user
                                            Cancelled   // Verification was cancelled by user or system
                                        }
                                    
                                

Cancel Verification

To cancel the verification anytime after it is created / initiated.
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.
URL :   https://nonvoip.com/reseller/verification/cancel/   POST

Parameters
verification_id : 7010cdfa-85fe-46d0-a964-1b79e329c9e5
Sample Response
                                    
                                        {
                                            "error": false,
                                            "message": "Verification is cancelled successfully",
                                            "data": {
                                                "id": "7010cdfa-85fe-46d0-a964-1b79e329c9e5",
                                                "cost": 17.5,
                                                "target_name": "Amazon",
                                                "number": "9285658286",
                                                "time_remaining": "00:04:59.9726782",
                                                "reuse_window": "00:00:00",
                                                "status": "Completed",
                                                "sms": "259160 is your Amazon OTP. OTP is confidential. For security reasons, DO NOT share this OTP with anyone."
                                            }
                                        }
                                    
                                
RESPONSE SCHEMA

id - Unique identifier for the verification
cost - number
target_name - string
time_remaining - string - Time remaining before the verification transitions to the "Timed Out" state
reuse_window - string - Time remaining before the verification can no longer be reused (use the same number again for the same service).
Only verifications in the "Completed" state and within the reuse time window can be reused.
status - string - State of the verification.
                                    
                                        {
                                            Pending     // Waiting for SMS
                                            Completed   // SMS received
                                            Timed Out   // Verification expired
                                            Reported    // Verification was reported by user
                                            Cancelled   // Verification was cancelled by user or system
                                        }
                                    
                                

Rental Target

To retrieve the list of targets.
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.

URL:    https://nonvoip.com/reseller/rentals/targets   POST

Sample Response
                                        
                                            {
                                                "error": false,
                                                "message": "Targets retrieved successfully",
                                                "rental_activation_charge": "30",
                                                "per_rental_cost": "30",
                                                "data": 
                                                    [{
                                                        "targetId": 268,
                                                        "name": "1StopMove"
                                                    },
                                                    {
                                                        "targetId": 196,
                                                        "name": "3Fun"
                                                    }]
                                            }
                                        
                                    
RESPONSE SCHEMA
targetId - integer
name - string
rental_activation_charge - number
per_rental_cost - number

Create Rental Purchase

To Create the Rental Purchase.
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.

URL:    https://nonvoip.com/reseller/rentals/create   POST

Parameters
targets : 3,4,5
reserve_on_same_number: 0 or 1

Sample Response
                                        
                                            {
                                                "error": true,
                                                "data": {
                                                    "rental_id": "78d5f6c2-dcce-4de8-af10-16abe57d61",
                                                    "reserve_on_same_number": true,
                                                    "cost": 60,
                                                    "renewal_cost": 60,
                                                    "targets": [
                                                        {
                                                            "targetId": 3,
                                                            "name": "Airbnb"
                                                        }
                                                    ],
                                                    "reservation_slots": {
                                                        "reservationId": "1d8becce-c9f1-4a7e-905c-ac60e454516a",
                                                        "maxRentalCutoff": "2019-12-17T22:20:08.7100459Z",
                                                        "maxRentalPeriod": "13.15:07:11.2904010"
                                                    }
                                                }
                                            }
                                        
                                    
RESPONSE SCHEMA
rental_id - string
reserve_on_same_number - boolean
cost - number
renewal_cost - number
reservationId - number
maxRentalCutoff - string
maxRentalPeriod - string

Execute Rental Purchase

To Purchase the Rental.
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.

URL:    https://nonvoip.com/reseller/rentals/purchase   POST

Parameters
rental_id : 2b34ee46-f7cf-4a53-97fa-75ab99fb556a
reservation_id : 48113e78-5653-446c-a9e2-f343078e9a67
targets : 3,40

Sample Response
                                        
                                            {
                                                "error": false,
                                                "message": "Rental purchased successfully",
                                                "data": {
                                                    "rental_id": "2b34ee46-f7cf-4a53-97fa-75ab99fb556a",
                                                    "time_remaining": "6.23:58:50.6950082",
                                                    "expiration": "2019-11-25T14:04:19.452647Z",
                                                    "max_rental_lifetime": "2019-12-17T17:20:08.7100459",
                                                    "cost": 70,
                                                    "renewal_cost": 80,
                                                    "auto_renew": false,
                                                    "email_reminder": true,
                                                    "rental_targets": [
                                                        {
                                                            "target_id": 40,
                                                            "name": "Instagram",
                                                            "daily_free_quota": 5,
                                                            "number": "9376076966"
                                                        }
                                                    ]
                                                }
                                            }
                                        
                                    
RESPONSE SCHEMA
rental_id - string
time_remaining - string
expiration - string
max_rental_lifetime - string
cost - number
renewal_cost - number
auto_renew - boolean
email_reminder - boolean
reservationId - number

Get Rental Details

To retrieve the Rental Details.
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.

URL:    https://nonvoip.com/reseller/rentals/details   POST

Parameters
target_id : 86
rental_id : f2ebbba8-ce41-48b9-a365-725b3dc1543d

Sample Response
                                        
                                            {
                                                "error": false,
                                                "message": "Rental history retrieved successfully",
                                                "rental_history": {
                                                    "id": "69",
                                                    "user_id": "1",
                                                    "rental_id": "f2ebbba8-ce41-48b9-a365-725b3dc1543d",
                                                    "target_id": "86",
                                                    "target_name": "Yahoo",
                                                    "cost": "60",
                                                    "number": "339268050",
                                                    "latest_code": "",
                                                    "daily_free_quota": "5",
                                                    "expiration": "2019-12-07 03:05:04",
                                                    "renewal_date": null,
                                                    "auto_renew": "0",
                                                    "email_reminder": "0",
                                                    "is_email_sent": "0",
                                                    "recurring_cost": "60",
                                                    "date_created": "2019-11-29 19:06:17"
                                                }
                                            }
                                        
                                    
RESPONSE SCHEMA
rental_id - string
target_id - number
target_name - string
cost - number
number - number
latest_code - string
daily_free_quota - number
expiration - Date Time
renewal_date - Date Time
auto_renew - boolean
email_reminder - boolean
recurring_cost - integer
date_created - Date Time

Get Rental Activity

To retrieve the Rental Activities.
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.

URL:    https://nonvoip.com/reseller/rentals/rental_activity   POST

Parameters
rental_id : f2ebbba8-ce41-48b9-a365-725b3dc1543d
target_id : 86

Sample Response
                                        
                                            {
                                                "error": "false",
                                                "rental_id": "f2ebbba8-ce41-48b9-a365-725b3dc1543d",
                                                "target_id": "86",
                                                "total_activities": 1,
                                                "activity": [
                                                    {
                                                        "sr_no": 1,
                                                        "timestamp": "30-Nov-2019 03:12:48 am",
                                                        "type": "Rental - SMS",
                                                        "number": "3309268050",
                                                        "code": "40675"
                                                    }
                                                ],
                                                "message": "SMSs / activities found for the following rental target."
                                            }
                                        
                                    
RESPONSE SCHEMA
rental_id - string
target_id - integer
total_activities - integer

Config Rental

To Configure the Rental.
A valid bearer token is required to complete this request. Obtained from the api/authentication endpoint.

URL:    https://nonvoip.com/reseller/rentals/config   POST

Parameters
rental_id : f2ebbba8-ce41-48b9-a365-725b3dc1543d
auto_renew : 0 or 1

Sample Response
                                        
                                           {
                                                "error": false,
                                                "data": "Rental Configured Successfully."
                                            }