API Reference - Business Data Logs
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108133
← Back to API Reference | Getting Started
Business Data Logs
Business Data Logs are the per-record audit trail for the Business Data Import system. Each log entry corresponds to a single imported member record and tracks the import payload, geocoding status, image import status, and overall processing state. Logs are linked to a parent Business Data Task and to the user record that was created or updated by the import.
business_data_logs — DB table: business_data_logsThe Business Data Log Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique log entry ID (primary key, read-only) |
unique_api_id | string | Unique identifier from the external data source API for this business record; max 500 characters required on create |
user_id | integer | Foreign key referencing the user record created or updated by this import required on create |
user_record | text | JSON-encoded data payload that was used to create or update the user record |
business_data_task_id | integer | Foreign key referencing the parent business_data_api_task record required on create |
geo_code_status | integer | Geocoding processing status; 0 = pending, 1 = complete |
image_import_status | integer | Image import processing status; 0 = pending, 1 = complete, null = not applicable |
user_actions_status | integer | Overall user action processing status; 0 = pending, 1 = complete, null = not applicable |
added_by | integer | Foreign key referencing the administrator who initiated the import required on create |
created_at | datetime | Datetime when this log entry was created |
user_updated_at | datetime | Datetime when the associated user record was last updated by the import pipeline |
List Business Data Logs
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/business_data_logs/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"id": "1",
"unique_api_id": "10795884555057933763",
"user_id": "1107",
"user_record": "{\"company\":\"Acme Corp\",\"phone_number\":\"+1555-123-4567\"}",
"business_data_task_id": "1",
"geo_code_status": "1",
"image_import_status": "1",
"user_actions_status": "1",
"added_by": "27",
"created_at": "2024-06-13 17:55:55",
"user_updated_at": "2024-06-13 16:55:58"
}
],
"total": "107",
"current_page": 1,
"total_pages": 5,
"next_page": "MipfKjI1"
}Retrieve a Business Data Log
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/business_data_logs/get/1" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"id": "1",
"unique_api_id": "10795884555057933763",
"user_id": "1107",
"user_record": "{\"company\":\"Acme Corp\",\"phone_number\":\"+1555-123-4567\"}",
"business_data_task_id": "1",
"geo_code_status": "1",
"image_import_status": "1",
"user_actions_status": "1",
"added_by": "27",
"created_at": "2024-06-13 17:55:55",
"user_updated_at": "2024-06-13 16:55:58"
}
],
"total": "1",
"current_page": 1,
"total_pages": 1
}Create a Business Data Log
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/business_data_logs/create" \
-H "X-Api-Key: your-api-key-here" \
-d "unique_api_id=ChIJrTLr-GyuEmsRBfy61i59si0" \
-d "user_id=1200" \
-d "user_record={\"company\":\"Acme Corp\"}" \
-d "business_data_task_id=5" \
-d "geo_code_status=0" \
-d "image_import_status=0" \
-d "user_actions_status=0" \
-d "added_by=27"Example Response
{
"status": "success",
"message": {
"id": "108",
"unique_api_id": "ChIJrTLr-GyuEmsRBfy61i59si0",
"user_id": "1200",
"user_record": "{\"company\":\"Acme Corp\"}",
"business_data_task_id": "5",
"geo_code_status": "0",
"image_import_status": "0",
"user_actions_status": "0",
"added_by": "27",
"created_at": null,
"user_updated_at": null
}
}Update a Business Data Log
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/business_data_logs/update" \ -H "X-Api-Key: your-api-key-here" \ -d "id=108" \ -d "geo_code_status=1" \ -d "image_import_status=1" \ -d "user_actions_status=1"
Example Response
{
"status": "success",
"message": {
"id": "108",
"unique_api_id": "ChIJrTLr-GyuEmsRBfy61i59si0",
"user_id": "1200",
"user_record": "{\"company\":\"Acme Corp\"}",
"business_data_task_id": "5",
"geo_code_status": "1",
"image_import_status": "1",
"user_actions_status": "1",
"added_by": "27",
"created_at": "0000-00-00 00:00:00",
"user_updated_at": "0000-00-00 00:00:00"
}
}Delete a Business Data Log
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/business_data_logs/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "id=108"
Example Response
{
"status": "success",
"message": "business_data_logs record was deleted"
}