Service prices by country
Compare service prices and availability across countries and operators.
Authentication
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
apikey | header | string | Yes | Your API key |
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
service | path | string | Yes | Service code. Services list (pattern: "^opt[0-9]{1,8}$") |
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 prices and available numbers for one service across countries and operators. Once you have chosen an option, use those codes with Get number by operator.
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/serviceprices/opt20?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 |
| 405 | Invalid parameters |
HTTP 200
Successful operation
Illustrative response
{
"statusCode": 200,
"data": {
"scode": "opt20",
"sname": "WhatsApp",
"clist": [
{
"ccode": "UK",
"cname": "United Kingdom",
"opers": [
{
"opcode": "DonorAlpha_UK",
"price": 0.65,
"count": 9999
}
]
}
]
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
data | object | Response data |
data.scode | string | Service code. |
data.sname | string | Service name. |
data.clist | array<object> | Countries and operators available for the service. |
data.clist[].ccode | string | Country code. |
data.clist[].cname | string | Country name. |
data.clist[].opers | array<object> | |
data.clist[].opers[].opcode | string | Operator code. It can be a regular SMSpva operator or a donor operator from an external provider. |
data.clist[].opers[].price | number | Operator price. (format: "float") |
data.clist[].opers[].count | integer | Available numbers count. For donor operators, 9999 means that the exact count is unknown and availability may be effectively unlimited. |
HTTP 405
Invalid parameters
Illustrative response
{
"statusCode": 405,
"error": {
"type": "INVALID_PARAMS",
"description": "Invalid params."
}
}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.