Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Leads

  • GET /api/leads

  • GET /api/leads/{lead_id}

  • GET /api/lead_conversations

  • GET /api/lead_conversations/{id}

GET /api/leads - get all leads
GET /api/leads {'limit': '3'}

...


Response

Code Block
languagejson
{
    "count": 3,
    "objects": [
        {
            "address": null,
            "business_name": null,
            "claimed_by_user_id": null,
            "emails": [
                "dasenko@example.com"
            ],
            "entity_id": null,
            "first_name": "Don",
            "id": 3,
            "last_name": "Asenko",
            "phones": [
                "888-555-7777"
            ],
            "source": {
                "id": -3,
                "name": "Website"
            },
            "source_id": -3,
            "stage": "New",
            "website": null
        },
        {
            "address": null,
            "business_name": null,
            "claimed_by_user_id": null,
            "emails": [
                "nicholas@example.com"
            ],
            "entity_id": null,
            "first_name": "Nichlas",
            "id": 4,
            "last_name": "Cook",
            "phones": [
                "8885553260"
            ],
            "source": {
                "id": -3,
                "name": "Website"
            },
            "source_id": -3,
            "stage": "New",
            "website": null
        },
        {
            "address": null,
            "business_name": null,
            "claimed_by_user_id": null,
            "emails": [
                "test@example.com"
            ],
            "entity_id": null,
            "first_name": "Han",
            "id": 12,
            "last_name": "Solo",
            "phones": [
                "8885557890"
            ],
            "source": {
                "id": -3,
                "name": "Website"
            },
            "source_id": -3,
            "stage": "New",
            "website": null
        }
    ],
    "offset": 0,
    "total": 60
}

GET /api/leads/{lead_id} – gets a specific lead
GET /api/leads/3
Response

Code Block
languagejson
{
    "address": null,
    "business_name": null,
    "claimed_by_user_id": null,
    "emails": [
        "dasenko@example.com"
    ],
    "entity_id": null,
    "first_name": "Don",
    "id": 3,
    "last_name": "Asenko",
    "phones": [
        "888-555-7777"
    ],
    "source": {
        "id": -3,
        "name": "Website"
    },
    "source_id": -3,
    "stage": "New",
    "website": null
}

GET /api/lead_conversations - get all leads
GET /api/lead_conversations {'limit': '1'}

...


Response

Code Block
languagejson
{
    "count": 1,
    "objects": [
        {
            "contacted_at": "2020-07-07T11:05:17.991272-04:00",
            "data": {
                "source_data": {
                    "email": "sbee@example.com",
                    "first_name": "Sam",
                    "last_name": "Bee",
                    "phone": "8885558055"
                }
            },
            "form": "unknown",
            "id": 1,
            "lead": {
                "address": null,
                "business_name": null,
                "emails": [
                    "sbee@example.com"
                ],
                "first_name": "Sam",
                "id": 1,
                "last_name": "Bee",
                "phones": [
                    "8885558055"
                ],
                "source": {
                    "id": -3,
                    "name": "Website"
                },
                "stage": "New",
                "website": null
            }
        }
    ],
    "offset": 0,
    "total": 60
}

GET /api/lead_conversations/{id} – gets a specific lead conversation
GET /api/lead_conversations/1
Response

Code Block
languagejson
{
    "contacted_at": "2020-07-07T11:05:17.991272-04:00",
    "data": {
        "source_data": {
            "email": "sbee@example.com",
            "first_name": "Sam",
            "last_name": "Bee",
            "phone": "8885558055"
        }
    },
    "form": "unknown",
    "id": 1,
    "lead": {
        "address": null,
        "business_name": null,
        "emails": [
            "sbee@example.com"
        ],
        "first_name": "Sam",
        "id": 1,
        "last_name": "Bee",
        "phones": [
            "8885558055"
        ],
        "source": {
            "id": -3,
            "name": "Website"
        },
        "stage": "New",
        "website": null
    },
    "location_id": 4
}

...