Country operator prices
Compare service and operator prices within a country.
Authentication
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
apikey | header | string | Yes | Your API key |
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
country | path | string | Yes | Country code |
voice | query | integer | No | Number type: 0 - SMS, 1 - caller-ID, 2 - voice call. Defaults to 0. (enum: [0,1,2]; default: 0) |
No request body is required.
How to use this method
Compare service prices and individual operator prices within one country. Check number counts and operator codes before requesting a number.
The list can include SMSPVA operators and donor operators, such as DonorAlpha_UK. Use either code in the same way. Donor numbers come from external providers and may be less consistent than SMSPVA’s own real SIM cards. A donor count of 9999 means the exact quantity is unknown; availability may be effectively unlimited.
Request examples
Runtime requirements and environment setup. cURL uses a POSIX shell. JavaScript and TypeScript run in Node.js. Java uses the standard HTTP client and prints raw JSON; use your application’s JSON library to inspect the body.
: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
curl --fail-with-body --max-time 30 --request GET \
--url "https://api.smspva.com/activation/serviceprice/UK?voice=0" \
--header "apikey: $SMSPVA_API_KEY"Responses
The examples below show the response format. Prices, stock and account values are sample data; use the API response for current values.
| HTTP | Description |
|---|---|
| 200 | Successful operation |
| 400 | No ApiKey found |
HTTP 200
Successful operation
Illustrative response
{
"statusCode": 200,
"data": [
{
"s": "opt0",
"sd": "myopinions & erewards",
"c": "UK",
"p": "0.58",
"po": {
"Hutchison_UK": "0.58",
"ASDA_UK": "0.58",
"Vodafone_UK": "0.65"
}
}
]
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
data | array<object> | Response data |
data[].s | string | Service code |
data[].sd | string | Service description |
data[].c | string | Country code |
data[].p | string | Base price for the service |
data[].po | object | Map of operator names to their prices for this service |
data[].po.* | string | Operator price |
HTTP 400
No ApiKey found
Illustrative response
{
"statusCode": 400,
"error": {
"type": "APIKEY_NOT_SET",
"description": "No ApiKey found"
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
error | object | Error data |
error.type | string | Error type |
error.description | string | Error description |
Related guides
If a connection fails during an order-changing request, check the order before trying again.