Close virtual phone number rent operation
GEThttps://onlinesim.io/api/rent/closeRentNum.php
This request closes the specified rental operation (except for US number rentals — they can be closed only upon expiration of the operation term).
A rent that waits for the first SMS (status 0) can be closed 120 seconds after the start, or at once
after any SMS; its reservation is released. A notice about a prohibited sender (service notify) does not
confirm the rent, so such a rent is also closed with the reservation released. A confirmed rent is closed
without a refund. If a real SMS has come but the rent still has status 0, the rent is confirmed (the
price is charged, no refund) and closed; the answer is "1".
POST with the same parameters works too.
Security
Parameters
query2
| Name | Type | Description |
|---|---|---|
tzid* | integer | Rent operation ID. Without it the answer is |
lang | string | Language of the texts in the answer (country and service names, status texts): Enum: frderuenzh |
Responses
200"1" or an error
application/jsonschemaoneOf
[0]object
[1]object
[2]object
Examples
Successful closure of the rental operation
{
"response": "1"
}No active rentals operations
{
"response": "ERROR_NO_OPERATIONS"
}The rent waits for the first SMS and 120 seconds have not passed since the start
{
"response": "NO_COMPLETE_TZID"
}A US number cannot be closed early
{
"response": "NO_CLOSE_RENT_US"
}429HTTP 429: more than 400 requests per minute from one profile (from one IP for requests without a key), or more than 200 requests per minute from one profile to getNum, getPrice, getState and setOperationOk together
application/jsonschemaobject
Examples
Request rate limit exceeded
{
"response": "TRY_AGAIN_LATER"
}456HTTP 456: the API key is invalid or the OAuth token has expired. Public methods answer the same way when an invalid key is sent
application/jsonschemaobject
Examples
Invalid API key or expired token
{
"response": "ERROR_WRONG_KEY"
}