post GET_NUMBER (RENT)

https://{yourserver.com}/getNumberRent
v1 rent

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*

Exception

Parameters

Authorization
Required

see more here

In: header
Schema:
  • string
    Example: "Bearer apiKey"

Global params

Request Body

Request payload from Onlinesim server for rent operation
Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"action":"GET_NUMBER","key":"string","country":"germany","operator":"any","service":"rent","sum":320,"exceptionPhoneSet":[46950]}
    Properties:
    • action
      string
      Required
      Method name, in this case `GET_NUMBER`
      Example: "GET_NUMBER"
      Enum: GET_NUMBER
    • key
      string
      Required
      API key of your Onlinesim partner's profile
      Example: "string"
    • 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. For long term rental value is always `rent`
      Example: "rent"
      Enum: rent
    • sum
      number
      Required
      Price 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:
      • 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