Get list of available services and countries for rent
POST{yourserver}/getServicesRent
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.
Parameters
header1
| Name | Type | Description |
|---|---|---|
Authorization* | string | see more here |
Request Body
Request payload from Onlinesim server
Content-Type
application/jsonSchema
schemaobject
actionstringRequired
Method name, in this case GET_SERVICESEnum:GET_SERVICESDefault:GET_SERVICESkeystringRequired
API key of your Onlinesim partner's profileExamples
Example payload of Onlinesim server GET_SERVICES request (for rent)
{
"action": "GET_SERVICES",
"key": "apikey"
}Responses
200The response of your server for GET_SERVICES request must be in
following format:
Headers
| Name | Type | Description |
|---|---|---|
Content-Type | string |
|
Content-Type
application/jsonSchema
schemaobject
countryListobject[]RequiredList of countries and the respective available number counts per operator and service
statusstringRequired
Request status (SUCCESS or ERROR)Enum:SUCCESSERRORExamples
Response example from your server (shared endpoint for rent and single-service activations)57 lines
{
"countryList": [
{
"country": "russia",
"operatorMap": {
"any": {
"vk": 10,
"ok": 25,
"wa": 52,
"rent": 19
},
"beeline": {
"vk": 10,
"ok": 15,
"wa": 20,
"rent": 9
},
"megafon": {
"vk": 0,
"ok": 10,
"wa": 32,
"rent": 10
}
}
},
{
"country": "ukraine",
"operatorMap": {
"any": {
"vk": 10,
"ok": 50,
"wa": 132,
"rent": 21
},
"life": {
"vk": 0,
"ok": 10,
"wa": 32,
"rent": 2
},
"vodafone": {
"vk": 10,
"ok": 10,
"wa": 0,
"rent": 14
},
"kyivstar": {
"vk": 0,
"ok": 30,
"wa": 100,
"rent": 5
}
}
}
],
"status": "SUCCESS"
}Response example from your server (dedicated endpoint for rent)36 lines
{
"countryList": [
{
"country": "russia",
"operatorMap": {
"any": {
"rent": 19
},
"beeline": {
"rent": 9
},
"megafon": {
"rent": 10
}
}
},
{
"country": "ukraine",
"operatorMap": {
"any": {
"rent": 21
},
"life": {
"rent": 2
},
"vodafone": {
"rent": 14
},
"kyivstar": {
"rent": 5
}
}
}
],
"status": "SUCCESS"
}Code Samples
Generating examples...