For full details of this API Endpoint, see Contact API.
type
-
Data Type: String
-
Required Field: No
Notes:
Denotes the type of Contact information being sent. “EMAIL”, “ADDRESS”, “PHONE”, “REMARKS”, “UDF”. If not set, the call creates a New Contact Record.
department
-
Data Type: Integer
-
Required Field: No
Notes:
Department recid that the Contact is assigned to.
customer_number
-
Data Type: Integer
-
Required Field: No*
Notes:
Customer Number assigned to the Contact. Conditionally Required if Contact is a CUSTOMER type
first_name
-
Data Type: String
-
Required Field: Yes
Notes:
Contact's First Name.
last_name
-
Data Type: String
-
Required Field: Yes
Notes:
Contact's Last Name.
contact_directory
-
Data Type: Integer
-
Required Field: Yes
Notes:
Is this Contact in the Directory? “1” for Yes, “0” for No.
contact_types
-
Data Type: String
-
Required Field: Yes
Notes:
The types of Contact this is. Values should be from the LISTS for Contact Types.
status
-
Data Type: Integer
-
Required Field: Yes
Notes:
The LISTS Value’s recid for the Contact Status.
email_directory
-
Data Type: Integer
-
Type Required: “EMAIL”
-
Required Field: Yes
Notes:
Should this Email show in the Directory? “1” for Yes, “0” for No.
email
-
Data Type: String
-
Type Required: “EMAIL”
-
Required Field: Yes
Notes:
New Primary Email for the Contact.
address_directory
-
Data Type: Integer
-
Type Required: “ADDRESS”
-
Required Field: No
Notes:
Is this Address in the Directory? “1” for Yes, “0” for No.
*If any Address fields are sent, all become Required
address_type
-
Data Type: String
-
Type Required: “ADDRESS”
-
Required Field: No
Notes:
The LISTS value for what type of Address it is.
*If any Address fields are sent, all become Required
street_address
-
Data Type: String
-
Type Required: “ADDRESS”
-
Required Field: No*
Notes:
First Line of the Address.
*If any Address fields are sent, all become Required
address2
-
Data Type: String
-
Type Required: “ADDRESS”
-
Required Field: No*
Notes:
Second Line of the Address.
*If any Address fields are sent, all become Required
country
-
Data Type: String
-
Type Required: “ADDRESS”
-
Required Field: No*
Notes:
Country for the provided Address, as defined by the LISTS Table
*If any Address fields are sent, all become Required
city
-
Data Type: String
-
Type Required: “ADDRESS”
-
Required Field: No*
Notes:
City the Address is in.
*If any Address fields are sent, all become Required
state
-
Data Type: String
-
Type Required: “ADDRESS”
-
Required Field: No*
Notes:
State the Address is in. Use standard 2 Letter Abbreviation.
*If any Address fields are sent, all become Required
zip_code
-
Data Type: Integer
-
Type Required: “ADDRESS”
-
Required Field: No*
Notes:
5 digit Postal Code assigned to the Address.
*If any Address fields are sent, all become Required
phone_directory
-
Data Type: Integer
-
Type Required: “PHONE”
-
Required Field: Yes
Notes:
Should this Phone Number show in the Directory. “1” for Yes, “0” for No.
phone_primary
-
Data Type: Integer
-
Type Required: “PHONE”
-
Required Field: No
-
Default Value: 1
Notes:
Is this the Primary phone number for the Contact? “1” for Yes, “0” for No.
phone_type
-
Data Type: String
-
Type Required: “PHONE”
-
Required Field: Yes
Notes:
The recid for the LISTS value for the Phone Type.
phone_number
-
Data Type: Integer
-
Type Required: “PHONE”
-
Required Field: Yes
Notes:
Phone Number for the Contact.
contact_recid
-
Data Type: Integer
-
Type Required: “EMAIL”, “ADDRESS”, “PHONE”, “REMARKS”, or “UDF”
-
Required Field: Yes*
Notes:
The recid of the Contact.
*not required if creating a new Contact (type not set).
remarks
-
Data Type: String
-
Type Required: “REMARKS”
-
Required Field: Yes
Notes:
The remark to add to the Contact
udf_UDF-RECID
-
Data Type: Integer
-
Type Required: “UDF”
-
Required Field: Yes*
Notes:
UDF-RECID is the RECID of the UDF to assign the value to. Example: udf_684=value
*udf_UDF-RECID and udf_UDF-IDENTIFIER are Conditionally Required. The use of one is Required, but not both.
udf_UDF-IDENTIFIER
-
Data Type: String
-
Type Required: “UDF”
-
Required Field: Yes*
Notes:
IDENTIFIER is the unique Identifier of the UDF to assign the value to. Example: udf_LEGACYNUM=value
*udf_UDF-RECID and udf_UDF-IDENTIFIER are Conditionally Required. The use of one is Required, but not both.
Add New Contact Example
$params = [
"customer_number" => 123456789,
"first_name" => "Demo",
"last_name" => "PCR",
"contact_directory" => 0,
"contact_types" => "CUSTOMER",
"status" => 1
];
$api_call = $this->call('saveContact', $params, true)
Add New Email to a Contact Example
$params = [
"type" => "EMAIL",
"email_directory" => 0,
"email" => "demo@pcr.com",
"contact_recid" => 1
];
$api_call = $this->call('saveContact', $params, true)
Add Remark Example
$params = [
"type" => "REMARK",
"contact_recid" => 1,
"remarks" => "This is an example of a Remark"
];
$api_call = $this->call('saveContact', $params, true)
Update UDF Example
$params = [
"type" => "UDF",
"contact_recid" => 1,
"udf_1" => "Value for RECID 1",
"udf_2" => "Value for RECID 2"
];
$api_call = $this->call('saveContact', $params, true)