Account: Pricing

You use this API to retrieve the outbound:

Pricing for a given country

The request to retrieve our outbound pricing for a given country is:

GET /account/get-pricing/outbound/{api_key}/{api_secret}/{country}
GET /account/get-pricing/outbound?api_key={api_key}&api_secret={api_secret}&country={country}

The parameters to use in the request are:

Parameter Description Required
country A 2 letter country code. For example, CA Yes

Response format

The following table shows example responses in JSON or XML:

JSON XML
{
    "country":country-code,
    "name": country-name,
    "prefix": prefix,
    "mt": mt,
    "networks":
      [
      {
        "code":code,
        "network":network,
        "mtPrice":mtPrice
      }
      ]
}

<outbound-country-pricing>
    <country>country-code</country>
    <name>country-name</name>
    <prefix>prefix</prefix>
    <mt>mt</mt>
      <networks>
        <network>
          <code>code</code>
          <name>name</name>
          <mtPrice>mtPrice</mtPrice>
        </network>
      </networks>
</outbound-country-pricing>

Response parameters

The response contains the following keys and values:

Key Value
country-code Country code. Ex: ES
country-name The corresponding country name Ex: Spain
prefix The international calling prefix Ex: 44
mt Default price for outbound message in Euro Ex: 0.035. For voice calls this is the price-per-minute.
networks Supported networks
code Network operator MCCMNC. Ex: 23450
network Network operator name. Ex: Jersey Telecom
mtPrice Price for outbound message in Euro Ex: 0.035

Example

The request and response to retrieve our outbound pricing for a country look like:

Request:

curl -H "Accept: application/json" https://rest.nexmo.com/account/get-pricing/outbound/{api_key}/{api_secret}/ES

Response:

{
  "country": "ES",
  "name": "Spain",
  "prefix": "34",
  "mt": "0.06000000",
  "networks": [
    {
      "code": "21425",
      "network": "Lycamobile, S.L.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21407",
      "network": "Movistar",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21408",
      "network": "Euskaltel, S.A.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21427",
      "network": "SCN Truphone, S.L.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21418",
      "network": "Vodafone ONO, S.A. Unipersonal",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21419",
      "network": "Simyo",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21429",
      "network": "Masmovil Ibercom, S.A.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21403",
      "network": "Orange Espana, S.A. Unipersonal",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21416",
      "network": "Telecable de Asturias, S.A.U.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21404",
      "network": "XFERA Moviles, S.A.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21417",
      "network": "R Cable y Telecomunicaciones Galicia, S.A.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21401",
      "network": "Vodafone",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21410",
      "network": "Operadora de Telecomunicaciones Opera, S.l.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21420",
      "network": "Parlem Telecom Companyia De Telecomunicacions, S.L",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21421",
      "network": "Jazz Telecom, S.A.U.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21422",
      "network": "Digi Spain Telecom, S.L.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21432",
      "network": "Tuenti Technologies, S.L.",
      "mtPrice": "0.06500000"
    },
    {
      "code": "21423",
      "network": "Vectone",
      "mtPrice": "0.06500000"
    }
  ],
  "countryDisplayName": "Spain"
}

Prices for a product in a given country

The request to retrieve our outbound pricing for a given country is:

GET /account/get-pricing/outbound/{product}/{api_key}/{api_secret}/{country}
GET /account/get-pricing/outbound/{product}?api_key={api_key}&api_secret={api_secret}&country={country}

The parameters to use in the request are:

Parameter Description Required
product Either sms or voice. Yes
country A 2 letter country code. For example, CA Yes

Response format

The following table shows example responses in JSON or XML:

JSON XML
{
  "dialingPrefix": "34",
  "defaultPrice": "0.06000000",
  "currency": "EUR",
  "countryDisplayName": "Spain",
  "countryCode": "ES",
  "countryName": "Spain",
  "networks": [
    {
      "type": "mobile",
      "price": "0.06500000",
      "currency": "EUR",
      "ranges": [
        34612,
        34631,
        34632,
        346020,
        346021,
        346023,
        346028
      ],
      "mnc": "25",
      "mcc": "214",
      "networkCode": "21425",
      "networkName": "Lycamobile, S.L."
      }
    ]
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<outbound-country-pricing>
    <country-code>ES</country-code>
    <country-name>Spain</country-name>
    <dialing-prefix>34</dialing-prefix>
    <default-price>0.06000000</default-price>
    <currency>EUR</currency>
    <networks>
        <network>
            <network-code>21425</network-code>
            <network-name>Lycamobile, S.L.</network-name>
            <type>mobile</type>
            <price>0.06500000</price>
            <currency>EUR</currency>
            <ranges>
                <range>34612</range>
                <range>34631</range>
                <range>34632</range>
                <range>346020</range>
                <range>346021</range>
                <range>346023</range>
                <range>346028</range>
            </ranges>
            <mcc>214</mcc>
            <mnc>25</mnc>
        </network>
        </networks>
    </outbound-country-pricing>

Response parameters

The response contains the following keys and values:

Key Value XML or JSON
dialing-prefix The international calling prefix Ex: 44 XML
dialingPrefix The international calling prefix Ex: 44 JSON
currency The currency you are charged in Both
country-code Country code. For example, ES XML
countryCode Country code. For example, ES JSON
country-name The full country name for country-code XML
countryName The full country name for countryCode JSON
countryDisplayName The corresponding country name Ex: Spain JSON
default-price The default price for outbound message in currency XML
defaultPrice The default price for outbound message in currency JSON
networks Supported networks in the country BOTH
  The following keys are for each network in networks  
network Information about a specific network XML
code Network operator MCCMNC. Ex: 23450 BOTH
network Network operator name. Ex: Jersey Telecom BOTH
type The network type BOTH
price The default price for outbound message in currency BOTH
currency The currency you are charged in BOTH
ranges The numbering plan ranges available with network. BOTH
mnc The MNC for this network. BOTH
mcc The MCC for this network. BOTH
network-code The MCCMNC for this network. XML
networkCode The MCCMNC for this network. JSON
network-name The full name for this network XML
networkName The full name for this network JSON

Example

The request and response to retrieve our outbound pricing for a country look like:

Request:

curl -H "Accept: application/json" https://rest.nexmo.com/account/get-pricing/outbound/sms/{api_key}/{api_secret}/ES

Response:

{
  "dialingPrefix": "34",
  "defaultPrice": "0.06000000",
  "currency": "EUR",
  "countryDisplayName": "Spain",
  "countryCode": "ES",
  "countryName": "Spain",
  "networks": [
    {
      "type": "mobile",
      "price": "0.06500000",
      "currency": "EUR",
      "ranges": [
        34612,
        34631,
        34632,
        346020,
        346021,
        346023,
        346028
      ],
      "mnc": "25",
      "mcc": "214",
      "networkCode": "21425",
      "networkName": "Lycamobile, S.L."
    },
    {
      "type": "mobile",
      "price": "0.06500000",
      "currency": "EUR",
      "ranges": [
        34744,
        346022,
        346844
      ],
      "mnc": "23",
      "mcc": "214",
      "networkCode": "21423",
      "networkName": "Vectone"
    }
  ]
}

Pricing for a given prefix

The request to retrieve our outbound pricing for a given international prefix is:

GET /account/get-prefix-pricing/outbound/{api_key}/{api_secret}/{prefix}
GET /account/get-prefix-pricing/outbound?api_key={api_key}&api_secret={api_secret}&prefix={prefix}

The parameters to use in the request are:

Parameter Description Required
prefix An international dialing code. For example, 44. Yes

Response format

The following table shows example responses in JSON or XML:

JSON XML
{
"count":count,
"prices":[
 {
 "country":country-code,
 "name": country-name,
 "prefix": prefix,
 "mt": mt,
 "networks":
   [
   {
     "code":code,
     "network":network,
     "mtPrice":mtPrice
   }
   ]
 }
]
}

<?xml version='1.0' encoding='UTF-8' standalone="yes"?>
<outbound-pricing>
 <countr>count</count>
 <prices>
 <country>country-code</country>
 <name>country-name</name>
 <prefix>prefix</prefix>
 <mt>mt</mt>
  <networks>
    <network>
      <code>code</code>
      <name>name</name>
      <mtPrice>mtPrice</mtPrice>
    </network>
  </networks>
 </prices>
</outbound-pricing>

Example

The request and response to retrieve our outbound pricing for in international prefix look like:
Request:

curl -H "Accept: application/json" https://rest.nexmo.com/account/get-prefix-pricing/outbound/{api_key}/{api_secret}/352

Response:

{
  "count": 1,
  "prices": [
    {
      "mt": "0.01100000",
      "country": "LU",
      "prefix": "352",
      "networks": [
        {
          "network": "LUXGSM",
          "code": "27001",
          "mtPrice": "0.01100000"
        },
        {
          "network": "Orange",
          "code": "27099",
          "mtPrice": "0.01100000"
        },
        {
          "network": "TANGO",
          "code": "27077",
          "mtPrice": "0.01100000"
        },
        {
          "network": "Unknown Luxembourg",
          "code": "27000",
          "mtPrice": "0.01100000"
        }
      ],
      "name": "Luxembourg"
    }
  ]
}

Pricing for a given phone number

The request to retrieve our outbound pricing for a given phone number is:

GET /account/get-phone-pricing/outbound/{product}/{api_key}/{api_secret}/{phone}
GET /account/get-phone-pricing/outbound/{product}?api_key={api_key}&api_secret={api_secret}&phone={phone}

The parameters to use in the request are:

Parameter Description Required
product Either sms or voice. Yes
phone A phone number in international format. For example, phone=447525856424. You can only use one phone number per request Yes

Response format

The following table shows example responses in JSON or XML:

JSON XML
{
  "country-code": "country-code",
  "network-code": "network-code",
  "phone": "phone",
  "price": "price"
}
<?xml version='1.0' encoding='UTF-8' standalone="yes"?>
    <outbound-pricing>
         <country-code>country-code</country-code>
         <network-code>network-code</network-code>
         <phone>phone</phone>
         <price>price</price>
    </outbound-pricing>

Example

The request and response to retrieve our outbound pricing for a single number look like:
Request:

curl -H "Accept: application/json" https://rest.nexmo.com/account/get-phone-pricing/outbound/sms/{api_key}/{api_secret}/441632960960

Response:

{
  "network": "GB-FIXED",
  "phone": "441632960960",
  "country-code": "GB",
  "price": "0.05850000"
}
Previous   Next