# Upload Certification

## Upload Certification

<mark style="color:green;">`POST`</mark> `https://api.iafcertsearch.org/api/client/v2/ab/upload-cert`

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

#### Headers

| Name                                                   | Type   | Description                                                                                                                                                     |
| ------------------------------------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Content-Type<mark style="color:red;">\*</mark>         | String | application/json                                                                                                                                                |
| x-http-authorization<mark style="color:red;">\*</mark> | String | <p>API Key received from <https://iafcertsearch.org/import-management/api-integration></p><p>Example:</p><p><code>x-http-authorization: <\<API KEY>></code></p> |

#### Request Body

| Name                                                                                  | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| certified\_entity.<mark style="color:red;">\*</mark>                                  | String | <p>{</p><p>"certified\_entities" : {</p><p>"certified\_entity\_unique\_id": "string",</p><p>"certified\_entity\_name": "string",</p><p><strong>. . . .</strong></p><p>}</p><p>}</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| certified\_entities.certified\_entity\_unique\_id<mark style="color:red;">\*</mark>   | String | <p>Mandatory Field provided by the Certification Body<br><br><strong>"Certified Entity Unique ID</strong>" also referred to as a client ID. The <strong>"Certified Entity Unique ID"</strong> / <strong>Client ID</strong> is a unique identification number for the organisation. The entity ID makes it possible to identify which individual certifications belong to the one organisation. The "<strong>Certified Entity Identity Number</strong>" can be any alpha numeric number.<br><br>Example:<br><br>UNIQUEID-COMPANY01<br>UNIQUEID-COMPANY02</p>                                                                                                                              |
| certified\_entities.certified\_entity\_name<mark style="color:red;">\*</mark>         | String | <p>Certified Entity Name (company name) as detailed on the certificate.<br><br>Example:<br><br>Test Food and Logistics Inc.<br>Reliable Logistics Services Inc.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| certified\_entities.certified\_entity\_english\_name                                  | String | <p>Certified Entity English Name<br><br>Example:<br><br>Test Food and Logistics Inc. English Name<br>Reliable Logistics Services Inc. English Name</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| certified\_entities.certified\_entity\_trading\_name                                  | String | <p>Certified Entity Trading Name<br><br>Example:<br><br>Test Food and Logistics Inc. Trading Name<br>Reliable Logistics Services Inc. Trading Name</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| certified\_entities.business\_registered\_street                                      | String | <p>Street of the main entity address for the certified entity.<br><br>Rule:<br>If business\_registered\_full\_address is NULL<br>AND<br>business\_registered\_city is NULL<br>THEN<br>business\_registered\_street should be REQUIRED.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| certified\_entities.business\_registered\_city                                        | String | <p>City of the main entity address for the certified entity.<br><br>Rule:<br>If business\_registered\_full\_address is NULL<br>AND<br>business\_registered\_street is NULL<br>THEN<br>business\_registered\_city should be REQUIRED.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| certified\_entities.business\_registered\_state                                       | String | State of the main entity address for the certified entity. If no state, leave blank.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| certified\_entities.business\_registered\_zip\_code                                   | String | Zip code or post code of the main entity address for the certified entity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| certified\_entities.business\_registered\_country<mark style="color:red;">\*</mark>   | String | Country/Economy of the main entity address for the certified entity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| certified\_entities.business\_registered\_full\_address                               | String | <p>Full Address of the main entity address for the certified entity.<br><br>Rule:<br>If business\_registered\_street is NULL</p><p>AND<br>business\_registered\_city is NULL<br>THEN</p><p>business\_registered\_full\_address should be REQUIRED.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| certified\_entities.confidential\_certified\_entity                                   | String | <p>Where the confidentiality of the Certified Entity is defined.<br><br>Accepted Values:<br><br>Yes</p><p>No</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| certified\_entities.certified\_entity\_website                                        | String | Website of the main entity address for the certified entity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| certified\_entities.tax\_id                                                           | String | <p>Tax Identification</p><p>Example:</p><p>000123456001</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| certified\_entities.company\_id\_number                                               | String | <p>Company Identification Number</p><p>Example:</p><p>U12345ABCDE12345F123456</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| certified\_entities.business\_registration\_number                                    | String | <p>Business Registration Number</p><p>Example:</p><p>1234567890A</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| certified\_entities.vat                                                               | String | <p>Vat<br><br>Example:</p><p>GB123456789</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| certified\_entities.duns\_number                                                      | String | <p>Duns Number<br><br>Example:<br><br>987654321</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| certification.<mark style="color:red;">\*</mark>                                      | String | <p>{</p><p>"certifications" : {</p><p>"certificate\_number": "string",</p><p>"certification\_status": "string",</p><p><strong>. . . .</strong></p><p>}</p><p>}</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| certification.certificate\_identity\_number<mark style="color:red;">\*</mark>         | String | <p>Certificate Identity Number</p><p>A unique identifier that provides a more secure form of identification.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| certification.certificate\_number<mark style="color:red;">\*</mark>                   | String | Certificate number shown on the certificate itself                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| certification.certification\_status<mark style="color:red;">\*</mark>                 | String | <p>Certification Status Include the terms that the Certification Body uses to define the status of the certification.<br><br>Accepted Values:</p><p><br>Active (valid)<br>Inactive<br>Withdrawn<br>Suspended<br>Cancelled (terminated)<br>Hidden (where details of a certification have been uploaded but it is not yet active/live)</p><p>Expired<br>CB Withdrawn<br>Pending<br>Deleted<br><br>If terms vary from the above terms the IAF CertSearch will provide a mapping process.</p>                                                                                                                                                                                                |
| certification.certificate\_accreditation\_status                                      | String | <p>Has this certificate been issued under and existing accreditation or is this an unaccredited certificate.<br><br>Accepted values:</p><p>Accredited</p><p>Unaccredited</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| certification.certification\_type<mark style="color:red;">\*</mark>                   | String | <p>Certification Type<br><br>Accepted Values:<br><br>Management System<br><br>If terms vary from the above terms the IAF CertSearch will provide a mapping process.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| certification.certification\_scope                                                    | String | <p>Certification Scope<br><br>Example:<br><br>Manufacturing, marketing and export of instruments, consumables and accessories for temperature, active oxygen, hydrogen, carbon measurements and sampling in ferrous and non-ferrous melts.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| certification.flexible\_scope                                                         | String | Flexible Scope                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| certification.certification\_original\_issue\_date                                    | String | <p>Original certification date (YYYYMMDD).<br><br>Example:<br><br>20170203</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| certification.certification\_issue\_date<mark style="color:red;">\*</mark>            | String | <p>Most recent certification date as detailed on the certificate (YYYYMMDD).<br><br>Example:</p><p>20170203</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| certification.certification\_expiry\_date<mark style="color:red;">\*</mark>           | String | <p>Certification expiry date as detailed on the certificate (YYYYMMDD).<br><br>Example:<br><br>20170203</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| certification.certified\_entity\_unique\_id<mark style="color:red;">\*</mark>         | String | <p>Mandatory Field provided by the Certification Body<br><br><strong>"Certified Entity Unique ID</strong>" also referred to as a client ID. The <strong>"Certified Entity Unique ID"</strong> / <strong>Client ID</strong> is a unique identification number for the organisation. The entity ID makes it possible to identify which individual certifications belong to the one organisation. The "<strong>Certified Entity Identity Number</strong>" can be any alpha numeric number.<br><br>Example:<br><br>UNIQUEID-COMPANY01<br>UNIQUEID-COMPANY02</p>                                                                                                                              |
| certification.main\_site\_street                                                      | String | <p>Street of the main entity address for the certification.<br><br>Rule:<br>If main\_site\_full\_address is NULL<br>AND<br>main\_site\_city is NULL<br>THEN<br>main\_site\_street should be REQUIRED.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| certification.main\_site\_city                                                        | String | <p>City of the main entity address for the certification.<br><br>Rule:<br>If main\_site\_full\_address is NULL<br>AND<br>main\_site\_street is NULL<br>THEN<br>main\_site\_city should be REQUIRED.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| certification.main\_site\_state                                                       | String | State of the main entity address for the certification. If no state, leave blank.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| certification.main\_site\_zip\_code                                                   | String | Zip code or post code of the main entity address for the certification.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| certification.main\_site\_country<mark style="color:red;">\*</mark>                   | String | Country/Economy of the main entity address for the certification.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| certification.main\_site\_full\_address                                               | String | <p>Full Address of the main entity address for the certification.<br><br>Rule:<br>If main\_site\_street is NULL</p><p>AND<br>main\_site\_city is NULL<br>THEN</p><p>main\_site\_full\_address should be REQUIRED.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| certification.certification\_body\_name<mark style="color:red;">\*</mark>             | String | Certification Body Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| certification.certification\_body\_acronym\_name                                      | String | Certification Body Acronym                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| certification.certification\_body\_identity\_number<mark style="color:red;">\*</mark> | String | Mandatory Field provided by the **Accreditation Body** for internal use of IAFCertSearch. **"Certification Body Identity Number"** is a unique identification for the Certification Body. The **"Certification Body Identity Number"** makes it possible to identify which **Certification Bodies** are in the **Accreditation Body** network what data in the register belongs to the Certification Body. When the Accreditation Body uploads additional data in the future (i.e. accreditation data) the system will look up the **"Certification Body Identity Number"** to maintain integrity of data. The **"Certification Body Identity Number"** can be any alpha numeric number. |
| certification.confidential\_certified\_entity                                         | String | <p>Where the confidentiality of the Certified Entity is defined.<br><br>Accepted Values:<br><br>Yes</p><p>No</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| certification.schemes<mark style="color:red;">\*</mark>                               | Array  | <p>Certification Schemes<br><br>Example:</p><p>{</p><p>"schemes": \[</p><p>{</p><p>"scheme\_name": "string",</p><p>"standard\_list": \[</p><p>{</p><p>"standards\_name": "string"</p><p>}</p><p>]</p><p>}</p><p>]</p><p>}</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| certification.cert\_sites                                                             | Array  | <p>Certification Sites<br><br>Example:</p><p>{</p><p>"cert\_sites": \[</p><p>{</p><p>"certified\_entity\_unique\_id: "string",</p><p>"site\_type": "string"</p><p>"street": "string",</p><p>"city": "string",</p><p>"state": "string",</p><p>"zip\_code": "string",</p><p>"country": "string",</p><p>"full\_address": "string",</p><p>"scope": "string</p><p>}</p><p>]</p><p>}<br><br></p><p>To delete all existing sites of a certification, set the value of the <code>sites</code> key to an empty array like so:</p><p>{</p><p>"cert\_sites": \[]</p><p>}</p>                                                                                                                        |
| certification.sectors                                                                 | Array  | <p>Certification Technical  Sectors<br><br>Example:<br>{<br>"sectors: \[<br>{<br>"sector\_name": "string",<br>"sector\_code": "string",<br>}<br>]<br>}<br><br>To delete all existing sectors of a certification, set the value of the <code>sectors</code> key to an empty array like so:<br>{<br>"sectors": \[]<br>}</p>                                                                                                                                                                                                                                                                                                                                                                |

{% tabs %}
{% tab title="200: OK Request successful." %}

```json
{
  "data": {
    "company_certifications_id": string
  }
}
```

{% endtab %}

{% tab title="400: Bad Request Other errors that is described in the API response." %}

```json
{
    "error": true,
    "timestamp": number (Epoch time),
    "elapse": number,
    "errors": {
      "message": "error_message",
      "code": "error_code"
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized Happens when you use an invalid API Key." %}

```json
{
    "error": true,
    "timestamp": number (Epoch time),
    "elapse": number,
    "errors": {
      "message": "Invalid Session token has been used.",
      "code": "invalid_session_token"
    }
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Did not pass validation." %}

```json
{
    "error": true,
    "timestamp": number (Epoch time),
    "elapse": number,
    "errors": {
        "code": "validation_error",
        "message": {
            "field_name": "error_message"
        }
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Upload Certification**

We recommend to have an interval of 1 minute in between API requests to avoid errors during certification data publication.
{% endhint %}

{% hint style="info" %}
To view the response data example, click the right arrow at the right side of the response description.
{% endhint %}

{% hint style="info" %}
You can also use <https://api.sandbox.iafcertsearch.org/api/client/v2/ab/upload-cert> to test it on the Sandbox server.
{% endhint %}

Take a look at how you might call this method:

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

```shell
curl --location --request POST 'https://api.iafcertsearch.org/api/client/v2/ab/upload-cert' \
--header 'Content-Type: application/json' \
--header 'x-http-authorization: <<API_KEY>>' \
--data-raw '{
     "certified_entity": {
        "certified_entity_unique_id": "string",
        "certified_entity_name": "string",
        "certified_entity_trading_name": "string",
        "certified_entity_english_name": "string",
        "confidential_certified_entity": "string",
        "business_registered_street": "string",
        "business_registered_city": "string",
        "business_registered_state": "string",
        "business_registered_zip_code": "string",
        "business_registered_country": "string",
        "business_registered_full_address": "string",
        "certified_entity_website": "string",
        "business_registration_number": "string",
        "tax_id": "string",
        "company_id_number": "string",
        "vat": "string",
        "duns_number": "string"
    },
    "certification": {
        "certificate_identity_number": "string",
        "certificate_number": "string",
        "certification_status": "string",
        "certificate_accreditation_status": "string",
        "certification_type": "string",
        "certification_scope": "string",
        "flexible_scope": "string",
        "certification_original_issue_date": "string",
        "certification_issue_date": "string",
        "certification_expiry_date": "string",
        "certified_entity_unique_id": "string",
        "main_site_street": "string",
        "main_site_city": "string",
        "main_site_state": "string",
        "main_site_zip_code": "string",
        "main_site_country": "string",
        "main_site_full_address": "string",
        "certification_body_name": "string",    
        "certification_body_acronym_name": "string",
        "certification_body_identity_number": "string",
        "confidential_certified_entity": "string",
        "schemes": [
            {
                "scheme_name": "string",
                "standard_list": [
                    {
                        "standards_name": "string"
                    }
                ]
            }
        ],
        "cert_sites": [
            {
                "certified_entity_unique_id": "string",
                "site_type": "string",
                "street": "string",
                "city": "string",
                "state": "string",
                "zip_code": "string",
                "country": "string",
                "full_address": "string",
                "scope_description": "string"
            }
        ],
        "sectors": [
            {
                "sector_name": "string",
                "sector_code": "string"
            }
        ]
    }
}'
```

{% endtab %}

{% tab title="Ruby" %}

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

url = URI("https://api.iafcertsearch.org/api/client/v2/ab/upload-cert")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["x-http-authorization"] = "<<API_KEY>>"
request.body = JSON.dump({
  "certified_entity": {
        "certified_entity_unique_id": "string",
        "certified_entity_name": "string",
        "certified_entity_trading_name": "string",
        "certified_entity_english_name": "string",
        "confidential_certified_entity": "string",
        "business_registered_street": "string",
        "business_registered_city": "string",
        "business_registered_state": "string",
        "business_registered_zip_code": "string",
        "business_registered_country": "string",
        "business_registered_full_address": "string",
        "certified_entity_website": "string",
        "business_registration_number": "string",
        "tax_id": "string",
        "company_id_number": "string",
        "vat": "string",
        "duns_number": "string"
    },
    "certification": {
        "certificate_identity_number": "string",
        "certificate_number": "string",
        "certification_status": "string",
        "certificate_accreditation_status": "string",
        "certification_type": "string",
        "certification_scope": "string",
        "flexible_scope": "string",
        "certification_original_issue_date": "string",
        "certification_issue_date": "string",
        "certification_expiry_date": "string",
        "certified_entity_unique_id": "string",
        "main_site_street": "string",
        "main_site_city": "string",
        "main_site_state": "string",
        "main_site_zip_code": "string",
        "main_site_country": "string",
        "main_site_full_address": "string",
        "certification_body_name": "string",
        "certification_body_acronym_name": "string",
        "certification_body_identity_number": "string",
        "confidential_certified_entity": "string",
        "schemes": [
            {
                "scheme_name": "string",
                "standard_list": [
                    {
                        "standards_name": "string"
                    }
                ]
            }
        ],
        "cert_sites": [
            {
                "certified_entity_unique_id": "string",
                "site_type": "string",
                "street": "string",
                "city": "string",
                "state": "string",
                "zip_code": "string",
                "country": "string",
                "full_address": "string",
                "scope_description": "string"
            }
        ],
        "sectors": [
            {
                "sector_name": "string",
                "sector_code": "string"
            }
        ]
    }
})

response = https.request(request)
puts response.read_body
```

{% endtab %}

{% tab title="Python" %}

```python
import http.client
import json

conn = http.client.HTTPSConnection("api.iafcertsearch.org")
payload = json.dumps({
  "certified_entity": {
        "certified_entity_unique_id": "string",
        "certified_entity_name": "string",
        "certified_entity_trading_name": "string",
        "certified_entity_english_name": "string",
        "confidential_certified_entity": "string",
        "business_registered_street": "string",
        "business_registered_city": "string",
        "business_registered_state": "string",
        "business_registered_zip_code": "string",
        "business_registered_country": "string",
        "business_registered_full_address": "string",
        "certified_entity_website": "string",
        "business_registration_number": "string",
        "tax_id": "string",
        "company_id_number": "string",
        "vat": "string",
        "duns_number": "string"
    },
    "certification": {
        "certificate_identity_number": "string",
        "certificate_number": "string",
        "certification_status": "string",
        "certificate_accreditation_status": "string",
        "certification_type": "string",
        "certification_scope": "string",
        "flexible_scope": "string",
        "certification_original_issue_date": "string",
        "certification_issue_date": "string",
        "certification_expiry_date": "string",
        "certified_entity_unique_id": "string",
        "main_site_street": "string",
        "main_site_city": "string",
        "main_site_state": "string",
        "main_site_zip_code": "string",
        "main_site_country": "string",
        "main_site_full_address": "string",
        "certification_body_name": "string",
        "certification_body_acronym_name": "string",
        "certification_body_identity_number": "string",
        "confidential_certified_entity": "string",
        "schemes": [
            {
                "scheme_name": "string",
                "standard_list": [
                    {
                        "standards_name": "string"
                    }
                ]
            }
        ],
        "cert_sites": [
            {
                "certified_entity_unique_id": "string",
                "site_type": "string",
                "street": "string",
                "city": "string",
                "state": "string",
                "zip_code": "string",
                "country": "string",
                "full_address": "string",
                "scope_description": "string"
            }
        ],
        "sectors": [
            {
                "sector_name": "string",
                "sector_code": "string"
            }
        ]
    }
})
headers = {
  'Content-Type': 'application/json',
  'x-http-authorization': '<<API_KEY>>'
}
conn.request("POST", "/api/client/v2/ab/upload-cert", 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 => 'https://api.iafcertsearch.org/api/client/v2/ab/upload-cert',
  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 =>'{
    "certified_entity": {
        "certified_entity_unique_id": "string",
        "certified_entity_name": "string",
        "certified_entity_trading_name": "string",
        "certified_entity_english_name": "string",
        "confidential_certified_entity": "string",
        "business_registered_street": "string",
        "business_registered_city": "string",
        "business_registered_state": "string",
        "business_registered_zip_code": "string",
        "business_registered_country": "string",
        "business_registered_full_address": "string",
        "certified_entity_website": "string",
        "business_registration_number": "string",
        "tax_id": "string",
        "company_id_number": "string",
        "vat": "string",
        "duns_number": "string"
    },
    "certification": {
        "certificate_identity_number": "string",
        "certificate_number": "string",
        "certification_status": "string",
        "certificate_accreditation_status": "string",
        "certification_type": "string",
        "certification_scope": "string",
        "flexible_scope": "string",
        "certification_original_issue_date": "string",
        "certification_issue_date": "string",
        "certification_expiry_date": "string",
        "certified_entity_unique_id": "string",
        "main_site_street": "string",
        "main_site_city": "string",
        "main_site_state": "string",
        "main_site_zip_code": "string",
        "main_site_country": "string",
        "main_site_full_address": "string",
        "certification_body_name": "string",
        "certification_body_acronym_name": "string",
        "certification_body_identity_number": "string",
        "confidential_certified_entity": "string",
        "schemes": [
            {
                "scheme_name": "string",
                "standard_list": [
                    {
                        "standards_name": "string"
                    }
                ]
            }
        ],
        "cert_sites": [
            {
                "certified_entity_unique_id": "string",
                "site_type": "string",
                "street": "string",
                "city": "string",
                "state": "string",
                "zip_code": "string",
                "country": "string",
                "full_address": "string",
                "scope_description": "string"
            }
        ],
        "sectors": [
            {
                "sector_name": "string",
                "sector_code": "string"
            }
        ]
    }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'x-http-authorization: <<API_KEY>>'
  ),
));

$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    \"certified_entity\": {\n        \"certified_entity_unique_id\": \"string\",\n        \"certified_entity_name\": \"string\",\n        \"certified_entity_trading_name\": \"string\",\n        \"certified_entity_english_name\": \"string\",\n        \"confidential_certified_entity\": \"string\",\n        \"business_registered_street\": \"string\",\n        \"business_registered_city\": \"string\",\n        \"business_registered_state\": \"string\",\n        \"business_registered_zip_code\": \"string\",\n        \"business_registered_country\": \"string\",\n        \"business_registered_full_address\": \"string\",\n        \"certified_entity_website\": \"string\",\n        \"business_registration_number\": \"string\",\n        \"tax_id\": \"string\",\n        \"company_id_number\": \"string\",\n        \"vat\": \"string\",\n        \"duns_number\": \"string\"\n    },\n    \"certification\": {\n        \"certificate_identity_number\": \"string\",\n        \"certificate_number\": \"string\",\n        \"certification_status\": \"string\",\n        \"certificate_accreditation_status\": \"string\",\n        \"certification_type\": \"string\",\n        \"certification_scope\": \"string\",\n        \"flexible_scope\": \"string\",\n        \"certification_original_issue_date\": \"string\",\n        \"certification_issue_date\": \"string\",\n        \"certification_expiry_date\": \"string\",\n        \"certified_entity_unique_id\": \"string\",\n        \"main_site_street\": \"string\",\n        \"main_site_city\": \"string\",\n        \"main_site_state\": \"string\",\n        \"main_site_zip_code\": \"string\",\n        \"main_site_country\": \"string\",\n        \"main_site_full_address\": \"string\",\n        \"certification_body_name\": \"string\",\n        \"certification_body_acronym_name\": \"string\",\n        \"certification_body_identity_number\": \"string\",\n        \"confidential_certified_entity\": \"string\",\n        \"schemes\": [\n            {\n                \"scheme_name\": \"string\",\n                \"standard_list\": [\n                    {\n                        \"standards_name\": \"string\"\n                    }\n                ]\n            }\n        ],\n        \"cert_sites\": [\n            {\n                \"certified_entity_unique_id\": \"string\",\n                \"site_type\": \"string\",\n                \"street\": \"string\",\n                \"city\": \"string\",\n                \"state\": \"string\",\n                \"zip_code\": \"string\",\n                \"country\": \"string\",\n                \"full_address\": \"string\",\n                \"scope\": \"string\"\n            }\n        ],\n        \"sectors\": [\n            {\n                \"sector_name\": \"string\",\n                \"sector_code\": \"string\"\n            }\n        ]\n    }\n}");
```
Request request = new Request.Builder()
  .url("http://127.0.0.1:8000/api/client/v2/ab/upload-cert")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("x-http-authorization", "")
  .build();
Response response = client.newCall(request).execute();
````

{% endtab %}

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

```javascript
var axios = require('axios');
var data = JSON.stringify({
    "certified_entity": {
        "certified_entity_unique_id": "string",
        "certified_entity_name": "string",
        "certified_entity_trading_name": "string",
        "certified_entity_english_name": "string",
        "confidential_certified_entity": "string",
        "business_registered_street": "string",
        "business_registered_city": "string",
        "business_registered_state": "string",
        "business_registered_zip_code": "string",
        "business_registered_country": "string",
        "business_registered_full_address": "string",
        "certified_entity_website": "string",
        "business_registration_number": "string",
        "tax_id": "string",
        "company_id_number": "string",
        "vat": "string",
        "duns_number": "string"
    },
    "certification": {
        "certificate_identity_number": "string",
        "certificate_number": "string",
        "certification_status": "string",
        "certificate_accreditation_status": "string",
        "certification_type": "string",
        "certification_scope": "string",
        "flexible_scope": "string",
        "certification_original_issue_date": "string",
        "certification_issue_date": "string",
        "certification_expiry_date": "string",
        "certified_entity_unique_id": "string",
        "main_site_street": "string",
        "main_site_city": "string",
        "main_site_state": "string",
        "main_site_zip_code": "string",
        "main_site_country": "string",
        "main_site_full_address": "string",
        "certification_body_name": "string",
        "certification_body_acronym_name": "string",
        "certification_body_identity_number": "string",
        "confidential_certified_entity": "string",
        "schemes": [
            {
                "scheme_name": "string",
                "standard_list": [
                    {
                        "standards_name": "string"
                    }
                ]
            }
        ],
       "cert_sites": [
            {
                "certified_entity_unique_id": "string",
                "site_type": "string",
                "street": "string",
                "city": "string",
                "state": "string",
                "zip_code": "string",
                "country": "string",
                "full_address": "string",
                "scope_description": "string"
            }
        ],
        "sectors": [
            {
                "sector_name": "string",
                "sector_code": "string"
            }
        ]
    }
});

var config = {
  method: 'post',
  url: 'https://api.iafcertsearch.org/api/client/v2/ab/upload-cert',
  headers: { 
    'Content-Type': 'application/json', 
    'x-http-authorization': '<<API_KEY>>'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}

{% tab title="Go" %}

```go
package main

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

func main() {

  url := "http://127.0.0.1:8000/api/client/v2/cb/bulk-upload-cert"
  method := "POST"

  payload := strings.NewReader(`{
    "certified_entity": {
        "certified_entity_unique_id": "string",
        "certified_entity_name": "string",
        "certified_entity_trading_name": "string",
        "certified_entity_english_name": "string",
        "confidential_certified_entity": "string",
        "business_registered_street": "string",
        "business_registered_city": "string",
        "business_registered_state": "string",
        "business_registered_zip_code": "string",
        "business_registered_country": "string",
        "business_registered_full_address": "string",
        "certified_entity_website": "string",
        "business_registration_number": "string",
        "tax_id": "string",
        "company_id_number": "string",
        "vat": "string",
        "duns_number": "string"
    },
    "certification": {
        "certificate_identity_number": "string",
        "certificate_number": "string",
        "certification_status": "string",
        "certificate_accreditation_status": "string",
        "certification_type": "string",
        "certification_scope": "string",
        "flexible_scope": "string",
        "certification_original_issue_date": "string",
        "certification_issue_date": "string",
        "certification_expiry_date": "string",
        "certified_entity_unique_id": "string",
        "main_site_street": "string",
        "main_site_city": "string",
        "main_site_state": "string",
        "main_site_zip_code": "string",
        "main_site_country": "string",
        "main_site_full_address": "string",
        "certification_body_name": "string",
        "certification_body_acronym_name": "string",
        "certification_body_identity_number": "string",
        "confidential_certified_entity": "string",
        "schemes": [
            {
                "scheme_name": "string",
                "standard_list": [
                    {
                        "standards_name": "string"
                    }
                ]
            }
        ],
        "cert_sites": [
            {
                "certified_entity_unique_id": "string",
                "site_type": "string",
                "street": "string",
                "city": "string",
                "state": "string",
                "zip_code": "string",
                "country": "string",
                "full_address": "string",
                "scope_description": "string"
            }
        ],
        "sectors": [
            {
                "sector_name": "string",
                "sector_code": "string"
            }
        ]
    }
}`)

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

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

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

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

{% endtab %}

{% tab title="C#" %}

```csharp
var client = new RestClient("https://api.iafcertsearch.org/api/client/v2/ab/upload-cert");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("x-http-authorization", "<<API_KEY>>");
var body = @"{" + "\n" +
@"    ""certified_entity"": {" + "\n" +
@"        ""certified_entity_unique_id"": ""string""," + "\n" +
@"        ""certified_entity_name"": ""string""," + "\n" +
@"        ""certified_entity_trading_name"": ""string""," + "\n" +
@"        ""certified_entity_english_name"": ""string""," + "\n" +
@"        ""confidential_certified_entity"": ""string""," + "\n" +
@"        ""business_registered_street"": ""string""," + "\n" +
@"        ""business_registered_city"": ""string""," + "\n" +
@"        ""business_registered_state"": ""string""," + "\n" +
@"        ""business_registered_zip_code"": ""string""," + "\n" +
@"        ""business_registered_country"": ""string""," + "\n" +
@"        ""business_registered_full_address"": ""string""," + "\n" +
@"        ""certified_entity_website"": ""string""," + "\n" +
@"        ""business_registration_number"": ""string""," + "\n" +
@"        ""tax_id"": ""string""," + "\n" +
@"        ""company_id_number"": ""string""," + "\n" +
@"        ""vat"": ""string""," + "\n" +
@"        ""duns_number"": ""string""" + "\n" +
@"    }," + "\n" +
@"    ""certification"": {" + "\n" +
@"        ""certificate_identity_number"": ""string""," + "\n" +
@"        ""certificate_number"": ""string""," + "\n" +
@"        ""certification_status"": ""string""," + "\n" +
@"        ""certificate_accreditation_status"": ""string""," + "\n" +
@"        ""certification_type"": ""string""," + "\n" +
@"        ""certification_scope"": ""string""," + "\n" +
@"        ""flexible_scope"": ""string""," + "\n" +
@"        ""certification_original_issue_date"": ""string""," + "\n" +
@"        ""certification_issue_date"": ""string""," + "\n" +
@"        ""certification_expiry_date"": ""string""," + "\n" +
@"        ""certified_entity_unique_id"": ""string""," + "\n" +
@"        ""main_site_street"": ""string""," + "\n" +
@"        ""main_site_city"": ""string""," + "\n" +
@"        ""main_site_state"": ""string""," + "\n" +
@"        ""main_site_zip_code"": ""string""," + "\n" +
@"        ""main_site_country"": ""string""," + "\n" +
@"        ""main_site_full_address"": ""string""," + "\n" +
@"        ""certification_body_name"": ""string""," + "\n" +
@"        ""certification_body_acronym_name"": ""string""," + "\n" +
@"        ""certification_body_identity_number"": ""string""," + "\n" +
@"        ""confidential_certified_entity"": ""string""," + "\n" +
@"        ""schemes"": [" + "\n" +
@"            {" + "\n" +
@"                ""scheme_name"": ""string""," + "\n" +
@"                ""standard_list"": [" + "\n" +
@"                    {" + "\n" +
@"                        ""standards_name"": ""string""" + "\n" +
@"                    }" + "\n" +
@"                ]" + "\n" +
@"            }" + "\n" +
@"        ]," + "\n" +
@"        ""cert_sites"": [" + "\n" +
@"            {" + "\n" +
@"                ""certified_entity_unique_id"": ""string""," + "\n" +
@"                ""site_type"": ""string""," + "\n" +
@"                ""street"": ""string""," + "\n" +
@"                ""city"": ""string""," + "\n" +
@"                ""state"": ""string""," + "\n" +
@"                ""zip_code"": ""string""," + "\n" +
@"                ""country"": ""string""," + "\n" +
@"                ""full_address"": ""string""," + "\n" +
@"                ""scope_description"": ""string""" + "\n" +
@"            }" + "\n" +
@"        ]," + "\n" +
@"        ""sectors"": [" + "\n" +
@"            {" + "\n" +
@"                ""sector_name"": ""string""," + "\n" +
@"                ""sector_code"": ""string""" + "\n" +
@"            }" + "\n" +
@"        ]" + "\n" +
@"    }" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

{% endtab %}
{% endtabs %}
