# Internet Package API

This endpoint lets you retrieve package listings for operators such as :&#x20;

**ISPs under Merosoft:**

* **Subisu :** Operator Id (19)
* **Worldlink :** Operator Id (20)
* **Vianet :** Operator Id (21)
* **Websurfer :** Operator Id (22)
* **Arrownet :** Operator Id (23)
* **SKY Internet :** Operator Id (24)
* **PrabhuNet :** Operator Id (25)
* **Palsnet :** Operator Id (26)
* **Loop Network :** Operator Id (27)
* **Techminds :** Operator Id (30)
* **Classic Tech :** Operator Id (32)
* **Chitrawan :** Operator Id (47)
* **Dolfin Net Communication :** Operator Id (59)
* **Net Max :** Operator Id (60)
* **Alisha Communication :** Operator Id (61)
* **World Fiber Net :** Operator Id (63)
* **Nijgadh Cable :** Operator Id (67)
* **Prime Network :** Operator Id (70)
* **PDS Server Network :** Operator Id (73)
* **Meta Link :** Operator Id (74)
* **DG Link :** Operator Id (82)
* **Dish Home Fiber :** Operator Id (83)
* **Izone :** Operator Id (84)
* **ACME Internet :** Operator Id (85)
* **Smart Link :** Operator Id (94)
* **SKY Broadband :** Operator Id (96)
* **Rapid Unique Net :** Operator Id (98)
* **GRS Internet :** Operator Id (99)
* **Wifi Nepal:** Operator Id (115)

#### How To Use:

1. **Identify the Operator**:
   * First, use the [Operator Lookup API ](/additional-nepal-apis/operator-lookup.md)to get the correct operator based on user input or selection.
2. **Determine Operator Type**:
   * Use the [Operator Type Lookup API ](/additional-nepal-apis/operator-type-lookup.md)to confirm the type (e.g., Mobile, DTH, Data Pack, etc).
3. **Initiate Package**:
   * Once you have obtained all the required details (operator, type), you can use the API to initiate a package request with the request parameters given below.

## Package Listing API

<mark style="color:green;">`POST`</mark> `/np/recharge/package`

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |
| Accept       | `application/json` |
| x-auth-token | `<token>`          |

**Body**

| Name               | Type   | Description                              |
| ------------------ | ------ | ---------------------------------------- |
| `operator_id`      | int    | ID of the relevant operator e.g. 20 , 21 |
| `operator_type_id` | int    | Operator Type ID e.g 5                   |
| `connection_no`    | string | Username provided by Operator            |
| `reference_no`     | string | Unique reference no for the request      |

**Respons**

{% tabs %}
{% tab title="200" %}

```json
{
    "error": false,
    "message": "The action has been successfully performed.",
    "data": {
        "operator_id": "20",
        "connection_no": "online_renew",
        "reference_no": "1234211",
        "session_id": 24109,
        "packages": {
            "customer": "Majdur family",
            "address": "CHITWAN",
            "message": "You have 233 day(s) remaining. You could pay in advance but it is not yet supported. | Remaining Days: 233",
            "bill": 0,
            "bill_type": "Dealdaar offer-50Mbps/12mths",
            "options": [
                {
                    "id": 800011,
                    "name": "Dealdaar offer-50Mbps/12mths",
                    "amount": 4520
                },
                {
                    "id": 800012,
                    "name": "Dealdaar offer-80Mbps/3mths",
                    "amount": 1808
                },
                {
                    "id": 800013,
                    "name": "Dealdaar offer-80mbps/6mths",
                    "amount": 3616
                },
                {
                    "id": 800014,
                    "name": "Dealdaar offer-80Mbps/12mths",
                    "amount": 6780
                }
            ]
        }
    }
}
```

{% endtab %}

{% tab title="4XX/5XX" %}

```json
{
    "error": true,
    "message": "Description for the error",
}
```

{% endtab %}

{% tab title="Guzzle" %}

```php
use GuzzleHttp\Client;

$url    = 'np/recharge/package';

$form_params =
  [
    'operator_type_id' => '5',
    'operator_id'      => '20',
    'connection_no'    => 'rameshsah_fbrgj',
    'reference_no'     => mt_rand(1000000,9999999)
    
  ];
            
$client = new Client([
    'base_uri' => 'https://uatservices.globaltopup.in/api/v1/',
          ]);
          $res = $client->post($url, [
          'json' => $form_params,  // Send JSON payload
          'headers' => 
        [
             'x-auth-token' => 'Token Provided by Global Topup',
             'Content-Type' => 'application/json'
        ]
                ]);
              
   $response       =   json_decode($res->getBody()->getContents(), true);

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

$data = json_encode(array(
    'operator_id' => '20',
    'operator_type_id' => '5',
    'connection_no' => 'rameshsah_fbrgj',
    'reference_no' => mt_rand(1000000,9999999)
));

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://uatservices.globaltopup.in/api/v1/np/recharge/package',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data, // Send JSON payload
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: application/json',
    'x-auth-token: Token Provided by Global Topup'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Curl" %}

```php

curl -X POST https://uatservices.globaltopup.in/api/v1/np/recharge/package
     -H 'Content-Type: application/json'
     -H 'Accept: application/json' 
     -H 'x-auth-token: Global Topup Provided Token'
     -d '{"operator_id" : "20","operator_type_id" : "5",
     "connection_no" : "rameshsah_fbrgj",
     "reference_no" : "345678"}' // Send JSON payload
```

{% endtab %}
{% endtabs %}

The response contains an error flag and a message, along with an array of objects with package listing data in case of a successful response, where each package object will have `id`, `name` and `amount`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.globaltopup.in/nepal-recharge/internet/multistep-group-execute/internet-package-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
