Skip to main content
Question

Unable to set the PrimaryContact on the BusinessAccount entity via RestAPI


Forum|alt.badge.img

I am having issues setting the PrimaryContact on a BusinessAccount entity.

We are building a customer application form where potentical customers can apply for an account. This data is going to flow into the Business Account entity as a “prospect. The application will contain their business information as well as a list of owners/authorized buyers.  These owners will be added as associated contacts to the business account entity.   I have all of that working via the RestAPI without much issue. The trouble I am having is setting the first owner (in the list of owners) as the PrimaryContact.  I can’t get anything to work.

 

Here are my order of operations:

  1.  Create the BusinessAccount
  2.  Iterate over the incoming contacts and create each new contact and associate them to the BusinessAccount ID
  3. Call and PUT against the newly created BusinessAccount and pass in the PrimaryContactID of the first Contact in the list from step 2. (this isn’t working)

 

I am doing a PUT to {{MY-BASE-URL}}/entity/PHDCustomerPortal/23.200.001/BusinessAccount.

 

This is my payload:

 

{
    "BusinessAccountID": {
        "value": "PR04012543"
    },
    "PrimaryContactID": {
        "value": 78810
    }
}

 

I also tried this:

 

{
    "BusinessAccountID": {
        "value": "PR04012543"
    },
    "PrimaryContact": {
        "ContactID": {
            "value": "78810"
        }
    }
}



Neither have worked.  I am really stuck and not sure on how to proceed.  Any pointers would be great.

 

Here is what my endpoint looks like. I am not all that much of an expert on the rest API side. I use more of the oData for pulling data from ACU, I typically don’t have to send data back into ACU. This is one of my first use cases for that.
 


thank you all so much!

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings