Skip to main content

JSON Post API

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

Request URL

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

Request Body

If you are using an API Key to perform the action:
{
"request": {
"authentication": {
"key": "",
"hash": ""
},
"order": {
"id": "",
"page": "",
"rowCount": ""
}
}
}

Definitions

The request to the server must be wrapped in the request tag. The definitions of the sub-tags of this tag are as follows:

authentication

User information that must be sent to obtain authorization for the request being made. The sub-tags are as follows:

  • key: This should be the API Key you can generate in the settings section after logging into iletimerkezi.com. It is mandatory to send this during the request.

  • hash: This should be the hash created using the API Key and the Secret Key that you can generate in the settings section after logging into iletimerkezi.com. It is mandatory to send this during the request.

order

Contains information about the order whose report will be queried. The sub-tags are as follows:

  • id: This is the unique numeric identifier that represents the order. It is mandatory to send this during the request, and you will receive this value as id from the server when you make an SMS sending request via the API.

  • page: This represents the report page. It is optional to send during the request. The default value is 1.

  • rowCount: This indicates the number of messages on a report page. It is optional to send during the request. The default value is 1000, and the maximum value is 1000. If more than 1000 messages have been sent in an order, a new request must be made by increasing the value in the page tag.

Server Response

{
"response": {
"status": {
"code": "",
"message": ""
},
"order": {
"id": "",
"status": "",
"message": [
{
"number": "",
"status": ""
},
{
"number": "",
"status": ""
},
{
"number": "",
"status": ""
}
]
}
}
}

Definitions

The response from the server is always wrapped in the response tag. The definitions of the sub-tags of this tag are as follows:

status

Contains information about the status of the process. The values returned by 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. The sub-tags are as follows:

  • code: This is a numeric value indicating the status of the process.
  • message: This contains an informational message about the status of the process.

order

Contains the information about the created order if the process has been successfully completed. If the process fails, this tag is not returned. The sub-tags are as follows:

  • id: This is the unique numeric identifier representing the order.
  • status: This is a numeric value indicating the general shipping status of the order. The values this tag can take and their meanings are listed in the table below:
Status CodeStatus Message
113Order delivery is in progress
114Order delivery is completed
115Order could not be delivered

message

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

  • number: Contains the recipient's phone number.
  • status: Indicates the delivery status of the message, represented as a numeric value. The values this tag can take and their meanings are listed in the table below:
Status CodeStatus Message
110Message is being sent
111Message has been sent
112Message could not be sent

Error Codes

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

codemessageDescription
400Request could not be resolvedThis error will be returned if the JSON you posted cannot be validated (if it is invalid). These errors are usually caused by unescaped values.
401Membership information is incorrectThis error will be given if we could not validate the information you sent in the authentication tag in the posted JSON. If you have defined a fixed IP for your account and are making a request from a different IP, you will receive this error again.
404API method not availableIf you receive this error, please check the address you are requesting; you might be making a request to an incorrect address.
455Order not foundIf there is no order created with the id you provided in the request or if the order has changed from waiting for delivery status to delivered status, you will receive this error.
456Order delivery date has not yet arrivedIf the order created with the id you provided in the request is a future date delivery and the delivery date has not yet arrived, you will receive this error.

Example Request

{
"request": {
"authentication": {
"key": "507caf2e1fcdb5eea9786332ca2d8785",
"hash": "0db4e316db72c519ba08121985f6ddf479809053d555c"
},
"order": {
"id": 428,
"page": 1,
"rowCount": 5
}
}
}

Example Successful Response

{
"response": {
"status": {
"code": 200,
"message": "Process successful"
},
"order": {
"id": 428,
"status": 113,
"message": [
{
"number": 5301234567,
"status": 110
},
{
"number": 5301234568,
"status": 111
},
{
"number": 5301234569,
"status": 112
},
{
"number": 5301234560,
"status": 111
},
{
"number": 5301234561,
"status": 111
}
]
}
}
}

Example Error Response

{
"response": {
"status": {
"code": 455,
"message": "Order not found"
}
}
}