POST v1/contacts/{id}/associate-customer

Associates an existing contact with an existing customer. User should know the ContactID and CustomerID prior to creating association. if there is an existing asssociation between the contact and customer, the association will be updated with the information supplied

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

ID for the contact to associate with a customer

integer

Required

Body Parameters

Association object indicating the CustomerID, and other details related to the association

CustomerContactAssociation
NameDescriptionTypeAdditional information
Customer

ID for the associated customer

IdNamePair

Required

ContactTitle

Title assigned to contact for the associated customer

string

None.

IsPrimary

Indicate if the contact is primary. If set to true, other primary contact (if any) will be revoked.

boolean

None.

Active

Indicate if the association is active. Setting false will deactivate the association

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "customer": {
    "id": 1,
    "name": "sample string 2"
  },
  "contactTitle": "sample string 1",
  "isPrimary": true,
  "active": true
}

application/xml, text/xml

Sample:
<CustomerContactAssociation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.CRM">
  <Active>true</Active>
  <ContactTitle>sample string 1</ContactTitle>
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Customer>
  <IsPrimary>true</IsPrimary>
</CustomerContactAssociation>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.