JSON Post API
If you want to add a mobile phone number that you do not want SMS to be sent to your blocked number list by sending it in JSON format using the POST method of the HTTP protocol, you can follow the instructions below.
Address to request
POSThttp://api.iletimerkezi.com/v1/add-blacklist/json
Request Content (Body)
{
"request": {
"authentication": {
"key": "",
"hash": ""
},
"blacklist": {
"number": ""
}
}
}
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.
blacklist
Label containing the number to add to the list.
- number: Label containing the number to be added to the list. The number tag is not a repeatable tag. Only one number can be sent per 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.
code | message | Description |
---|---|---|
400 | The request could not be resolved | is caused by an error in the structure of the JSON you are POSTing. These errors are usually caused by a misspelled JSON tag or an improperly closed (") character. |
401 | Incorrect membership information | We give this error when we can't verify the information you have sent in the authentication tag of the JSON 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. |
404 | API does not have requested method | If 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": "",
"hash": ""
},
"blacklist": {
"number": "+49172574483311"
}
}
}
Example Successful Response
{
"response": {
"status": {
"code": 200,
"message": "Operation successful"
}
}
}
Example Incorrect Answer
{
"response": {
"status": {
"code": 401,
"message": "Membership information is incorrect"
}
}
}