For all operations listed below you will need to provide HTTP Request Header Authorization param. For more details see Login/Auth page.
Get the list of Contacts
Route: /contact
Method: GET
Required query parameters:
- customer_id: array of customer IDs. (See customer section, for more details how to get customer IDs associated with your account)
Example result
{
"entities": [
{
"email": "Email Address",
"tel": "123456789",
"tel1": "1234567890",
"fax": "",
"mobile": "",
"role": "User Role",
"department": "Department name",
"milestone": "1",
"cost_center_id": "0",
"email2": "",
"email3": "",
"customer_portal_profile_id": "1",
"customer_name": "Name of the Customer",
"customer_account": "Customer account number",
"customer_id": 1,
"portal_profile": "Portal profile id",
"name": "Contact Name",
"cost_center_name": "",
"customer_custom_identifier": "",
"portal_fullname": "",
"portal_branch_id": "",
"vendor_account": "",
"vendor_id": "",
"vendor_name": "",
"vendor_type": 1,
"id": "Internal Id",
"created_at": "Creation Date",
"updated_at": "Last Update Time",
"is_active": "1",
"portal_active": "1",
"locale": "en_US",
"customer_portal_profile_name": ""
},
{
...
}
...
"result": true
Get contact by internal ID
Route: /contact/{internal_id}
Method: GET
Adding new contact object
Route: /contact
Method: POST
Data requirements & limitations
- create_method - Not allowed.
- name (required) - String with at most 64 characters.
- is_active - Boolean (1 or 0).
- email - String in email format and at most 191 characters.
- tel - String with at most 32 characters.
- tel1 - String with at most 32 characters.
- fax - String with at most 32 characters.
- mobile - String with at most 32 characters.
- role - String with at most 32 characters.
- department - String with at most 64 characters.
- customer_portal_profile_id - Unsigned integer between 0 and 4294967295.
- portal_password - String between 8 - 32 characters.
- portal_active - Boolean (1 or 0).
- milestone - Boolean (1 or 0).
- cost_center_id - int.
- customer_custom_identifier - String with at most 16 characters.
- locale - valid locale string, default en_US
API response examples:
RESPONSE 200 - OK, SUCCESS
{
"msg": "Successfully created entity.",
"id": "1",
"result": true
}
RESPONSE 200 - OK, FAILURE (EMPTY REQUEST)
{
"error": "Nothing sent for request.",
"result": false
}
OTHER FAILURE RESPONSES MIGHT RETURN
- errors:
- field_name: Field is required.
- field_name: validation error, when field does not validate against the rules listed above
- result: false
Updating existing contact object
Route: /contact/{internal_id}
Method: POST
Data requirements & limitations
- create_method - Not allowed.
- name (required) - String with at most 64 characters.
- is_active - Boolean (1 or 0).
- email - String in email format and at most 191 characters.
- tel - String with at most 32 characters.
- tel1 - String with at most 32 characters.
- fax - String with at most 32 characters.
- mobile - String with at most 32 characters.
- role - String with at most 32 characters.
- department - String with at most 64 characters.
- customer_portal_profile_id - Unsigned integer between 0 and 4294967295.
- portal_password - String between 8 - 32 characters.
- portal_active - Boolean (1 or 0).
- milestone - Boolean (1 or 0).
- cost_center_id - int.
- customer_custom_identifier - String with at most 16 characters.
- locale - valid locale string, default en_US
API response examples:
RESPONSE 200 - OK, SUCCESS
{
"msg": "Successfully updated entity.",
"result": true
}
RESPONSE 200 - OK, FAILURE (EMPTY REQUEST)
{
"error": "Nothing sent for request.",
"result": false
}
OTHER FAILURE RESPONSES MIGHT RETURN
- errors:
- field_name: Field is required.
- field_name: validation error, when field does not validate against the rules listed above
- result: false
Deleting the existing contact object
Route: /contact/{internal_id}/delete
Method: GET
API response examples
RESPONSE 200 - OK, SUCCESSFULLY DELETED ENTITY
{
"msg": "Entity has been successfully deleted.",
"result": false
}
RESPONSE 200 - OK, ENTITY NOT FOUND
{
"msg": "Entity not found.",
"result": false
}