SMSPVAdevelopers
Rental API
SMSPVA / DOCUMENTATION

Rental data

GET /api/rent.php?method=getdata

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

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"getdata"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.
extendquerystringNo"1"Set to 1 to include procent_days, procent and day_step pricing settings in each service entry.

How to use this method

Look up service prices and available numbers for your country and rental duration. Set dtype to week or month, and dcount to the number of periods.

Service entries include names, codes, daily prices, counts and icon paths; data.totalAmount gives the total. Add extend=1 to include the pricing settings procent_days, procent and day_step. Check JSON status: 0 means the request failed, with details in msg, even if HTTP is 200.

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=getdata" \
  --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": {
    "services": [
      {
        "name": "Airbnb",
        "service": "opt46",
        "price_day": 6,
        "count": 359,
        "img": "images/ico/whatsapp.png",
        "procent_days": 0,
        "procent": 0,
        "day_step": 0
      }
    ],
    "totalAmount": 100
  }
}
NameTypeDescription
statusintegerStatus of the response: 1 for success, 0 for failure
dataobject
data.servicesarray<object>
data.services[].namestringService name
data.services[].servicestringService code Services list
data.services[].price_daynumberPrice per day
data.services[].countintegerAvailable count
data.services[].imgstringService icon path.
data.services[].procent_daysintegerNumber of days for discount Returned with extend=1.
data.services[].procentintegerDiscount percentage Returned with extend=1.
data.services[].day_stepnumberDay step for pricing Returned with extend=1.
data.totalAmountintegerTotal count of available numbers for all services
msgstringError message when status is 0.

On this page