SMSPVAdevelopers
Rental API
SMSPVA / DOCUMENTATION

Countries by service

GET /api/rent.php?method=get_country_by_service

SMSPVA API
GEThttps://smspva.com/api/rent.php?method=get_country_by_service

Send a GET request and check status in the JSON response: 1 means success and 0 means failure, even with HTTP 200. If it fails, read msg for the reason.

Authentication

You can call this method without an API key.

Parameters

NameLocationTypeRequiredExampleDescription
methodquerystringYes"get_country_by_service"Method name
servicequerystringYes"opt20"Service code Services list
dtypequerystringYes"week"Type of period: week or month
dcountqueryintegerNo1Count type of period, i.e. if dtype=week then counts of weeks Defaults to 1 when omitted.

How to use this method

Find countries that support your rental service and dtype. After choosing one, compare providers with Data by provider, using the same service and duration.

Request examples

Environment and dependencies. Each example encodes query values and allows 30 seconds for the request. Check HTTP and JSON status before using data. cURL prints the response for you to check; Java uses Jackson to read the JSON.

curl --get --fail-with-body --max-time 30 "https://smspva.com/api/rent.php" \
  --data-urlencode "method=get_country_by_service" \
  --data-urlencode "service=opt20" \
  --data-urlencode "dtype=week" \
  --data-urlencode "dcount=1"

Responses

Check the response that matches your request. Example values and dates are illustrative. Optional fields can depend on the outcome or the response format you selected.

HTTP 200

Success

application/json

Illustrative response

{
  "status": 1,
  "data": {
    "<key>": {
      "service_name": "Fiverr",
      "price": "0.20",
      "procent_days": "30",
      "procent": "30",
      "day_step": "0.00",
      "country": "KZ",
      "phoneAmount": 79
    }
  }
}
NameTypeDescription
statusintegerStatus of the response: 1 for success, 0 for failure
dataobject
data.*object
data.*.service_namestring
data.*.pricestring
data.*.procent_daysstring
data.*.procentstring
data.*.day_stepstring
data.*.countrystring
data.*.phoneAmountinteger
msgstringError message when status is 0.

On this page