# Bulk Retrieve Companies & Certificates

## Bulk Retrieve Companies & Certificates

Find multiple companies and certificates by name and match rate.

<mark style="color:green;">**`POST`**</mark> **`/bulk-companies`**

Fields that are marked with an asterisk (`*`) are mandatory.

* The API accepts multiple Company Information and can match multiple Certified Entities from IAFCertSearch per request.
* **Companies**:
  * The `companies` must be provided.
  * The maximum number of company data that this endpoint accepts is **100**.
  * **Companies Information Requirements**
    * At least one of the two fields, `company_name` or `company_identifiers`, must be provided.
* **Match Rate Value**:
  * The default rate value is set to **100**.
  * The minimum acceptable rate value is **80**, regardless of whether a lower threshold is specified.
  * Valid rate values range from **80** to **100**, in increments of **5**.
  * Any rate value exceeding **100** will automatically be capped at **100**.
* **Response Value:**
  * The API will return a list of matched Certified Entities with its Certificates.
    * You may use the `companies_request_index` field in the response to correlate which item from the `companies` request data array the Certified Entity was matched with. The first element of the `companies` request data array starts with the index 0. (i.e.,  The corresponding matched record will have a value of `companies_request_index: 0` )

### Headers

<table><thead><tr><th>Name</th><th width="179">Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type<mark style="color:red;">*</mark></td><td>String</td><td>application/json</td></tr><tr><td>x-http-authorization<mark style="color:red;">*</mark></td><td>String</td><td><p>API Key received from https://www.iafcertsearch.org/api-verification<br></p><p>Example:</p><p><code>x-http-authorization: &#x3C;&#x3C;API KEY>></code></p></td></tr></tbody></table>

### Request Body

<table><thead><tr><th width="222">Name</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>companies</td><td>Array of Objects</td><td>Array of companies to be matched<br><br>The maximum number of company data that this endpoint accepts is 100</td></tr><tr><td>companies.*company_country<mark style="color:red;">*</mark></td><td>String</td><td>Country/Economy of the main entity address for the Certified Entity.<br><br><a href="https://www.iban.com/country-codes"><em>Supports full country name, alpha-2 and alpha-3 format</em></a> <em>(click for more information)</em><br><br>Example:<br><strong><code>Australia | AU | AUS</code></strong> </td></tr><tr><td>companies.*.company_name</td><td>String</td><td>Certified Entity Name (Company Name) as detailed on the Certificate.</td></tr><tr><td>companies.*.company_identifiers</td><td>Object</td><td><p>Additional Company Fields<br></p><p>Format:<br><code>"company_identifiers": {</code></p><p>  <code>"vat": "string",</code></p><p>  <code>"tax_id": "string",</code> </p><p>  <code>"business_registration_number": "string",</code></p><p>  <code>"duns_number": "string",</code></p><p>  <code>"company_id_number": "string"</code></p><p><code>}</code></p></td></tr><tr><td>match_rate</td><td>Number / String</td><td>The percentage or similarity score indicating how closely the details of two companies match during the verification process.<br><br>Example: <br><code>100 | "100%"</code></td></tr></tbody></table>

### Example Payload Request

{% tabs %}
{% tab title="Required Fields Only - Company Name" %}

```json
{
    "companies": [
        {
          "company_name": "IAF",
          "company_country": "Australia",
          "company_identifiers": {
            "vat": null,
            "tax_id": null,
            "business_registration_number": null,
            "duns_number": null,
            "company_id_number": null
          }          
        }
    ],
    "match_rate": 90
}
```

{% endtab %}

{% tab title="Required Fields Only - Company Identifiers" %}

```json
{
    "companies": [
        {
          "company_name": null,
          "company_country": "Australia",
          "company_identifiers": {
            "vat": "VAT",
            "tax_id": "TAX ID",
            "business_registration_number": "BUSINESS REGISTRATION NUMBER",
            "duns_number": "DUNS NUMBER",
            "company_id_number": "COMPANY ID NUMBER"
          }
        }
    ],
    "match_rate": 90
}
```

{% endtab %}

{% tab title="Some Fields Are Null" %}

```json
{
    "companies": [
        {
          "company_name": "IAF",
          "company_country": "Australia",
          "company_identifiers": {
            "vat": null,
            "tax_id": null,
            "business_registration_number": null,
            "duns_number": "DUNS NUMBER",
            "company_id_number": "COMPANY ID NUMBER"
          }
        }
    ],
    "match_rate": 100
}
```

{% endtab %}

{% tab title="All Fields Have Values" %}

```json
{
    "companies": [
        {
          "company_name": "QualityTrade",
          "company_country": "Australia",
          "company_identifiers": { // Have priority over company_name
            "vat": "VAT",
            "tax_id": "TAX ID",
            "business_registration_number": "BUSINESS REGISTRATION NUMBER",
            "duns_number": "DUNS NUMBER",
            "company_id_number": "COMPANY ID NUMBER"
          }
        }
    ],
    "match_rate": 100
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```url
curl --location --globoff --request POST '{API_URL}/bulk-companies' \
--header 'x-http-authorization: {API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
    "companies": [
        {
          "company_name": "string",
          "company_country": "string",
          "company_identifiers": {
            "vat": "string",
            "tax_id": "string",
            "business_registration_number": "string",
            "duns_number": "string",
            "company_id_number": "string"
          }
        }
    ],
    "match_rate": 90
}'
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require "uri"
require "json"
require "net/http"

url = URI("{API_URL}/bulk-companies")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["x-http-authorization"] = "{API_KEY}"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "companies": [
    {
      "company_name": "string",
      "company_country": "string",
      "company_identifiers": {
        "vat": "string",
        "tax_id": "string",
        "business_registration_number": "string",
        "duns_number": "string",
        "company_id_number": "string"
      }
    }
  ],
  "match_rate": 90
})

response = http.request(request)
puts response.read_body

```

{% endtab %}

{% tab title="Python" %}

```python
import http.client
import json

conn = http.client.HTTPSConnection("{API_URL}")
payload = json.dumps({
  "companies": [
    {
      "company_name": "string",
      "company_country": "string",
      "company_identifiers": {
        "vat": "string",
        "tax_id": "string",
        "business_registration_number": "string",
        "duns_number": "string",
        "company_id_number": "string"
      }
    }
  ],
  "match_rate": 90
})
headers = {
  'x-http-authorization': '{API_KEY}',
  'Content-Type': 'application/json'
}
conn.request("POST", "/bulk-companies", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '{API_URL}/bulk-companies',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "companies": [
        {
          "company_name": "string",
          "company_country": "string",
          "company_identifiers": {
            "vat": "string",
            "tax_id": "string",
            "business_registration_number": "string",
            "duns_number": "string",
            "company_id_number": "string"
          }
        }
    ],
    "match_rate": 90
}',
  CURLOPT_HTTPHEADER => array(
    'x-http-authorization: {API_KEY}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Java" %}

```java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"companies\": [\n        {\n          \"company_name\": \"string\",\n          \"company_country\": \"string\",\n          \"company_identifiers\": {\n            \"vat\": \"string\",\n            \"tax_id\": \"string\",\n            \"business_registration_number\": \"string\",\n            \"duns_number\": \"string\",\n            \"company_id_number\": \"string\"\n          }\n        }\n    ],\n    \"match_rate\": 90\n}");
Request request = new Request.Builder()
  .url("{API_URL}/bulk-companies")
  .method("POST", body)
  .addHeader("x-http-authorization", "{API_KEY}")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "companies": [
    {
      "company_name": "string",
      "company_country": "string",
      "company_identifiers": {
        "vat": "string",
        "tax_id": "string",
        "business_registration_number": "string",
        "duns_number": "string",
        "company_id_number": "string"
      }
    }
  ],
  "match_rate": 90
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: '{API_URL}/bulk-companies',
  headers: { 
    'x-http-authorization': '{API_KEY}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "{API_URL}/bulk-companies"
  method := "POST"

  payload := strings.NewReader(`{
    "companies": [
        {
          "company_name": "string",
          "company_country": "string",
          "company_identifiers": {
            "vat": "string",
            "tax_id": "string",
            "business_registration_number": "string",
            "duns_number": "string",
            "company_id_number": "string"
          }
        }
    ],
    "match_rate": 90
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("x-http-authorization", "{API_KEY}")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
var options = new RestClientOptions("{API_URL}/bulk-companies")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("x-http-authorization", "{API_KEY}");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@"    ""companies"": [" + "\n" +
@"        {" + "\n" +
@"          ""company_name"": ""string""," + "\n" +
@"          ""company_country"": ""string""," + "\n" +
@"          ""company_identifiers"": {" + "\n" +
@"            ""vat"": ""string""," + "\n" +
@"            ""tax_id"": ""string""," + "\n" +
@"            ""business_registration_number"": ""string""," + "\n" +
@"            ""duns_number"": ""string""," + "\n" +
@"            ""company_id_number"": ""string""" + "\n" +
@"          }" + "\n" +
@"        }" + "\n" +
@"    ]," + "\n" +
@"    ""match_rate"": 90" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
```

{% endtab %}
{% endtabs %}

### Responses

{% tabs %}
{% tab title="200" %}
**Request Successful**

```json
{
  "data": [
    {
        "companies_request_index": integer,
        "ce_id": string,
        "matched_certified_entity_name": string,
        "match_status": string,
        "match_type": string,
        "certified_entity_english_name": string,
        "certified_entity_trading_name": string,
        "country": string,
        "certified_entity_addresses": [
          {
            "street": string,
            "city": string,
            "state": string,
            "post_code": string,
            "full_address": string,
            "country": string
          }
        ],
        "certificates": [
          {
            "cert_id": string,
            "accreditation_bodies_name": string,
            "certification_bodies_name": string,
            "certification_number": string,
            "certification_status": string,
            "certification_scope": string,
            "certification_standards_scheme": [
              {
                "standard_name": string,
                "scheme_name": string,
                "is_accredited_mla": boolean
              }
            ],
            "certification_main_sites": [
              {
                "street": string,
                "city": string,
                "state": string,
                "post_code": string,
                "full_address": string,
                "scope": string,
                "country": string
              }
            ],
            "certification_additional_sites": [
              {
                "street": string,
                "city": string,
                "state": string,
                "post_code": string,
                "full_address": string,
                "scope": string,
                "country": string
              }
            ],
            "certification_sectors": [
              {
                "sector_name": string,
                "sector_code": string
              }
            ],
            "updated_at": integer
          }
        ]
      }
  ]
}
```

{% endtab %}

{% tab title="200" %}
**Request Successful with Certification Issuance Dates**

```json
{
  "data": [
    {
        "companies_request_index": integer,
        "ce_id": string,
        "matched_certified_entity_name": string,
        "match_status": string,
        "match_type": string,
        "certified_entity_english_name": string,
        "certified_entity_trading_name": string,
        "country": string,
        "certified_entity_addresses": [
          {
            "street": string,
            "city": string,
            "state": string,
            "post_code": string,
            "full_address": string,
            "country": string
          }
        ],
        "certificates": [
          {
            "cert_id": string,
            "accreditation_bodies_name": string,
            "certification_bodies_name": string,
            "certification_number": string,
            "certification_status": string,
            "certification_scope": string,
            "certification_issuance_dates": {
              "certification_original_issued_date": string,
              "certification_issued_date": string,
              "certification_expiry_date": string
            },
            "certification_standards_scheme": [
              {
                "standard_name": string,
                "scheme_name": string,
                "is_accredited_mla": boolean
              }
            ],
            "certification_main_sites": [
              {
                "street": string,
                "city": string,
                "state": string,
                "post_code": string,
                "full_address": string,
                "scope": string,
                "country": string
              }
            ],
            "certification_additional_sites": [
              {
                "street": string,
                "city": string,
                "state": string,
                "post_code": string,
                "full_address": string,
                "scope": string,
                "country": string
              }
            ],
            "certification_sectors": [
              {
                "sector_name": string,
                "sector_code": string
              }
            ],
            "updated_at": integer
          }
        ]
      }
  ]
}
```

{% endtab %}

{% tab title="200" %}
**Some data are Confidential**

```json
{
  "data": [
    {
        "companies_request_index": integer,
        "ce_id": string,
        "matched_certified_entity_name": string,
        "match_status": string,
        "match_type": string,
        "certified_entity_english_name": "Confidential",
        "certified_entity_trading_name": "Confidential",
        "country": string,
        "certified_entity_addresses": [
          {
            "street": "Confidential",
            "city": "Confidential",
            "state": "Confidential",
            "post_code": "Confidential",
            "full_address": "Confidential",
            "country": string
          }
        ],
        "certificates": [
          {
            "cert_id": string,
            "accreditation_bodies_name": string,
            "certification_bodies_name": string,
            "certification_number": string,
            "certification_status": string,
            "certification_scope": string,
            "certification_standards_scheme": [
              {
                "standard_name": string,
                "scheme_name": string,
                "is_accredited_mla": boolean
              }
            ],
            "certification_main_sites": [
              {
                "street": string,
                "city": string,
                "state": string,
                "post_code": string,
                "full_address": string,
                "scope": string,
                "country": string
              }
            ],
            "certification_additional_sites": [
              {
                "street": string,
                "city": string,
                "state": string,
                "post_code": string,
                "full_address": string,
                "scope": string,
                "country": string
              }
            ],
            "certification_sectors": [
              {
                "sector_name": string,
                "sector_code": string
              }
            ],
            "updated_at": integer
          }
        ]
      }
  ]
}
```

{% endtab %}

{% tab title="200" %}
**Some data are Confidential with Certification Issuance Dates**

```json
{
  "data": [
    {
        "companies_request_index": integer,
        "ce_id": string,
        "matched_certified_entity_name": string,
        "match_status": string,
        "match_type": string,
        "certified_entity_english_name": "Confidential",
        "certified_entity_trading_name": "Confidential",
        "country": string,
        "certified_entity_addresses": [
          {
            "street": "Confidential",
            "city": "Confidential",
            "state": "Confidential",
            "post_code": "Confidential",
            "full_address": "Confidential",
            "country": string
          }
        ],
        "certificates": [
          {
            "cert_id": string,
            "accreditation_bodies_name": string,
            "certification_bodies_name": string,
            "certification_number": string,
            "certification_status": string,
            "certification_scope": string,
            "certification_issuance_dates": {
              "certification_original_issued_date": string,
              "certification_issued_date": string,
              "certification_expiry_date": string
            },
            "certification_standards_scheme": [
              {
                "standard_name": string,
                "scheme_name": string,
                "is_accredited_mla": boolean
              }
            ],
            "certification_main_sites": [
              {
                "street": string,
                "city": string,
                "state": string,
                "post_code": string,
                "full_address": string,
                "scope": string,
                "country": string
              }
            ],
            "certification_additional_sites": [
              {
                "street": string,
                "city": string,
                "state": string,
                "post_code": string,
                "full_address": string,
                "scope": string,
                "country": string
              }
            ],
            "certification_sectors": [
              {
                "sector_name": string,
                "sector_code": string
              }
            ],
            "updated_at": integer
          }
        ]
      }
  ]
}
```

{% endtab %}

{% tab title="200" %}
**No Results**

```json
{
  "data": []
}
```

{% endtab %}

{% tab title="401" %}
**Unauthorized Access**

```json
{
  "type": "string",
  "title": "Unauthorized access.",
  "status": 401,
  "detail": "Authentication failed due to invalid credentials or missing token.",
  "instance": "/bulk-companies",
  "code": "unauthorized"
}
```

{% endtab %}

{% tab title="403" %}
**Forbidden Access**

```json
{
  "type": "string",
  "title": "Forbidden access.",
  "status": 403,
  "detail": "You do not have access to this resource.",
  "instance": "/bulk-companies",
  "code": "forbidden"
}
```

{% endtab %}

{% tab title="403" %}
**Insufficient Credit**

```json
{
  "type": "string",
  "title": "Insufficient credit.",
  "status": 403,
  "detail": "You are trying to access data that exceeds your available credits. To increase your available credits, please contact us at info@iafcertsearch.org.",
  "instance": "/bulk-companies",
  "code": "insufficient_credit"
}
```

{% endtab %}

{% tab title="403" %}
**API Request Limit Reached**

```json
{
    "type": "string",
    "title": "API request limit reached.",
    "status": 403,
    "detail": "API request limit reached. To increase your API request limit, contact us at info@iafcertsearch.org.",
    "instance": "/bulk-companies",
    "code": "api_request_limit_reached"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.iafcertsearch.org/verification-users-api-developer-guide/api-integration/verification-apis/bulk-retrieve-companies-and-certificates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
