MACANTA Introduction
Welcome to the Macanta API! You can use our API to access Macanta API endpoints, which allow you to access and manipulate Data Objects.
We have language examples in Shell and PHP! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
This example API documentation page was created with Slate.
Macanta expects the API access key to be included in all API requests to the server, as a URL query parameter.
Reserved Words
Macanta Reserved Words for Condition Query:
Words |
---|
less than equal |
greater than equal |
greater than |
more than |
larger than |
higher than |
exceeds |
is over |
older than |
bigger than |
less than |
fewer than |
lower than |
younger than |
within |
between |
or |
and |
is not |
is null |
not null |
cd_amended |
Authentication
Macanta has simple Authentication using Application Access Key:
GET Sample
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/app_check/?access_key=1234567890123456
<?php
$IsValidKey = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/app_check/?access_key=1234567890123456')
?>
POST Sample
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/app_check
--header 'Content-Type: application/json' \
--data '{"access_key":"1234567890123456"}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/app_check');
$payload = '{"access_key":"1234567890123456"';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
Macanta uses an access key to allow access to the API. You can find the access key for any Macanta installation in Admin >> Security & Saved Searches.
Make sure to replace
APP_NAME
with your Macanta app name, and1234567890123456
with your Macanta access key.
Contacts
Add/Update Contact
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/contact
--header 'Content-Type: application/json' \
--data '{"access_key":"1234567890123456","Email":"email@mail.com","FirstName":"John","LastName":"Doe"'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/contact');
$payload = '{"access_key":"1234567890123456","Email":"email@mail.com","FirstName":"John","LastName":"Doe"';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
If the contact/email is not existing, the API will try to add a record into the database or update if exist: The above command returns the Data Object configuration as JSON structured like this:
[
{
"action" : "insert/update",
"status" : "true/false",
"contactId" : "12345",
"Email" : "youremail@email.com",
"FirstName" : "John",
"LastName" : "Doe",
"Title" : "",
"Company" : "Macanta Inc.",
"EmailAddress2" : "EmailAdd 2",
"EmailAddress3" : "EmailAdd 3",
"Website" : "macantacrm.com",
"JobTitle" : "Developer",
"Phone1" : "123456789",
"Phone2" : "123456789",
"Phone3" : "123456789",
"Phone4" : "123456789",
"Phone5" : "123456789",
"StreetAddress1" : "StreetAddress1",
"StreetAddress2" : "StreetAddress2",
"City" : "City",
"State" : "State",
"PostalCode" : "123-456",
"Country" : "London",
"Address2Street1" : "Street1",
"Address2Street2" : "Street2",
"City2" : "City2",
"PostalCode2" : "PostalCode2",
"Country2" : "Country2"
}
]
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
Contact Email, unique and used as record key |
All Contact Field can be passed as parameter to update the record
Retrieve Contact
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/contact/?Email=youremail@email.com&limit=100&page=0&sort=desc&sort_by=FirstName&access_key=1234567890123456'
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/contact/?FirstName=Peter&limit=100&page=0&sort=desc&sort_by=FirstName&access_key=1234567890123456'
<?php
$Contact = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/contact/?Email=youremail@email.com&limit=100&page=0&access_key=1234567890123456');
$Contact = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/contact/?FirstName=Peter&limit=100&page=0&access_key=1234567890123456');
?>
The above command returns the Contact Data as JSON structured like this:
[
{
"Id" : "123456",
"Email" : "youremail@email.com",
"FirstName" : "John",
"LastName" : "Doe",
"Title" : "",
"Company" : "Macanta Inc.",
"EmailAddress2" : "EmailAdd 2",
"EmailAddress3" : "EmailAdd 3",
"Website" : "macantacrm.com",
"JobTitle" : "Developer",
"Phone1" : "123456789",
"Phone2" : "123456789",
"Phone3" : "123456789",
"Phone4" : "123456789",
"Phone5" : "123456789",
"StreetAddress1" : "StreetAddress1",
"StreetAddress2" : "StreetAddress2",
"City" : "City",
"State" : "State",
"PostalCode" : "123-456",
"Country" : "London",
"Address2Street1" : "Street1",
"Address2Street2" : "Street2",
"City2" : "City2",
"PostalCode2" : "PostalCode2",
"Country2" : "Country2"
}
]
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
Contact Email, unique and used as record key |
All Contact Field can be passed as parameter to query the record
Search Contact
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/search/contact/?q=John%20Doe&page=0&limit=100&sort=desc&sort_by=FirstName&access_key=1492505713264569'
<?php
$SearchResults = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/search/contact/?q=John%20Doe&page=0&limit=100&sort=desc&sort_by=FirstName&access_key=1492505713264569');
?>
The above command returns the Search Results Data as JSON structured like this:
{
"searchType": "contact",
"query": "John Doe",
"limit": "100",
"page": "0",
"count": 3,
"sort": "desc",
"sort_by": "FirstName",
"data": [
{
"AccountId": "0",
"BillingInformation": "",
"Birthday": "",
"City": "",
"City2": "",
"Company": "",
"CompanyID": "0",
"ContactNotes": "",
"ContactType": "",
"Country": "",
"CreatedBy": "0",
"DateCreated": "{\"date\":\"2020-04-17 07:08:49\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"Email": "johndoe@gmail.com",
"Fax1": "",
"FirstName": "John",
"Groups": "",
"Id": "2264",
"JobTitle": "",
"LastName": "Doe",
"LastUpdated": "",
"LastUpdatedBy": "0",
"LeadSourceId": "0",
"Leadsource": "",
"MiddleName": "",
"Nickname": "",
"OwnerID": "0",
"Password": "",
"Phone1": "",
"Phone1Ext": "",
"Phone1Type": "",
"Phone2": "",
"Phone2Ext": "",
"Phone2Type": "",
"Phone3": "",
"Phone3Ext": "",
"Phone3Type": "",
"PostalCode2": "",
"Country2": "",
"PostalCode": "",
"ReferralCode": "",
"SpouseName": "",
"State": "",
"State2": "",
"StreetAddress1": "",
"StreetAddress2": "",
"Address2Street1": "",
"Address2Street2": "",
"Suffix": "",
"Title": "",
"Username": "",
"Validated": "",
"Website": "",
"TimeZone": "",
"EmailAddress2": "",
"EmailAddress3": "",
"Address3Street1": "",
"Address3Street2": "",
"Address3Type": "",
"City3": "",
"State3": "",
"Country3": "",
"PostalCode3": "",
"IdLocal": "2264"
}
]
}
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
q | String query to Search |
page | (int) Page number of a Searched results |
limit | (int) a number to limit the Search results |
sort | either asc or desc |
session_name | (optional) to filter contacts |
sort_by | any field name of a Contact Table |
User
Get User Infor
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/user_info?Email=email@gmail.com&api_key=1234567890'
<?php
$UserData = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/user_info?Email=email@gmail.com&api_key=1234567890');
?>
The above command returns the User Object as JSON structured like this:
{
"Data": {
"AccountId": "0",
"Address1Type": "",
"Address2Street1": "",
"Address2Street2": "",
"Address2Type": "",
"Address3Street1": "",
"Address3Street2": "",
"Address3Type": "",
"Anniversary": "",
"AssistantName": "",
"AssistantPhone": "",
"BillingInformation": "",
"Birthday": "",
"City": "",
"City2": "",
"City3": "",
"Company": "",
"CompanyID": "0",
"ContactNotes": "",
"ContactType": "",
"Country": "",
"Country2": "",
"Country3": "",
"CreatedBy": "0",
"DateCreated": "{\"date\":\"2020-02-25 10:25:12\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"Email": "email@gmail.com",
"EmailAddress2": "",
"EmailAddress3": "email3@gmail.com",
"Fax1": "",
"Fax1Type": "",
"Fax2": "",
"Fax2Type": "",
"FirstName": "John",
"Groups": "",
"Id": "1366",
"IdLocal": "1366",
"JobTitle": "",
"LastName": "Doe",
"LastUpdated": "{\"date\":\"2020-06-17 12:15:26\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"LastUpdatedBy": "0",
"Phone2": "9988640885",
"Phone1Ext": "",
"Phone1": "+639988640885",
"MiddleName": "",
"OwnerID": "0",
"Nickname": "",
"Phone2Type": "",
"Leadsource": "",
"LeadSourceId": "0",
"Phone2Ext": "",
"PostalCode": "",
"Phone1Type": "",
"Phone3Ext": "",
"PostalCode2": "",
"Phone3": "1234567899",
"Phone5Ext": "",
"Phone5": "+639428640885",
"Phone5Type": "",
"Phone4Ext": "",
"Phone4": "9886408",
"Phone3Type": "",
"Phone4Type": "",
"PostalCode3": "",
"ReferralCode": "",
"SpouseName": "",
"State": "",
"State2": "",
"State3": "",
"StreetAddress1": "",
"StreetAddress2": "",
"TimeZone": "",
"Title": "",
"Suffix": "",
"Username": "",
"Validated": "",
"Website": "",
"ZipFour1": "",
"ZipFour2": "",
"ZipFour3": "",
"Origin": "",
"CustomField": "[]",
"Signature": "<p>Test</p>",
"AppName": "qj311-dm"
},
"Permission": {
"Level": "administrator",
"Access": {
"TemplateId": "8",
"TemplateName": "AAA",
"TemplateDescription": "AAA",
"TabAccess": "{\"ct_kf2e7cxn\":\"ReadWrite\",\"ci_k9teyuio\":\"ReadWrite\",\"ci_kb6k54ne\":\"ReadWrite\",\"ci_kb6mwvu8\":\"ReadWrite\",\"ci_kdra6pxx\":\"ReadWrite\",\"ci_kdra9cuq\":\"ReadWrite\",\"com_history\":\"ReadWrite\"}",
"SectionAccess": "{\"ci_k9teyuio\":{\"Section Name 01\":{},\"Section Name 02\":{},\"Info\":\"ReadWrite\",\"Section Name 03\":{},\"This is a very long Section Name\":{},\"Section Name 04\":{},\"Email Details\":\"ReadWrite\"},\"ci_kb6k54ne\":{\"Section Ok\":{}}}",
"MQBAccess": "{\"qry_9iSq8ol4KByOmpf3\":\"ReadWrite\"}",
"MQBWidgetAccess": "{\"qry_9iSq8ol4KByOmpf3\":\"unchecked\"}",
"UserGuides": "{\"GeneralInterface\":{\"Contact Window\":\"Test\",\"Search Function\":\"Test\",\"Notes & Tasks\":\"Note Test\"},\"SidebarTabs\":{\"Notes\":\"sitebar tabs\"},\"DataObject\":{\"Companies\":{\"Section Name 01\":\"Ok this is a helper text\",\"Section Name 02\":\"ok\",\"Info\":\"info\",\"Section Name 03\":\"sadasd\",\"This is a very long Section Name\":\"ok long\",\"Section Name 04\":\"sadasd\"},\"Flights\":{},\"Deals\":{},\"New DO\":{},\"Old COntent\":{}}}",
"ContactViewPermissions": "{\"Global\":\"ReadWrite\"}",
"WorkflowBoards": "",
"Status": "Active",
"Created": "2020-08-13 09:30:10",
"Updated": "2020-10-02 14:59:27"
}
},
"Message": "Ok"
}
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
List Macanta Users
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/users?access_key=12345678910'
<?php
$UserData = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/users?access_key=12345678910');
?>
The above command returns the User Object as JSON structured like this:
{
"limit": 1000,
"page": 0,
"count": 2,
"total": "2",
"data": [
{
"ContactId": "1311",
"ContactLevel": "Admin",
"TemplateId": "8",
"FirstName": "John",
"LastName": "Doe",
"Email": "john.d@macantacrm.com"
},
{
"ContactId": "1366",
"ContactLevel": "Admin",
"TemplateId": "8",
"FirstName": "Sam",
"LastName": "Smith",
"Email": "sam.s@macantacrm.com"
}
]
}
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
Add Macanta User
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/user
--header 'Content-Type: application/json' \
--data '{"access_key":"1234567890123456","email":"email@mail.com","firstname":"John","lastname":"Doe"'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/user');
$payload = '{"access_key":"1234567890123456","email":"email@mail.com","firstname":"John","lastname":"Doe"';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
If the contact/email is not existing, the API will try to add a record into the database or update if exist: The above command returns the Data Object configuration as JSON structured like this:
{
"user":
{
"action" : "insert",
"status" : "true/false",
"contactId" : "12345",
"user_level" : "Admin",
"user_premission_tlp_id" : "2",
"WebHookResults" : "true"
}
}
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
Contact Email, unique and used as record key | |
firstname | First Name of a User |
lastname | Last Name of a User |
Authentication
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/user_verify?Email=email@gmail.com&access_key=12345678910&Password=silenceisgolden
<?php
$UserData = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/user_verify?Email=email@gmail.com&access_key=12345678910&Password=silenceisgolden');
?>
The above command returns the User Object as JSON structured like this:
{
"Data": {},
"Permission": {
"Level": "administrator",
"Access": {
"TemplateId": "3",
"TemplateName": "AAA",
"TemplateDescription": "AAA",
"TabAccess": "{\"ci_k30e5zmn\":\"ReadWrite\",\"ci_kbgaluau\":\"ReadWrite\",\"ci_kc2bram8\":\"ReadWrite\"}",
"SectionAccess": "{\"ci_k30e5zmn\":{\"Macanta\":\"ReadWrite\",\"Chargebee\":\"ReadWrite\",\"Tracking\":\"ReadWrite\"},\"ci_kbgaluau\":{\"Tracking\":\"ReadWrite\"},\"ci_kc2bram8\":{\"Tracking\":\"ReadOnly\"}}",
"MQBAccess": "{\"qry_qaEJDv3d1GJ7bPRU\":\"ReadWrite\",\"qry_xMdCgcZxhEHlhk4c\":\"ReadWrite\",\"qry_KBUXlMo96E8udImL\":\"ReadWrite\",\"qry_yMqeqCvYxmV02MVL\":\"ReadWrite\",\"qry_7hRxvAwGyGsqYpcm\":\"ReadWrite\"}",
"MQBWidgetAccess": "{\"qry_qaEJDv3d1GJ7bPRU\":\"unchecked\",\"qry_xMdCgcZxhEHlhk4c\":\"unchecked\",\"qry_KBUXlMo96E8udImL\":\"unchecked\",\"qry_yMqeqCvYxmV02MVL\":\"unchecked\",\"qry_7hRxvAwGyGsqYpcm\":\"unchecked\"}",
"UserGuides": "",
"ContactViewPermissions": "{\"Global\":\"ReadWrite\"}",
"WorkflowBoards": "",
"Status": "Active",
"Created": "2020-02-25 06:25:38",
"Updated": "2020-07-30 08:46:52"
}
},
"SessionName": "sess_a30679adfca52144",
"Login": true,
"Message": "Ok"
}
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
User Email/Login | |
Password | User Password |
Data Objects
Add Data Object Item
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/add' \
--header 'Content-Type: application/json' \
--data '{"access_key":"1234567890123456","contactId":"123456","connected_group":"Pets","relationship":"Owner","FieldName1":"Value1","FieldName2":"Value2"}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data/?access_key=1234567890123456');
$payload = '{"access_key":"1234567890123456","contactId":"123456","connected_group":"Pets","relationship":"Owner","FieldName1":"Value1","FieldName2":"Value2"}';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
contactId | (Required) Contact Id |
connected_group | (Required) Data Object Type |
relationship | (Required) Ralationship Name of a Contact |
Edit Data Object Item
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/add' \
--header 'Content-Type: application/json' \
--data '{"access_key":"1234567890123456","cd_guid":"item_123sffds","contactId":"123456","connected_group":"Pets","relationship":"Owner","FieldName1":"Value1","FieldName2":"Value2"}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data/?access_key=1234567890123456');
$payload = '{"access_key":"1234567890123456","cd_guid":"item_123sffds","contactId":"123456","connected_group":"Pets","relationship":"Owner","FieldName1":"Value1","FieldName2":"Value2"}';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
cd_guid or connecteddata_id | (Required) Item Id to be updated or if connecteddata_id(FieldName) it checks the Unique value of a Field and treat as a Key |
contactId | (Required) Contact Id |
connected_group | (Required) Data Object Type |
relationship | (Required) Ralationship Name of a Contact |
Retrieve Data Object Types
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/data_object/types?access_key=1234567890123456'
<?php
$DataObjectTypes = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/data_object/types?access_key=1234567890123456');
?>
The above command returns the JSON Data:
json [ { "id":"ci_k30e5zmn", "title":"Macanta Installs" }, { "id":"ci_k73m2ld9", "title":"Case Study and Demo Calls" }, { "id":"ci_k862yk1f", "title":"Case Study Webinars" } ]
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
Retrieve Data Object Relationships
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/data_object/relationships?access_key=1234567890123456'
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/data_object/relationships?type=ci_k30e5zmn&access_key=1234567890123456'
<?php
$Relationships = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/data_object/relationships?access_key=1234567890123456');
$Relationships = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/data_object/relationships?type=ci_k30e5zmn&access_key=1234567890123456');
?>
The above command returns the JSON Data:
json [ { "id": "re_34cc668d5636f556", "title": "Macanta User" }, { "id": "re_f984875611fae2fd", "title": "Prospect" }, { "id": "re_6fa67d0c1d49085c", "title": "Initial Call Host" }, { "id": "re_ccb956bd506cbdc8", "title": "Prep Call Host" } ]
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
type | Data Object Type Id, Use to get Relationships of Specific Type |
Retrieve Data Object Fields
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/data_object/fields?access_key=1234567890123456'
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/data_object/fields?type=ci_k30e5zmn&access_key=1234567890123456'
<?php
$Fields = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/data_object/fields?access_key=1234567890123456');
$Fields = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/data_object/fields?type=ci_k30e5zmn&access_key=1234567890123456');
?>
The above command returns the JSON Data:
json [ { "placeHolder": "App Name", "useAsPrimaryKey": "no", "requiredField": "no", "contactspecificField": "no", "showInTable": "yes", "showOrder": "1", "fieldSubGroup": "App Details", "fieldHeadingText": "", "id": "field_k30e6goe", "key": "App Name", "type": "Text", "helpText": "This is the app name of your Macanta.", "placeholder": "App Name", "default": "", "required": false }, { "placeHolder": "Contact Is App Owner", "fieldChoices": "Yes\r\nNo", "useAsPrimaryKey": "no", "requiredField": "no", "contactspecificField": "yes", "showInTable": "no", "showOrder": "0", "fieldSubGroup": "App Details", "fieldHeadingText": "", "id": "field_k7egpmve", "key": "Contact Is App Owner", "type": "Radio", "helpText": "", "placeholder": "Contact Is App Owner", "default": "No", "required": false, "choices": [ "Yes", "No" ] }, { "placeHolder": "Macanta URL", "useAsPrimaryKey": "no", "requiredField": "no", "contactspecificField": "no", "showOrder": "0", "fieldSubGroup": "App Details", "fieldHeadingText": "", "id": "field_k30eaola", "key": "Macanta URL", "type": "URL", "helpText": "", "placeholder": "Macanta URL", "default": "", "required": false }, { "placeHolder": "App Owner Email", "useAsPrimaryKey": "no", "requiredField": "no", "contactspecificField": "no", "showInTable": "no", "showOrder": "0", "fieldSubGroup": "App Details", "fieldHeadingText": "", "id": "field_k737arpa", "key": "App Owner Email", "type": "Email", "helpText": "", "placeholder": "App Owner Email", "default": "", "required": false } ]
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
type | Data Object Type Id, Use to get Fields of Specific Type |
Retrieve Data Object Specific Item
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/data_object/item?item=item_e267982d99421b7b&access_key=1234567890123456'
<?php
$Item = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/data_object/item?item=item_e267982d99421b7b&access_key=1234567890123456');
?>
The above command returns the JSON Data:
json { "id": "item_e267982d99421b7b", "group": "ci_k30e5zmn", "value": "{\"field_k30e6goe\":\"oz210\",\"field_k7egpmve\":{\"id_1786\":\"Yes\"},\"field_k30eaola\":\"https:\\/\\/oz210.macantacrm.com\",\"field_k737arpa\":\"kathy@sbhradiators.co.uk\",\"field_k30ebgv9\":{\"id_1786\":\"southern-physics\"},\"field_k30ecy98\":\"2020-03-24\",\"field_k30eddgn\":\"2020-12-31\",\"field_k36efn5h\":\"Trial\",\"field_k3d24pkk\":{\"id_1786\":\"Logged In Recently\"},\"field_k30eiqgd\":{\"id_1786\":\"2020-03-26\"},\"field_k30ej93n\":{\"id_1786\":\"2020-03-26\"},\"field_k37cs0uw\":{\"id_1786\":\"\"},\"field_k30egim6\":{\"id_1786\":\"\"},\"field_k30ey43o\":{\"id_1786\":\"\"},\"field_k30eyo68\":{\"id_1786\":\"\"},\"field_k30ezifx\":{\"id_1786\":\"\"},\"field_k7320fob\":\"Azyw7pRuBq7X11nSn\",\"field_k7bz6wea\":\"\",\"field_k7bz7o3h\":\"\",\"field_k7329avc\":\"\",\"field_k7d49odm\":\"Macanta EC Page\",\"field_k7dcoxgr\":\"Keg0Dy\",\"field_k7dcnd0s\":\"2021-03-24\",\"field_k7dgiild\":\"\",\"field_k80883nl\":{\"id_1786\":\"\"},\"field_k80a3hdn\":{\"id_1786\":\"\"}}", "connected_contact": "{\"1786\":{\"relationships\":[\"re_34cc668d5636f556\"],\"ContactId\":1786,\"FirstName\":\"Kathy\",\"LastName\":\"Smith\",\"Email\":\"kathy@sbhradiators.co.uk\"}}", "history": "{\"update_history\":[],\"connection_history\":[{\"date\":\"2020-03-24 21:19:20\",\"to\":{\"1786\":{\"Email\":\"kathy@sbhradiators.co.uk\",\"FirstName\":\"Kathy\",\"LastName\":\"Smith\",\"relationships\":[\"re_34cc668d5636f556\"]}}}]}", "meta": "{\"editable\":\"yes\",\"searchable\":\"yes\",\"multiple_link\":\"yes\"}", "created": "2020-03-24 21:19:20", "status": "active" }
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
item | (Required) Data Object Item Id, Use to get Specific Item |
List Data Object Structure
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/connected_data?access_key=1234567890123456'
<?php
$DOStructure = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data?access_key=1234567890123456');
?>
List Data Object Items
Using Data Object Type or Group Id
shell curl --request GET \ --url 'https://APP_NAME.macantacrm.com/rest/v1/connected_data?access_key=1234567890123456&group_id=ci_k30e5zmn'
<?php
$DOStructure = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data?access_key=1234567890123456&group_id=ci_k30e5zmn');
?>
Using Data Object Type Name or Group Name
shell curl --request GET \ --url 'https://APP_NAME.macantacrm.com/rest/v1/connected_data?access_key=1234567890123456&type=Macanta+Installs'
<?php
$DOStructure = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data?access_key=1234567890123456&type=Macanta+Installs');
?>
Search Data Object Item by Field Name and Value
Data Object Id or Name can be used
shell curl --request GET \ --url 'https://APP_NAME.macantacrm.com/rest/v1/connected_data?access_key=1234567890123456&group_id=ci_k30e5zmn&field=App+Name&value=crm'
<?php
$DOStructure = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data?access_key=1234567890123456&group_id=ci_k30e5zmn&field=App+Name&value=crm');
?>
Get Data Objects by Type and Contact
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/connected_data/?access_key=1234567890123456&type=Pets&contactId=123'
<?php
$ContactPets = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data/?access_key=1234567890123456&type=Pets&contactId=123')
?>
The above command returns JSON structured like this:
{
"connected_data": {
"ci_j7kunryw": {
"group_name": "Pets",
"items": {
"item_50eec9d8": {
"data": {
"field_kcylb25x": {
"id": "field_kcylb25x",
"name": "Project",
"type": "Text",
"helpText": "The name of the project",
"placeholder": "",
"default": "",
"required": "yes",
"showInTable": "yes",
"showOrder": "0",
"fieldSubGroup": "",
"sectionTagId": "",
"custom-field": "",
"value": "Macanta Apple Watch"
},
"field_kejv78th": {
"id": "field_kejv78th",
"name": "Level",
"type": "Text",
"helpText": "",
"placeholder": "",
"default": "",
"required": "no",
"showInTable": "yes",
"showOrder": "2",
"fieldSubGroup": "",
"sectionTagId": "",
"custom-field": "",
"value": "Senior"
},
"field_kelg4y6m": {
"id": "field_kelg4y6m",
"name": "Preferred Libraries",
"type": "Text",
"helpText": "",
"placeholder": "",
"default": "",
"required": "no",
"showInTable": "yes",
"showOrder": "2",
"fieldSubGroup": "",
"sectionTagId": "",
"custom-field": "",
"value": "Redux Toolkit"
},
"field_keljzr6m": {
"id": "field_keljzr6m",
"name": "Logged Hours",
"type": "Number",
"helpText": "",
"placeholder": "",
"default": "",
"required": "no",
"showInTable": "yes",
"showOrder": "3",
"fieldSubGroup": "Group A",
"sectionTagId": "",
"custom-field": "",
"value": "36"
}
},
"attachments": [
{
"id": "1",
"item_id": "item_kel7za1e",
"filename": "DO Details with Section and Subgroups.png",
"thumbnail":"asdasdasddasd",
"download_url": "https://f000.backblazeb2.com/file/macantacrm-connected-data-attachments/sx529/item_kel7za1e/DO-Details-with-Section-and-Subgroups.png",
"file_size": "187979",
"timestamp": "1602741076",
"b2_filename": "sx529/item_kel7za1e/DO-Details-with-Section-and-Subgroups.png",
"b2_file_id": "4_z03a5e12671321ffc7c000110_f11811b4a6b4042d3_d20201015_m055115_c000_v0001075_t0032",
"b2_timestamp": "1602741075000",
"meta": "{}"
}
],
"notes": [
{
"Id": "8",
"IdLocal": "8",
"Origin": "Local",
"CreationNotes": "test note DO Description",
"ActionDescription": "test note DO title",
"CreatedBy": "1",
"UserID": "1",
"IsAppointment": "0",
"ActionType": "General",
"CreationDate": {
"date": "2020-09-02 16:36:46",
"timezone_type": 3,
"timezone": "UTC"
},
"CompletionDate": "",
"ObjectType": "Note",
"ActionDate": "",
"_Taskassignedto": "",
"_CallRecordingURL": "",
"_JSON": {
"note_type": "quick_notes",
"user": "Jethro Estrada",
"note": {
"Notes": "PHA+dGVzdCBub3RlIERPIERlc2NyaXB0aW9uPC9wPg=="
}
}
}
],
"meta": null,
"connected_contacts": {
"257": {
"FirstName": "Peter",
"LastName": "Daly-Dickson",
"Email": "peter@conquerthechaos.org",
"Relationships": {
"re_28aaf338": "Walker"
}
}
}
},
"item_jg3haotv": {
"data": {
"field_j7kuo0hg": {
"name": "name",
"type": "Text",
"custom-field": "PetName",
"value": "Felix"
},
"field_j7kupkc7": {
"name": "species",
"type": "Select",
"custom-field": "Species",
"value": "Cat"
},
"field_j7kuq116": {
"name": "sex",
"type": "Radio",
"custom-field": "Sex",
"value": "Female"
},
"field_j7kuqmio": {
"name": "date of birth",
"type": "Date",
"custom-field": "PetDateofBirth",
"value": "2013-04-09"
}
},
"meta": null,
"connected_contacts": {
"257": {
"FirstName": "Peter",
"LastName": "Daly-Dickson",
"Email": "peter@conquerthechaos.org",
"Relationships": {
"re_42f3fa8e": "Owner"
}
}
}
},
"item_jg3hb3v3": {
"data": {
"field_j7kuo0hg": {
"name": "name",
"type": "Text",
"custom-field": "PetName",
"value": "Thumper"
},
"field_j7kupkc7": {
"name": "species",
"type": "Select",
"custom-field": "Species",
"value": "Rabbit"
},
"field_j7kuq116": {
"name": "sex",
"type": "Radio",
"custom-field": "Sex",
"value": "Male"
},
"field_j7kuqmio": {
"name": "date of birth",
"type": "Date",
"custom-field": "PetDateofBirth",
"value": "2016-11-23"
}
},
"meta": null,
"connected_contacts": {
"257": {
"FirstName": "Peter",
"LastName": "Daly-Dickson",
"Email": "peter@conquerthechaos.org",
"Relationships": {
"re_42f3fa8e": "Owner"
}
}
}
}
}
}
},
"count": 1,
"next": "",
"previous": ""
}
This endpoint retrieves all Data Objects of a specific type, for a specific contact.
HTTP Request
GET https://APP_NAME.macantacrm.com/rest/v1/connected_data
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
type | Set to the required Data Object type |
contactId | Set to the ID of the required contact |
Edit Data Object Item by Item ID, Field IDs and Contact IDs
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/connected_data/?access_key=1234567890123456' \
--header 'Content-Type: application/json' \
--data '{"item_id":"item_j5mytgsz","value":{"field_j5m6j6vg":"2016-10-23","field_other01":"value01"},"connected_contacts":[{contact_id1:relationship_name},{contact_id2:relationship_name}]}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data/?access_key=1234567890123456');
$payload = '{"item_id":"item_j5mytgsz","value":{"field_j5m6j6vg":"2016-10-23","field_other01":"value01"},"connected_contacts":[{contact_id1:relationship_name},{contact_id2:relationship_name}]}';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
Bulk Edit/Add Data Object Item
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/connected_data/?access_key=1234567890123456' \
--header 'Content-Type: application/json' \
--data '{
"{group_id|group_name}": "string",
"duplicate_option": "string",
"items": [
{
"data": {
"{field_name1}": "string",
"{field_name2}": "string",
"{field_name3}": "string"
},
"connected_contacts": {
"{contact_id1}": "{relation_name}",
"{contact_id2}": "{relation_name}"
}
},
{
"data": {
"{field_name1}": "string",
"{field_name2}": "string",
"{field_name3}": "string"
},
"connected_contacts": {
"{contact_id1}": "{relation_name}",
"{contact_id2}": "{relation_name}"
}
}
]
}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/connected_data/?access_key=1234567890123456');
$payload = '{
"{group_id|group_name}": "string",
"duplicate_option": "string",
"items": [
{
"data": {
"{field_name1}": "string",
"{field_name2}": "string",
"{field_name3}": "string"
},
"connected_contacts": {
"{contact_id1}": "{relation_name}",
"{contact_id2}": "{relation_name}"
}
},
{
"data": {
"{field_name1}": "string",
"{field_name2}": "string",
"{field_name3}": "string"
},
"connected_contacts": {
"{contact_id1}": "{relation_name}",
"{contact_id2}": "{relation_name}"
}
}
]
}';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
group_id/group_name | Data Object Id or Name |
duplicate_option | Use for DupCheck Existing Items |
field_name | Field Name of an Item |
contact_id | Contact Id to be connected |
relation_name | Name of the relationship |
Add Data Object Note
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/data_object/note/add' \
--header 'Content-Type: application/json' \
--data '{"access_key":"1492505713264569","item_id":"item_keb6xi7p","note_title":"API Note","note_type":"General","rich_text_notes":"API note rich text","plain_text_notes":"API note plain text","tags":"test,geover"}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/data_object/note/add');
$payload = '{"access_key":"1492505713264569","item_id":"item_keb6xi7p","note_title":"API Note","note_type":"General","rich_text_notes":"API note rich text","plain_text_notes":"API note plain text","tags":"test,geover"}';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
item_id | Id of the Item to attach the note |
note_title | Title of the Note |
note_type | e.g. General, Alert, Update, Comment, Call Note |
rich_text_notes | rich text note to save, can be the same as plain_text_notes |
plain_text_notes | plain text note to save |
tags | (optional) e.g. #tag1,#tag2 |
Contact Action (Notes And Task)
Retrieve Note
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/note/?contactId=12345&limit=100&page=0&filter=general&filter_by=terms&access_key=1234567890123456'
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/note/?Id=12345&limit=100&page=0&&access_key=1234567890123456'
<?php
$Notes = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/note/?contactId=12345&limit=100&page=0&filter=general&filter_by=terms&access_key=1234567890123456');
$Note = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/note/?Id=12345&limit=100&page=0&access_key=1234567890123456');
?>
The above command returns JSON structured like this:
{
"limit": "1",
"page": "0",
"count": 1,
"total": "17",
"data": [
{
"Accepted": "0",
"ActionDate": "",
"ActionDescription": "Edited API Note Test Title",
"ActionType": "General",
"CompletionDate": "",
"ContactId": "1366",
"CreatedBy": "0",
"CreationDate": "{\"date\":\"2020-09-02 11:40:46\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"CreationNotes": "this is my test note content edit ok",
"EndDate": "",
"Id": "821",
"IsAppointment": "0",
"LastUpdated": "{\"date\":\"2020-09-02 11:46:49\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"LastUpdatedBy": "0",
"Location": "",
"ObjectType": "Note",
"OpportunityId": "0",
"PopupDate": "",
"Priority": "0",
"UserID": "1311",
"tags": "#general,#geover,#now",
"_CallRecordingURL6": "",
"_JSON3": {
"note_type": "quick_notes",
"user": " ",
"note": {
"Notes": "dGhpcyBpcyBteSB0ZXN0IG5vdGUgY29udGVudCBlZGl0IG9r"
}
}
}
]
}
Get All Note Records with ContactId
HTTP Request
GET https://APP_NAME.macantacrm.com/rest/v1/note
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
contactId | Use to Retrieve Note Record for Contact |
Id | Use to Retrieve Note Record with Specific Note Id |
limit | Default to 1000, Number of Items to return |
page | Default to 0, Record Offset |
filter | (optional) a string to filter search items, Tags can be separated by coma |
filter_by | (optional) either terms or tags Default to terms |
Create A Note
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/note?access_key=1234567890123456
--header 'Content-Type: application/json' \
--data '{"contactId":"12345","note":"Note Content","title":"Note Title","type":"General","tags":"#alert,#system,#api"'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/note/?access_key=1234567890123456');
$payload = '{"contactId":"12345","note":"Note Content","title":"Note Title","type":"General","tags":"#alert,#system,#api"';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
The above command returns JSON structured like this:
[
{
"Accepted": "0",
"ActionDate": "",
"ActionDescription": "Note Title",
"ActionType": "General",
"CompletionDate": "",
"ContactId": "12345",
"CreatedBy": "0",
"CreationDate": "{\"date\":\"2020-07-06 06:53:30\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"CreationNotes": "Note Content",
"EndDate": "",
"Id": "0123",
"IsAppointment": "0",
"LastUpdated": "{\"date\":\"2020-07-06 06:53:30\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"LastUpdatedBy": "0",
"Location": "",
"ObjectType": "Note",
"OpportunityId": "0",
"PopupDate": "",
"Priority": "0",
"UserID": "1311",
"tags": "#alert,#system,#api",
"status": true
}
]
Create Note Record
HTTP Request
GET https://APP_NAME.macantacrm.com/rest/v1/note
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key, can be set in the URL or Payload |
contactId | Note Contact Id |
title | (required) Note Title |
note | (required) Note Message or Body |
type | Type of the note, Default to General |
tags | Default to #{Note_Type} |
Edit Note
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/note/edit/{id}
--header 'Content-Type: application/json' \
--data '{"tags":"#tag,#now","type":"General","note":"this is my test note content edit","title":"Edited API Note Test Title","api_key":"1492505713264569"}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/note/edit/{id}');
$payload = '{"tags":"#tag,#now","type":"General","note":"this is my test note content edit","title":"Edited API Note Test Title","api_key":"1492505713264569"}';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
Query Parameters
Parameter | Description |
---|---|
api_key | Set to the Macanta API access key, can be set in the URL or Payload |
tags | e.g. #tag1,#tag2 |
type | Type of the note, Default to General |
note | Edited Note |
title | Edited Title |
Retrieve Task
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/task/?contactId=12345&limit=100&page=0&filter=general&filter_by=terms&access_key=1234567890123456'
curl --request GET \
--url 'https://APP_NAME.macantacrm.com/rest/v1/task/?Id=12345&limit=100&page=0&access_key=1234567890123456'
<?php
$Tasks = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/task/?contactId=12345&limit=100&page=0&filter=general&filter_by=terms&access_key=1234567890123456');
$Task = file_get_contents( 'https://APP_NAME.macantacrm.com/rest/v1/task/?Id=12345&limit=100&page=0&access_key=1234567890123456');
?>
The above command returns JSON structured like this:
{
"limit": "1",
"page": "0",
"count": 1,
"total": "16",
"data": [
{
"Accepted": "1",
"ActionDate": "{\"date\":\"20200703T00:00:00\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"ActionDescription": "Edited Task",
"ActionType": "MacantaTask",
"CompletionDate": "{\"date\":\"20200902T12:20:23\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"ContactId": "1366",
"CreatedBy": "0",
"CreationDate": "{\"date\":\"2020-09-02 09:07:48\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"CreationNotes": "ho ho ho 2",
"EndDate": "",
"Id": "815",
"IsAppointment": "0",
"LastUpdated": "{\"date\":\"2020-09-02 12:42:10\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"LastUpdatedBy": "0",
"Location": "",
"ObjectType": "Task",
"OpportunityId": "0",
"PopupDate": "",
"Priority": "1",
"UserID": "1311",
"tags": "#alert,#geover,#testAPI",
"_Taskassignedto": "Geover Zamora",
"_Taskassignedby": " ",
"_JSON3": {
"Notes": "dGhpcyBpcyBteSB0ZXN0IG5vdGUgY29udGVudCBlZGl0IG9r"
}
}
]
}
Get All Task Records with ContactId
HTTP Request
GET https://APP_NAME.macantacrm.com/rest/v1/task
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key |
contactId | Use to Retrieve Note Record for Contact |
Id | Use to Retrieve Note Record with Specific Note Id |
limit | Default to 1000, Number of Items to return |
page | Default to 0, Record Offset |
filter | (optional) a string to filter search items, Tags can be separated by coma |
filter_by | (optional) either terms or tags Default to terms |
JSON return:
json { "id": 815, "updated": true }
Create A Task
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/task
--header 'Content-Type: application/json' \
--data '{"contactId":"12345","task_note":"Task Content","task_description":"Task Title","action_date":"","2020-07-06":"","user_email":"assignedto@gmail.com","tags":"#task","priority":"1"'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/task/?access_key=1234567890123456');
$payload = '{"contactId":"12345","task_note":"Task Content","task_description":"Task Title","action_date":"","2020-07-06":"","user_email":"assignedto@gmail.com","tags":"#task","priority":"1"';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
The above command returns JSON structured like this:
[
{
"Accepted": "1",
"ActionDate": "{\"date\":\"20200703T00:00:00\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"ActionDescription": "API Task Title",
"ActionType": "MacantaTask",
"CompletionDate": "",
"ContactId": "1366",
"CreatedBy": "0",
"CreationDate": "{\"date\":\"2020-07-06 09:14:49\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"CreationNotes": "Task Content",
"EndDate": "",
"Id": "773",
"IsAppointment": "0",
"LastUpdated": "{\"date\":\"2020-07-06 09:14:49\",\"timezone_type\":3,\"timezone\":\"UTC\"}",
"LastUpdatedBy": "0",
"Location": "",
"ObjectType": "Task",
"OpportunityId": "0",
"PopupDate": "",
"Priority": "1",
"UserID": "0",
"tags": "#task",
"_Taskassignedto": "Jarvis ",
"status": true,
"message": "added"
}
]
Create a Task Record
HTTP Request
GET https://APP_NAME.macantacrm.com/rest/v1/note
Query Parameters
Parameter | Description |
---|---|
access_key | Set to the Macanta API access key, can be set in the URL or Payload |
contactId | Note Contact Id |
task_description | (required) Task Title |
task_note | (required) Task Message or Body |
action_date | (required) Action Date of the Task |
priority | Default to 1 |
user_email | (required) To whom the task will be assigned |
tags | Default to #task |
Edit Task
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/task/edit/{id}
--header 'Content-Type: application/json' \
--data '{"action_date":"2020-07-03","task_note":"your task is this","task_description":"Edited Task","api_key":"1492505713264569"}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/task/edit/{id}');
$payload = '{"action_date":"2020-07-03","task_note":"your task is this","task_description":"Edited Task","api_key":"1492505713264569"}';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
Query Parameters
Parameter | Description |
---|---|
api_key | Set to the Macanta API access key, can be set in the URL or Payload |
action_date | e.g. 2020-07-03. The date of Task Action Date |
task_note | Edited Body of the Task |
task_description | Title of the Task |
JSON return:
json { "id": 815, "updated": true }
Complete A Task
curl --request POST \
--url 'https://APP_NAME.macantacrm.com/rest/v1/task/complete/{id}
--header 'Content-Type: application/json' \
--data '{"api_key":"1492505713264569"}'
<?php
$ch = curl_init( 'https://APP_NAME.macantacrm.com/rest/v1/task/complete/{id}');
$payload = '{"api_key":"1492505713264569"}';
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
curl_close($ch);
?>
JSON return:
json { "completed": true, "id": 1234 }
"erusev/parsedown": "^1.7.4",
"erusev/parsedown-extra": "0.8.1"