Webhooks

Example

This is an example of a webhook request for a lead.updated event:

Headers

Content-Type: application/json
User-Agent: SelfmadeEnergy-Webhook/v2
X-SME-API-Version: v2
X-SME-Webhook-Event: lead.updated
X-SME-Webhook-Subscription: 94839
X-SME-Webhook-Delivery: 91c09896-7ee2-4e45-9a4f-dc8f3e93d44f
X-SME-Webhook-Signature: w264ccd18429ffd0a150a227df5ddb54e2d9cad0929a93a33dc5edc87ba07ad0

Body (Photovoltaics Lead)

{
"api_version": "v2",
"event": "lead.updated",
"payload": {
"id": 1234,
"created": "2023-02-27T18:33:23.013575+01:00",
"location": {
"id": 567,
"name": "Niederlassung München"
},
"product": {
"id": 890,
"name": "PV-Anlage, 415 Wp, Kauf"
},
"customer": {
"first_name": "John",
"last_name": "Doe",
"street": "Hauptstraße",
"street_number": "123",
"zipcode": "12345",
"city": "Berlin",
"coordinate": {
"lat": 52.12345,
"lng": 13.12345
},
"email": "john.doe@example.com",
"phone": "+491234567890",
"year_of_birth": 1978
},
"parameters": {
"house_type": "detached house",
"energy_consumption": 7000.0,
"is_interested_in_emobility": true,
"is_interested_in_heat_pump": true,
"is_interested_in_batteries": true,
"roof_angle": 30,
"roof_orientation": 155,
"roof_area": "more-than-100-qm",
"roof_material": "clay",
"roof_renovated_period": "new_building",
"installation_time": "1-6 months",
"financing": [
"buy",
"rent"
],
"customer_is_owner": true
},
"calculations": {
"netto_capacity": 12.75,
"suitability": "verygood",
"pv_area": {
"well_suited": 323.9,
"suited": 95.9,
"barely_suited": 0
},
"max_energy": 74758,
"number_of_panels": 28,
"yearly_yield": 9174,
"autarky": 67,
"co2_savings": 4.2
},
"prices": {
"with_battery": 23456.78,
"without_battery": 12345.67
},
"photos": [
{
"type": "gable view",
"url": "https://images.example.com/8491384-1D92A491/gable-view/1234567-8901234.jpg",
"score": "good"
},
{
"type": "house and surroundings",
"url": "https://images.example.com/8491384-1D92A491/house-and-surroundings/1234567-8901234.jpg",
"score": "good"
},
{
"type": "meter cabinet",
"url": "https://images.example.com/8491384-1D92A491/meter-cabinet/1234567-8901234.jpg",
"score": "good"
},
{
"type": "roof surface",
"url": "https://images.example.com/8491384-1D92A491/roof-surface/1234567-8901234.jpg",
"score": "good"
},
{
"type": "tiles",
"url": "https://images.example.com/8491384-1D92A491/tiles/1234567-8901234.jpg",
"score": "good"
}
],
"legal": {
"terms_and_conditions_accepted": true,
"data_privacy_accepted": true
}
}
}

Body (Heat Pump Lead)

{
"api_version": "v2",
"event": "heatpump-lead.updated",
"payload": {
"api_version": "v2",
"event": "heatpump-lead.created",
"payload": {
"id": 125,
"created": "2024-02-29T10:15:51.927081+01:00",
"location": {
"id": 127,
"name": "Test-Location"
},
"product": {
"id": 126,
"name": "Heat Pump Product",
"type": "heat_pump"
},
"customer": {
"first_name": "John",
"last_name": "Doe",
"street": "Hauptstraße",
"street_number": "123",
"zipcode": "12345",
"city": "Berlin",
"coordinate": {
"lat": 52.12345,
"lng": 13.12345
},
"email": "john.doe@example.com",
"phone": "+491234567890",
"year_of_birth": 1978
},
"legal": {
"terms_and_conditions_accepted": true,
"data_privacy_accepted": true
},
"parameters": {
"house_type": "detached house",
"house_size": "0-to-100-qm",
"energy_efficiency_class": "B",
"construction_year": "new building",
"modernization_year": 2018,
"modernization_types": [
"new windows",
"new entrance door"
],
"energy_source": "remote heating",
"energy_demand": 2500,
"heating_system": "underfloor heating and radiators",
"heating_location": "basement",
"installation_time": "now to three months",
"zipcode": "12435",
"remarks": "customer comment or request",
"heatpump_targeted_consultation_topics": [
"Eignung meiner Immobilie für eine Wärmepumpe",
"Passende Installationsorte für die Wärmepumpe",
"Kombination mit einer Photovoltaikanlage",
"Fördermittel und staatliche Zuschüsse",
"Energieberatung und Effizienzsteigerung",
"Demontage der alten Heizung / Entsorgung des Öltanks"
]
},
"prices": {
"price_without_buffer": 8500.0,
"price_with_buffer": 10200.0
}
}
}
}
Previous
Signing