### GetAllBusinesses Source: https://leadforensics-api.readme.io/reference/testinput Retrieves a list of businesses that have visited the client site within a specified date range. Supports pagination and filtering by date. ```APIDOC ## GET /Business/GetAllBusinesses ### Description Returns all of the businesses who have visited the client site between the date range provided. ### Method GET ### Endpoint /Business/GetAllBusinesses ### Parameters #### Query Parameters - **datefrom** (string) - Required - The date from which the businesses have visited. Format: date. Default: "2016-03-12 00:00:00" - **dateto** (string) - Required - The date to which the businesses have visited. Format: date. Default: "2016-03-13 00:00:00" - **pagesize** (integer) - Required - Number of records to return in a page of results. Default: 5 - **pageno** (integer) - Required - The particular page of results to return. Default: 1 ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **BusinessList** (array) - List of businesses. - **BusinessID** (integer) - Unique identifier for the business. - **Name** (string) - Name of the business. - **AddressLine1** (string) - First line of the business address. - **AddressLine2** (string) - Second line of the business address. - **AddressLine3** (string) - Third line of the business address. - **Locality** (string) - Locality of the business. - **Town** (string) - Town of the business. - **County** (string) - County of the business. - **PostCode** (string) - Postcode of the business. - **Country** (string) - Country of the business. - **Telephone** (string) - Telephone number of the business. - **Website** (string) - Website of the business. - **Industry** (string) - Industry the business belongs to. - **SICCode** (string) - Standard Industrial Classification code. - **Turnover** (string) - Business turnover. - **RegistrationNumber** (string) - Business registration number. - **EmployeeNumber** (string) - Number of employees in the business. - **PageSize** (integer) - Number of records per page. - **PageCount** (integer) - Total number of pages. - **RecordCount** (integer) - Total number of records. - **CurrentPage** (integer) - The current page number. #### Response Example ```json { "BusinessList": [ { "BusinessID": 1101281, "Name": "Bonafide Bones The Butcher", "AddressLine1": "Landsdown Road", "AddressLine2": "Willesborough", "AddressLine3": "", "Locality": "", "Town": "Ashford", "County": "Kent", "PostCode": "TN7 0PZ", "Country": "United Kingdom", "Telephone": "01233 2349 234", "Website": "http://www.bonafide-bones-the-butcher.co.uk", "Industry": "Butcher", "SICCode": "1123", "Turnover": "12231", "RegistrationNumber": "1341", "EmployeeNumber": "1-20" } ], "PageSize": 5, "PageCount": 1, "RecordCount": 1, "CurrentPage": 1 } ``` ``` -------------------------------- ### Retrieve Business Data with JavaScript Source: https://leadforensics-api.readme.io/reference/testinput Use this AJAX request to fetch business records from the API. Ensure you provide valid date ranges, page size, page number, and authentication headers (Authorization-Token and ClientID). ```javascript $.ajax({ type: 'GET', dataType: 'json', url: 'https://interact.leadforensics.com/WebApi_v2/Business/GetAllBusinesses?datefrom=10-05-2016 00:00:00&dateto=12-06-2016 23:59:59&pagesize=5&pageno=1', headers:{ 'Authorization-Token': 'Zax4qjY5w3tmAlqJUajROgW', 'ClientID':'45656' }, success: function (data) { if (data.BusinessList.length > 0) { //we have a business record } else { //we do not have a business record } }, error: function (err) { //ajax error trap } }); ``` -------------------------------- ### GetAllBusinesses Source: https://leadforensics-api.readme.io/reference/testinput Retrieves a list of businesses based on a date range. Supports pagination and filtering. ```APIDOC ## GET GetAllBusinesses ### Description Retrieves a list of businesses within a specified date range. This endpoint supports pagination to manage large result sets. ### Method GET ### Endpoint /WebApi_v2/Business/GetAllBusinesses ### Parameters #### Query Parameters - **datefrom** (string) - Required - The start date for the data retrieval (e.g., '10-05-2016 00:00:00'). - **dateto** (string) - Required - The end date for the data retrieval (e.g., '12-06-2016 23:59:59'). - **pagesize** (integer) - Optional - The number of records to return per page. Defaults to 0. - **pageno** (integer) - Optional - The page number to retrieve. Defaults to 0. ### Request Example ```javascript $.ajax({ type: 'GET', dataType: 'json', url: 'https://interact.leadforensics.com/WebApi_v2/Business/GetAllBusinesses?datefrom=10-05-2016 00:00:00&dateto=12-06-2016 23:59:59&pagesize=5&pageno=1', headers: { 'Authorization-Token': 'Zax4qjY5w3tmAlqJUajROgW', 'ClientID': '45656' }, success: function (data) { if (data.BusinessList.length > 0) { // Process business records } else { // No business records found } }, error: function (err) { // Handle AJAX error } }); ``` ### Response #### Success Response (200) - **BusinessList** (array) - A list of business objects. - **County** (string) - The county of the business. - **PostCode** (string) - The postcode of the business. - **Country** (string) - The country of the business. - **Telephone** (string) - The telephone number of the business. - **Website** (string) - The website of the business. - **Industry** (string) - The industry the business operates in. - **SICCode** (string) - The Standard Industrial Classification code. - **Turnover** (string) - The business turnover. - **RegistrationNumber** (string) - The business registration number. - **EmployeeNumber** (string) - The number of employees. - **PageSize** (integer) - The number of records returned per page. - **PageCount** (integer) - The total number of pages available. - **RecordCount** (integer) - The total number of records found. - **CurrentPage** (integer) - The current page number. #### Response Example ```json { "BusinessList": [ { "County": "Kent", "PostCode": "TN7 0PZ", "Country": "United Kingdom", "Telephone": "01233 2349 234", "Website": "http://www.bonafide-bones-the-butcher.co.uk", "Industry": "Butcher", "SICCode": "1123", "Turnover": "12231", "RegistrationNumber": "1341", "EmployeeNumber": "1-20" } ], "PageSize": 5, "PageCount": 1, "RecordCount": 1, "CurrentPage": 1 } ``` #### Error Response (400) - **description**: "400" - **content**: { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } ``` -------------------------------- ### OpenAPI Definition for Lead Forensics API Source: https://leadforensics-api.readme.io/reference/testinput This OpenAPI 3.1.0 definition outlines the structure and endpoints of the Lead Forensics API, including security schemes and available operations. ```json { "openapi": "3.1.0", "info": { "title": "API Settings", "version": "1.0" }, "servers": [ { "url": "https://interact.leadforensics.com/WebApi_v2" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "in": "header", "name": "ClientID", "x-default": "45656" }, "sec1": { "type": "apiKey", "in": "header", "name": "Authorization-Token", "x-default": "Zax4qjY5w3tmAlqJUajROgW" } } }, "security": [ { "sec0": [], "sec1": [] } ], "paths": { "/Business/GetAllBusinesses": { "get": { "summary": "GetAllBusinesses", "description": "", "operationId": "testinput", "parameters": [ { "name": "datefrom", "in": "query", "description": "The date from which the businesses have visited", "required": true, "schema": { "type": "string", "format": "date", "default": "2016-03-12 00:00:00" } }, { "name": "dateto", "in": "query", "description": "The date to which the businesses have visited", "required": true, "schema": { "type": "string", "format": "date", "default": "2016-03-13 00:00:00" } }, { "name": "pagesize", "in": "query", "description": "Number of records to return in a page of results", "required": true, "schema": { "type": "integer", "format": "int32", "default": 5 } }, { "name": "pageno", "in": "query", "description": "The particular page of results to return", "required": true, "schema": { "type": "integer", "format": "int32", "default": 1 } } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"BusinessList\": [\n {\n \"BusinessID\": 1101281,\n \"Name\": \"Bonafide Bones The Butcher\",\n \"AddressLine1\": \"Landsdown Road\",\n \"AddressLine2\": \"Willesborough\",\n \"AddressLine3\": \"\",\n \"Locality\": \"\",\n \"Town\": \"Ashford\",\n \"County\": \"Kent\",\n \"PostCode\": \"TN7 0PZ\",\n \"Country\": \"United Kingdom\",\n \"Telephone\": \"01233 2349 234\",\n \"Website\": \"http://www.bonafide-bones-the-butcher.co.uk\",\n \"Industry\": \"Butcher\",\n \"SICCode\": \"1123\",\n \"Turnover\": \"12231\",\n \"RegistrationNumber\": \"1341\",\n \"EmployeeNumber\": \"1-20\"\n }\n ], \"PageSize\": 5,\n \"PageCount\": 1,\n \"RecordCount\": 1,\n \"CurrentPage\": 1\n}" } }, "schema": { "type": "object", "properties": { "BusinessList": { "type": "array", "items": { "type": "object", "properties": { "BusinessID": { "type": "integer", "example": 1101281, "default": 0 }, "Name": { "type": "string", "example": "Bonafide Bones The Butcher" }, "AddressLine1": { "type": "string", "example": "Landsdown Road" }, "AddressLine2": { "type": "string", "example": "Willesborough" }, "AddressLine3": { "type": "string", "example": "" }, "Locality": { "type": "string", "example": "" }, "Town": { "type": "string", "example": "Ashford" } } } }, "PageSize": { "type": "integer", "example": 5, "default": 0 }, "PageCount": { "type": "integer", "example": 1, "default": 0 }, "RecordCount": { "type": "integer", "example": 1, "default": 0 }, "CurrentPage": { "type": "integer", "example": 1, "default": 0 } } } } } } } } } } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.