CustomerContactAdd(
    object Contact,
    int CustomerID,
    bool IsPrimary
)

Add Contact information for a Customer.

Request

Request Data:

  • (object) Contact(required) – the contact information.
    • All information is optional.
    • (array) PhoneNumbers list of up to 4 phone numbers for this contact.
      Note 0: sending an empty phone Number will result in having ” none” as it’s values on subsequent reads.
      Note 1: the phone Type is one of the following: Business=1, Home=2, Fax=3, Other=6.
  • (int) CustomerID (required) – identify the customer.
  • (bool) IsPrimary (optional) – make this the primary contact
{
    "Contact": {
        "Email": <string>,
        "FirstName": <string>,
        "LastName": <string>,
        "PhoneNumbers": [
            {
                "Number": <string>,
                "PhoneNumberID": <int>,
                "Type": <enum: Business=1, Home=2, Fax=3, Other=6>
            },
            <... more Phone Numbers>
        ],
        "Salutation": <string>,
        "Title": <string>
    },
    "CustomerID": <int>,
    "IsPrimary": <bool>
}

Response

{
    "Result": {
        "Contact": {
            "ContactID": <int>,
            "Email": <string>,
            "FirstName": <string>,
            "LastName": <string>,
            "PhoneNumbers": [
                {
                    "Number": <string>,
                    "PhoneNumberID": <int>,
                    "Type": 1 // Business
                },
                {
                    "Number": <string>,
                    "PhoneNumberID": <int>,
                    "Type": 2 // Home
                },
                {
                    "Number": <string>,
                    "PhoneNumberID": <int>,
                    "Type": 3 // Fax
                },
                {
                    "Number": <string>,
                    "PhoneNumberID": <int>,
                    "Type": 6 // Other
                }
            ],
            "Salutation": <string>,
            "Title": <string>
        }
    }
}

Errors

  • “Customer not found”
  • “Unrecognized type for phone number: ” – if the phone number type is not valid.