Forward specified phone numbers to Onlinesim server
POSThttps://{ourserver.com}/api/resellers/addNumber
This request allows you to add numbers to the Onlinesim server by one at a time, on the contrary to sendNumbersOnline that sends all active numbers as a list.
This could be especially useful if you need to add new numbers to the list of existing ones, instead of passing the modified list every time when you add new numbers.
Parameters
header1
| Name | Type | Description |
|---|---|---|
Authorization* | string | see more here |
Request Body
Adding new numbers to the list of existing ones on Onlinesim server.
Content-Type
application/jsonSchema
schemaobjectPayload schema
All Of
[0]object
[1]object
Examples
Payload example for `addNumber` from your server
{
"number": "+46050910804",
"country_id": 46,
"operator": 24012,
"date_start": 1658209063,
"port_id": "Port1",
"rent": 0,
"test": "test1"
}Responses
200Onlinesim server response
Content-Type
application/jsonSchema
schemaobject
responseoneOf1, if request was successful, otherwise error message will come up
idinteger
Phone number and their respective IDs: id - returns
id for each existing number (or assigns id for new
ones) or assigns null for removed numbersExamples
Onlinesim server response example (successfuly added new numbers)
{
"response": 1,
"ids": {
"+234112233445": 1042,
"+234112233446": 1043,
"+234112233447": 1044
}
}Incorrect key passed
[
{
"response": "ERROR_WRONG_KEY"
}
]400Missing or incorred parameters (request must contain parameters in it's body with proper names as described in documentation)
Content-Type
application/jsonSchema
schemaobject
responsestringRequired
Enum:ERROR_PARAMSmessagestringRequired
401Unauthorized. The request is missing or uses an invalid API key. Some endpoints may return a 200 status with an ERROR_WRONG_KEY message instead of 401 — check the response body
Content-Type
text/plainSchema
schemastring
Enum:Unauthorized403Forbidden. The request was understood but refused due to insufficient permissions
Content-Type
application/jsonSchema
schemaobject
errorobjectRequired
messagestringRequired
Enum:ERROR_DISABLEDERROR_IPERROR_RENTdetailsobject[]Required
Code Samples
Generating examples...