Add new lead with mobile.
curl --request POST \
--url https://apigw.bienport.com/api/lead/add \
--header 'Content-Type: application/json' \
--data '
{
"name": "Test3 Name",
"prospectContact": [
{}
]
}
'import requests
url = "https://apigw.bienport.com/api/lead/add"
payload = {
"name": "Test3 Name",
"prospectContact": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Test3 Name', prospectContact: [{}]})
};
fetch('https://apigw.bienport.com/api/lead/add', 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://apigw.bienport.com/api/lead/add",
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([
'name' => 'Test3 Name',
'prospectContact' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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://apigw.bienport.com/api/lead/add"
payload := strings.NewReader("{\n \"name\": \"Test3 Name\",\n \"prospectContact\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://apigw.bienport.com/api/lead/add")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Test3 Name\",\n \"prospectContact\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.bienport.com/api/lead/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Test3 Name\",\n \"prospectContact\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 89839,
"totalPages": 1,
"href": "FN-3***",
"totalItems": 1,
"creationDate": "2020-07-06T00:00:00.000Z",
"currentPage": 1,
"description": "****",
"leads": "<array>",
"name": "KAMER T****",
"rating": 50,
"referredDate": "2020-07-06T00:00:00.000Z",
"category": {
"id": 123,
"name": "Alarm"
},
"marketSegment": {
"id": 1,
"name": "Alarm"
},
"prospectContact": [
{
"characteristic": {
"phoneNumber": "5XXXXXXXXXX (phoneNumber must be 10 characters. phoneNumber must not be start 0.)",
"city": "İstanbul",
"mobileAppId": "1231-4654-6564-6498-99",
"subscriptionId": "551",
"panelNo": "EA-560"
}
}
],
"relatedParty": [
{
"name": "<string>",
"id": "456789"
}
],
"status": "Randevu Alındı"
}This response has no body data.{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}This response has no body data.This response has no body data.{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}Add new lead with mobile.
POST
/
lead
/
add
Add new lead with mobile.
curl --request POST \
--url https://apigw.bienport.com/api/lead/add \
--header 'Content-Type: application/json' \
--data '
{
"name": "Test3 Name",
"prospectContact": [
{}
]
}
'import requests
url = "https://apigw.bienport.com/api/lead/add"
payload = {
"name": "Test3 Name",
"prospectContact": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Test3 Name', prospectContact: [{}]})
};
fetch('https://apigw.bienport.com/api/lead/add', 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://apigw.bienport.com/api/lead/add",
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([
'name' => 'Test3 Name',
'prospectContact' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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://apigw.bienport.com/api/lead/add"
payload := strings.NewReader("{\n \"name\": \"Test3 Name\",\n \"prospectContact\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://apigw.bienport.com/api/lead/add")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Test3 Name\",\n \"prospectContact\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.bienport.com/api/lead/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Test3 Name\",\n \"prospectContact\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 89839,
"totalPages": 1,
"href": "FN-3***",
"totalItems": 1,
"creationDate": "2020-07-06T00:00:00.000Z",
"currentPage": 1,
"description": "****",
"leads": "<array>",
"name": "KAMER T****",
"rating": 50,
"referredDate": "2020-07-06T00:00:00.000Z",
"category": {
"id": 123,
"name": "Alarm"
},
"marketSegment": {
"id": 1,
"name": "Alarm"
},
"prospectContact": [
{
"characteristic": {
"phoneNumber": "5XXXXXXXXXX (phoneNumber must be 10 characters. phoneNumber must not be start 0.)",
"city": "İstanbul",
"mobileAppId": "1231-4654-6564-6498-99",
"subscriptionId": "551",
"panelNo": "EA-560"
}
}
],
"relatedParty": [
{
"name": "<string>",
"id": "456789"
}
],
"status": "Randevu Alındı"
}This response has no body data.{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}This response has no body data.This response has no body data.{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}Body
application/json
addLeadRequest
Response
Lead Adding Success.
Response Model for get lead
Example:
89839
Example:
1
Example:
"FN-3***"
Example:
1
Example:
"2020-07-06T00:00:00.000Z"
Example:
1
Example:
"****"
Example:
"KAMER T****"
Example:
50
Example:
"2020-07-06T00:00:00.000Z"
Category for get lead
Show child attributes
Show child attributes
MarketSegment for get lead
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"Randevu Alındı"
Was this page helpful?
⌘I