...
Table of contents
Searching for Contacts
The following table provides the URI and method that can be used to search for contacts in Crittah.
Search Fields
Field | Value type | Mandatory | Description | Example |
---|
FirstName | string | | First name of the contact | Jarryd |
LastName | string |
| Last name of the contact | Hayne |
Phone | string |
| Phone number of the contact | 987649874 |
Mobile | string | | Mobile phone number of the contact | 041658246 |
Fax | string |
| Fax number of the contact | 6546548665 |
Email | string | | Email address of the contact | fred@smith.com |
ContactRef | string |
| The unique reference of the contact allocated by Crittah contact created | 6548335 |
Example Search
Perform a POST to the following URL https://[companyID].crittah.com/ws/apiv2/json/contacts/search
Code Block |
---|
{
"FirstName": "James",
"Mobile": "0438770502",
"Email": "james@skurray.com"
} |
Working with a single contact
Data fields
Field | Value type | Mandatory | Description | Example |
---|
IDContact | string |
|
| Unique identifier of the contact. You can omit this field when creating a new contact. The ContactID is used for updating or deleting an existing contact. | 7090fad1-c4da-4488-9ceb-55ee9847edcc |
ExternalRef | string |
|
| A reference to an id used in an external system to Crittah. This can be used to link Crittah to internal systems and maintaining the relationship between the two systems. | HSG29373 |
ContactRef | string |
|
| Human readable unique identifier of the contact | 2586681 |
IDSite | string | Status |
---|
subtle | true |
---|
colour | Red |
---|
title | Yes |
---|
|
| Unique ID for the site the contact belongs to | 20058233-7388-418b-9193-6b57e28604f9 |
Site | string |
|
| Site Name that contact belongs to | SYD |
Types | Types Object |
|
| Array of types returned when getting a record | [ { "IDType": "c0fd94f3-2ddd-4eea-bc24-40189480d10f", "Type": "Producer" }, { "IDType": "eb6bef8f-6f03-49dd-80a4-83a220f6ddc3", "Type": "VIP" } ] |
IDTypes | Array strings |
|
| Used when adding or updating the record | "IDTypes": [ "c0fd94f3-2ddd-4eea-bc24-40189480d10f", "eb6bef8f-6f03-49dd-80a4-83a220f6ddc3"] |
Salutation | string |
|
| Salutation of the contact | Mr |
FirstName | string | Status |
---|
subtle | true |
---|
colour | Red |
---|
title | Yes |
---|
|
| Contact’s first name. | John |
LastName | string |
|
| Contact’s last name. | Smith |
Email | string |
| |
| Contacts phone | (02) 9506 3560 |
Mobile | string |
|
| Contacts Mobile | 0412 544 654 |
Fax | string |
|
| Contacts Fax | (02) 9567 680 |
BirthDate | string |
|
| contacts birth date in ISO 8601 format | 2010-08-20T15:00:00Z |
Position | string |
|
| Contacts position | Manager |
Department | string |
|
| Contacts department | Beverage |
IDStatus | string |
|
| IDStatus of contact | 926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa |
Status | string |
| | Examples
Get a contacts details
...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?>
<ContactObj xmlns="http://schemas.datacontract.org/2004/07/Spinifex.lib.objects" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<IDContact>7090fad1-c4da-4488-9ceb-55ee9847edcc</IDContact>
<ContactRef>2586681</ContactRef>
<IDSite>20058233-7388-418b-9193-6b57e28604f9</IDSite>
<Site>SYD</Site>
<Types>
<TypeObj>
<IDType>c0fd94f3-2ddd-4eea-bc24-40189480d10f</IDType>
<Type>Producer</Type>
</TypeObj>
<TypeObj>
<IDType>eb6bef8f-6f03-49dd-80a4-83a220f6ddc3</IDType>
<Type>VIP</Type>
</TypeObj>
</Types>
<Salutation>Mr</Salutation>
<FirstName>John</FirstName>
<LastName>Peterson</LastName>
<Email>j.peterson@gmal.com</Email>
<Phone>(02) 9506 3560</Phone>
<Mobile>0412 544 654</Mobile>
<Fax>9567 680</Fax>
<BirthDate>1978-04-01T00:00:00Z</BirthDate>
<Position>Manager</Position>
<Department>Beverage</Department>
<IDStatus>926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa</IDStatus>
<Status>Active</Status>
<Customer>
<AccountOwner>00000000-0000-0000-0000-000000000000</AccountOwner>
<Address>
<IDAddress>2d69c03b-5b57-46b4-8d67-43d2f27d225a</IDAddress>
<AddressLine1>88 Castlereagh Street</AddressLine1>
<AddressLine2 i:nil="true" />
<City>SYDNEY</City>
<State>NSW</State>
<IDCountry>1013</IDCountry>
<Country>Australia</Country>
<PostCode>2000</PostCode>
<LocRef>
<IDLocation>e97c85a5-62c0-4e13-bb63-ed8a43050360</IDLocation>
<LatLng>
<Lat>-33.869738</Lat>
<Lng>151.209448</Lng>
</LatLng>
</LocRef>
</Address>
<AddressBilling>
<IDAddress>368321fe-de7e-4f38-80a7-e7ea8e34fe26</IDAddress>
<AddressLine1>88 Castlereagh Street</AddressLine1>
<AddressLine2 i:nil="true" />
<City>SYDNEY</City>
<State>NSW</State>
<IDCountry>1013</IDCountry>
<Country>Australia</Country>
<PostCode>2000</PostCode>
<LocRef>
<IDLocation>6db14940-f906-4c20-949a-e332f6798336</IDLocation>
<LatLng>
<Lat>-33.869738</Lat>
<Lng>151.209448</Lng>
</LatLng>
</LocRef>
</AddressBilling>
<CompanyName>Sydney Bunting Supplies</CompanyName>
<CompanyNo>654 654 9879</CompanyNo>
<Council>Sydney</Council>
<CustomerRef>7193032</CustomerRef>
<Fax>654 654 544</Fax>
<IDCustomer>5f3f2135-d0f5-47a4-906e-7274b0128054</IDCustomer>
<IDSite>20058233-7388-418b-9193-6b57e28604f9</IDSite>
<IDStatus>926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa</IDStatus>
<Mobile>0414 656 654</Mobile>
<Notes>
<NoteObj>
<IDEntity>5f3f2135-d0f5-47a4-906e-7274b0128054</IDEntity>
<IDNoteType>77d5d244-eb29-4b5b-8b14-87d92b4215ea</IDNoteType>
<Type>General</Type>
<NoteInfo>Contact the front desk for assistance</NoteInfo>
<IDNote>05629a9b-2869-4197-82af-b6f975be93c8</IDNote>
</NoteObj>
<NoteObj>
<IDEntity>5f3f2135-d0f5-47a4-906e-7274b0128054</IDEntity>
<IDNoteType>77d5d244-eb29-4b5b-8b14-87d92b4215ea</IDNoteType>
<Type>General</Type>
<NoteInfo>Entry is via 120 King st - last driveway on right before Castlereagh st.</NoteInfo>
<IDNote>cf67b514-3ba2-44d9-82f0-c0d5f8d57816</IDNote>
</NoteObj>
</Notes>
<Parent i:nil="true" />
<Phone>9575 545</Phone>
<Site>SYD</Site>
<Status>Active</Status>
<Types>
<TypeObj>
<IDType>4d819963-731c-41fd-9378-fd7a10199b78</IDType>
<Type>Associates</Type>
</TypeObj>
<TypeObj>
<IDType>21a952eb-089e-467a-98bf-f8cb9a0ebd88</IDType>
<Type>Producer</Type>
</TypeObj>
</Types>
<WebSite>http://www.buntingsupplies.comau</WebSite>
</Customer>
<Address>
<IDAddress>09ad445a-6958-4365-aa4b-1a297828b14d</IDAddress>
<AddressLine1>26 Wolongong ROad</AddressLine1>
<AddressLine2 i:nil="true" />
<City>ARNCLIFFE</City>
<State>NSW</State>
<IDCountry>1013</IDCountry>
<Country>Australia</Country>
<PostCode>2205</PostCode>
<LocRef>
<IDLocation>328e934c-930f-4610-af3c-edf83c2b9d1a</IDLocation>
<LatLng>
<Lat>-33.934813</Lat>
<Lng>151.146104</Lng>
</LatLng>
</LocRef>
</Address>
<Notes>
<NoteObj>
<IDEntity>7090fad1-c4da-4488-9ceb-55ee9847edcc</IDEntity>
<IDNoteType>2b11efc3-2a43-4c03-92ac-923e77f821a2</IDNoteType>
<Type>Important</Type>
<NoteInfo>Main contact for organisation</NoteInfo>
<IDNote>6df67939-97b1-4724-a966-77fa0b7438f9</IDNote>
</NoteObj>
</Notes>
</ContactObj> |
Create Contact
Add the follow contents to a file called "contact.data"
...
Code Block |
---|
curl -X POST -d update_contact.data \
-H "Content-Type: application/json" \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/contacts/[idcontact to update] |
Delete a contact
Code Block |
---|
curl -X DELETE \
-H "Content-Type: application/json" \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/contacts/fde3e1d7-5a7c-493d-b49f-dd514fa3b3af
|
...