HTTPS API v2 / General communications
If you do not specify an action, blocked customer account or provide incorrect customer data, SerwerSMS.pl will generate a document in JSON or XML format with information about the error that occurred. For example, if you provide an incorrect login or password, the client will see the following message:
{
"error":
{
"code":1001,
"type":"InvalidUser",
"message":"Incorrect login or password"
}
}
If you do not specify any action to be performed, the system displays a message:
{
"error":
{
"code":1000,
"type":"InvalidAction",
"message":"Not specified action to execute"
}
}
Preview error message can be checked with action:
error/[code]
example:
https://api2.serwersms.pl/error/1000
response:
{
"error":
{
"code":1000,
"type":"InvalidAction",
"message":"Not specified action to execute"
}
}
The list of error codes returned by the API
Below is a table with codes and their associated text descriptions.
| Code | Type | Description |
|---|---|---|
| General | ||
| 1000 | InvalidAction | Not specified action to execute |
| 1001 | InvalidUser |
Incorrect login or password |
| 1002 | InvalidRole | The user does not have permission to use the API |
| 1003 | InvalidIP |
Unauthorized IP address |
| 1004 | InvalidID | Invalid parameter ID |
| 1005 | InvalidRole | No permission |
| 1006 | InvalidData | Niepoprawny format danych |
| 1007 | InvalidRole | Invalid data format |
| 1008 | InvalidRole | The user does not have permission to view the numbers |
| 2000 | ValidationRequiredError |
Missing required parameters |
| 2001 | ValidationPhoneError |
Invalid phone number |
| 2002 | ValidationCodeError |
Invalid error code |
| Messages | ||
| 3000 | SendError | Exhausted the limit of available SMS ECO+ |
| 3001 | SendError |
No permission to send messages SMS ECO+ |
| 3002 | SendError | Exhausted the limit of available SMS FULL |
| 3003 | SendError | No permission to send messages SMS FULL |
| 3004 | SendError |
Exhausted the limit of available MMS |
| 3005 | SendError | No permission to send messages MMS |
| 3006 | SendError | Exhausted the limit of available messages VOICE |
| 3007 | SendError |
No permission to send messages VOICE |
| 3008 | SendError |
No permission to send Flash SMS |
| 3009 | SendError | No permission to send messages SMS |
| 3100 | SendError |
Sending SMS is blocked |
| 3101 | SendError | Message is empty |
| 3102 | SendError |
Message exceeded the allowed number of characters |
| 3103 | SendError |
Wrong number of recipients |
| 3104 | SendError | Not specified phone numbers |
| 3105 | SendError | Invalid message |
| 3106 | SendError |
You can not use the name of the sender |
| 3107 | SendError | You do not have permission to send personalized messages |
| 3108 | SendError |
Invalid time shipping |
| 3109 | SendError | Invalid file |
| 3110 | SendError |
Too large number of messages to be transmitted, the maximum number of 000 to 100 text in a single application |
| 3111 | SendError |
Error uniqueness |
| 3200 | SendError |
Invalid characters in uniqe_id |
| 3201 | SendError |
Uploaded unique_id are not unique |
| 3202 | SendError | Incompatible number of personalized and uniqe_id |
| 3330 | MessageError |
No messages |
| 3331 | MessageError | Too many records to display. |
| Pliki | ||
| 4000 | FileError |
File is too large |
| 4001 | FileError |
File does not exist |
| 4002 | FileInvalid | Invalid file |
| Phone number/HLR | ||
| 4100 | PhoneError | Connection error |
| 4101 | PhoneError | Invalid number |
| 4102 | PhoneError | No permission to HLR |
| 4103 | PhoneError |
Exhausted the limit of available queries HLR |
| 4104 | PhoneError |
Account lockout |
| 4105 | PhoneError |
Waiting for reply |
| 4106 | PhoneError | Invalid ID |
| Premium | ||
| 4200 | PremiumError | Error shipping |
| 4201 | PremiumError | Incorrect data |
|
Account |
||
| 4300 | AccountError | No login |
| 4301 | AccountError | No password |
| 4302 | AccountError | No phone number |
| 4303 | AccountError | No email |
| 4304 | AccountError | No name |
| 4305 | AccountError | No surname |
| 4306 | AccountError | No firm name |
| 4307 | AccountError | Wrong number |
| 4308 | AccountError | Incorrect e-mail address |
| 4309 | AccountError | Too short login |
| 4310 | AccountError | Incorrect login |
| 4311 | AccountError | Incorrect firm |
| 4312 | AccountError |
Login exists |
| 4313 | AccountError | Registration error |
| 4320 | AccountError |
Not given the current password |
| 4321 | AccountError |
Current password is incorrect |
| 4322 | AccountError |
Not given a new password |
| 4323 | AccountError |
New passwords do not match |
| 4324 | AccountError |
Not given login |
| 4325 | AccountError |
Invalid login |
|
Sender name |
||
| 4400 | SenderExists |
Sender name already exists |
| 4401 | SenderError |
Can not add the number as the sender's name |
| 4402 | SenderInvalid |
Incorrect sender's name |
| 4403 | SenderError | Incorrect number |
| 4404 | SenderError | Incorrect code or number |
| 4405 | SenderError |
The number was already active |
| Subaccounts | ||
| 4500 | SubaccountError |
No permission to department users |
| 4501 | SubaccountError |
Subaccount can not create subaccounts |
| 4502 | SubaccountError | Login busy |
| 4503 | SubaccountError | No template permissions |
| 4504 | SubaccountError |
Incorrect login or password |
| Black list | ||
| 4600 | BlacklistError | No operation to complete |
| 4601 | BlacklistPhoneExists |
Number is already on the list |
| 4602 | BlacklistError |
Not found the specified number |