Lead Import

Lead Import processes incoming emails and converts them to leads. Admins as well as team admins can create their own integrations based on either the built-in ones, or create their own custom parser.

After creating the integration or parser, the lead emails should be sent to the address in the email property (e.g. xxx@lead-import.easir.com).

Built-In Integrations

Get Providers

Retrieves a list of providers that are available to your company and/or language.

GET /lead-import/providers

Query Parameters

  • country string
    • Required
    • The country of the company, e.g. DK (Denmark), SE (Sweden), DE (Germany).

Response

Status code 200

{
  "data": [
    {
      "id": 5,
      "name": "AutoUncle",
      "description": "Get leads from AutoUncle",
      "icon": "https://static.easir.com/easir/classifieds/autouncle.png",
      "help_center_url": "https://easir.zendesk.com/hc/de/articles/360002329297",
      "countries": [
        "DE",
        "DK",
        "SE"
      ]
    }
  ]
}

Get integrations

For each provider, multiple integrations can be created. This allows you to, for example, route leads from different provider accounts in to separate lead types.

In the response below, both a built-in integration and a custom parser is shown (provider has the ID 2019112708 and name Generic.)

GET /lead-import/integrations

Response

Status code 200

{
   "data": [
      {
         "company_id": 1,
         "email": "wu6y4ybaskx3lacj@lead-import.easir.com",
         "fallback_email": "jack.daniels@example.com",
         "forward_all": true,
         "id": 1,
         "is_active": true,
         "lead_type_id": "c57961b8-9a72-4b74-8e9a-6ca6de601451",
         "locale": "en",
         "name": "Bilbasen",
         "provider_id": 3,
         "team_id": null,
         "provider": {
            "id": 3,
            "name": "Bilbasen",
            "description": "F\u00e5 leads fra Bilbasen",
            "icon": "https:\/\/static.easir.com\/easir\/classifieds\/bilbasen.png",
            "help_center_url": "https:\/\/easir.zendesk.com\/hc\/en-us\/articles\/360002722958-Integrate-Bilbasen-dk-as-a-lead-source",
            "countries": [
               "DK"
            ]
         }
      },
      {
         "company_id": 1,
         "email": "bjik1wmfyfqexmgw@lead-import.easir.com",
         "fallback_email": "jack.daniels@example.com",
         "forward_all": false,
         "id": 2,
         "is_active": true,
         "lead_type_id": "123e4567-e89b-12d3-a456-426655440000",
         "locale": null,
         "name": null,
         "provider_id": 2019112708,
         "team_id": null,
         "provider": {
            "id": 2019112708,
            "name": "Generic",
            "description": "Get leads based on provided mapping",
            "icon": "",
            "help_center_url": "",
            "countries": []
         }
      }
   ]
}

Create Integration

POST /lead-import/providers/:provider_id/integrations

Payload Parameters

  • is_active bool
    • Required
    • Specifies whether the integration is active creates leads
  • forward_all bool
    • Required
    • Specifies whether the integration should forward all emails to the fallback email address, and not just the ones that can't be processed due to e.g. a parsing error
  • fallback_email string
    • Required
    • When an email can't be processed due to e.g. a parsing error, forward to this address
  • name string
    • Required
    • The name of the integration
  • locale string
    • Required
    • The locale, which is used for translation of the fields for the lead
  • lead_type_id string
    • Required
    • Specifies which lead type the leads should be created in

Payload

{
    "is_active": true,
    "forward_all": true,
    "locale": "se",
    "name": "AutoUncle Leads",
    "lead_type_id": "c1047736-07f6-4533-ab4c-ef823c630fc8",
    "fallback_email": "jack.daniels@example.com"
}

Response

Status code 200

{
    "provider_id": 5,
    "team_id": null,
    "company_id": 120,
    "fallback_email": "jack.daniels@example.com",
    "forward_all": true,
    "is_active": true,
    "lead_type_id": "c1047736-07f6-4533-ab4c-ef823c630fc8",
    "locale": "se",
    "name": "AutoUncle Leads",
    "email": "oydw1lnbilsmbscq@lead-import.easir.com",
    "updated_at": "2019-12-10 09:17:47",
    "created_at": "2019-12-10 09:17:47",
    "id": 55,
    "provider": {
        "id": 5,
        "name": "AutoUncle",
        "description": "Get leads from AutoUncle",
        "icon": "https://static.easir.com/easir/classifieds/autouncle.png",
        "help_center_url": "https://easir.zendesk.com/hc/de/articles/360002329297",
        "countries": [
            "DE",
            "DK",
            "SE"
        ]
    }
}