CustomerContactEdit(
    object Contact,
    int CustomerID,
    bool IsPrimary
)

Edit a Contact information for one Customer.

Warning: currently this endpoint will clear out the values of “Salutation”, “Title”, and “Email” if a value is not sent. It’s recommended to first load all the contact data using the Customer endpoint and using all the data when requesting this endpoint.

Request

Request Data:

  • (int) CustomerID (required) – identify the customer.
  • (bool) IsPrimary (required) – send true to make it the primary contact (does not allow setting to false).
  • (object) Contact(required) – the contact information.
    • (string) FirstName (required) – the contact first name.
    • (string) LastName (required) – the contact last name.
    • (string) Salutation (optional) – the contact salutation (will be cleared if not provided).
    • (string) Title (optional) – the contact title (will be cleared if not provided).
    • (string) Email (optional) – the contact email (will be cleared if not provided).
    • (array) PhoneNumberslist of up to 4 phone numbers for this contact. Each with the following properties:
      • (int) PhoneNumberID (optional) – the phone number ID to edit existing phone entries.
      • (int) Type (optional) – the type of the phone number (Business=1, Home=2, Fax=3, Other=6).
        If the PhoneNumberID is not provided and there is no phone of the type a new phone number is registered.
      • (string) Number (optional) – the phone number.
{
    "Contact": {
        "ContactID": <int>,
        "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

  • “Contact ID not passed into call”
  • “Customer not found”
  • “Contact not found”
  • “Unrecognized type for phone number: ” – if the phone number type is not valid.
  • “Phone type <int> has already been assigned and cannot be replaced by PhoneNumberID: <int>” – when there’s already a phone with that type.