> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List all toll-free numbers

> List all toll-free numbers in a Powerpack number pool

This API fetches a list of all toll-free numbers from a number pool based on the number pool UUID specified in the resource URI.

#### API Endpoint

```text GET theme={null}
https://api.plivo.com/v1/Account/{auth_id}/NumberPool/{number_pool_uuid}/Tollfree/
```

### Arguments

<div class="alert alert-info">No arguments need to be passed.</div>

### Returns

This API returns the list of toll-free numbers from the number pool.

The API response contains a `meta` field with the following fields:

* `limit`: The size of the page returned in the response.
* `next`: The URL that points to the next page of results. (Currently this will be blank because only one toll-free can be present in a number pool.)
* `offset`: The offset for the page returned in the response.
* `previous`: The URL that points to the previous page of results. (Currently this will be blank because only one toll-free can be present in a number pool.)
* `total_count`: The total number of records that match the specified filters. (Currently this is always 1.)

<RequestExample>
  ```py Python theme={null}
  import plivo

  client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")
  # List all Tollfree in a Powerpack
  powerpack = client.powerpacks.get(uuid='<powerpack_uuid>')
  # Version 1
  response = powerpack.list_tollfree()
  # Version 2
  response = powerpack.numberpool.tollfree.list()
  print(response)
  ```

  ```ruby Ruby theme={null}
  require 'rubygems'
  require 'plivo'

  include Plivo
  include Plivo::Exceptions

  api = RestClient.new("<auth_id>", "<auth_token>")

  begin
  # List all tollfree numbers
  powerpack = api.powerpacks.get('<powerpack_uuid>')
  # Version 1
  response = powerpack.list_tollfree()  
  # Version 2
  response = response.numberpool.tollfree.list()

  puts(response)
  rescue PlivoRESTError => e
  puts 'Exception: ' + e.message
  end
  ```

  ```js Node theme={null}
  let plivo = require('plivo');

  let client = new plivo.Client('<auth_id>', '<auth_token>');

  // List all Tollfree in a Powerpack
  client.powerpacks.get("<powerpack_uuid>").then(
    function (powerpack) {
      return powerpack.list_tollfree()
      // return powerpack.number_pool.tollfree.list()  V2
    })
  .then(function (result) {
    console.log(result)
  })
  ```

  ```php PHP theme={null}
  <?php
  require 'vendor/autoload.php';
  use Plivo\RestClient;

  $client = new RestClient("<auth_id>", "<auth_token>");
  $client->client->setTimeout(40);

  // List all Tollfree in a Powerpack
      try {
      $powerpack = $client->powerpacks->get("<powerpack_uuid>");
      // Version 1
      $response = $powerpack->list_tollfree();
      // Version 2
      $response = $powerpack->number_pool->tollfree->list();
      print_r($response);
      } 
      catch (PlivoRestException $ex) {
          print_r($ex);
      }
  ```

  ```java Java theme={null}
  package com.plivo.api;

  import java.io.IOException;
  import com.plivo.api.Plivo;
  import com.plivo.api.exceptions.PlivoRestException;
  import com.plivo.api.models.powerpack.Powerpack;
  import com.plivo.api.models.powerpack.Tollfree;
  import com.plivo.api.models.base.ListResponse;


  public class Test {
          
  public static void main(String[] args) {
          
      Plivo.init("<auth_id>", "<auth_token>");

          // List all Tollfree in a Powerpack
          try {
              Powerpack powerpack = Powerpack.getter("<powerpack_uuid>").get();
              // Version 1
              ListResponse<Tollfree> response = powerpack.list_tollfree().list();
              //Version 2
              ListResponse<Tollfree> response = powerpack.numberpool.tollfree.list().list();
          } catch (PlivoRestException | IOException e) {
              e.printStackTrace();
          }
      }
  }
  ```

  ```csharp .NET theme={null}
  using System;
  using System.Collections.Generic;
  using Plivo;
  using Plivo.Exception;

  namespace PlivoExamples
  {
      class Program
      {
          static void Main(string[] args)
          {
              var api = new PlivoApi("<auth_id>","<auth_token>");

              // List all Tollfree in a Powerpack
              try
              {
                  var powerpack = api.Powerpacks.Get("<powerpack_uuid>");
                  // Version 1
                  var response = powerpack.List_Tollfree();
                  // Version 2
                  var response = powerpack.numberpool.tollfree.List();
                  Console.WriteLine(response);
              }
              catch (PlivoRestException e)
              {
                  Console.WriteLine("Exception: " + e.Message);
              }
          }
      }
  }
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"

  	plivo "github.com/plivo/plivo-go/v7"
  )

  func main() {

  	client, err := plivo.NewClient("<auth_id>", "<auth_token>",
  		&plivo.ClientOptions{})
  	if err != nil {
  		fmt.Print("Error", err.Error())
  		return
  	}

  	// List all Tollfree in a Powerpack
  	powerpack, err := client.Powerpack.Get("<powerpack_uuid>")
  	if err != nil {
  		fmt.Print("Error", err.Error())
  		return
  	}
  	response, err := powerpack.List_tollfree()
  	if err != nil {
  		fmt.Print("Error", err.Error())
  		return
  	}
  	fmt.Printf("Response: %#v\n", response)
  }
  ```

  ```sh cURL theme={null}
  ```
</RequestExample>

### Response

```json theme={null}
{
  "api_id": "06c15d7c-7ed5-11ea-855f-0242ac110003",
  "meta": {
    "limit": 20,
    "next": "",
    "offset": 0,
    "previous": "",
    "total_count": 1
  },
  "objects": [
    {
      "account_phone_number_resource": "/v1/Account/{auth_id}/Number/{your_tollfree_number}/",
      "added_on": "2022-10-09T11:24:35.085797Z",
      "country_iso2": "US",
      "number": "{your_tollfree_number}",
      "number_pool_uuid": "{number_pool_uuid}",
      "service": "mms",
      "type": "tollfree"
    }
  ]
}
```
