Project actions
Cards stored in MiniCRM are displayed as Projects in case of API.
Project search (field-based)
Identification is required, example url
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Project?StatusId=2500
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Project?StatusId=2500
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/Project?StatusId=2500&UserId=3200
StatusGroup parameter can be used to search for projects in a specific status group (Lead, Open, Success, Failed). For example:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Project?StatusGroup=Success
Example output:
{
"Count": 1,
"Results": {
"1234": {
"Id": "1234",
"Name": "Test project",
"Url": "https://r3.minicrm.hu/Api/R3/Project/1234",
"StatusId": "2500",
"UserId": "3200",
"Deleted": "0"
}
}
}
Project (GET)
Projects can be identified by MiniCRM’s internal ID (ProjectId) or an external ID provided by you when adding data (ReferenceId).
ProjectId
Identification is required, example url:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Project/1234
ReferenceId
Identification is required, example url:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Project?ReferenceId=123456
The response is the same in both cases: getting the data of a specific project.
In the response, the project is received in one array, in which you can see the data of the project fields.
Example output:
{
"Id": 1234,
"CategoryId": 3,
"ContactId": 12345,
"StatusId": "Contacted",
"UserId": "John Doe",
"Name": "Very Motivated Customer",
"Deleted": "0",
"LeadSource": "WOM",
"InterestedIn": "Premium products",
"Text1105": "Lorem ipsum....",
"Int1107": 12500,
"File1103": "http://cdn.minicrm.hu/doc/2013/04-25/A/Q/AQFwQq7Os0kE5ykH_GSJfg-1"
}
Project (PUT)
When modifying existing projects, it is always better to send only the changed fields. Identification is required, example url:
$ curl -XPUT https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Project/1234 -d '{
"Name":"New name given through API",
"Deleted":"1"
}'
The service URL equals to the URL of project download. You can download a project with GET request, and with PUT request, you can modify data. It is possible to add a new project by omitting the ID (1234 at the end of example url). It is important that in case of a new project, it is required to send the CategoryID and ContactID fields, and in case of an existing task, the CategoryID and ContactID fields cannot be edited.
In case of a File field, our system expects an URL on which the file can be found. In this case, the file is uploaded to MiniCRM servers and is stored there.
You can use the ReferenceId field to pass along the entity ID used in your system.
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":1234
}
Email search
Identification is required, example url:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/EmailList/1234
Getting the emails of a specific project.
In the response, the data comes in one array. On its Count key, the number of the emails can be found. On the Results key, the project’s emails can be found in separate arrays.
The search can be narrowed by the CreatedAt parameter. This way, only those emails will be listed that were created at the defined time or later.
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/EmailList/1234?CreatedAt=2014-03-20
It is important that if you send a high volume of emails from the system, the query may take more time.
In case of emails, the GET function is not supported.
Example output:
{
"Count":1,
"Results":[
{
"Id":3333,
"TemplateId":1479,
"From":"help@minicrm.hu",
"To":"user@example.com",
"Subject":"Subject of sent email",
"Status":"Sent",
"CreatedAt":"2013-03-20 12:35:24",
"OpenedAt":"2013-03-20 15:12:00",
"ClickedAt":""
}
]
}