SMSPVAdevelopers
Rental API
SMSPVA / DOCUMENTATION

Rental orders

GET /api/rent.php?method=orders

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

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

Send apikey as a required query parameter.

Parameters

NameLocationTypeRequiredExampleDescription
methodquerystringYes"orders"Method name
apikeyquerystringYesSMSPVA_API_KEYYour API key You can find it on the website in the top right drop-down menu in the Profile and APIKEY section

How to use this method

View your active rentals, their current state and extension options. Use an order’s ID to activate, read SMS or extend it. Completed rentals and restoration eligibility are in Rental history.

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.

: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
curl --get --fail-with-body --max-time 30 "https://smspva.com/api/rent.php" \
  --data-urlencode "method=orders" \
  --data-urlencode "apikey=$SMSPVA_API_KEY"

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": [
    {
      "id": 40300,
      "scode": "opt16",
      "sname": "Instagram",
      "state": 0,
      "pnumber": "9096068511",
      "ccode": "+7",
      "cname": "KZ",
      "hasnewsms": false,
      "until": 1587552240,
      "canprolong": true,
      "canprolongmax": 162,
      "canprolonguntil": 1634883780,
      "lastonline": 1586947920
    }
  ]
}
NameTypeDescription
statusintegerStatus of the response: 1 for success, 0 for failure
dataarray<object>
data[].idintegerID of order
data[].scodestringService code Services list
data[].snamestringService name
data[].stateintegerOrder state: 0 - not active, 1 - active, 2 - activating, -1 - not in system
data[].pnumberstringPhone number without country code
data[].ccodestringDigital country code
data[].cnamestringCountry code of number Countries list
data[].hasnewsmsbooleanNew SMS received for this order
data[].untilintegerUNIX timestamp of expire date
data[].canprolongbooleanIs this order available for prolongation?
data[].canprolongmaxintegerMaximum number of days available for prolongation. This is the limit - you cannot extend beyond this number of days.
data[].canprolonguntilintegerUnix timestamp showing the deadline until which you can prolong the order. After this date, prolongation is not available.
data[].lastonlineintegerUnix timestamp of last online date of number

On this page