XML Post API
If you want to remove a phone number that you have added to the blacklist from your blocked number list by submitting it in XML format using the POST method of the HTTP protocol, you can follow the instructions below.
Request URL
POSThttps://api.iletimerkezi.com/v1/add-blacklist
Request Body
<request>
<authentication>
<key></key>
<hash></hash>
</authentication>
<blacklist>
<number></number>
</blacklist>
</request>
Definitions
The request sent to the server must be wrapped in the request tag. The definitions of its sub-tags are as follows:
authentication
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 standard in every request made. Its subtags are as follows
key: After logging into your iletimerkezi.com panel, the API Key that you can create from the settings section should be written in this field. It is mandatory to send it when making a request.
hash: After logging into your iletimerkezi.com panel, the hash created using the API Key and Secret Key, which you can create from the settings section, should be written in this field. It is mandatory to send it when making a request.
blacklist
Tag containing the number to be removed from the list.
- number: Tag containing the number to be removed from the list. The number tag is not a repeatable tag. Only one number can be sent per request.
Server Response
<response>
<status>
<code></code>
<message></message>
</status>
</response>
Definitions
The response from the server is always wrapped in 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 standard in every request made. Its subtags are as follows
- code: It is a numeric value indicating the process status.
- message: Contains information message about the process status.
Error Codes
The following table lists the error codes that the API can return.
Error Code | Message | Description |
---|---|---|
400 | İstek çözümlenemedi | POST ettiğiniz XML'in yapısındaki hatadan kaynaklanır. Bu hatalar genellikle, yanlış yazılan XML etiketi, düzgün kapatılmayan XML etiketi veya CDATA kullanılmadan XML'in yapısını bozabilecek bir karakterin kullanımından kaynaklanır. |
401 | Üyelik bilgileri hatalı | POST ettiğiniz XML'in authentication etiketi içerisinde göndermiş olduğunuz bilgileri doğrulayamadığımızda bu hatayı veriyoruz, eğer hesabınızda sabit IP tanımladıysanız ve farklı bir IP üzerinden istek yapıyorsanız yine bu hatayı alırsınız. |
404 | API istek yapılan yönteme sahip değil | Eğer bu hatayı alıyorsanız istek yaptığınız adresi tekrar kontrol edin yanlış bir adrese istek yapıyor olabilirsiniz. |
466 | Hatalı numara | İstek içeriğindeki numara hatalı ise bu hatayı alırsınız. |
Sample Request
<?xml version="1.0" encoding="UTF-8" ?>
<request>
<authentication>
<key></key>
<hash></hash>
</authentication>
<blacklist>
<number>+90505xxxxxxx</number>
</blacklist>
</request>
Sample Successful Response
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>
<code>200</code>
<message>Successful operation</message>
</status>
</response>
Sample Error Response
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>
<code>466</code>
<message>Invalid number.</message>
</status>
</response>