GEThttps://onlinesim.io/api/rent/extendRentState.php

Extend virtual phone number rent

Extends a rent for a specified period (in days).

This request is needed when your rental period is about to expire, but you plan to continue using it.

Security

OAuth2
rent-scope
grants access to renting phone numbers from Onlinesim

Parameters

query3
NameTypeDescription
tzid*string

Operation ID returned by the server when issuing a number (in response to getNum or getRentNum). The list of active operations on your profile with their IDs can also be obtained via getState or getRentState

days*integer

Extention period for rental number (in days). Can only accept values listed in extend section of getRentState

langstring

Response language:

fr - French,

de - German,

ru - Russian,

en - English,

zh - Chinese.

Please note that the translation applies only to string field values, such as service names or country names. Field names themselves, error messages, and standard values (for example, true/false for boolean fields) remain in English

Enum:frderuenzhDefault:ru

Responses

200

Successful response for extendRentState request: extends the rent of a number with requested parameters or throws an exception

Content-Typeapplication/json
Schema
schemaoneOf

Successful rental renewal or a common error. The TRY_AGAIN_LATER error may also be returned when incorrect values are passed in the tzid and days parameters, or when trying to renew an already closed operation

One Of
[0]object
[1]object

Examples

Virtual number rental was successfully renewedexample_lines

Number rental was successfully renewed

{
  "response": 1,
  "item": {
    "status": 1,
    "extension": 1,
    "messages": {
      "current_page": 1,
      "data": [],
      "from": 1,
      "last_page": 1,
      "per_page": 20,
      "to": 1,
      "total": 0
    },
    "sum": 251.5,
    "country": 7,
    "checked_time": "2022-07-17 21:41:20",
    "number": "9915584307",
    "rent": 4,
    "tzid": 22867974,
    "time": 5750,
    "days": 3,
    "hours": 95,
    "extend": {
      "1": 36,
      "3": 108,
      "7": 252,
      "15": 540,
      "30": 1080
    },
    "checked": true,
    "reload": 0,
    "day_extend": 36,
    "m_ext": false,
    "freeze": false
  }
}
Invalid values were passed in the parameters or the operation is already closed

Invalid values were passed in the tzid or days parameters, or the operation is already closed

{
  "response": "TRY_AGAIN_LATER"
}

Code Samples

Generating examples...