post GET_SERVICES
https://{yourserver.com}/getServices
This request is sent from Onlinesim server to yours every 2 minutes to get a quantity of available numbers. Your server should return a relevant list of available numbers in format described below.
Your partner's API key will be passed in the request in a payload.
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 within 10 seconds of the request. Otherwise current request will be cancelled.
IMPORTANT NOTE!
operatorMap
should contain operatorany
that includes summarized amount of numbers of all operators for each service
Each successful operation has to reduce count of available numbers for the service by 1. If operation was cancelled or failed (SMS hasn't been received), the counter has to remain unchanged.
Operation result is passed as status
parameter in FINISH_ACTIVATION request.
Parameters
Global params
Request Body
- Schema
- Examples
- objectExample:
{"action":"GET_SERVICES","key":"string"}
Properties:action
stringRequiredMethod name, in this case `GET_SERVICES`Example:"GET_SERVICES"
Enum:GET_SERVICES
key
stringRequiredAPI key of your Onlinesim partner's profileExample:"string"
Responses
200
Content-Type
- stringExample:
"application/json; charset=utf-8"
Enum:application/json; charset=utf-8
- Schema
- Examples
- objectExample:
{"countryList":[{"#countryname#":"string","operatorMap":{"any":{"#service_name#":0},"#operator_name#":{"#service_name#":0}}}],"status":"SUCCESS"}
Properties:countryList
arrayExample:[{"#countryname#":"string","operatorMap":{"any":{"#service_name#":0},"#operator_name#":{"#service_name#":0}}}]
Items:- objectExample:
{"#countryname#":"string","operatorMap":{"any":{"#service_name#":0},"#operator_name#":{"#service_name#":0}}}
status
stringRequest status (`SUCCESS` or `ERROR`)Example:"SUCCESS"
Enum:SUCCESS
ERROR