Leads
Convert lead
Convert a lead to a customer
GET
/
v1
/
leads
/
convert
Convert lead
curl --request GET \
--url https://api.example.com/v1/leads/convertimport requests
url = "https://api.example.com/v1/leads/convert"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/leads/convert', 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.example.com/v1/leads/convert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/leads/convert"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/leads/convert")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/leads/convert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": 44,
"status": "converted",
"created_at": "2025-05-16",
"lead_info": {
"name": "Alice Brown",
"email": "[email protected]"
},
"converted_to": {
"key": "NSpBI1qWSE4J",
"name": "Alice Brown",
"email": "[email protected]"
},
"submitter": {
"id": "partner_123",
"name": "John Doe",
"email": "[email protected]"
},
"submission_form": [
{
"question": "Name",
"answer": "Alice Brown"
},
{
"question": "Email address",
"answer": "[email protected]"
}
],
"can_be_converted": false,
"can_be_rejected": false
},
"status": 1
}
Endpoint
GET https://api.partnero.com/v1/leads/convert
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Lead ID to convert |
commission_transaction_amount | number | Yes | Transaction amount for commission calculation |
Request
cURL
curl --location 'https://api.partnero.com/v1/leads/convert?id=44&commission_transaction_amount=500' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'
Response
{
"data": {
"id": 44,
"status": "converted",
"created_at": "2025-05-16",
"lead_info": {
"name": "Alice Brown",
"email": "[email protected]"
},
"converted_to": {
"key": "NSpBI1qWSE4J",
"name": "Alice Brown",
"email": "[email protected]"
},
"submitter": {
"id": "partner_123",
"name": "John Doe",
"email": "[email protected]"
},
"submission_form": [
{
"question": "Name",
"answer": "Alice Brown"
},
{
"question": "Email address",
"answer": "[email protected]"
}
],
"can_be_converted": false,
"can_be_rejected": false
},
"status": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
data.converted_to | object | The created customer |
data.converted_to.key | string | New customer’s unique key |
data.converted_to.name | string | Customer name |
data.converted_to.email | string | Customer email |
After conversion, the lead’s
status changes to converted and can_be_converted becomes false.Reject a Lead
To reject a lead instead of converting:GET https://api.partnero.com/v1/leads/reject?id=44
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Lead ID to reject |
⌘I
Convert lead
curl --request GET \
--url https://api.example.com/v1/leads/convertimport requests
url = "https://api.example.com/v1/leads/convert"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/leads/convert', 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.example.com/v1/leads/convert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/leads/convert"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/leads/convert")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/leads/convert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": 44,
"status": "converted",
"created_at": "2025-05-16",
"lead_info": {
"name": "Alice Brown",
"email": "[email protected]"
},
"converted_to": {
"key": "NSpBI1qWSE4J",
"name": "Alice Brown",
"email": "[email protected]"
},
"submitter": {
"id": "partner_123",
"name": "John Doe",
"email": "[email protected]"
},
"submission_form": [
{
"question": "Name",
"answer": "Alice Brown"
},
{
"question": "Email address",
"answer": "[email protected]"
}
],
"can_be_converted": false,
"can_be_rejected": false
},
"status": 1
}
