post GET_NUMBER (RENT)
https://{yourserver.com}/getNumberRent
This request creates a new rent operation, which will allow to use a number to receive SMS from any service and other mobile numbers for a long period of time (from 1 day up to several months). DO NOT CLOSE an operation before FINISH_ACTIVATION
request.
IMPORTANT NOTE! You can either create a new endpoint for rent orders only or use the same GET_NUMBER endpoint as for single-service activations (v1). However in the latter case you need to modify it so your server could create the rental operation correctly.
IMPORTANT NOTE! Your server must issue a number for rent with specified parameters within 10 seconds of the request. Otherwise current request will be cancelled.
If number won't receive SMS within 20 minutes after operation is created, the operation will be cancelled automatically, making it available for another operation. If number fails 3 consecutive operations to receive SMS within 20 minutes, it will be banned by our server. These bans are lifted automatically every 24 hours.
Rent can be prolonged by the client, but the income is CREDITED UPON OPERATION CLOSING (upon rent expiration or termination).
IMPORTANT NOTE! We're blocking messages from banks, payment systems and credit institutions to prevent any legal consequences for our partners that might be caused by unscrupulous customers. At the same time long term rental does not support any exceptions for services as we don't know beforehand which service may or may not be used by our clients. Please keep in mind that ANY BLACKLISTED SERVICES YOU MAY ADD FOR SINGLE-SERVICE ACTIVATIONS WILL NOT BE APPLIED FOR RENT.
IMPORTANT NOTE! You will have to implement a fucntionality for number's mask exception for rent (same as for regular SMS receiving): optional parameter
exceptionPhoneSet
might contain an array with exception set. When one does, your server should exclude numbers with matching patters from issuing them. For example, if [46950] value is passed, your server should not issue numbers of Sweden for rent that start with +46950*
Parameters
Global params
Request Body
- Schema
- Examples
- objectExample:
{"action":"GET_NUMBER","key":"string","country":"germany","operator":"any","service":"rent","sum":320,"exceptionPhoneSet":[46950]}
Properties:action
stringRequiredMethod name, in this case `GET_NUMBER`Example:"GET_NUMBER"
Enum:GET_NUMBER
key
stringRequiredAPI key of your Onlinesim partner's profileExample:"string"
country
stringRequiredCountry name, enum (country list)
Example:"germany"
operator
stringRequiredOperator name (for examples take a look at operator list)
Example:"any"
service
stringRequiredService name, enum. For long term rental value is always `rent`Example:"rent"
Enum:rent
sum
numberRequiredPrice for initial rental period, in RUB (this amount will be credited to your Onlinesim account when operation is closed successfully)Example:320
exceptionPhoneSet
array<integer>List of exception prefixes that SHOULD NOT BE ISSUED when the number is requested. Format: country code + following digits of a number. I.e, when value 46950 is passed, numbers of Sweden starting with +46950 shouldn't be issued
Example:[46950]
Items:- integerExample:
46950
Responses
200
Content-Type
- stringExample:
"application/json; charset=utf-8"
Enum:application/json; charset=utf-8
- Schema
- Examples
- objectExample:
{"number":79088081050,"activationId":355,"status":"SUCCESS"}
Properties:number
integerPhone number in international format according to the requested parametersExample:79088081050
activationId
integerOperation ID (assigned by your server)Example:355
>= 1
status
stringRequest status (`SUCCESS` or `ERROR`)Example:"SUCCESS"
Enum:SUCCESS
ERROR