post GET_SERVICES (RENT)

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

This request is sent from Onlinesim server to yours to get a list of available for rent numbers. Your server should return a list of numbers in format described below.

Your partner's API key will be passed in the request in a payload.

IMPORTANT NOTE! You can either add a result field that contains quantity of available numbers for rent to your existing GET_SERVICES endpoint response for singe-service activations (v1) or create a new endpoint for rent only.

IMPORTANT NOTE! It is necessary to return actual number of simultaneously available numbers. For example, if you have SIM bank with 512 ports and only 64 GSM-modules, then you should return 64, not 512. Violation of this condition will cause the system to automatically block receiving numbers from you for 30 minutes. Your server must issue a list with quantity of available numbers for rent within 10 seconds of the request. Otherwise current request will be cancelled.

IMPORTANT NOTE! operatorMap must contain operator any that includes summarized amount of numbers of all operators listed for rent.

Parameters

Authorization
Required

see more here

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

Global params

Request Body

Request payload from Onlinesim server
Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"action":"GET_SERVICES","key":"string"}
    Properties:
    • action
      string
      Required
      Method name, in this case `GET_SERVICES`
      Example: "GET_SERVICES"
      Enum: GET_SERVICES
    • key
      string
      Required
      API key of your Onlinesim partner's profile
      Example: "string"

Responses

200

The response of your server for `GET_SERVICES` 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: {"countryList":[{"#countryname#":"string","operatorMap":{"any":{"#service_name#":0,"rent":0},"#operator_name#":{"#service_name#":0,"rent":0}}}],"status":"SUCCESS"}
    Properties:
    • countryList
      array
      Example: [{"#countryname#":"string","operatorMap":{"any":{"#service_name#":0,"rent":0},"#operator_name#":{"#service_name#":0,"rent":0}}}]
      Items:
      • object
        Example: {"#countryname#":"string","operatorMap":{"any":{"#service_name#":0,"rent":0},"#operator_name#":{"#service_name#":0,"rent":0}}}
    • status
      string
      Request status (`SUCCESS` or `ERROR`)
      Example: "SUCCESS"
      Enum: SUCCESS ERROR