JSON Post API
This API method is under development, there may be changes to it. Please contact your customer representative to access the API method.
To retrieve the information of a contact in your address book using the POST method of the HTTP protocol in JSON format, you can follow the instructions below.
Request URL
POSThttps://api.iletimerkezi.com/v1/get-contact/json
Request Body
{
"request": {
"authentication": {
"key": "",
"hash": ""
},
"contact": {
"id": ""
}
}
}
Definitions
The request sent to the server must be wrapped in the request tag. The definitions of its sub-tags are as follows:
authentication
Contains information about the transaction status. The values returned with this tag can also be obtained by looking at the header information of the HTTP response. This tag is returned as standard in every request made. Its subtags are as follows
key: After logging into your iletimerkezi.com panel, the API Key that you can create from the settings section should be written in this field. It is mandatory to send it when making a request.
hash: After logging into your iletimerkezi.com panel, the hash created using the API Key and Secret Key, which you can create from the settings section, should be written in this field. It is mandatory to send it when making a request.
contact
Contains the information of the contact whose information you want. The sub-tag is as follows.
- id: Represents the unique numeric value of the contact.
Server Response
{
"response": {
"status": {
"code": "",
"message": ""
},
"contact": {
"id": "",
"name": "",
"surname": "",
"email": "",
"gsm": "",
"custom_fields": [
{
"id": "",
"value": ""
}
],
"groups": [5]
}
}
}
Definitions
The response from the server is always wrapped in the response tag. The definitions of its sub-tags are as follows:
status
Contains information about the transaction status. The values returned with this tag can also be obtained by looking at the header information of the HTTP response. This tag is returned as standard in every request made. Its subtags are as follows
- code: It is a numeric value indicating the process status.
- message: Contains information message about the process status.
contact
Contains the information of the contact. It does not repeat. The sub-tags are as follows.
-
id: Represents the unique numeric value of the contact.
-
name: Represents the contact's name.
-
surname: Represents the contact's surname.
-
email: Represents the contact's email address.
-
gsm: Represents the contact's mobile phone number.
-
custom_fields
Represents the custom fields defined for the contact. The sub-tags are as follows:
-
id: Represents the unique numeric value of the custom field.
-
value: Represents the value stored for the contact in the custom field.
-
groups
Contains the unique numeric values representing the groups to which the contact belongs.
Error Codes
The following table lists the error codes that the API can return.
Error Code | Message | Description |
---|---|---|
400 | İstek çözümlenemedi | POST ettiğiniz JSON'in yapısındaki hatadan kaynaklanır. Bu hatalar genellikle, yanlış yazılan JSON etiketi, düzgün kapatılmayan XML etiketi veya CDATA kullanılmadan JSON'in yapısını bozabilecek bir karakterin kullanımından kaynaklanır. |
401 | Üyelik bilgileri hatalı | POST ettiğiniz JSON'in authentication etiketi içerisinde göndermiş olduğunuz bilgileri doğrulayamadığımızda bu hatayı veriyoruz, eğer hesabınızda sabit IP tanımladıysanız ve farklı bir IP üzerinden istek yapıyorsanız yine bu hatayı alırsınız. |
404 | API istek yapılan yönteme sahip değil | Eğer bu hatayı alıyorsanız istek yaptığınız adresi tekrar kontrol edin yanlış bir adrese istek yapıyor olabilirsiniz. |
465 | Kişi bulunamadı. | Eğer grup içerisinde herhangi bir kişi bulunamadıysa bu hatayı alırsınız. |