Contact actions
Companies and contact persons stored in MiniCRM are displayed as a Contact in case of API.
Contact search (field-based)
Identification is required, example url:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Contact?Email=jd@example.com
It is possible to search the values of fields. The search applies to those fields as well that cannot be seen among the results of the search. For further information, go to the Database Schema section. If you would like to filter in a more detailed way, you can add more fields as a parameter, for example:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Contact?Email=kjozsef@teszt.hu&Type=Person
Example output:
{
"Count": 1,
"Results": {
"12345": {
"Id": "12345",
"Name": "John Doe",
"Url": "https://r3.minicrm.hu/Api/R3/Contact/12345",
"Type": "Person",
"Email": "jd@example.com",
"Phone": "0612345678"
}
}
}
You can search among contacts.
Contact (GET)
Identification is required, example url:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Contact/12346
Get all data of a given contact.
In the response, the contact is received in one array, in which you can see the data of the contact fields.
Example output (Company)
{
"Id": 12346,
"Type": "Business",
"Name": "Test Business",
"Email": "info@test.com",
"EmailType": "",
"Phone": "06-1 / 987-65432",
"PhoneType": "",
"Description": "",
"Url": "http://test.com",
"Industry": "",
"Region": "",
"VatNumber": "",
"RegistrationNumber": "",
"BankAccount": "12345678-12345678-12345678",
"Swift": "",
"Employees": 0,
"YearlyRevenue": 0
}
Example output (Person)
{
"Id": 12345,
"BusinessId": 12346,
"Type": "Person",
"FirstName": "John",
"LastName": "Doe",
"Email": "jd@example.com",
"EmailType": "",
"Phone": "0612345678",
"PhoneType": "",
"Position": "IT"
}
Contact (PUT)
Modifying an existing contact, or creating a new one. When modifying existing projects, it’s better to send only the changed fields. Identification is required, example url:
$ curl -XPUT https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Contact/12345 -d '{
"FirstName":"John",
"LastName":"Doe"
}'
The service URL equals to the URL of contact download. You can download a contact with GET request, and with PUT request, you can modify data. It is possible to add a new contact by omitting the ID (12345 at the end of example url). It is important that in case of a new contact, it is required to send the Type field, and in case of an existing task, the Type field cannot be edited. To assign a person to a company, enter the company’s ID into the BusinessID field.
The data structure expected by input is the same as the structure received by the download of the contact. Input format is JSON serialized array.
Example output:
{
"Id":12345
}