POST /getNumber
Order a virtual number for the specified service
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).
WARNING
Your server must issue a number with specified parameters within 10 seconds of the request. Otherwise current request will be cancelled.
WARNING
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*
%20%5BGET_NUMBER%5D.png)
WARNING
Numbers that are used in one operation cannot be used in other until the previous operation is closed (until FINISH_ACTIVATION request is received).
%20%5BGET_NUMBER%5D.png)
Parameters
| Name | Type | Description |
|---|---|---|
Authorization* | string | see more here Example: Bearer apikey |
Content-Type* | string |
Enum: application/json; charset=utf-8Example:application/json; charset=utf-8 |
Request Body
Request payload from Onlinesim server
Content-Type:
application/jsonBodyobject
actionstringRequired
Method name, in this case GET_NUMBER
Enum:
GET_NUMBERDefault:
GET_NUMBERExample:
GET_NUMBERsumnumberRequired
Service price, in RUB (this sum will be credited to your
Onlinesim account after successful operation)
Example:
40keystringRequired
API key of your Onlinesim partner’s profile
exceptionPhoneSetinteger[]
List of exception prefixes that SHOULD NOT be issued
when the number is requested. Format: country code +
following digits of a number.
Responses
200
The response of your server for
GET_NUMBER
request must be in following format:
Code Samples
No code samples available