{
  "openapi": "3.1.0",
  "info": {
    "title": "B2BHint company verification API",
    "version": "1.0.0",
    "summary": "One small answer to \"what do the official company registers hold on this company\".",
    "description": "Look up one company, or up to 100 at a time, by country code and registry number and get the registered name, status, registration date, the officers on record and a list of risk tags, each naming a record B2BHint holds, instead of parsing the full company document. This is not a KYB determination. Risk tags describe records B2BHint holds for this company; a register that is not ingested, or a record we do not hold, produces no tag, so the absence of a tag says nothing about the company. Status classes are our reading of the register wording and are unknown where we cannot classify it. The response never states that a company is clear, compliant or verified. Every answered company counts as one full-record request against the same day and month budget as `GET /api/v1/company/details?full=true`; a company that is not found, a refused row and a row not processed cost nothing. Send your API key in the `apiKey` header. An account with a confirmed e-mail address and no paid plan can try both routes free: 300 searches a month (50 a day), and 100 other requests a month (25 a day), at most 10 of them full-record calls (3 a day).",
    "termsOfService": "https://b2bhint.com/en/terms-of-use",
    "contact": {
      "name": "B2BHint LLC",
      "url": "https://b2bhint.com/en/contact-us"
    }
  },
  "servers": [
    {
      "url": "https://b2bhint.com"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Company verification",
      "description": "Records the registers hold on one company, in one small payload."
    },
    {
      "name": "Company data",
      "description": "Look a company up by name, or read the record we hold by registry number."
    }
  ],
  "paths": {
    "/api/v1/company/verify": {
      "get": {
        "operationId": "verifyCompany",
        "tags": [
          "Company verification"
        ],
        "summary": "Verify one company",
        "description": "Returns what B2BHint holds on one company: register wording and class of its status, registration date, officers and risk tags. A company that does not exist, or is not available, answers 400 `COMPANY_DOESNT_EXIST`.",
        "parameters": [
          {
            "name": "internationalNumber",
            "in": "query",
            "required": true,
            "description": "Company number from the local registry.",
            "schema": {
              "type": "string"
            },
            "example": "2000/000000/07"
          },
          {
            "name": "countryCode",
            "in": "query",
            "required": true,
            "description": "Code of a register B2BHint covers, lower case (for example `za` or `ro`). The countries your key may query are returned in the 403 body.",
            "schema": {
              "type": "string"
            },
            "example": "za"
          }
        ],
        "responses": {
          "200": {
            "description": "The company was found.",
            "headers": {
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/X-RateLimit-Scope"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Day"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Day"
              },
              "X-RateLimit-Limit-Month": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Month"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-B2BHint-Degraded": {
                "$ref": "#/components/headers/X-B2BHint-Degraded"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KybVerification"
                },
                "example": {
                  "found": true,
                  "company": {
                    "name": "Example Trading (Pty) Ltd",
                    "internationalNumber": "2000/000000/07",
                    "countryCode": "za",
                    "status": "In Business",
                    "statusClass": "active",
                    "registrationDate": "2000-01-31",
                    "dissolutionDate": null,
                    "type": "Private Company",
                    "address": "1 Example Street, Example Town"
                  },
                  "record": {
                    "lastUpdatedAt": "2025-12-20T08:21:00.000Z",
                    "ageDays": 12,
                    "band": "current"
                  },
                  "officers": [
                    {
                      "name": "Jane Example",
                      "kind": "person",
                      "role": "Director",
                      "appointedOn": "2000-01-31",
                      "resignedOn": null,
                      "ownershipPercent": null
                    }
                  ],
                  "officersTotal": 1,
                  "officersTruncated": false,
                  "riskTags": [
                    {
                      "code": "filing_recency",
                      "basis": "the latest annual accounts on record are for 2022, 4 years before this check (band: stale)",
                      "asOf": null
                    }
                  ],
                  "unavailableChecks": [],
                  "checkedAt": "2026-01-01T09:00:00.000Z",
                  "disclaimer": "This is not a KYB determination. Risk tags describe records B2BHint holds for this company; a register that is not ingested, or a record we do not hold, produces no tag, so the absence of a tag says nothing about the company. Status classes are our reading of the register wording and are unknown where we cannot classify it."
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing (`INTERNATIONAL_NUMBER_IS_REQUIRED`, `COUNTRY_IS_REQUIRED`), the country is not served (`INVALID_COUNTRY`), or the company does not exist or is not available (`COMPANY_DOESNT_EXIST`). That refusal may carry a `hint`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "COMPANY_DOESNT_EXIST",
                  "hint": "B2BHint does not hold this number in this country, or it is not available to check. That says nothing about whether the company exists."
                }
              }
            }
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "MISSING_AUTH_TOKEN"
                }
              }
            }
          },
          "403": {
            "description": "Refused: the key may not query this country (`allowedCountries` lists the countries it may), the plan's day or month budget is used up, or the account cannot use the API. `message` is the code that says which.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotaError"
                },
                "example": {
                  "error": true,
                  "message": "COUNTRY_NOT_IN_API_ACCESS_LIST",
                  "allowedCountries": [
                    "za",
                    "ro"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many calls from this key are in flight; wait until others finish.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "WAIT_UNTIL_OTHER_REQUESTS_ARE_FINISHED_TOO_MANY_IP_CONCURENT_REQUESTS"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/company/verify/batch": {
      "post": {
        "operationId": "verifyCompanies",
        "tags": [
          "Company verification"
        ],
        "summary": "Verify up to 100 companies",
        "description": "Each answered row is exactly what the single endpoint returns, in `verification`, in the order sent. The list is accepted only when your remaining day and month budget covers every row. Rows are read a few at a time under a 25 second budget; rows not answered by then come back `not_processed`, unmetered, to be re-sent. Do not record a `not_processed` row as a company we do not hold.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KybBatchRequest"
              },
              "example": {
                "items": [
                  {
                    "ref": "row-1",
                    "internationalNumber": "2000/000000/07",
                    "countryCode": "za"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-row results; check `complete` and each row `status`. A row refused `COMPANY_DOESNT_EXIST` may carry a `hint`.",
            "headers": {
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/X-RateLimit-Scope"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Day"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Day"
              },
              "X-RateLimit-Limit-Month": {
                "$ref": "#/components/headers/X-RateLimit-Limit-Month"
              },
              "X-RateLimit-Remaining-Month": {
                "$ref": "#/components/headers/X-RateLimit-Remaining-Month"
              },
              "X-B2BHint-Degraded": {
                "$ref": "#/components/headers/X-B2BHint-Degraded"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KybBatchResponse"
                },
                "example": {
                  "requested": 3,
                  "answered": 1,
                  "refused": 1,
                  "notProcessed": 1,
                  "complete": false,
                  "maxItems": 100,
                  "results": [
                    {
                      "ref": "row-1",
                      "input": {
                        "internationalNumber": "2000/000000/07",
                        "countryCode": "za"
                      },
                      "status": "ok",
                      "verification": {
                        "found": true,
                        "company": {
                          "name": "Example Trading (Pty) Ltd",
                          "internationalNumber": "2000/000000/07",
                          "countryCode": "za",
                          "status": "In Business",
                          "statusClass": "active",
                          "registrationDate": "2000-01-31",
                          "dissolutionDate": null,
                          "type": "Private Company",
                          "address": "1 Example Street, Example Town"
                        },
                        "record": {
                          "lastUpdatedAt": "2025-12-20T08:21:00.000Z",
                          "ageDays": 12,
                          "band": "current"
                        },
                        "officers": [
                          {
                            "name": "Jane Example",
                            "kind": "person",
                            "role": "Director",
                            "appointedOn": "2000-01-31",
                            "resignedOn": null,
                            "ownershipPercent": null
                          }
                        ],
                        "officersTotal": 1,
                        "officersTruncated": false,
                        "riskTags": [
                          {
                            "code": "filing_recency",
                            "basis": "the latest annual accounts on record are for 2022, 4 years before this check (band: stale)",
                            "asOf": null
                          }
                        ],
                        "unavailableChecks": [],
                        "checkedAt": "2026-01-01T09:00:00.000Z",
                        "disclaimer": "This is not a KYB determination. Risk tags describe records B2BHint holds for this company; a register that is not ingested, or a record we do not hold, produces no tag, so the absence of a tag says nothing about the company. Status classes are our reading of the register wording and are unknown where we cannot classify it."
                      }
                    },
                    {
                      "ref": "row-2",
                      "input": {
                        "internationalNumber": "0000/000000/00",
                        "countryCode": "za"
                      },
                      "status": "error",
                      "error": "COMPANY_DOESNT_EXIST",
                      "hint": "B2BHint does not hold this number in this country, or it is not available to check. That says nothing about whether the company exists."
                    },
                    {
                      "ref": "row-3",
                      "input": {
                        "internationalNumber": "2001/000001/07",
                        "countryCode": "za"
                      },
                      "status": "not_processed",
                      "reason": "time_budget",
                      "retryable": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body is not a JSON object with a non-empty `items` array of at most 100, or an entry lacks `internationalNumber` or `countryCode`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "`items` must contain at least one entry"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "MISSING_AUTH_TOKEN"
                }
              }
            }
          },
          "403": {
            "description": "Refused: the key may not query this country (`allowedCountries` lists the countries it may), the plan's day or month budget is used up, or the account cannot use the API. `message` is the code that says which.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotaError"
                },
                "example": {
                  "error": true,
                  "message": "COUNTRY_NOT_IN_API_ACCESS_LIST",
                  "allowedCountries": [
                    "za",
                    "ro"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many calls from this key are in flight; wait until others finish.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "WAIT_UNTIL_OTHER_REQUESTS_ARE_FINISHED_TOO_MANY_IP_CONCURENT_REQUESTS"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/company/search": {
      "get": {
        "operationId": "searchCompanies",
        "tags": [
          "Company data"
        ],
        "summary": "Search companies",
        "description": "Returns the companies that match every word of `q` in the name and registry-number text B2BHint indexes, best match first, as name fields plus the registry number to pass to `GET /api/v1/company/details`. Leave `countryCode` out to search every country your key may query. An empty list says nothing about whether a company exists.",
        "externalDocs": {
          "description": "The reference page for this route, with request examples.",
          "url": "https://b2bhint.com/en/api-reference/company"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "The words to look for: a company name, or the start of a registry number.",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "example trading"
          },
          {
            "name": "countryCode",
            "in": "query",
            "required": false,
            "description": "Code of a register B2BHint covers, for example `za`; case does not matter. Absent: every country your key may query.",
            "schema": {
              "type": "string"
            },
            "example": "za"
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "description": "Companies per page. Must be between 1 and 100; absent, 0 or not a number means 10.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number, counted from 1. Must be between 1 and 100; absent, 0 or not a number means 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The page of matches, possibly empty. The free evaluation allowance sends the quota headers; a paid key does not.",
            "headers": {
              "X-RateLimit-Scope": {
                "description": "`free_tier_search`.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit-Day": {
                "description": "Requests the quota in `X-RateLimit-Scope` allows per day.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "description": "Requests left today.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset-Day": {
                "description": "Unix time in seconds at which the day window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit-Month": {
                "description": "Requests the quota in `X-RateLimit-Scope` allows per month.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Month": {
                "description": "Requests left this month.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset-Month": {
                "description": "Unix time in seconds at which the month window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "maxItems": 100,
                  "items": {
                    "$ref": "#/components/schemas/CompanySearchHit"
                  }
                },
                "example": [
                  {
                    "name": "Example Trading (Pty) Ltd",
                    "shortName": null,
                    "brandName": null,
                    "internationalNumber": "2000/000000/07",
                    "countryCode": "za"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "A parameter is refused. The body is `{ \"error\": \"<text>\" }` with one of: \"Missing search query\", \"Maximum size value is 100\", \"Minimum size value is 1\", \"Maximum page value is 100\", \"Minimum page value is 1\", \"Invalid country code\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlainError"
                },
                "example": {
                  "error": "Maximum size value is 100"
                }
              }
            }
          },
          "401": {
            "description": "No API key (`MISSING_AUTH_TOKEN`) or an unknown one (`USER_NOT_FOUND`). Send the key in the `apiKey` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "MISSING_AUTH_TOKEN"
                }
              }
            }
          },
          "403": {
            "description": "Refused. `message` is one of `USER_IS_LOCKED`, `FAILED_PAYMENT_FOR_YOUR_SUBSCRIPTION`, `API_ACCESS_NOT_INCLUDED_IN_YOUR_PLAN`, `API_FREE_TIER_QUOTA_EXHAUSTED`, `COUNTRY_NOT_IN_API_ACCESS_LIST`. The last says your key may not query that country.",
            "headers": {
              "X-RateLimit-Scope": {
                "description": "Sent on a quota refusal. `free_tier_search` or `free_tier`: the free evaluation allowance's overall budget (search, or everything else) is used up. `company` or `company_full`: the cap of that scope is used up, on a paid plan or on the free allowance (a free key that has used its full-record calls reads `company_full`). `account` with a limit of 0: the plan has no API access. A free evaluation key also gets these headers on its other refusals; a paid key gets them only on a quota refusal.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit-Day": {
                "description": "Requests the quota in `X-RateLimit-Scope` allows per day.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "description": "Requests left today.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset-Day": {
                "description": "Unix time in seconds at which the day window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit-Month": {
                "description": "Requests the quota in `X-RateLimit-Scope` allows per month.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Month": {
                "description": "Requests left this month.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset-Month": {
                "description": "Unix time in seconds at which the month window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "API_FREE_TIER_QUOTA_EXHAUSTED"
                }
              }
            }
          },
          "503": {
            "description": "The search could not be completed, so no answer is given: `{ \"error\": \"Search service temporarily unavailable\" }`, or `{ \"error\": true, \"message\": \"SERVICE_TEMPORARILY_UNAVAILABLE\" }` when the service is shedding load. Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PlainError"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "example": {
                  "error": "Search service temporarily unavailable"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/company/details": {
      "get": {
        "operationId": "getCompanyDetails",
        "tags": [
          "Company data"
        ],
        "summary": "Read the record held for one company",
        "description": "Returns the record B2BHint holds for one company, found by country code and registry number. A call without `full` is the basic record and counts against the company quota; `full=true` returns the whole record with further sections that are not listed here, and counts against the separate full-record quota. A company that does not exist, or is not available, answers 400 `COMPANY_DOESNT_EXIST`.",
        "externalDocs": {
          "description": "The reference page for this route, with request examples.",
          "url": "https://b2bhint.com/en/api-reference/company"
        },
        "parameters": [
          {
            "name": "internationalNumber",
            "in": "query",
            "required": true,
            "description": "Company number from the local registry.",
            "schema": {
              "type": "string"
            },
            "example": "2000/000000/07"
          },
          {
            "name": "countryCode",
            "in": "query",
            "required": true,
            "description": "Code of a register B2BHint covers, for example `za`; case does not matter. The countries your key may query are returned in the 403 body.",
            "schema": {
              "type": "string"
            },
            "example": "za"
          },
          {
            "name": "full",
            "in": "query",
            "required": false,
            "description": "Only the value `true` returns the full record; anything else, or no value, returns the basic record.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The record. Quota headers describe the quota this call drew on.",
            "headers": {
              "X-RateLimit-Scope": {
                "description": "`company` for a basic call, `company_full` with `full=true`. The free evaluation allowance reads the same two scopes, with its evaluation caps as the limits.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit-Day": {
                "description": "Requests the quota in `X-RateLimit-Scope` allows per day.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "description": "Requests left today.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset-Day": {
                "description": "Unix time in seconds at which the day window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit-Month": {
                "description": "Requests the quota in `X-RateLimit-Scope` allows per month.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Month": {
                "description": "Requests left this month.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset-Month": {
                "description": "Unix time in seconds at which the month window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDetails"
                },
                "example": {
                  "id": 1,
                  "name": "Example Trading (Pty) Ltd",
                  "shortName": null,
                  "brandName": null,
                  "internationalNumber": "2000/000000/07",
                  "localNumber": null,
                  "address": "1 Example Street, Example Town",
                  "statusText": null,
                  "dateCreated": "2000-01-31T00:00:00.000Z",
                  "dateDisolved": null,
                  "activityDescription": null,
                  "updatedAt": "2025-12-20T08:21:00.000Z",
                  "healthScore": null,
                  "workforce": null,
                  "benchmark": null,
                  "trademarks_intel": null,
                  "isin_intel": null,
                  "address_intel": null,
                  "industry_classification": null
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or refused, or the company does not exist or is not available: `message` is one of `INTERNATIONAL_NUMBER_IS_REQUIRED`, `COUNTRY_IS_REQUIRED`, `INVALID_COUNTRY`, `COMPANY_DOESNT_EXIST`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "COMPANY_DOESNT_EXIST"
                }
              }
            }
          },
          "401": {
            "description": "No API key (`MISSING_AUTH_TOKEN`) or an unknown one (`USER_NOT_FOUND`). Send the key in the `apiKey` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "MISSING_AUTH_TOKEN"
                }
              }
            }
          },
          "403": {
            "description": "Refused. `message` is one of `USER_IS_LOCKED`, `FAILED_PAYMENT_FOR_YOUR_SUBSCRIPTION`, `API_ACCESS_NOT_INCLUDED_IN_YOUR_PLAN`, `API_FREE_TIER_QUOTA_EXHAUSTED`, `TOO_MANY_REQUESTS_FOR_CURRENT_MEMBERSHIP`, `COUNTRY_NOT_IN_API_ACCESS_LIST`. With `COUNTRY_NOT_IN_API_ACCESS_LIST` the body lists in `allowedCountries` the countries your key may query.",
            "headers": {
              "X-RateLimit-Scope": {
                "description": "Sent on a quota refusal. `free_tier_search` or `free_tier`: the free evaluation allowance's overall budget (search, or everything else) is used up. `company` or `company_full`: the cap of that scope is used up, on a paid plan or on the free allowance (a free key that has used its full-record calls reads `company_full`). `account` with a limit of 0: the plan has no API access. A free evaluation key also gets these headers on its other refusals; a paid key gets them only on a quota refusal.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit-Day": {
                "description": "Requests the quota in `X-RateLimit-Scope` allows per day.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "description": "Requests left today.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset-Day": {
                "description": "Unix time in seconds at which the day window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit-Month": {
                "description": "Requests the quota in `X-RateLimit-Scope` allows per month.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Month": {
                "description": "Requests left this month.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset-Month": {
                "description": "Unix time in seconds at which the month window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotaError"
                },
                "example": {
                  "error": true,
                  "message": "COUNTRY_NOT_IN_API_ACCESS_LIST",
                  "allowedCountries": [
                    "za",
                    "ro"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many calls from this key are in flight: `{ \"error\": \"WAIT_UNTIL_OTHER_REQUESTS_ARE_FINISHED_TOO_MANY_IP_CONCURENT_REQUESTS\" }`. Wait until others finish.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlainError"
                },
                "example": {
                  "error": "WAIT_UNTIL_OTHER_REQUESTS_ARE_FINISHED_TOO_MANY_IP_CONCURENT_REQUESTS"
                }
              }
            }
          },
          "503": {
            "description": "The call was not served: `message` is `SERVICE_TEMPORARILY_UNAVAILABLE` (retry after the `Retry-After` seconds; nothing was counted) or `TOO_MANY_REQUESTS` (the call waited so long that the caller had gone).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": true,
                  "message": "SERVICE_TEMPORARILY_UNAVAILABLE"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "apiKey"
      }
    },
    "headers": {
      "X-RateLimit-Scope": {
        "description": "The quota these headers describe: `company_full`.",
        "schema": {
          "type": "string"
        }
      },
      "X-RateLimit-Limit-Day": {
        "description": "Full-record requests your plan allows per day.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining-Day": {
        "description": "Full-record requests left today.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Limit-Month": {
        "description": "Full-record requests your plan allows per month.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining-Month": {
        "description": "Full-record requests left this month.",
        "schema": {
          "type": "integer"
        }
      },
      "X-B2BHint-Degraded": {
        "description": "Present only when a check was attempted and failed on this call; lists the names, as `unavailableChecks` does.",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "A refusal with `error: true` and `message`, a stable code such as `COMPANY_DOESNT_EXIST`, not a sentence. A few refusals use `PlainError`. A refusal with the code `COMPANY_DOESNT_EXIST` may also carry a `hint`.",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "const": true
          },
          "message": {
            "type": "string"
          },
          "hint": {
            "type": "string",
            "description": "Present only on a refusal with the code `COMPANY_DOESNT_EXIST`: what B2BHint holds, in words. It says the number is not held or not available to check, and that this says nothing about whether the company exists. `message` and `error` stay the stable code; match on those, never on `hint`."
          }
        }
      },
      "QuotaError": {
        "type": "object",
        "description": "A 403 for a key that may not query this country (`allowedCountries` lists the countries it may), or for a plan whose day or month budget is used up. The batch door also returns `requested` and `remaining` when the list does not fit the remaining budget.",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "const": true
          },
          "message": {
            "type": "string"
          },
          "allowedCountries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "documentation": {
            "type": "string"
          },
          "requested": {
            "type": "integer"
          },
          "remaining": {
            "type": "integer"
          }
        }
      },
      "KybOfficer": {
        "type": "object",
        "additionalProperties": false,
        "description": "One officer exactly as the register states it. No birth date, identifier or contact detail is ever returned.",
        "required": [
          "name",
          "kind",
          "role",
          "appointedOn",
          "resignedOn",
          "ownershipPercent"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "enum": [
              "person",
              "company"
            ],
            "description": "`company` when the officer is itself a company (a corporate director or shareholder)."
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "description": "The register's own role wording."
          },
          "appointedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "resignedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "ownershipPercent": {
            "type": [
              "number",
              "null"
            ],
            "description": "Ownership share in percent when the register states one."
          }
        }
      },
      "KybRiskTag": {
        "type": "object",
        "additionalProperties": false,
        "description": "A record B2BHint holds that needs a look. A tag is emitted only for a record we hold; the absence of a tag says nothing about the company (a register we do not ingest, or a record we do not hold, produces no tag).",
        "required": [
          "code",
          "basis",
          "asOf"
        ],
        "properties": {
          "code": {
            "enum": [
              "insolvency_record",
              "enforcement_record",
              "sanctions_list_record",
              "filing_recency",
              "address_co_location",
              "linked_director_records",
              "lei_terminated",
              "health_band_low",
              "record_age"
            ],
            "description": "`insolvency_record`: Insolvency-register records are on file for this company. `enforcement_record`: Enforcement actions are on record for this company. `sanctions_list_record`: A currently active enforcement action carries a sanctions-list label in the record's own text. `filing_recency`: The latest annual accounts on record are old (not emitted for a dissolved company). `address_co_location`: Other companies are registered at the same address and a large share of those are dissolved or in a terminal status. `linked_director_records`: Officers of this company also sit on other companies that have registry records (charges, court cases, insolvencies, restrictions, security measures). `lei_terminated`: LEI records in a terminated state (lapsed, retired, duplicate or annulled) are on file. `health_band_low`: The registry health score, derived from registry records, is in the limited or low band. It is a score, not a determination. `record_age`: B2BHint's last write to this record is older than 90 days, or its date is unknown; the status and the officers may be older still."
          },
          "basis": {
            "type": "string",
            "description": "What we hold, in plain words."
          },
          "asOf": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The day of the newest record behind the tag; null when the source carries no usable date."
          }
        }
      },
      "KybVerification": {
        "type": "object",
        "additionalProperties": false,
        "description": "A small answer for one company. This is not a KYB determination. Risk tags describe records B2BHint holds for this company; a register that is not ingested, or a record we do not hold, produces no tag, so the absence of a tag says nothing about the company. Status classes are our reading of the register wording and are unknown where we cannot classify it.",
        "required": [
          "found",
          "company",
          "record",
          "officers",
          "officersTotal",
          "officersTruncated",
          "riskTags",
          "unavailableChecks",
          "checkedAt",
          "disclaimer"
        ],
        "properties": {
          "found": {
            "const": true,
            "description": "Always true on a 200. A company that does not exist, or is not available, answers 400 `COMPANY_DOESNT_EXIST`."
          },
          "company": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "internationalNumber",
              "countryCode",
              "status",
              "statusClass",
              "registrationDate",
              "dissolutionDate",
              "type",
              "address"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "internationalNumber": {
                "type": "string"
              },
              "countryCode": {
                "type": "string"
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The register's own wording, verbatim; several distinct rows are joined with `; `."
              },
              "statusClass": {
                "enum": [
                  "active",
                  "inactive",
                  "dissolved",
                  "in_liquidation",
                  "in_insolvency",
                  "reserved",
                  "forming",
                  "unknown"
                ],
                "description": "Our reading of the register wording. `active` only where the wording itself says so in a country whose statuses we can classify; `unknown` wherever we cannot (the register's own words are always in `status`)."
              },
              "registrationDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "dissolutionDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The register's own legal-form wording."
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "record": {
            "type": "object",
            "additionalProperties": false,
            "description": "When B2BHint last wrote ANY data to this record (contact details included), so it is not the time the status or the officers were last read from the register. `band` is `current` up to 90 days, `aging` up to 365 days, `stale` beyond; `unknown` when there is no usable date and is never to be read as current.",
            "required": [
              "lastUpdatedAt",
              "ageDays",
              "band"
            ],
            "properties": {
              "lastUpdatedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "ageDays": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "band": {
                "enum": [
                  "current",
                  "aging",
                  "stale",
                  "unknown"
                ]
              }
            }
          },
          "officers": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/KybOfficer"
            }
          },
          "officersTotal": {
            "type": "integer",
            "description": "Officers on record, before the cap on `officers`."
          },
          "officersTruncated": {
            "type": "boolean",
            "description": "True when `officersTotal` exceeds the 200 officers returned."
          },
          "riskTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KybRiskTag"
            }
          },
          "unavailableChecks": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Checks that were attempted and FAILED on this call (the names the `X-B2BHint-Degraded` header lists). An empty list means every check ran; a failed check is not an empty result."
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "disclaimer": {
            "type": "string"
          }
        }
      },
      "KybBatchRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "One malformed entry refuses the whole list with a 400, before anything is read or metered.",
            "items": {
              "type": "object",
              "required": [
                "internationalNumber",
                "countryCode"
              ],
              "properties": {
                "ref": {
                  "type": "string",
                  "description": "Your own row identifier, echoed back verbatim."
                },
                "internationalNumber": {
                  "type": "string"
                },
                "countryCode": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "KybBatchRow": {
        "type": "object",
        "description": "`ok`: `verification` is the answer. `error`: the refusal the single endpoint would give for that row, in `error`. `not_processed`: this call did not answer the row and it says nothing about the company; re-send it (`retryable` is true).",
        "required": [
          "ref",
          "input",
          "status"
        ],
        "properties": {
          "ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "input": {
            "type": "object",
            "required": [
              "internationalNumber",
              "countryCode"
            ],
            "properties": {
              "internationalNumber": {
                "type": "string"
              },
              "countryCode": {
                "type": "string"
              }
            }
          },
          "status": {
            "enum": [
              "ok",
              "error",
              "not_processed"
            ]
          },
          "verification": {
            "$ref": "#/components/schemas/KybVerification"
          },
          "error": {
            "type": "string"
          },
          "reason": {
            "enum": [
              "time_budget",
              "read_failed",
              "caller_gone"
            ]
          },
          "retryable": {
            "const": true
          },
          "hint": {
            "type": "string",
            "description": "Present only on a refusal with the code `COMPANY_DOESNT_EXIST`: what B2BHint holds, in words. It says the number is not held or not available to check, and that this says nothing about whether the company exists. `message` and `error` stay the stable code; match on those, never on `hint`."
          }
        }
      },
      "KybBatchResponse": {
        "type": "object",
        "required": [
          "requested",
          "answered",
          "refused",
          "notProcessed",
          "complete",
          "maxItems",
          "results"
        ],
        "properties": {
          "requested": {
            "type": "integer"
          },
          "answered": {
            "type": "integer"
          },
          "refused": {
            "type": "integer"
          },
          "notProcessed": {
            "type": "integer"
          },
          "complete": {
            "type": "boolean",
            "description": "False when any row is `not_processed`."
          },
          "maxItems": {
            "type": "integer",
            "const": 100
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KybBatchRow"
            },
            "description": "In the order sent."
          },
          "allowedCountries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "documentation": {
            "type": "string"
          }
        }
      },
      "PlainError": {
        "type": "object",
        "description": "A refusal whose `error` is a string, not `true`: `GET /company/search` answers its 400 and 503 this way, and `GET /company/details` its 429.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "CompanySearchHit": {
        "type": "object",
        "additionalProperties": false,
        "description": "One company: the name fields and the registry number to pass to `GET /api/v1/company/details`. Nothing else is returned.",
        "required": [
          "internationalNumber",
          "countryCode"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The register's own wording. An empty string means the register holds no usable name."
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ]
          },
          "brandName": {
            "type": [
              "string",
              "null"
            ]
          },
          "internationalNumber": {
            "type": "string",
            "description": "The registry number, in the form the details route takes."
          },
          "countryCode": {
            "type": "string",
            "description": "Lower case."
          }
        }
      },
      "CompanyDetails": {
        "type": "object",
        "description": "The record B2BHint holds for one company. The fields below are present on every call; further fields are returned and are not listed here (additionalProperties is open), and `full=true` adds more sections still. A `null` in a derived view means we hold no record to derive it from, which says nothing about the company.",
        "required": [
          "id",
          "internationalNumber"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ]
          },
          "brandName": {
            "type": [
              "string",
              "null"
            ]
          },
          "internationalNumber": {
            "type": "string"
          },
          "localNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "statusText": {
            "type": [
              "string",
              "null"
            ],
            "description": "The register's own status wording, when it is held as text on the record."
          },
          "dateCreated": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 8601 date-time of registration."
          },
          "dateDisolved": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 8601 date-time of dissolution. The field name carries the spelling the API has always used."
          },
          "activityDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 8601 date-time of the last write B2BHint made to this record."
          },
          "healthScore": {
            "type": [
              "object",
              "null"
            ],
            "description": "A score derived from registry records. It is a score, not a determination about the company."
          },
          "workforce": {
            "type": [
              "object",
              "null"
            ],
            "description": "A headcount band and count parsed from the register, when it states one."
          },
          "benchmark": {
            "type": [
              "object",
              "null"
            ],
            "description": "National and sector turnover and profit ranks the parsers hold."
          },
          "trademarks_intel": {
            "type": [
              "object",
              "null"
            ],
            "description": "Registered-trademark status mix and classes, from EU trademark records."
          },
          "isin_intel": {
            "type": [
              "object",
              "null"
            ],
            "description": "Listed-securities summary, from the ISIN records we hold."
          },
          "address_intel": {
            "type": [
              "object",
              "null"
            ],
            "description": "How many other companies share the registered address."
          },
          "industry_classification": {
            "type": [
              "object",
              "null"
            ],
            "description": "Industry codes, verbatim, for the US federal-registrant records we hold."
          }
        }
      }
    }
  }
}