SMSPVAdevelopers
Rental API
SMSPVA / DOCUMENTATION

Counts by provider

GET /api/rent.php?method=getCountWithProviders

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

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

The apikey query parameter is optional. Omit it for public data; set it for account-specific data or pricing where documented.

Parameters

NameLocationTypeRequiredExampleDescription
methodquerystringYes"getCountWithProviders"Method name
apikeyquerystringNo(optional)Optional API key. When supplied, it may affect personalized rental data.
countryquerystringYes"KZ"Country code of number Countries list
dtypequerystringNo"week"Type of period: week or month Defaults to week when omitted.
dcountqueryintegerNo1Count type of period, i.e. if dtype=week then counts of weeks Defaults to 1 when omitted.

How to use this method

Compare stock by service and provider. For each service code, Amount maps provider names to counts and Total gives the combined number. Read these keys from the response: both service codes and provider names can change.

Check JSON status even with HTTP 200. If it is 0, read the error in msg.

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.

# Optional: add --data-urlencode "apikey=$SMSPVA_API_KEY" for account-specific data.
curl --get --fail-with-body --max-time 30 "https://smspva.com/api/rent.php" \
  --data-urlencode "method=getCountWithProviders" \
  --data-urlencode "country=KZ" \
  --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": {
    "opt48": {
      "Amount": {
        "Limbo_AT": 12,
        "Tele2_AT": 1,
        "yesss_AT": 69
      },
      "Total": 82
    }
  }
}
NameTypeDescription
statusintegerStatus of the response: 1 for success, 0 for failure
dataobjectService codes mapped to provider counts and totals.
data.*object
data.*.AmountobjectProvider names mapped to available number counts.
data.*.Amount.*integer
data.*.TotalintegerTotal available numbers for the service.
msgstringError message when status is 0.

On this page