OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Format to create Lead using API

This topic contains 1 reply, has 1 voice, and was last updated by  Rodolfo 9 years, 1 month ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #33806

    Rodolfo
    Participant

    Hi!

    I’m trying to create a Lead using Rest/API. So, I’m using this example here:

    https://github.com/orocrm/crm/blob/master/src/OroCRM/Bundle/SalesBundle/Tests/Functional/Controller/API/RestLeadTest.php#L37-L45

    I’m using guzzleHttp and my POST request is:

    I’m getting these errors:

    string(134) “Client error response [url] http://localhost/api/rest/latest/lead.json [status code] 400 [reason phrase] Bad Request”
    string(609) “{“code”:400,”message”:”Validation Failed”,”errors”:{“children”:{“owner”:[],”name”:[],”dataChannel”:{“errors”:[“This value is not valid.”]},”namePrefix”:[],”firstName”:[],”middleName”:[],”lastName”:[],”nameSuffix”:[],”contact”:[],”jobTitle”:[],”phoneNumber”:[],”email”:[],”customer”:[],”companyName”:[],”website”:[],”numberOfEmployees”:[],”industry”:[],”address”:{“children”:{“id”:[],”label”:[],”namePrefix”:[],”firstName”:[],”middleName”:[],”lastName”:[],”nameSuffix”:[],”organization”:[],”country”:[],”street”:[“…

    “This value is not valid.”

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #33807

    Rodolfo
    Participant

    I still don’t know why.. But.. It’s working now..

    Right after a combination of procedures (Cleaned cache, Created a Lead using UI and Added a source => ‘demand_generation’)

Viewing 1 replies (of 1 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top