post GET_NUMBER

https://{yourserver.com}/getNumber
v1

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*

Exception

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).

Queue

Parameters

Authorization
Required

see more here

In: header
Schema:
  • string
    Example: "Bearer apiKey"
Content-Type
Required
`Content type` header and encoding scheme
In: header
Schema:
  • string
    Example: "application/json; charset=utf-8"
    Enum: application/json; charset=utf-8

Request Body

Request payload from Onlinesim server
Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"action":"GET_NUMBER","country":"germany","operator":"any","service":"facebook","sum":40,"key":"string","exceptionPhoneSet":[46950]}
    Properties:
    • action
      string
      Required
      Method name, in this case `GET_NUMBER`
      Example: "GET_NUMBER"
      Enum: GET_NUMBER
    • country
      string
      Required

      Country name, enum (country list)

      Example: "germany"
    • operator
      string
      Required

      Operator name (for examples take a look at operator list)

      Example: "any"
    • service
      string
      Required

      Service name, enum (service list)

      Example: "facebook"
    • sum
      number
      Required
      Service price, in RUB (this sum will be credited to your Onlinesim account after successful operation)
      Example: 40
    • key
      string
      Required
      API key of your Onlinesim partners profile
      Example: "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:
      • integer
        Example: 46950

Responses

200

The response of your server for GET_NUMBER request must be in following format:

Headers
Content-Type
`Content type` header and encoding scheme
Schema:
  • string
    Example: "application/json; charset=utf-8"
    Enum: application/json; charset=utf-8
Content
Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"number":79088081050,"activationId":355,"status":"SUCCESS"}
    Properties:
    • number
      integer
      Phone number in international format according to the requested parameters
      Example: 79088081050
    • activationId
      integer
      Operation ID (assigned by your server)
      Example: 355
      >= 1
    • status
      string
      Request status (`SUCCESS` or `ERROR`)
      Example: "SUCCESS"
      Enum: SUCCESS ERROR