Get API
If you want to perform the SMS sending operation using the GET method of the HTTP protocol, you can follow the guidelines below. You can generally integrate the SMS integration panels of ready-made software or hardware/devices like firewalls into İleti Merkezi using this documentation.
Request URL
GEThttps://api.iletimerkezi.com/v1/send-sms/get/
Request Parameters
https://api.iletimerkezi.com/v1/send-sms/get/?key=API_KEY&hash=API_HASH&text=Lorem%20ipsum%20dolor%20sit%20amet&receipents=5301234569,5301234570&sender=APITEST&iys=1&iysList=BIREYSEL
After writing your values to the request parameters, you can try the integration by entering the generated URL in your browser's address bar. If you encounter an error, you can check how to resolve it in the status and error codes section.
Definitions
The explanations of the parameters sent in the request are as follows:
-
key: This should be the API Key that you can create from the settings section after logging into your iletimerkezi.com panel. It is mandatory to send this when making the request.
-
hash: This should be the hash created using the API Key and Secret Key that you can create from the settings section after logging into your iletimerkezi.com panel. It is mandatory to send this when making the request.
-
text: This contains the SMS text to be sent. It is mandatory to send this when making the request. It must be URL encoded.
If you are not integrating into a ready-made panel or if you are creating a panel for SMS integration in your own software, you should encode the values in the "text" field since your message text may contain characters that could break the URL structure.
There are built-in functions available in every programming language that perform this encoding.
&text=Sample unencoded message text
# After encoding, the message text should appear as follows
&text=Sample%20encoded%20message%20text
-
receipents: This contains the recipient's phone number. The number format should be 5xxxxxxxxx. If you want to define multiple recipients for the specified message text, the numbers should be separated by commas. It is mandatory to send this when making the request.
-
sender: This is the title defined and approved by iletimerkezi.com from the management panel, consisting of a maximum of 11 characters. The sent message will be sent to the recipient with the title specified by this parameter. It is mandatory to send this when making the request. It must be URL encoded.
-
iys: This indicates whether the message will be queried through the İleti Yönetim Sistemi (IYS). If you send this value as 1 (true), your messages will be queried through IYS; if you send it as 0 (false), they will not be queried. It is mandatory to send this when making the request.
If you are sending a commercial message, this value must be legally set to 1. Otherwise, legal action may be taken.
- iysList: This indicates the list you want to query through the İleti Yönetim Sistemi (IYS). If you sent the value of iys as 1, meaning you want your message to be queried through IYS, the iysList value must be sent as either BIREYSEL or TACIR. If you send the value of iys as 0, this field will not be considered.
Sample Request
https://api.iletimerkezi.com/v1/send-sms/get/?key=3ea65b1e8baxxxx&hash=XXXX&text=Lorem%20ipsum%20dolor%20sit%20amet&receipents=5301234569,5301234570&sender=APITEST&iys=1&iysList=BIREYSEL
Server Response
<response>
<status>
<code></code>
<message></message>
</status>
<order>
<id></id>
</order>
</response>
Definitions
The response from the server is always encapsulated with the response tag. The definitions of its sub-tags are as follows:
status
Contains information about the transaction status. The values returned with this tag can also be obtained by looking at the header information of the HTTP response. This tag is returned as a standard in every request made. Its sub-tags are as follows:
- code: This is a numeric value indicating the transaction status.
- message: This contains an informational message about the transaction status.
order
Contains the order information created if the transaction is successfully completed. This tag is not returned if the transaction fails. The order tag is not repeatable. Only one order can be sent per request. Its sub-tag is as follows:
- id: This is a unique numeric value representing the order. You can save the "id" value in your systems and use it when querying the report of the order or canceling the order if you have made a future date delivery.
Error Codes
If the result of the request is negative, the error codes and messages that the server will return to you are as follows.
code | message | Description |
---|---|---|
401 | Membership information is incorrect | This error is returned if the information you sent within the key, hash tags could not be validated. If you have defined a static IP in your account and you make the request from a different IP, you will receive this error as well. |
402 | Insufficient balance | This error is returned if the balance in your account is not enough to send this order. |
450 | The sent title is not suitable for use | This error is returned if the value you sent with the sender tag is not approved in your account. You must send it as defined in your account. Generally, changes that cause this error are differences in case sensitivity or sending extra space values. |
451 | Repeated order | If you try to send the same message text to the same recipients within 10 minutes, the system will return this error to you to prevent spam and ensure that the same messages are not sent to the same people by mistake. If you have such a sending requirement, you can differentiate the message text by writing the current time and minute in the message text. |
452 | Message recipients are incorrect | This error is returned if the phone numbers you sent with the receipents tag are incomplete or cannot be verified. Also, if you are sure that the mobile phone number you want to send a message to is correct, you may receive this error if the mobile phone number has been added to your block list. |
453 | Order size exceeded | This error returns if the message text you sent with the text tag is longer than seven (7) SMS lengths according to your character encoding. |
454 | Message text is empty | This error returns if the message text you sent in the text parameter does not contain any values. |
Sample Successful Response
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>
<code>200</code>
<message>Operation Successful</message>
</status>
<order>
<id>323223</id>
</order>
</response>
Sample Error Response
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>
<code>401</code>
<message>Membership information is incorrect</message>
</status>
</response>