Lead Import
A CSV upload job that creates or updates leads for an offer or schedule from an uploaded file.
GET /lead_imports
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/lead_imports
List Lead Import records.
List the lead imports in your account.
Params
| Param name | Description |
|---|---|
|
ids Optional |
Return records matching these ids.
|
|
page Optional |
Return the next page of results.
|
|
per_page Optional |
How many results to return per page. The default is 25.
|
|
created_at_to Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
|
created_at_from Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
|
fulltext Optional |
Search for any record that matches this text
|
|
time_zone Optional |
Date ranges will be parsed using this time zone.
|
|
columns Optional |
Specify the columns you would like returned by the API for a given resource.
Limiting the columns can significantly increase API response time since only the requested data will be processed.
columns=uuid,number,created_at
Must be any combination of:
|
|
root Optional |
Pass
|
GET /lead_imports/new
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/lead_imports/new
Build Lead Import with defaults.
Return a new, unsaved lead import pre-filled with defaults.
POST /lead_imports
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/lead_imports
Create Lead Import.
Upload a CSV file of leads for an offer or schedule. The import does not start until its columns are mapped with data_maps_attributes, so this call alone creates no leads.
Params
| Param name | Description |
|---|---|
|
data_maps_attributes Optional Blank value allowed |
How the uploaded file’s columns fill in Trackdrive lead fields. Each entry maps one column: td_key is the Trackdrive field the column fills (for example caller_id or email), and ex_key is the column header in your uploaded file. One entry must map td_key caller_id or trackdrive_lead_id, and this mapping is what starts the import. [ { "td_key": "caller_id", "ex_key": "Phone", "import": "1" },
{ "td_key": "email", "ex_key": "Email", "import": "1" }
]
|
GET /lead_imports/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/lead_imports/:id
Get Lead Import by id.
Retrieve a single lead import by id, including its progress and any error message.
PUT /lead_imports/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/lead_imports/:id
Update Lead Import by id.
Update a lead import's name, column mapping, or lead handling options. Mapping a caller_id or trackdrive_lead_id column with data_maps_attributes starts the import, which creates or updates leads from the uploaded file.
Params
| Param name | Description |
|---|---|
|
data_maps_attributes Optional Blank value allowed |
How the uploaded file’s columns fill in Trackdrive lead fields. Each entry maps one column: td_key is the Trackdrive field the column fills (for example caller_id or email), and ex_key is the column header in your uploaded file. One entry must map td_key caller_id or trackdrive_lead_id, and this mapping is what starts the import. [ { "td_key": "caller_id", "ex_key": "Phone", "import": "1" },
{ "td_key": "email", "ex_key": "Email", "import": "1" }
]
|
DELETE /lead_imports/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/lead_imports/:id
Destroy Lead Import by id.
Delete a lead import. Leads it already created are not removed.