Solved

How to add Contact info in Leads API

  • 14 August 2023
  • 1 reply
  • 56 views

Userlevel 2
Badge

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"}
}
}]
}

 

icon

Best answer by RohitRattan88 14 August 2023, 19:44

View original

1 reply

Userlevel 7
Badge +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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved