Skip to main content

XML Post API

If you want to receive the status of the SMS package you have sent in XML format using the POST method of the HTTP protocol, you can follow the instructions below.

Address to request

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

Request Content (Body)

If you are processing using API Key, the content of the request is:
<request>
<authentication>
<key></key>
<hash></hash>
</authentication>
<order>
<id></id>
<page></page>
<rowCount></rowCount>
</order>
</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.

order

The report contains the information of the order to be queried. The alt tags are as follows.

  • id: Unique numeric value representing the order. When you request to send SMS via API, it is the id value returned by the server. It is required to be sent when making a request.

  • page: Indicates the report page. It is not required to be sent when making a request. Its default value is 1.

  • rowCount: Indicates the number of posts on a report page. It is not required to be sent when making a request. Its default value is 1000. Its maximum value is 1000. If more than 1000 messages are sent in an order, a new request should be made by increasing the value in the page tag.

Server response

<response>
<status>
<code></code>
<message></message>
</status>
<order>
<id></id>
<status></status>
<message>
<number></number>
<status></status>
</message>
<message>
<number></number>
<status></status>
</message>
</order>
</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.

order

Contains the order information created if the transaction was completed successfully. If the operation fails, this tag is not returned. The alt tags are as follows:

  • id: Unique numeric value representing the order.

  • status: It is the numerical value that indicates the general shipping status of the order. The following table lists the values ​​that this label can take and the meanings they mean.

    Status CodeStatus Message
    113Order in progress
    114Order has been shipped
    115Failed to submit order

    messages

    Contains reported message information. It is repeated as many times as the number of messages on the queried page. The alt tags are as follows:

    • number: Recipient's mobile phoneContains u number.

    • status: It is the numerical value that indicates the sending status of the message. The following table lists the values ​​that this label can take and the meanings they mean.

      Status CodeStatus Message
      110Sending message
      111Message sent
      112Failed to send message

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.
455Order not foundIf there is no order created with the id that you have forwarded in the request, or if the order has changed from being pending delivery to being delivered, you will get this error.
456Order shipping date has not come yetIf the order created with the id you have submitted in the request is a post-dated delivery and the delivery date has not yet arrived, you will receive this error.

Sample Request

<?xml version="1.0" encoding="UTF-8" ?>
<request>
<authentication>
<key>demo</key>
<hash>demo</hash>
</authentication>
<order>
<id>428</id>
<page>1</page>
<rowCount>5</rowCount>
</order>
</request>

Example Successful Response

<?xml version="1.0" encoding="UTF-8" ?>
<response>
<status>
<code>200</code>
<message>Operation successful</message>
</status>
<order>
<id>428</id>
<status>113</status>
<message>
<number>5301234567</number>
<status>110</status>
</message>
<message>
<number>5301234568</number>
<status>111</status>
</message>
<message>
<number>5301234569</number>
<status>110</status>
</message>
<message>
<number>530123456</number>
<status>111</status>
</message>
<message>
<number>5301234561</number>
<status>111</status>
</message>
</order>
</response>

Example Incorrect Answer

<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>
<code>455</code>
<message>Order not found</message>
</status>
</response>