This API provides the following services:
The request format is:
https://app.forestcrm.hu/api/xml/<API KEY>/contacts
Request HTTP method: GET
Request parameters:
query.If no parameters are supplied, all contacts for the tenant are returned.
https://app.forestcrm.hu/api/xml/demo/contacts?query="Alan";companyId="5206"
Response conforms the attached XSD.
Notes:
<contacts>
<contact id="4145">
<updated>2010-12-29T00:00:00+01:00</updated>
<name>Alan Shephard</name>
<company id="5206">Some partner</company>
<position/>
<phone>+999 412 111-2222</phone>
<email>[email protected]</email>
<skype/>
<phone2/>
<fax/>
<note/>
<external_ref>32b11281-d721-4f2b-ae2f-6c6c600d8f67</external_ref>
<contact id="4147">
<updated>2010-12-29T00:00:00+01:00</updated>
<name>Mike Johnson</name>
<company id="5213">Another partner</company>
<position>manager</position>
<phone>+999 412 987-6543</phone>
<email>[email protected]</email>
<skype/>
<phone2/>
<fax/>
<note/>
</contact>
</contacts>
The request format is:
https://app.forestcrm.hu/api/xml/<API KEY>/contacts
Request HTTP method: POST
Request parameters (optional params default to empty unless noted otherwise):
POST https://app.forestcrm.hu/api/xml/demo/categories
Header:
Content-Type: application/json
Body:
{
"contact": {
"company_id": 19424,
"name": "John Little",
"position": "Chairman",
"phone": "(123) 123-4567",
"note": "an old friend",
"category_ids": [2190]
}
}
If the contact could be created the response is of status code 200 and the body contains the the ID of the contact created in XML format:
<contact>
<id type="integer">38756</id>
</contact>
Errors are reported with a status code (422) and the response body contains the errors in XML format.
The request format is:
https://app.forestcrm.hu/api/xml/<API KEY>/contacts/<contact ID>or
https://app.forestcrm.hu/api/xml/<API KEY>/contacts/<contact ID>?external_ref
Request HTTP method: PUT
Request parameters: same as in create
Note that the requested attributes get updated (overwritten), missing attributes don't change.
PUT https://app.forestcrm.hu/api/xml/demo/contacts/38756
Header:
Content-Type: application/json
Body:
{
"contact": {
"email": "[email protected]"
}
}
If the company could be updated the response is of status code 200.
Errors are reported with a status code (422) and the response body contains the errors in XML format.