Announcement

Collapse
No announcement yet.

Create new record(lead) true api

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create new record(lead) true api

    Hi,
    i am still testing espocrm and now i want to create simple add-on for creation leads true api. (please provide api example for creating new record to some entity).
    i am using Gravity Forms in wordpress to get the leads from my website. now i want to send lead parameters(name,emil,phone etc...) to espocrm.
    the questions are:
    ​1. how to create secure connection to espocrm api?
    ​2. how to create new record(lead) and store all parameters in the fields i need?
    ​3. in creation process true api, how can we select the team and the user to assign the new record?

    * some good example will and can help to many users

    Thanks

  • #2
    REST API
    method: POST
    ESPOCRM_URL/api/v1/Lead
    Specify field values as JSON in the request payload

    Open your espoCRM, press F12, go to network, do some actions and you will see api calls.

    Comment


    • #3
      Hi,
      please provide some code example.
      i am trying to make this work but seems i miss something

      the error i get when form submitted in my website and trying to send data to ESPOCRM URL/api/v1/Lead

      * i also tried to enter to this url:ESPOCRM_URL/api/v1/Lead and it ask me for user and password. so i assuming this can be also the problem?

      Code:
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px]Array[/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px]([/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px][safe_message] => error object[/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px][object] => WP_Error Object[/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px]([/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px][errors:WP_Error:private] => Array[/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px]([/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px][http_request_failed] => Array[/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px]([/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px][0] => Not properly address entered.[/SIZE][/FONT][/COLOR]
      [COLOR=#333333][FONT=Helvetica Neue][SIZE=14px])[/SIZE][/FONT][/COLOR]

      Comment


      • #4
        I don't have any php example.
        You need to use Basic Authorization. See what happening in browser console (Network tab) and replicate the same request in php.

        Comment


        • #5
          Hi,
          i tried to see some api calls when i created new lead. but i did not see nothing that can help me to create api connection to create lead from 3rd party.

          Comment


          • #6
            It's pretty easy to use REST API (details via PM).
            Job Offers and Requests

            Comment


            • ayush
              ayush commented
              Editing a comment
              tarasm, I am also looking for API examples. Can you please share them with me?

              Thanks!!

            • ronea23
              ronea23 commented
              Editing a comment
              Hi Tarasm, could you please send me the examples pls ??

            • blaz
              blaz commented
              Editing a comment
              Hi could I also get examples?

          • #7
            Hello, would you give some examples in php to login in EspoCRM, get fields and create Lead?

            Thanks!

            Comment


            • #8
              Originally posted by davidperez View Post
              Hello, would you give some examples in php to login in EspoCRM, get fields and create Lead?

              Thanks!
              Did you ever get examples? I'm not a ding dong but the instructions are not clear at all lol. Thanks

              Comment


              • #9
                Originally posted by tarasm View Post
                It's pretty easy to use REST API (details via PM).
                Can you provide to the community and post here so people like myself can learn? We seek examples... Well at this point I do lol. I need

                Comment

                Working...
                X