> ## 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.

# Pricing API

> Retrieve pricing information for voice, SMS, and phone numbers by country

Retrieve pricing rates for voice calls, SMS messages, and phone number rentals by country.

**API Endpoint**

```
https://api.plivo.com/v1/Account/{auth_id}/Pricing/
```

***

## The Pricing Object

### Attributes

<ParamField body="country" type="string">
  Name of the country.
</ParamField>

<ParamField body="country_code" type="integer">
  [Country calling code](https://countrycode.org/).
</ParamField>

<ParamField body="country_iso" type="string">
  [ISO 3166 Alpha-2 code](https://www.iban.com/country-codes) for the country.
</ParamField>

<ParamField body="message" type="object">
  Pricing for outbound and inbound messages, including network-specific rates.
</ParamField>

<ParamField body="phone_numbers" type="object">
  Pricing for local, mobile, national, and toll-free numbers. Includes monthly rental and setup fees by capability.
</ParamField>

<ParamField body="voice" type="object">
  Pricing for inbound and outbound voice calls. Split by local, toll-free, and IP. Includes prefix-wise rates.
</ParamField>

### Example Object

```json theme={null}
{
  "api_id": "7ff5505c-93ca-11e7-9bde-024427e23b8a",
  "country": "United States",
  "country_code": 1,
  "country_iso": "US",
  "message": {
    "inbound": {
      "rate": "0.00000"
    },
    "outbound": {
      "rate": "0.00350"
    },
    "outbound_networks_list": [
      {
        "group_name": "US",
        "rate": "0.00350"
      },
      {
        "group_name": "United States - AT&T Mobility",
        "rate": "0.00350"
      }
    ]
  },
  "phone_numbers": {
    "local": {
      "rate": "1.0000",
      "rates": [
        {
          "capabilities": ["voice", "sms"],
          "rental_rate": "1.00",
          "setup_rate": "0.50"
        },
        {
          "capabilities": ["voice"],
          "rental_rate": "1.00",
          "setup_rate": "0.00"
        }
      ]
    },
    "tollfree": {
      "rate": "1.00000",
      "rates": [
        {
          "capabilities": ["voice", "sms"],
          "rental_rate": "1.00",
          "setup_rate": "0.30"
        }
      ]
    }
  },
  "voice": {
    "inbound": {
      "ip": {
        "rate": "0.00300"
      },
      "local": {
        "rate": "0.00850"
      },
      "tollfree": {
        "rate": "0.02100"
      }
    },
    "outbound": {
      "ip": {
        "rate": "0.00300"
      },
      "local": {
        "rate": "0.00750"
      },
      "rates": [
        {
          "prefix": ["1"],
          "rate": "0.00750"
        }
      ],
      "tollfree": {
        "rate": null
      }
    }
  }
}
```

***

## Retrieve Pricing for a Country

Get pricing information for a specific country.

```
GET https://api.plivo.com/v1/Account/{auth_id}/Pricing/
```

### Arguments

<ParamField query="country_iso" type="string" required>
  Two-character [ISO country code](https://www.iban.com/country-codes). Example: `US` for United States.
</ParamField>

### Example

<CodeGroup>
  ```python Python theme={null}
  import plivo

  client = plivo.RestClient('<auth_id>', '<auth_token>')

  response = client.pricing.get(country_iso='US')
  print(response)
  ```

  ```javascript Node.js theme={null}
  const plivo = require('plivo');

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

  client.pricings.get('US')
      .then(response => console.log(response));
  ```

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

  client = Plivo::RestClient.new('<auth_id>', '<auth_token>')

  response = client.pricings.get('US')
  puts response
  ```

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

  $client = new RestClient('<auth_id>', '<auth_token>');

  $response = $client->pricings->get('US');
  print_r($response);
  ```

  ```java Java theme={null}
  import com.plivo.api.Plivo;
  import com.plivo.api.models.pricing.Pricing;

  Plivo.init("<auth_id>", "<auth_token>");

  Pricing response = Pricing.getter("US").get();
  System.out.println(response);
  ```

  ```csharp .NET theme={null}
  using Plivo;

  var api = new PlivoApi("<auth_id>", "<auth_token>");

  var response = api.Pricing.Get(countryIso: "US");
  Console.WriteLine(response);
  ```

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

  import (
      "fmt"
      "github.com/plivo/plivo-go/v7"
  )

  func main() {
      client, _ := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})

      response, _ := client.Pricings.Get("US")
      fmt.Println(response)
  }
  ```

  ```bash cURL theme={null}
  curl -i --user AUTH_ID:AUTH_TOKEN \
      "https://api.plivo.com/v1/Account/{auth_id}/Pricing/?country_iso=US"
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "api_id": "7ff5505c-93ca-11e7-9bde-024427e23b8a",
  "country": "United States",
  "country_code": 1,
  "country_iso": "US",
  "message": {
    "inbound": {
      "rate": "0.00000"
    },
    "outbound": {
      "rate": "0.00350"
    },
    "outbound_networks_list": [
      {
        "group_name": "US",
        "rate": "0.00350"
      }
    ]
  },
  "phone_numbers": {
    "local": {
      "rate": "0.80000"
    },
    "tollfree": {
      "rate": "1.00000"
    }
  },
  "voice": {
    "inbound": {
      "ip": {
        "rate": "0.00300"
      },
      "local": {
        "rate": "0.00850"
      },
      "tollfree": {
        "rate": "0.02100"
      }
    },
    "outbound": {
      "ip": {
        "rate": "0.00300"
      },
      "local": {
        "rate": "0.00750"
      },
      "rates": [
        {
          "prefix": ["1"],
          "origination_prefix": [""],
          "rate": "0.00750"
        }
      ],
      "tollfree": {
        "rate": null
      }
    }
  }
}
```
