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

Close virtual phone number rent operation

This request closes the specified rental operation (except for US number rentals — they can be closed only upon expiration of the operation term).

Security

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

Parameters

query2
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

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 closeRentNum request: the server closes the current rental operation and returns information for it or throws an exception

Content-Typeapplication/json
Schema
schemaoneOf

Successful closure of the rental operation, specific or a common error

One Of
[0]object
[1]object
[2]object

Examples

Rental operation successfully closed

Successful closure of the rental operation

{
  "response": "1"
}
No active rental operations

No active rentals operations

{
  "response": "ERROR_NO_OPERATIONS"
}
Unable to close the specified rental operation

Closure during the protective interval is unavailable: while there is no SMS and 120 seconds have not passed since the start (the rental is still awaiting activation); also always returned when trying to close a US rental number

{
  "response": "NO_COMPLETE_TZID"
}

Code Samples

Generating examples...