Skip to main content
Solved

How to add Contact info in Leads API

  • 14 August 2023
  • 1 reply
  • 113 views

param2022
Jr Varsity II
Forum|alt.badge.img

I am trying to add contact info in leads API. With the following URL and body. But it is giving an error  "Last Name or Account Name (or both) should be filled in." Can anyone help me here please.

 

http://localhost/MyInstance/entity/Default/22.200.001/Lead

BODY:

{
    "ContactID" : {"value" : "Param"},
  "Description" : {"value": "My Test Lead"},
  "Source": {"value": "W"},
  "CRM Info":[{
      "Contact Preferences":{
        "FirstName": {"value": "Param"},
      "LastName": {"value": "Test"}
      }
  }]
}

 

Best answer by RohitRattan88

@param2022 

I did not find ContactInfo on the Default endpoint(CRM Info is the different tab you using in your example); but extended it to add ContactInfo as a linked entity.

How to extend enpoints:

Extending Acumatica Web Service Endpoints | Acumatica Cloud ERP

Extending Contract-Based API Default Endpoint - Acumatica Developers Blog

 

 

Then you could use newly added entity to GET or PUT as usual.

 

View original

RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4

@param2022 

I did not find ContactInfo on the Default endpoint(CRM Info is the different tab you using in your example); but extended it to add ContactInfo as a linked entity.

How to extend enpoints:

Extending Acumatica Web Service Endpoints | Acumatica Cloud ERP

Extending Contract-Based API Default Endpoint - Acumatica Developers Blog

 

 

Then you could use newly added entity to GET or PUT as usual.

 


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