# Network Resource

A **Network** resource represents a cellular network to which Super SIMs can connect.

You can obtain a list of all available mobile operator networks, provided as an array of **Network** resources, from this endpoint:

```
https://supersim.api.korewireless.com/v1/Networks
```

{% hint style="info" %}
To allow Super SIMs to connect to the cellular network that a Network resource represents, the Network resource must be included in a [Network Access Profile](https://docs.korewireless.com/en-us/api/products/supersim/networkaccessprofile-resource) resource's [Networks](https://docs.korewireless.com/en-us/api/products/supersim/networkaccessprofile-resource/network-resource) subresource.
{% endhint %}

***

## Network Identifiers

Each Network resource will have a `sid` property that is used by KORE as the primary identifier. This is a unique identifier to KORE. In the world of cellular connectivity, networks are often referred to by their MCC (mobile country code) and MNC (mobile network code). Networks often have multiple MCC-MNCs associated with it. You can look these up on various websites such as [this one](https://www.mcc-mnc.com/).&#x20;

{% hint style="info" %}
There have been many mergers, spin-offs, and rebrandings of mobile network operators around the world. A PLMN may therefore have many identifiers, i.e., multiple MCC and MNC pairings. A PLMN's trading name may no longer match the 'friendly name' which is used to identify it in a human-readable way to other PLMNs and which is recorded in a Network resource's `friendly_name` property.

If there is a specific mobile network operator you are looking for which may have a different name to the Network resource's `friendly_name` property, check if its MCC and MNC IDs are included among a Network resource's `identifiers`.
{% endhint %}

A Network resource's `identifiers` property is an array of objects that contain identifiers for all of the public land mobile networks (PLMNs) that are represented by a Network resource. Each object in the array will have these properties:

| `mcc` | The Mobile Country Code (MCC) is the unique ID that identifies the mobile operator network's home country. |
| ----- | ---------------------------------------------------------------------------------------------------------- |
| `mnc` | The Mobile Network Code (MNC) is the unique ID that identifies the mobile operator network.                |

## API Authorization <a href="#api-authorization" id="api-authorization"></a>

Before you can make requests to this resource, you must have a valid bearer token. Review our API [authorization guide](https://docs.korewireless.com/en-us/developers/api-management/auth) to learn how to generate a token. Here's a curl example on how to define your access token in a header:

{% code overflow="wrap" %}

```bash
curl -L "https://supersim.api.korewireless.com/v1/Sims" -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" 
```

{% endcode %}

{% hint style="warning" %}
The examples below do not show the required `Authorization` header due to a bug. We're working on fixing that. In the meantime, be sure to include that in all of your requests.
{% endhint %}

***

## Fetch a Network Resource

## GET /v1/Networks/{Sid}

> Fetch a Network resource.

```json
{"openapi":"3.0.1","info":{"title":"KORE - Supersim","version":"1.0.0"},"tags":[{"name":"SupersimV1Network"}],"servers":[{"url":"https://supersim.api.korewireless.com"}],"security":[{"OAuth":[]}],"components":{"securitySchemes":{"OAuth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}},"schemas":{"supersim.v1.network":{"type":"object","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that we created to identify the Network resource."},"friendly_name":{"type":"string","nullable":true,"description":"A human readable identifier of this resource."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Network resource."},"iso_country":{"type":"string","nullable":true,"description":"The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resource."},"identifiers":{"type":"array","items":{},"nullable":true,"description":"Array of objects identifying the [MCC-MNCs](https://en.wikipedia.org/wiki/Mobile_country_code) that are included in the Network resource."}}}}},"paths":{"/v1/Networks/{Sid}":{"get":{"description":"Fetch a Network resource.","tags":["SupersimV1Network"],"parameters":[{"name":"Sid","in":"path","description":"The SID of the Network resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supersim.v1.network"}}},"headers":{"Access-Control-Allow-Origin":{"description":"Specify the origin(s) allowed to access the resource","schema":{"type":"string"}},"Access-Control-Allow-Methods":{"description":"Specify the HTTP methods allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Headers":{"description":"Specify the headers allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"description":"Indicates whether the browser should include credentials","schema":{"type":"boolean"}},"Access-Control-Expose-Headers":{"description":"Headers exposed to the client","schema":{"type":"string"}}},"description":"OK"}},"operationId":"FetchNetwork"}}}}
```

***

## Read Multiple Network Resources

## GET /v1/Networks

> Retrieve a list of Network resources.

```json
{"openapi":"3.0.1","info":{"title":"KORE - Supersim","version":"1.0.0"},"tags":[{"name":"SupersimV1Network"}],"servers":[{"url":"https://supersim.api.korewireless.com"}],"security":[{"OAuth":[]}],"components":{"securitySchemes":{"OAuth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}},"schemas":{"supersim.v1.network":{"type":"object","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that we created to identify the Network resource."},"friendly_name":{"type":"string","nullable":true,"description":"A human readable identifier of this resource."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Network resource."},"iso_country":{"type":"string","nullable":true,"description":"The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resource."},"identifiers":{"type":"array","items":{},"nullable":true,"description":"Array of objects identifying the [MCC-MNCs](https://en.wikipedia.org/wiki/Mobile_country_code) that are included in the Network resource."}}}}},"paths":{"/v1/Networks":{"get":{"description":"Retrieve a list of Network resources.","tags":["SupersimV1Network"],"parameters":[{"name":"IsoCountry","in":"query","description":"The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read.","schema":{"type":"string"}},{"name":"Mcc","in":"query","description":"The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read.","schema":{"type":"string"}},{"name":"Mnc","in":"query","description":"The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read.","schema":{"type":"string"}},{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"networks":{"type":"array","items":{"$ref":"#/components/schemas/supersim.v1.network"}},"meta":{"properties":{"first_page_url":{"format":"uri","type":"string"},"key":{"type":"string"},"next_page_url":{"format":"uri","nullable":true,"type":"string"},"page":{"type":"integer"},"page_size":{"type":"integer"},"previous_page_url":{"format":"uri","nullable":true,"type":"string"},"url":{"format":"uri","type":"string"}},"type":"object"}},"title":"ListNetworkResponse"}}},"headers":{"Access-Control-Allow-Origin":{"description":"Specify the origin(s) allowed to access the resource","schema":{"type":"string"}},"Access-Control-Allow-Methods":{"description":"Specify the HTTP methods allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Headers":{"description":"Specify the headers allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"description":"Indicates whether the browser should include credentials","schema":{"type":"boolean"}},"Access-Control-Expose-Headers":{"description":"Headers exposed to the client","schema":{"type":"string"}}},"description":"OK"}},"operationId":"ListNetwork"}}}}
```

### More Read Examples

#### Read Network resources

{% tabs %}
{% tab title="Request" %}
{% code overflow="wrap" %}

```sh
curl -X GET "https://supersim.api.korewireless.com/v1/Networks?PageSize=20" --header "Authorization: Bearer <YOUR_AUTH_TOKEN>"
```

{% endcode %}
{% endtab %}

{% tab title="Response" %}

```json
{
	"meta": {
	    "page": 0,
	    "page_size": 20,
	    "first_page_url": "https://supersim.api.korewireless.com/v1/Networks?Page=0&PageSize=20",
	    "previous_page_url": null,
	    "url": "https://supersim.api.korewireless.com/v1/Networks?Page=0&PageSize=20",
	    "key": "networks",
	    "next_page_url": "https://supersim.api.korewireless.com/v1/Networks?Page=1&PageSize=20&PageToken=NTUxXzE"
	},
	"networks": [
	    {
		"sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"friendly_name": "T-Mobile",
		"iso_country": "US",
		"identifiers": [
		    {
			"mcc": "310",
			"mnc": "490"
		],
		"url": "https://supersim.api.korewireless.com/v1/Networks/HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
	    }
	]
}
```

{% endtab %}
{% endtabs %}

#### Read Network resources in a country

To filter down the list of networks to just those available in a given country, provide the ISO2 country code (e.g., "US" for the United States) as the `IsoCountry` query parameter.

{% tabs %}
{% tab title="Request" %}
{% code overflow="wrap" %}

```sh
curl -X GET "https://supersim.api.korewireless.com/v1/Networks?IsoCountry=US&PageSize=20" --header "Authorization: Bearer <YOUR_AUTH_TOKEN>"
```

{% endcode %}
{% endtab %}

{% tab title="Response" %}

```json
{
    "meta": {
        "page": 0,
        "page_size": 20,
        "first_page_url": "https://supersim.api.korewireless.com/v1/Networks?IsoCountry=US&&Page=0&PageSize=20",
        "previous_page_url": null,
        "url": "https://supersim.api.korewireless.com/v1/Networks?IsoCountry=US&&Page=0&PageSize=20",
        "key": "networks",
        "next_page_url": null
    },
    "networks": [
        {
            "sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "friendly_name": "T-Mobile",
            "iso_country": "US",
            "identifiers": [
                {
                    "mcc": "310",
                    "mnc": "490"
                },
                {
                    "mcc": "310",
                    "mnc": "240"
                },
                {
                    "mcc": "310",
                    "mnc": "220"
                },
                {
                    "mcc": "310",
                    "mnc": "230"
                },
                {
                    "mcc": "310",
                    "mnc": "310"
                },
                {
                    "mcc": "310",
                    "mnc": "210"
                },
                {
                    "mcc": "310",
                    "mnc": "200"
                },
                {
                    "mcc": "310",
                    "mnc": "260"
                },
                {
                    "mcc": "310",
                    "mnc": "270"
                },
                {
                    "mcc": "310",
                    "mnc": "160"
                },
                {
                    "mcc": "310",
                    "mnc": "250"
                }
            ],
            "url": "https://supersim.api.korewireless.com/v1/Networks/HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

#### Read Network resources by MCC-MNC

You can use the a cellular network's MCC-MNC to search for a specific network. For example, one of AT\&T US' MCC-MNCs is 310-410. You can use the `Mcc` and `Mnc` query parameters to search for the Network resource which represents AT\&T US.

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

```sh
curl -X GET "https://supersim.api.korewireless.com/v1/Networks?Mcc=310&Mnc=410&PageSize=20" \
--header "Authorization: Bearer <YOUR_AUTH_TOKEN>"
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "meta": {
        "page": 0,
        "page_size": 20,
        "first_page_url": "https://supersim.api.korewireless.com/v1/Networks?Mcc=310&Mnc=410&&Page=0&PageSize=20",
        "previous_page_url": null,
        "url": "https://supersim.api.korewireless.com/v1/Networks?Mcc=310&Mnc=410&&Page=0&PageSize=20",
        "key": "networks",
        "next_page_url": null
    },
    "networks": [
        {
            "sid": "HWd85b0262d6fc4c0b991bf8294596642e",
            "friendly_name": "AT&T",
            "iso_country": "US",
            "identifiers": [
                {
                    "mcc": "310",
                    "mnc": "170"
                },
                {
                    "mcc": "310",
                    "mnc": "280"
                },
                {
                    "mcc": "310",
                    "mnc": "410"
                },
                {
                    "mcc": "313",
                    "mnc": "100"
                },
                {
                    "mcc": "310",
                    "mnc": "380"
                },
                {
                    "mcc": "310",
                    "mnc": "030"
                },
                {
                    "mcc": "310",
                    "mnc": "150"
                }
            ],
            "url": "https://supersim.api.korewireless.com/v1/Networks/HWd85b0262d6fc4c0b991bf8294596642e"
        }
    ]
}
```

{% endtab %}
{% endtabs %}
