# Lead report

# Setup

Endpoint: https://app.lamatool.com/api/v2/stats/lead-report

Type: GET

# Parameters

Field Type Required Note
api_key string true Company API key
from date true Format Y-m-d
until date true Format Y-m-d
custom_fields boolean false Default false

# Using from and until

When using from and until be aware that from is start of day and until is end of day.

So if you want a report for january:

from=2023-01-01&until=2023-01-31

from=2023-01-01&until=2023-02-01

# Example

The following example will return a lead-report for the given period: 2023-01-01-2023-05-31

https://app.lamatool.com/api/v2/stats/lead-report?api_key=[YOUR_API_KEY]&custom_fields=true&from=2023-07-06&until=2023-07-06

# Example result

[
    {
        "id": 1,
        "customer": {
            "zip": 4000
        },
        "dealer": {
            "id": null,
            "name": null
        },
        "products": [
            {
                "id": "t5org3",
                "name": "Product 1"
            }
        ],
        "tags": [
            "test"
        ],
        "created_at": "2023-07-06 09:44:47",
        "media_source": "postman",
        "meta": {
            "accept_time": null
        },
        "custom_fields": [
            {
                "id": "QUkoWg",
                "name": "My custom field",
                "value": "This is a value"
            }
        ]
    },
    ...
]