Get Task Status
curl --request GET \
--url https://api.baselayer.com/searches/{id}/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/searches/{id}/status"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.baselayer.com/searches/{id}/status', 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.baselayer.com/searches/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.baselayer.com/searches/{id}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.baselayer.com/searches/{id}/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/searches/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "COMPLETED",
"console_url": "https://console.baselayer.com/search/c06777fe-1f7e-11ef-af7e-1edb1b067314",
"error": "RuntimeError The Business Search could not be completed.",
"warnings": [
"IRS Validation is unavailable."
],
"business_url": "https://api.baselayer.com/businesses/ae752082-1f7e-11ef-b572-1edb1b067314"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}KYB Search
Get Task Status
Retrieve the status of a business search by ID.
GET
/
searches
/
{id}
/
status
Get Task Status
curl --request GET \
--url https://api.baselayer.com/searches/{id}/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/searches/{id}/status"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.baselayer.com/searches/{id}/status', 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.baselayer.com/searches/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.baselayer.com/searches/{id}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.baselayer.com/searches/{id}/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/searches/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "COMPLETED",
"console_url": "https://console.baselayer.com/search/c06777fe-1f7e-11ef-af7e-1edb1b067314",
"error": "RuntimeError The Business Search could not be completed.",
"warnings": [
"IRS Validation is unavailable."
],
"business_url": "https://api.baselayer.com/businesses/ae752082-1f7e-11ef-b572-1edb1b067314"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
The unique identifier of the search to retrieve the status for.
Examples:
"412a49b5-7466-426b-bf1e-081b00b54576"
"9d5a286e-a6d6-4d6c-a38e-8b7ea50accd5"
Response
Successful Response
Represents a business search status response.
Unique identifier for the business search.
The current state of the business search.
Available options:
PENDING, EXECUTING, COMPLETED, FAILED, CANCELLED Example:
"COMPLETED"
The URL to the business search details in the console.
Required string length:
1 - 2083Example:
"https://console.baselayer.com/search/c06777fe-1f7e-11ef-af7e-1edb1b067314"
Any errors that occurred.
Example:
"RuntimeError The Business Search could not be completed."
Any warnings that occurred.
Example:
["IRS Validation is unavailable."]
The API URL to retrieve the business details.
Required string length:
1 - 2083Example:
"https://api.baselayer.com/businesses/ae752082-1f7e-11ef-b572-1edb1b067314"