Service price
Read the price of one country and service, including operator prices.
Authentication
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
apikey | header | string | Yes | Your API key |
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
country | path | string | Yes | Country 2 symbols name in ISO 3166-2 format, uppercase. Countries list |
service | path | string | Yes | Service code. Services list |
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
Get the price for one country and service, including the prices in priceByOperators. Choose codes from the reference lists, check availability, or compare other countries.
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/BD/opt0?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 country or service parameter. |
HTTP 200
Successful operation
Illustrative response
{
"statusCode": 200,
"data": {
"service": "opt0",
"serviceDescription": "myopinions & erewards",
"country": "KZ",
"price": "2.34",
"priceByOperators": {
"Other_KZ": "0.39",
"Activ_KZ": "0.39"
}
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | Result status code |
data | object | Response data |
data.service | string | Service |
data.serviceDescription | string | Service description. |
data.country | string | Country |
data.price | string | Price. |
data.priceByOperators | object | Prices grouped by mobile operator. |
data.priceByOperators.* | string |
HTTP 405
Invalid country or service parameter.
Illustrative response
{
"statusCode": 405,
"error": {
"type": "INVALID_PARAMS",
"description": "Invalid params"
}
}Response fields
| Name | Type | Description |
|---|---|---|
statusCode | integer | |
error | object | |
error.type | string | |
error.description | string |
Related guides
If a connection fails during an order-changing request, check the order before trying again.