Skip to main content

JSON Post API

It is the method used to cancel the SMS package you have created with a future date. You can use it by sending data in JSON format by using the POST method of the HTTP protocol.

Hint

Orders that have been sent cannot be cancelled.

Address to request

POSThttps://api.iletimerkezi.com/v1/cancel-order/json

Request Content (Body)

If you are processing using API Key, the content of the request is:
{
"request": {
"authentication": {
"key": "",
"hash": ""
},
"order": {
"id": ""
}
}
}

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

Contains the SMS order information to be canceled. The alt tag is 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.

Server response

{
"response": {
"status": {
"code": "200",
"message": "Operation successful"
}
}
}

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.

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 foundYou will get this error if there is no order created with the id you have forwarded in the request, or if the order has changed from being pending to being delivered.

Sample Request

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

Example Successful Response

{
"response": {
"status": {
"code": "200",
"message": "Operation successful"
}
}
}

Example Incorrect Answer

{
"response": {
"status": {
"code": "400",
"message": "The request could not be resolved"
}
}
}