Skip to main content

XML Post API

You can follow the instructions below to get the balance information of your account in XML format using the POST method of the HTTP protocol.

Address to request

POSThttps://api.iletimerkezi.com/v1/get-balance

Request Content (Body)

Content of the request if you are processing using API Key
<request>
<authentication>
<key></key>
<hash></hash>
</authentication>
</request>

Definitions

The request to the server must be wrapped with the request tag. The definitions of the subtags of this tag are as follows:

authentication

It is the user information that must be sent in order to receive authorization for the requested operation. The alt tags are as follows:

  • key: API Key that you can create from the settings section should be written in this field after logging in to your iletimerkezi.com panel. It is required to be sent when making a request.

  • hash: After logging into your iletimerkezi.com panel, the hash generated using the API Key and Secret Key that you can create from the settings section should be written in this field. It is required to be sent when making a request.

Server response

<response>
<status>
<code></code>
<message></message>
</status>
<balance>
<amount></amount>
<sms></sms>
</balance>
</response>

Definitions

The response from the server is always wrapped in the response tag. The definition of subtags of this tag is as follows:

status

Contains information about the transaction status. The values ​​returned by this tag can also be obtained by looking at the header information of the HTTP response. This tag is returned by default on every request made. The alt tags are as follows

  • code: It is the numerical value that indicates the operation status.
  • message: Contains an informational message about the transaction status.

balance

Represents your balance information. The alt tags are as follows.

  • amount: Contains the "TL" balance amount in the user account.
  • sms: Contains the amount of SMS in the user account.

:::Type Hint If your account works with TL credit, amount tag, if it works with SMS credit, sms tag represents your current balance information. :::

Error Codes

If the result of the request is negative, the error codes and messages that will be returned to you by the server are as follows.

codemessageDescription
400The request could not be resolved is caused by an error in the structure of the XML you POST. These errors are usually caused by a misspelled XML tag, an improperly closed XML tag, or the use of a character that can break the structure of XML without using CDATA.
401Incorrect membership informationWe give this error when we can't verify the information you have submitted in the authentication tag of the XML you POST. If you have defined a fixed IP in your account and you are requesting from a different IP, you will get this error again.
404API does not have requested methodIf you're getting this error, double-check the address you requested, you may be making a request to a wrong address.

Sample Request

<request>
<authentication>
<key></key>
<hash></hash>
</authentication>
</request>

Example Successful Response

<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>
<code>200</code>
<message>Operation successful</message>
</status>
<balance>
<amount>134.0000</amount>
<sms>7538</sms>
</balance>
</response>

Example Incorrect Answer

<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>
<code>401</code>
<message>Membership information is incorrect</message>
</status>
</response>