Imports one batch of a file (a header and at most 1,000 rows) into an import
curl --request POST \
--url https://api.erdo.ai/v1/provider-lead-sources/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_submitted_at": "<string>",
"dry_run": true,
"header": [
"<string>"
],
"name": "<string>",
"rows": [
[
"<string>"
]
]
}
'import requests
url = "https://api.erdo.ai/v1/provider-lead-sources/import"
payload = {
"default_submitted_at": "<string>",
"dry_run": True,
"header": ["<string>"],
"name": "<string>",
"rows": [["<string>"]]
}
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({
default_submitted_at: '<string>',
dry_run: true,
header: ['<string>'],
name: '<string>',
rows: [['<string>']]
})
};
fetch('https://api.erdo.ai/v1/provider-lead-sources/import', 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.erdo.ai/v1/provider-lead-sources/import",
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([
'default_submitted_at' => '<string>',
'dry_run' => true,
'header' => [
'<string>'
],
'name' => '<string>',
'rows' => [
[
'<string>'
]
]
]),
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.erdo.ai/v1/provider-lead-sources/import"
payload := strings.NewReader("{\n \"default_submitted_at\": \"<string>\",\n \"dry_run\": true,\n \"header\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"rows\": [\n [\n \"<string>\"\n ]\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.erdo.ai/v1/provider-lead-sources/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_submitted_at\": \"<string>\",\n \"dry_run\": true,\n \"header\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"rows\": [\n [\n \"<string>\"\n ]\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/provider-lead-sources/import")
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 \"default_submitted_at\": \"<string>\",\n \"dry_run\": true,\n \"header\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"rows\": [\n [\n \"<string>\"\n ]\n ]\n}"
response = http.request(request)
puts response.read_body{
"already_written": 123,
"created": 123,
"created_leads": [
"<string>"
],
"existing": 123,
"no_contact": 123,
"preview": {
"already_written": 123,
"existing_columns": [
"<string>"
],
"format_columns": {},
"header": [
"<string>"
],
"history": 123,
"missing_fields": [
"<string>"
],
"new": 123,
"not_read": [
"<string>"
],
"read_columns": {},
"rows": 123,
"sample": [
{}
],
"skipped": {},
"suggested_columns": {},
"suggested_values": {},
"test": 123
},
"refused": 123,
"unreadable": 123
}{
"code": "not_found",
"details": {},
"message": "<string>"
}API Reference
Imports one batch of a file (a header and at most 1,000 rows) into an import
lead source. Every row is written as history: dated by the file’s own submission time or default_submitted_at, never alerted on, billed or followed up until somebody starts it. A row already imported is not written again. dry_run previews the batch. Mirrors erdo_import_lead_source_rows.
POST
/
v1
/
provider-lead-sources
/
import
Imports one batch of a file (a header and at most 1,000 rows) into an import
curl --request POST \
--url https://api.erdo.ai/v1/provider-lead-sources/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_submitted_at": "<string>",
"dry_run": true,
"header": [
"<string>"
],
"name": "<string>",
"rows": [
[
"<string>"
]
]
}
'import requests
url = "https://api.erdo.ai/v1/provider-lead-sources/import"
payload = {
"default_submitted_at": "<string>",
"dry_run": True,
"header": ["<string>"],
"name": "<string>",
"rows": [["<string>"]]
}
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({
default_submitted_at: '<string>',
dry_run: true,
header: ['<string>'],
name: '<string>',
rows: [['<string>']]
})
};
fetch('https://api.erdo.ai/v1/provider-lead-sources/import', 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.erdo.ai/v1/provider-lead-sources/import",
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([
'default_submitted_at' => '<string>',
'dry_run' => true,
'header' => [
'<string>'
],
'name' => '<string>',
'rows' => [
[
'<string>'
]
]
]),
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.erdo.ai/v1/provider-lead-sources/import"
payload := strings.NewReader("{\n \"default_submitted_at\": \"<string>\",\n \"dry_run\": true,\n \"header\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"rows\": [\n [\n \"<string>\"\n ]\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.erdo.ai/v1/provider-lead-sources/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_submitted_at\": \"<string>\",\n \"dry_run\": true,\n \"header\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"rows\": [\n [\n \"<string>\"\n ]\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/provider-lead-sources/import")
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 \"default_submitted_at\": \"<string>\",\n \"dry_run\": true,\n \"header\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"rows\": [\n [\n \"<string>\"\n ]\n ]\n}"
response = http.request(request)
puts response.read_body{
"already_written": 123,
"created": 123,
"created_leads": [
"<string>"
],
"existing": 123,
"no_contact": 123,
"preview": {
"already_written": 123,
"existing_columns": [
"<string>"
],
"format_columns": {},
"header": [
"<string>"
],
"history": 123,
"missing_fields": [
"<string>"
],
"new": 123,
"not_read": [
"<string>"
],
"read_columns": {},
"rows": 123,
"sample": [
{}
],
"skipped": {},
"suggested_columns": {},
"suggested_values": {},
"test": 123
},
"refused": 123,
"unreadable": 123
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
Body
application/json
Response
Success response

