v1 rent

Get list of available services and countries for rent

POST{yourserver}/getServicesRent

This request is sent from the OnlineSIM server to yours every 5 minutes to get the number of numbers available for rent. Your server should return the counts in the format described below.

Your partner API key is passed in the payload. Rent support, the URL and the exact rent keys depend on the integration.

Request Body

Request payload from the OnlineSIM server

Content-Typeapplication/json
Schema
schemaobject
actionstringRequired
Method name, in this case GET_SERVICESEnum:GET_SERVICESExample:GET_SERVICES
keystringRequired
API key of your OnlineSIM partner profileExample:apikey

Examples

request

GET_SERVICES request from the OnlineSIM server (for rent)

{
  "action": "GET_SERVICES",
  "key": "apikey"
}

Responses

200The answer of your server to GET_SERVICES
Content-Typeapplication/json
Schema
schemaobject
countryListobject[]RequiredList of countries with the number of available numbers per operator and service. Countries and services OnlineSIM does not know are ignored; negative counts are read as 0.Example:[ { "country": "russia", "operatorMap": { "any": { "vk": 10, "ok": 25, "wa": 52 } } } ]
statusstring
Request statusEnum:SUCCESSERRORExample:SUCCESS

Examples

sharedEndpoint28 lines

Shared answer for rent and single-service activations

{
  "countryList": [
    {
      "country": "russia",
      "operatorMap": {
        "any": {
          "vk": 10,
          "ok": 25,
          "wa": 52,
          "rent": 19,
          "rent_noext": 7
        }
      }
    },
    {
      "country": "ukraine",
      "operatorMap": {
        "any": {
          "vk": 10,
          "ok": 50,
          "wa": 132,
          "rent": 21
        }
      }
    }
  ],
  "status": "SUCCESS"
}
rentPerPeriod

Rent-only answer with counts per rent period

{
  "countryList": [
    {
      "country": "russia",
      "operatorMap": {
        "any": {
          "rent1": 19,
          "rent7": 12,
          "rent30": 5,
          "rent_noext1": 4
        }
      }
    }
  ],
  "status": "SUCCESS"
}

Code Samples

Generating examples...