Announcement

Collapse
No announcement yet.

How to create LEAD through API

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

  • How to create LEAD through API

    Hi,
    i have big problem with lead entity.
    I used Postman to GET all leads, after that i copied one of leads, change request to POST, paste info which i copied before, deleted id field and etc, click "POST" and nothing.. i don't have any success response.. Can you tell me which fields i should fill to successfully create lead through API ?

  • #2
    any of name, accountName, emailAddress, phoneNumber
    what is response code?

    Comment


    • #3
      I used method POST, with those felds:
      {
      "name": "asd",
      "title": "",
      "status": "New",
      "source": "",
      "industry": "",
      "opportunityAmount": null,
      "website": "",
      "addressStreet": "",
      "addressCity": "",
      "addressState": "",
      "addressCountry": "",
      "addressPostalCode": "",
      "emailAddress": "dafg@adfgadg.asd",
      "phoneNumber": "+48 123 456 789",
      "doNotCall": false,
      "description": "",
      "accountName": "",
      "opportunityAmountCurrency": null,
      "emailAddressIsOptedOut": false,
      "opportunityAmountConverted": null,
      "createdById": "35264363457",
      "createdByName": "asfafafasfaaga",
      "modifiedById": "35264363457",
      "modifiedByName": "asfafafasfaaga",
      "assignedUserId": "35264363457",
      "assignedUserName": "asfafafasfaaga"
      }

      Comment


      • #4
        Just replicate the request sent by the browser when you create a lead. Make sure you pass application/json content type.

        Comment


        • #5
          Can you tell me how i can find this request sented by browser?

          Comment


          • #6
            F12 button, Network tab

            Comment


            • #7
              Can you sent me here request which create lead with: first name, last name, phone number and e-mail? Maybe i'm stupid but i can't find that There is too much information in network tab..

              Comment


              • #8

                [ 'firstName' => 'Test', 'lastName' => 'Hello', 'phoneNumber'=>'123456789', 'emailAddress'=>'test@hello.espo' ]

                Comment


                • #9
                  How it's different from my post request?

                  I used method POST, with those felds:
                  {
                  "name": "asd",
                  "title": "",
                  "status": "New",
                  "source": "",
                  "industry": "",
                  "opportunityAmount": null,
                  "website": "",
                  "addressStreet": "",
                  "addressCity": "",
                  "addressState": "",
                  "addressCountry": "",
                  "addressPostalCode": "",
                  "emailAddress": "dafg@adfgadg.asd",
                  "phoneNumber": "+48 123 456 789",
                  "doNotCall": false,
                  "description": "",
                  "accountName": "",
                  "opportunityAmountCurrency": null,
                  "emailAddressIsOptedOut": false,
                  "opportunityAmountConverted": null,
                  "createdById": "35264363457",
                  "createdByName": "asfafafasfaaga",
                  "modifiedById": "35264363457",
                  "modifiedByName": "asfafafasfaaga",
                  "assignedUserId": "35264363457",
                  "assignedUserName": "asfafafasfaaga"
                  }

                  Comment


                  • #10
                    only name and first/last names
                    any record is created? if not, check request header, content-type

                    Comment

                    Working...
                    X