Update lead status
curl --request POST \
--url https://{tenant}.techea.eu/api/v1/lead/{lead_id}/status \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"status": "converted",
"advertiser_id": "5490c3cc-0d44-4b50-8888-8dd43736052a",
"metadata": {
"amount": 8000,
"term_months": 24
}
}
'import requests
url = "https://{tenant}.techea.eu/api/v1/lead/{lead_id}/status"
payload = {
"status": "converted",
"advertiser_id": "5490c3cc-0d44-4b50-8888-8dd43736052a",
"metadata": {
"amount": 8000,
"term_months": 24
}
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'converted',
advertiser_id: '5490c3cc-0d44-4b50-8888-8dd43736052a',
metadata: {amount: 8000, term_months: 24}
})
};
fetch('https://{tenant}.techea.eu/api/v1/lead/{lead_id}/status', 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://{tenant}.techea.eu/api/v1/lead/{lead_id}/status",
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([
'status' => 'converted',
'advertiser_id' => '5490c3cc-0d44-4b50-8888-8dd43736052a',
'metadata' => [
'amount' => 8000,
'term_months' => 24
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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://{tenant}.techea.eu/api/v1/lead/{lead_id}/status"
payload := strings.NewReader("{\n \"status\": \"converted\",\n \"advertiser_id\": \"5490c3cc-0d44-4b50-8888-8dd43736052a\",\n \"metadata\": {\n \"amount\": 8000,\n \"term_months\": 24\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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://{tenant}.techea.eu/api/v1/lead/{lead_id}/status")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"converted\",\n \"advertiser_id\": \"5490c3cc-0d44-4b50-8888-8dd43736052a\",\n \"metadata\": {\n \"amount\": 8000,\n \"term_months\": 24\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.techea.eu/api/v1/lead/{lead_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"converted\",\n \"advertiser_id\": \"5490c3cc-0d44-4b50-8888-8dd43736052a\",\n \"metadata\": {\n \"amount\": 8000,\n \"term_months\": 24\n }\n}"
response = http.request(request)
puts response.read_body{
"lead_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "validation_error",
"message": "Request body validation failed",
"details": [
{
"field": "product_data.loan_amount",
"issue": "must be between 500 and 75000"
}
]
}{
"error": "validation_error",
"message": "Request body validation failed",
"details": [
{
"field": "product_data.loan_amount",
"issue": "must be between 500 and 75000"
}
]
}{
"error": "validation_error",
"message": "Request body validation failed",
"details": [
{
"field": "product_data.loan_amount",
"issue": "must be between 500 and 75000"
}
]
}Advertiser
Update Lead Status
Notifies Leadhub of a status change for a lead (e.g. registration completed, loan issued).
Called by the advertiser when a relevant event occurs during lead processing. Leadhub will forward the notification to the publisher’s configured callback URL.
The lead_id is provided by Leadhub in the POST /lead response and must be included in the URL path.
POST
/
lead
/
{lead_id}
/
status
Update lead status
curl --request POST \
--url https://{tenant}.techea.eu/api/v1/lead/{lead_id}/status \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"status": "converted",
"advertiser_id": "5490c3cc-0d44-4b50-8888-8dd43736052a",
"metadata": {
"amount": 8000,
"term_months": 24
}
}
'import requests
url = "https://{tenant}.techea.eu/api/v1/lead/{lead_id}/status"
payload = {
"status": "converted",
"advertiser_id": "5490c3cc-0d44-4b50-8888-8dd43736052a",
"metadata": {
"amount": 8000,
"term_months": 24
}
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'converted',
advertiser_id: '5490c3cc-0d44-4b50-8888-8dd43736052a',
metadata: {amount: 8000, term_months: 24}
})
};
fetch('https://{tenant}.techea.eu/api/v1/lead/{lead_id}/status', 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://{tenant}.techea.eu/api/v1/lead/{lead_id}/status",
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([
'status' => 'converted',
'advertiser_id' => '5490c3cc-0d44-4b50-8888-8dd43736052a',
'metadata' => [
'amount' => 8000,
'term_months' => 24
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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://{tenant}.techea.eu/api/v1/lead/{lead_id}/status"
payload := strings.NewReader("{\n \"status\": \"converted\",\n \"advertiser_id\": \"5490c3cc-0d44-4b50-8888-8dd43736052a\",\n \"metadata\": {\n \"amount\": 8000,\n \"term_months\": 24\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
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://{tenant}.techea.eu/api/v1/lead/{lead_id}/status")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"converted\",\n \"advertiser_id\": \"5490c3cc-0d44-4b50-8888-8dd43736052a\",\n \"metadata\": {\n \"amount\": 8000,\n \"term_months\": 24\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.techea.eu/api/v1/lead/{lead_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"converted\",\n \"advertiser_id\": \"5490c3cc-0d44-4b50-8888-8dd43736052a\",\n \"metadata\": {\n \"amount\": 8000,\n \"term_months\": 24\n }\n}"
response = http.request(request)
puts response.read_body{
"lead_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "validation_error",
"message": "Request body validation failed",
"details": [
{
"field": "product_data.loan_amount",
"issue": "must be between 500 and 75000"
}
]
}{
"error": "validation_error",
"message": "Request body validation failed",
"details": [
{
"field": "product_data.loan_amount",
"issue": "must be between 500 and 75000"
}
]
}{
"error": "validation_error",
"message": "Request body validation failed",
"details": [
{
"field": "product_data.loan_amount",
"issue": "must be between 500 and 75000"
}
]
}Authorizations
API Key provided by TECHEA
Path Parameters
Lead ID provided by Leadhub at submission time
Body
application/json
⌘I