curl --request POST \
--url https://api.nomos.energy/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "pln_mi4f0oda6x9m7gcsvjk0ole1",
"address": {
"zip": "10115",
"street": "Torstraße",
"city": "Berlin",
"house_number": "119"
},
"meter": {
"estimated_usage": 2500,
"type": "smart",
"number": "1APA0195124010"
},
"customer": {
"type": "person",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"payment_method": {
"type": "sepa_debit",
"sepa_debit": {
"iban": "DE68500105178297336485",
"account_holder": "John Doe"
}
},
"previous_supplier": "mp_mi4f0oda6x9m7gcsvjk0ole1",
"next_possible_start": true,
"intended_start_date": "2024-01-01",
"change_reason": "supplier_change",
"created_by": "john.doe@example.com",
"metadata": {
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}
}
'import requests
url = "https://api.nomos.energy/leads"
payload = {
"plan": "pln_mi4f0oda6x9m7gcsvjk0ole1",
"address": {
"zip": "10115",
"street": "Torstraße",
"city": "Berlin",
"house_number": "119"
},
"meter": {
"estimated_usage": 2500,
"type": "smart",
"number": "1APA0195124010"
},
"customer": {
"type": "person",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"payment_method": {
"type": "sepa_debit",
"sepa_debit": {
"iban": "DE68500105178297336485",
"account_holder": "John Doe"
}
},
"previous_supplier": "mp_mi4f0oda6x9m7gcsvjk0ole1",
"next_possible_start": True,
"intended_start_date": "2024-01-01",
"change_reason": "supplier_change",
"created_by": "john.doe@example.com",
"metadata": {
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan: 'pln_mi4f0oda6x9m7gcsvjk0ole1',
address: {zip: '10115', street: 'Torstraße', city: 'Berlin', house_number: '119'},
meter: {estimated_usage: 2500, type: 'smart', number: '1APA0195124010'},
customer: {
type: 'person',
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com'
},
payment_method: {
type: 'sepa_debit',
sepa_debit: {iban: 'DE68500105178297336485', account_holder: 'John Doe'}
},
previous_supplier: 'mp_mi4f0oda6x9m7gcsvjk0ole1',
next_possible_start: true,
intended_start_date: '2024-01-01',
change_reason: 'supplier_change',
created_by: 'john.doe@example.com',
metadata: {utm_source: 'google', utm_campaign: 'campaign_name', user_id: '1234567890'}
})
};
fetch('https://api.nomos.energy/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nomos.energy/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan' => 'pln_mi4f0oda6x9m7gcsvjk0ole1',
'address' => [
'zip' => '10115',
'street' => 'Torstraße',
'city' => 'Berlin',
'house_number' => '119'
],
'meter' => [
'estimated_usage' => 2500,
'type' => 'smart',
'number' => '1APA0195124010'
],
'customer' => [
'type' => 'person',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john.doe@example.com'
],
'payment_method' => [
'type' => 'sepa_debit',
'sepa_debit' => [
'iban' => 'DE68500105178297336485',
'account_holder' => 'John Doe'
]
],
'previous_supplier' => 'mp_mi4f0oda6x9m7gcsvjk0ole1',
'next_possible_start' => true,
'intended_start_date' => '2024-01-01',
'change_reason' => 'supplier_change',
'created_by' => 'john.doe@example.com',
'metadata' => [
'utm_source' => 'google',
'utm_campaign' => 'campaign_name',
'user_id' => '1234567890'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nomos.energy/leads"
payload := strings.NewReader("{\n \"plan\": \"pln_mi4f0oda6x9m7gcsvjk0ole1\",\n \"address\": {\n \"zip\": \"10115\",\n \"street\": \"Torstraße\",\n \"city\": \"Berlin\",\n \"house_number\": \"119\"\n },\n \"meter\": {\n \"estimated_usage\": 2500,\n \"type\": \"smart\",\n \"number\": \"1APA0195124010\"\n },\n \"customer\": {\n \"type\": \"person\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\"\n },\n \"payment_method\": {\n \"type\": \"sepa_debit\",\n \"sepa_debit\": {\n \"iban\": \"DE68500105178297336485\",\n \"account_holder\": \"John Doe\"\n }\n },\n \"previous_supplier\": \"mp_mi4f0oda6x9m7gcsvjk0ole1\",\n \"next_possible_start\": true,\n \"intended_start_date\": \"2024-01-01\",\n \"change_reason\": \"supplier_change\",\n \"created_by\": \"john.doe@example.com\",\n \"metadata\": {\n \"utm_source\": \"google\",\n \"utm_campaign\": \"campaign_name\",\n \"user_id\": \"1234567890\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nomos.energy/leads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan\": \"pln_mi4f0oda6x9m7gcsvjk0ole1\",\n \"address\": {\n \"zip\": \"10115\",\n \"street\": \"Torstraße\",\n \"city\": \"Berlin\",\n \"house_number\": \"119\"\n },\n \"meter\": {\n \"estimated_usage\": 2500,\n \"type\": \"smart\",\n \"number\": \"1APA0195124010\"\n },\n \"customer\": {\n \"type\": \"person\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\"\n },\n \"payment_method\": {\n \"type\": \"sepa_debit\",\n \"sepa_debit\": {\n \"iban\": \"DE68500105178297336485\",\n \"account_holder\": \"John Doe\"\n }\n },\n \"previous_supplier\": \"mp_mi4f0oda6x9m7gcsvjk0ole1\",\n \"next_possible_start\": true,\n \"intended_start_date\": \"2024-01-01\",\n \"change_reason\": \"supplier_change\",\n \"created_by\": \"john.doe@example.com\",\n \"metadata\": {\n \"utm_source\": \"google\",\n \"utm_campaign\": \"campaign_name\",\n \"user_id\": \"1234567890\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nomos.energy/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan\": \"pln_mi4f0oda6x9m7gcsvjk0ole1\",\n \"address\": {\n \"zip\": \"10115\",\n \"street\": \"Torstraße\",\n \"city\": \"Berlin\",\n \"house_number\": \"119\"\n },\n \"meter\": {\n \"estimated_usage\": 2500,\n \"type\": \"smart\",\n \"number\": \"1APA0195124010\"\n },\n \"customer\": {\n \"type\": \"person\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\"\n },\n \"payment_method\": {\n \"type\": \"sepa_debit\",\n \"sepa_debit\": {\n \"iban\": \"DE68500105178297336485\",\n \"account_holder\": \"John Doe\"\n }\n },\n \"previous_supplier\": \"mp_mi4f0oda6x9m7gcsvjk0ole1\",\n \"next_possible_start\": true,\n \"intended_start_date\": \"2024-01-01\",\n \"change_reason\": \"supplier_change\",\n \"created_by\": \"john.doe@example.com\",\n \"metadata\": {\n \"utm_source\": \"google\",\n \"utm_campaign\": \"campaign_name\",\n \"user_id\": \"1234567890\"\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "lead",
"id": "lead_a8n8ol7yd4h0wohx824f0bui",
"link": "https://nomos.checkout.energy/?id=lead_a8n8ol7yd4h0wohx824f0bui",
"created_at": "2024-03-14T12:00:00Z",
"subscription": "sub_a8n8ol7yd4h0wohx824f0bui",
"subscribed_at": "2024-03-14T12:00:00Z",
"created_by": "john.doe@example.com",
"last_visited_at": "2024-03-14T12:00:00Z",
"metadata": {
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}
}{
"code": "BAD_REQUEST",
"message": "invalid_type in 'end': Required",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/BAD_REQUEST",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "UNAUTHORIZED",
"message": "Invalid or malformed token",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/UNAUTHORIZED",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "PAYMENT_REQUIRED",
"message": "Payment required",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/PAYMENT_REQUIRED",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "FORBIDDEN",
"message": "You are not allowed to access this resource",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/FORBIDDEN",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "NOT_FOUND",
"message": "Resource not found",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/NOT_FOUND",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "METHOD_NOT_ALLOWED",
"message": "Method not allowed",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/METHOD_NOT_ALLOWED",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "CONFLICT",
"message": "Resource already exists",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/CONFLICT",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "UNPROCESSABLE_ENTITY",
"message": "invalid_enum_value in 'status': Invalid enum value. Expected 'pending' | 'active' | 'ended'",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/UNPROCESSABLE_ENTITY",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "TOO_MANY_REQUESTS",
"message": "Wait 30 seconds before retrying.",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/TOO_MANY_REQUESTS",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/INTERNAL_SERVER_ERROR",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}Create a lead
This endpoint can be used to create a secure, pre-filled checkout link. The link (returned in the “link” property) contains all provided customer, address and meter data, allowing the prospect to finalize their signup with only providing the missing payment information, essentially enabling a 2-click checkout experience. Leads are tracked in the Nomos Dashboard for detailed conversion analytics. Leads can be created for both consumption and feed-in plans.
curl --request POST \
--url https://api.nomos.energy/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "pln_mi4f0oda6x9m7gcsvjk0ole1",
"address": {
"zip": "10115",
"street": "Torstraße",
"city": "Berlin",
"house_number": "119"
},
"meter": {
"estimated_usage": 2500,
"type": "smart",
"number": "1APA0195124010"
},
"customer": {
"type": "person",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"payment_method": {
"type": "sepa_debit",
"sepa_debit": {
"iban": "DE68500105178297336485",
"account_holder": "John Doe"
}
},
"previous_supplier": "mp_mi4f0oda6x9m7gcsvjk0ole1",
"next_possible_start": true,
"intended_start_date": "2024-01-01",
"change_reason": "supplier_change",
"created_by": "john.doe@example.com",
"metadata": {
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}
}
'import requests
url = "https://api.nomos.energy/leads"
payload = {
"plan": "pln_mi4f0oda6x9m7gcsvjk0ole1",
"address": {
"zip": "10115",
"street": "Torstraße",
"city": "Berlin",
"house_number": "119"
},
"meter": {
"estimated_usage": 2500,
"type": "smart",
"number": "1APA0195124010"
},
"customer": {
"type": "person",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"payment_method": {
"type": "sepa_debit",
"sepa_debit": {
"iban": "DE68500105178297336485",
"account_holder": "John Doe"
}
},
"previous_supplier": "mp_mi4f0oda6x9m7gcsvjk0ole1",
"next_possible_start": True,
"intended_start_date": "2024-01-01",
"change_reason": "supplier_change",
"created_by": "john.doe@example.com",
"metadata": {
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan: 'pln_mi4f0oda6x9m7gcsvjk0ole1',
address: {zip: '10115', street: 'Torstraße', city: 'Berlin', house_number: '119'},
meter: {estimated_usage: 2500, type: 'smart', number: '1APA0195124010'},
customer: {
type: 'person',
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com'
},
payment_method: {
type: 'sepa_debit',
sepa_debit: {iban: 'DE68500105178297336485', account_holder: 'John Doe'}
},
previous_supplier: 'mp_mi4f0oda6x9m7gcsvjk0ole1',
next_possible_start: true,
intended_start_date: '2024-01-01',
change_reason: 'supplier_change',
created_by: 'john.doe@example.com',
metadata: {utm_source: 'google', utm_campaign: 'campaign_name', user_id: '1234567890'}
})
};
fetch('https://api.nomos.energy/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nomos.energy/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan' => 'pln_mi4f0oda6x9m7gcsvjk0ole1',
'address' => [
'zip' => '10115',
'street' => 'Torstraße',
'city' => 'Berlin',
'house_number' => '119'
],
'meter' => [
'estimated_usage' => 2500,
'type' => 'smart',
'number' => '1APA0195124010'
],
'customer' => [
'type' => 'person',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john.doe@example.com'
],
'payment_method' => [
'type' => 'sepa_debit',
'sepa_debit' => [
'iban' => 'DE68500105178297336485',
'account_holder' => 'John Doe'
]
],
'previous_supplier' => 'mp_mi4f0oda6x9m7gcsvjk0ole1',
'next_possible_start' => true,
'intended_start_date' => '2024-01-01',
'change_reason' => 'supplier_change',
'created_by' => 'john.doe@example.com',
'metadata' => [
'utm_source' => 'google',
'utm_campaign' => 'campaign_name',
'user_id' => '1234567890'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nomos.energy/leads"
payload := strings.NewReader("{\n \"plan\": \"pln_mi4f0oda6x9m7gcsvjk0ole1\",\n \"address\": {\n \"zip\": \"10115\",\n \"street\": \"Torstraße\",\n \"city\": \"Berlin\",\n \"house_number\": \"119\"\n },\n \"meter\": {\n \"estimated_usage\": 2500,\n \"type\": \"smart\",\n \"number\": \"1APA0195124010\"\n },\n \"customer\": {\n \"type\": \"person\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\"\n },\n \"payment_method\": {\n \"type\": \"sepa_debit\",\n \"sepa_debit\": {\n \"iban\": \"DE68500105178297336485\",\n \"account_holder\": \"John Doe\"\n }\n },\n \"previous_supplier\": \"mp_mi4f0oda6x9m7gcsvjk0ole1\",\n \"next_possible_start\": true,\n \"intended_start_date\": \"2024-01-01\",\n \"change_reason\": \"supplier_change\",\n \"created_by\": \"john.doe@example.com\",\n \"metadata\": {\n \"utm_source\": \"google\",\n \"utm_campaign\": \"campaign_name\",\n \"user_id\": \"1234567890\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nomos.energy/leads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan\": \"pln_mi4f0oda6x9m7gcsvjk0ole1\",\n \"address\": {\n \"zip\": \"10115\",\n \"street\": \"Torstraße\",\n \"city\": \"Berlin\",\n \"house_number\": \"119\"\n },\n \"meter\": {\n \"estimated_usage\": 2500,\n \"type\": \"smart\",\n \"number\": \"1APA0195124010\"\n },\n \"customer\": {\n \"type\": \"person\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\"\n },\n \"payment_method\": {\n \"type\": \"sepa_debit\",\n \"sepa_debit\": {\n \"iban\": \"DE68500105178297336485\",\n \"account_holder\": \"John Doe\"\n }\n },\n \"previous_supplier\": \"mp_mi4f0oda6x9m7gcsvjk0ole1\",\n \"next_possible_start\": true,\n \"intended_start_date\": \"2024-01-01\",\n \"change_reason\": \"supplier_change\",\n \"created_by\": \"john.doe@example.com\",\n \"metadata\": {\n \"utm_source\": \"google\",\n \"utm_campaign\": \"campaign_name\",\n \"user_id\": \"1234567890\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nomos.energy/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan\": \"pln_mi4f0oda6x9m7gcsvjk0ole1\",\n \"address\": {\n \"zip\": \"10115\",\n \"street\": \"Torstraße\",\n \"city\": \"Berlin\",\n \"house_number\": \"119\"\n },\n \"meter\": {\n \"estimated_usage\": 2500,\n \"type\": \"smart\",\n \"number\": \"1APA0195124010\"\n },\n \"customer\": {\n \"type\": \"person\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\"\n },\n \"payment_method\": {\n \"type\": \"sepa_debit\",\n \"sepa_debit\": {\n \"iban\": \"DE68500105178297336485\",\n \"account_holder\": \"John Doe\"\n }\n },\n \"previous_supplier\": \"mp_mi4f0oda6x9m7gcsvjk0ole1\",\n \"next_possible_start\": true,\n \"intended_start_date\": \"2024-01-01\",\n \"change_reason\": \"supplier_change\",\n \"created_by\": \"john.doe@example.com\",\n \"metadata\": {\n \"utm_source\": \"google\",\n \"utm_campaign\": \"campaign_name\",\n \"user_id\": \"1234567890\"\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "lead",
"id": "lead_a8n8ol7yd4h0wohx824f0bui",
"link": "https://nomos.checkout.energy/?id=lead_a8n8ol7yd4h0wohx824f0bui",
"created_at": "2024-03-14T12:00:00Z",
"subscription": "sub_a8n8ol7yd4h0wohx824f0bui",
"subscribed_at": "2024-03-14T12:00:00Z",
"created_by": "john.doe@example.com",
"last_visited_at": "2024-03-14T12:00:00Z",
"metadata": {
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}
}{
"code": "BAD_REQUEST",
"message": "invalid_type in 'end': Required",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/BAD_REQUEST",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "UNAUTHORIZED",
"message": "Invalid or malformed token",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/UNAUTHORIZED",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "PAYMENT_REQUIRED",
"message": "Payment required",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/PAYMENT_REQUIRED",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "FORBIDDEN",
"message": "You are not allowed to access this resource",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/FORBIDDEN",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "NOT_FOUND",
"message": "Resource not found",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/NOT_FOUND",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "METHOD_NOT_ALLOWED",
"message": "Method not allowed",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/METHOD_NOT_ALLOWED",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "CONFLICT",
"message": "Resource already exists",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/CONFLICT",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "UNPROCESSABLE_ENTITY",
"message": "invalid_enum_value in 'status': Invalid enum value. Expected 'pending' | 'active' | 'ended'",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/UNPROCESSABLE_ENTITY",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "TOO_MANY_REQUESTS",
"message": "Wait 30 seconds before retrying.",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/TOO_MANY_REQUESTS",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error",
"requestId": "37a04f8f-e791-491c-81e1-86cd304649bb",
"docs": "https://docs.nomos.energy/api-references/errors/INTERNAL_SERVER_ERROR",
"errors": [
{
"code": "invalid_type",
"field": "favoriteNumbers.1",
"message": "Invalid input: expected string, received number"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The lead to create
Plan ID
"pln_mi4f0oda6x9m7gcsvjk0ole1"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Person
- Company
Show child attributes
Show child attributes
Show child attributes
Show child attributes
ID of the previous supplier, possible to obtain via /suppliers. Only supported for consumption plans.
"mp_mi4f0oda6x9m7gcsvjk0ole1"
If set to false we will request the cancellation of the previous supplier / grid operator signup to the date provided in intended_start_date. If set to true we will request the next possible date.
true
Intended start date of the subscription. Must be a date in the future. For feed-in plans it must be the first day of a month, at least one month in the future; when omitted, the next possible production start date is used.
"2024-01-01"
Reason of changing the supplier
supplier_change, move_in "supplier_change"
Email of the user who created the lead
"john.doe@example.com"
Metadata of the lead, can be internal data
Show child attributes
Show child attributes
{
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}
Response
The created lead details
lead Unique identifier for the lead
"lead_a8n8ol7yd4h0wohx824f0bui"
URL of the lead
"https://nomos.checkout.energy/?id=lead_a8n8ol7yd4h0wohx824f0bui"
Timestamp when the lead was created
"2024-03-14T12:00:00Z"
ID of the subscription, if the lead is converted to a subscription
"sub_a8n8ol7yd4h0wohx824f0bui"
Timestamp when the lead was converted to a subscription
"2024-03-14T12:00:00Z"
Email of the user who created the lead
"john.doe@example.com"
Timestamp when the lead was last visited
"2024-03-14T12:00:00Z"
Metadata of the lead, can be internal data
Show child attributes
Show child attributes
{
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}
Was this page helpful?