post GET_NUMBER
https://{yourserver.com}/getNumber
Request for ordering a number for SMS receiving from a specified service.
This request is sent to your server to order a number with specific parameters to receive SMS from a single service for 15 minutes.
The operation can be closed prematurely (check FINISH_ACTIVATION).
IMPORTANT NOTE! Your server must issue a number with specified parameters within 10 seconds of the request. Otherwise current request will be cancelled.
IMPORTANT NOTE! As we mentioned before, you will have to implement a fucntionality for number's mask exception: 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 that start with +46950*
IMPORTANT NOTE! Numbers that are used in one operation cannot be used in other until the previous operation is closed (until FINISH_ACTIVATION request is received).
Parameters
Content-Type
header
- stringExample:
"application/json; charset=utf-8"
Enum:application/json; charset=utf-8
Request Body
- Schema
- Examples
- objectExample:
{"action":"GET_NUMBER","country":"germany","operator":"any","service":"facebook","sum":40,"key":"string","exceptionPhoneSet":[46950]}
Properties:action
stringRequiredMethod name, in this case `GET_NUMBER`Example:"GET_NUMBER"
Enum:GET_NUMBER
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 (service list)
Example:"facebook"
sum
numberRequiredService price, in RUB (this sum will be credited to your Onlinesim account after successful operation)Example:40
key
stringRequiredAPI key of your Onlinesim partners profileExample:"string"
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.
Example:[46950]
Items:- integerExample:
46950
Responses
200
The response of your server for GET_NUMBER request must be in following format:
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