Skip to content

Commit 1b3869e

Browse files
committed
docs(crm-client): added API endpoints for contacts
1 parent dc7a5a5 commit 1b3869e

File tree

4 files changed

+566
-4
lines changed

4 files changed

+566
-4
lines changed

docs/api_data.js

Lines changed: 282 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,123 @@ define({ "api": [
960960
]
961961
}
962962
},
963+
{
964+
"type": "Post",
965+
"url": "/crm/client/:id/contact/",
966+
"title": "Add Contact",
967+
"name": "AddContact",
968+
"order": "7",
969+
"group": "CRM",
970+
"version": "1.0.0",
971+
"parameter": {
972+
"fields": {
973+
"Contact Fields": [
974+
{
975+
"group": "Contact Fields",
976+
"type": "Number",
977+
"optional": true,
978+
"field": "id",
979+
"description": "<p>The ID of the client's contact.</p>"
980+
},
981+
{
982+
"group": "Contact Fields",
983+
"type": "String",
984+
"optional": true,
985+
"field": "firstName",
986+
"description": "<p>First name of contact.</p>"
987+
},
988+
{
989+
"group": "Contact Fields",
990+
"type": "String",
991+
"optional": true,
992+
"field": "lastName",
993+
"description": "<p>Last name of contact.</p>"
994+
},
995+
{
996+
"group": "Contact Fields",
997+
"type": "String",
998+
"optional": true,
999+
"field": "email",
1000+
"description": "<p>First name of contact.</p>"
1001+
},
1002+
{
1003+
"group": "Contact Fields",
1004+
"type": "String",
1005+
"optional": true,
1006+
"field": "mobile",
1007+
"description": "<p>Mobile number.</p>"
1008+
},
1009+
{
1010+
"group": "Contact Fields",
1011+
"type": "String",
1012+
"optional": true,
1013+
"field": "mobileAreaCode",
1014+
"description": "<p>Mobile number area code.</p>"
1015+
},
1016+
{
1017+
"group": "Contact Fields",
1018+
"type": "String",
1019+
"optional": true,
1020+
"field": "workPhone",
1021+
"description": "<p>Work phone number.</p>"
1022+
},
1023+
{
1024+
"group": "Contact Fields",
1025+
"type": "String",
1026+
"optional": true,
1027+
"field": "workPhoneAreaCode",
1028+
"description": "<p>Work phone number area code.</p>"
1029+
},
1030+
{
1031+
"group": "Contact Fields",
1032+
"type": "String",
1033+
"optional": true,
1034+
"field": "homePhone",
1035+
"description": "<p>Home phone number.</p>"
1036+
},
1037+
{
1038+
"group": "Contact Fields",
1039+
"type": "String",
1040+
"optional": true,
1041+
"field": "homePhoneAreaCode",
1042+
"description": "<p>Home phone number area code.</p>"
1043+
},
1044+
{
1045+
"group": "Contact Fields",
1046+
"type": "Object",
1047+
"optional": true,
1048+
"field": "custom",
1049+
"description": "<p>Object of custom variables.</p>"
1050+
},
1051+
{
1052+
"group": "Contact Fields",
1053+
"type": "Object",
1054+
"optional": true,
1055+
"field": "custom.OBJECT_1",
1056+
"description": "<p>Custom variable of a client. To set values requires an Object of {&quot;value&quot;: &quot;Example&quot;, &quot;type&quot;: &quot;String&quot;}</p>"
1057+
}
1058+
]
1059+
}
1060+
},
1061+
"examples": [
1062+
{
1063+
"title": "CURL Example",
1064+
"content": "curl -A YourCompany -u admin:password -X \"POST\" https://service.formitize.com/api/rest/v2/crm/client/77/contact/ {POSTFIELDS}",
1065+
"type": "json"
1066+
}
1067+
],
1068+
"success": {
1069+
"examples": [
1070+
{
1071+
"title": "Response Body Example:",
1072+
"content": "{\n \"payload\": [\n {\n \"id\": \"78\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"homePhone\": \"\",\n \"homePhoneAreaCode\": \"\",\n \"mobile\": \"\",\n \"mobileAreaCode\": \"\",\n \"workPhone\": \"\",\n \"workPhoneAreaCode\": \"\",\n \"email\": \"john.doe@example.com\",\n \"custom\": [\n {\n \"type\": \"Email\",\n \"value\": \"john.doe@example.com\"\n }\n ]\n }\n ]\n}",
1073+
"type": "json"
1074+
}
1075+
]
1076+
},
1077+
"filename": "app/system/class/api/rest/v1/crm/client/_apidoc.js",
1078+
"groupTitle": "CRM"
1079+
},
9631080
{
9641081
"type": "Delete",
9651082
"url": "/crm/client/:id",
@@ -987,6 +1104,143 @@ define({ "api": [
9871104
"filename": "app/system/class/api/rest/v1/crm/client/_apidoc.js",
9881105
"groupTitle": "CRM"
9891106
},
1107+
{
1108+
"type": "Delete",
1109+
"url": "/crm/client/:id/contact/:contactID",
1110+
"title": "Delete Contact",
1111+
"name": "DeleteContact",
1112+
"order": "9",
1113+
"group": "CRM",
1114+
"version": "1.0.0",
1115+
"examples": [
1116+
{
1117+
"title": "CURL Example",
1118+
"content": "curl -A YourCompany -u admin:password -X \"DELETE\" https://service.formitize.com/api/rest/v2/crm/client/77/contact/78",
1119+
"type": "json"
1120+
}
1121+
],
1122+
"success": {
1123+
"examples": [
1124+
{
1125+
"title": "Response Body Example:",
1126+
"content": "{\n \"payload\": [\n {\n \"id\": \"78\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"status\": \"Deleted\"\n }\n ]\n}",
1127+
"type": "json"
1128+
}
1129+
]
1130+
},
1131+
"filename": "app/system/class/api/rest/v1/crm/client/_apidoc.js",
1132+
"groupTitle": "CRM"
1133+
},
1134+
{
1135+
"type": "Post",
1136+
"url": "/crm/client/:id/contact/:contactID",
1137+
"title": "Edit Contact",
1138+
"name": "EditContact",
1139+
"order": "8",
1140+
"group": "CRM",
1141+
"version": "1.0.0",
1142+
"parameter": {
1143+
"fields": {
1144+
"Contact Fields": [
1145+
{
1146+
"group": "Contact Fields",
1147+
"type": "String",
1148+
"optional": true,
1149+
"field": "firstName",
1150+
"description": "<p>First name of contact.</p>"
1151+
},
1152+
{
1153+
"group": "Contact Fields",
1154+
"type": "String",
1155+
"optional": true,
1156+
"field": "lastName",
1157+
"description": "<p>Last name of contact.</p>"
1158+
},
1159+
{
1160+
"group": "Contact Fields",
1161+
"type": "String",
1162+
"optional": true,
1163+
"field": "email",
1164+
"description": "<p>First name of contact.</p>"
1165+
},
1166+
{
1167+
"group": "Contact Fields",
1168+
"type": "String",
1169+
"optional": true,
1170+
"field": "mobile",
1171+
"description": "<p>Mobile number.</p>"
1172+
},
1173+
{
1174+
"group": "Contact Fields",
1175+
"type": "String",
1176+
"optional": true,
1177+
"field": "mobileAreaCode",
1178+
"description": "<p>Mobile number area code.</p>"
1179+
},
1180+
{
1181+
"group": "Contact Fields",
1182+
"type": "String",
1183+
"optional": true,
1184+
"field": "workPhone",
1185+
"description": "<p>Work phone number.</p>"
1186+
},
1187+
{
1188+
"group": "Contact Fields",
1189+
"type": "String",
1190+
"optional": true,
1191+
"field": "workPhoneAreaCode",
1192+
"description": "<p>Work phone number area code.</p>"
1193+
},
1194+
{
1195+
"group": "Contact Fields",
1196+
"type": "String",
1197+
"optional": true,
1198+
"field": "homePhone",
1199+
"description": "<p>Home phone number.</p>"
1200+
},
1201+
{
1202+
"group": "Contact Fields",
1203+
"type": "String",
1204+
"optional": true,
1205+
"field": "homePhoneAreaCode",
1206+
"description": "<p>Home phone number area code.</p>"
1207+
},
1208+
{
1209+
"group": "Contact Fields",
1210+
"type": "Object",
1211+
"optional": true,
1212+
"field": "custom",
1213+
"description": "<p>Object of custom variables.</p>"
1214+
},
1215+
{
1216+
"group": "Contact Fields",
1217+
"type": "Object",
1218+
"optional": true,
1219+
"field": "custom.OBJECT_1",
1220+
"description": "<p>Custom variable of a client. To set values requires an Object of {&quot;value&quot;: &quot;Example&quot;, &quot;type&quot;: &quot;String&quot;}</p>"
1221+
}
1222+
]
1223+
}
1224+
},
1225+
"examples": [
1226+
{
1227+
"title": "CURL Example",
1228+
"content": "curl -A YourCompany -u admin:password -X \"POST\" https://service.formitize.com/api/rest/v2/crm/client/77/contact/78 {POSTFIELDS}",
1229+
"type": "json"
1230+
}
1231+
],
1232+
"success": {
1233+
"examples": [
1234+
{
1235+
"title": "Response Body Example:",
1236+
"content": "{\n \"payload\": [\n {\n \"id\": \"78\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"homePhone\": \"\",\n \"homePhoneAreaCode\": \"\",\n \"mobile\": \"\",\n \"mobileAreaCode\": \"\",\n \"workPhone\": \"\",\n \"workPhoneAreaCode\": \"\",\n \"email\": \"john.doe@example.com\",\n \"custom\": [\n {\n \"type\": \"Email\",\n \"value\": \"john.doe@example.com\"\n }\n ]\n }\n ]\n}",
1237+
"type": "json"
1238+
}
1239+
]
1240+
},
1241+
"filename": "app/system/class/api/rest/v1/crm/client/_apidoc.js",
1242+
"groupTitle": "CRM"
1243+
},
9901244
{
9911245
"type": "Get",
9921246
"url": "/crm/client/:id",
@@ -1015,7 +1269,34 @@ define({ "api": [
10151269
"groupTitle": "CRM"
10161270
},
10171271
{
1018-
"type": "post",
1272+
"type": "Get",
1273+
"url": "/crm/client/:id/contact/",
1274+
"title": "Get Contacts",
1275+
"name": "GetContact",
1276+
"order": "6",
1277+
"group": "CRM",
1278+
"version": "1.0.0",
1279+
"examples": [
1280+
{
1281+
"title": "CURL Example",
1282+
"content": "curl -A YourCompany -u admin:password -X \"GET\" https://service.formitize.com/api/rest/v2/crm/client/77/contact/",
1283+
"type": "json"
1284+
}
1285+
],
1286+
"success": {
1287+
"examples": [
1288+
{
1289+
"title": "Response Body Example:",
1290+
"content": "{\n \"payload\": [\n {\n \"id\": \"78\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"homePhone\": \"\",\n \"homePhoneAreaCode\": \"\",\n \"mobile\": \"\",\n \"mobileAreaCode\": \"\",\n \"workPhone\": \"\",\n \"workPhoneAreaCode\": \"\",\n \"email\": \"john.doe@example.com\",\n \"custom\": [\n {\n \"type\": \"Email\",\n \"value\": \"john.doe@example.com\"\n }\n ]\n }\n ]\n}",
1291+
"type": "json"
1292+
}
1293+
]
1294+
},
1295+
"filename": "app/system/class/api/rest/v1/crm/client/_apidoc.js",
1296+
"groupTitle": "CRM"
1297+
},
1298+
{
1299+
"type": "Get",
10191300
"url": "/crm/client/list/?page=1",
10201301
"title": "List Clients",
10211302
"description": "<p>List all the contacts and clients available, returns 500 at a time.</p>",

0 commit comments

Comments
 (0)