API Reference - Business Data Tasks
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108134
← Back to API Reference | Getting Started
Business Data Tasks
Business Data Tasks represent individual bulk import jobs in the Business Data Import system. Each task defines the search parameters used to fetch business records from an external data source, tracks the overall processing state (geocoding, image imports, user actions), and records start/completion times and total record counts. Individual imported records are tracked in Business Data Logs.
business_data_api_task — DB table: business_data_api_taskThe Business Data Task Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique task ID (primary key, read-only) |
search_parameters | text | JSON-encoded object describing the search criteria used for this import job (EG category, location, required fields) |
cache_file | string | Filename or path of the cached API response file for this task; max 500 characters |
api_type | string | Identifier for the external business data source this task was pulled from; max 500 characters |
geo_code_status | integer | Geocoding processing status for all records in this task; 0 = pending, 1 = complete, null = not applicable |
image_import_status | integer | Image import processing status for all records in this task; 0 = pending, 1 = complete, null = not applicable |
user_actions_status | integer | Overall user action processing status for all records; 0 = pending, 1 = complete, null = not applicable |
start_date | datetime | Datetime when this import task began processing |
complete_date | datetime | Datetime when this import task finished processing |
total_records | integer | Total number of records imported or processed by this task |
List Business Data Tasks
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/business_data_api_task/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"id": "1",
"search_parameters": "{\"category\":\"Property management company\",\"location\":\"Austin, TX\"}",
"cache_file": "ea66bf0b769c7b323292a8f0aca52299.bd",
"api_type": "google_places",
"geo_code_status": "1",
"image_import_status": "1",
"user_actions_status": "0",
"start_date": "2024-06-13 17:55:55",
"complete_date": "2024-06-13 16:55:58",
"total_records": "4"
}
],
"total": "21",
"current_page": 1,
"total_pages": 5,
"next_page": "MipfKjU="
}Retrieve a Business Data Task
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/business_data_api_task/get/1" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"id": "1",
"search_parameters": "{\"category\":\"Property management company\",\"location\":\"Austin, TX\"}",
"cache_file": "ea66bf0b769c7b323292a8f0aca52299.bd",
"api_type": "google_places",
"geo_code_status": "1",
"image_import_status": "1",
"user_actions_status": "0",
"start_date": "2024-06-13 17:55:55",
"complete_date": "2024-06-13 16:55:58",
"total_records": "4"
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create a Business Data Task
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/business_data_api_task/create" \
-H "X-Api-Key: your-api-key-here" \
-d "search_parameters={\"category\":\"Restaurant\",\"location\":\"Chicago, IL\"}" \
-d "cache_file=abc123.bd" \
-d "api_type=google_places" \
-d "geo_code_status=0" \
-d "image_import_status=0" \
-d "user_actions_status=0" \
-d "total_records=0"Example Response
{
"status": "success",
"message": {
"id": "22",
"search_parameters": "{\"category\":\"Restaurant\",\"location\":\"Chicago, IL\"}",
"cache_file": "abc123.bd",
"api_type": "google_places",
"geo_code_status": "0",
"image_import_status": "0",
"user_actions_status": "0",
"start_date": null,
"complete_date": null,
"total_records": "0"
}
}Update a Business Data Task
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/business_data_api_task/update" \ -H "X-Api-Key: your-api-key-here" \ -d "id=22" \ -d "user_actions_status=1" \ -d "total_records=15"
Example Response
{
"status": "success",
"message": {
"id": "22",
"search_parameters": "{\"category\":\"Restaurant\",\"location\":\"Chicago, IL\"}",
"cache_file": "abc123.bd",
"api_type": "google_places",
"geo_code_status": "0",
"image_import_status": "0",
"user_actions_status": "1",
"start_date": "0000-00-00 00:00:00",
"complete_date": "0000-00-00 00:00:00",
"total_records": "15"
}
}Delete a Business Data Task
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/business_data_api_task/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "id=22"
Example Response
{
"status": "success",
"message": "business_data_api_task record was deleted"
}