Companies
To search for B-BBEE scorecards, first locate the company to which the scorecard was issued.
Beagle lets you search for companies using one or more query parameters. When multiple parameters are supplied, results include records that match any of the provided identifiers.
Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /api/companies | Search companies by VAT number, registration number, and/or ID number |
Authentication
Include the following headers on every request:
Authorization: Basic <base64_encoded_credentials>Accept: application/json
See Authentication.
Attributes
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
vat_number | string | conditional | Search by VAT number. At least one identifier is required. |
registration_number | string | conditional | Search by company registration number. At least one identifier is required. |
id_number | string | conditional | Search by ID number (sole proprietors). At least one identifier is required. |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Beagle company identifier. Used to retrieve scorecards. |
commodity | string | Industry or commodity classification. |
identification_number | string | null | ID number, if applicable. |
region | string | Geographic region. |
registration_number | string | null | Company registration number. |
trading_name | string | Company trading name. |
vat_number | string | VAT number. |
Notes
- At least one query parameter (
vat_number,registration_number, orid_number) should be provided. - When multiple parameters are supplied, results include records that match any of the provided identifiers.
Search companies
Search for companies by VAT number, registration number, or ID number.
GET /api/companies
Code examples
- cURL
- JavaScript (axios)
curl -X GET "https://www.beagledatabase.co.za/api/companies?vat_number=412345678" \
-u "<your username>:<your password>" \
-H "Accept: application/json"
const url =
"https://www.beagledatabase.co.za/api/companies?vat_number=412345678";
const response = await axios.get(url, {
auth: {
username: process.env.API_USERNAME,
password: process.env.API_PASSWORD,
},
});
console.log(response.data);
Response
[
{
"id": "8ovHrj",
"commodity": "Food Services",
"identification_number": null,
"region": "National",
"registration_number": null,
"trading_name": "ACME Corp",
"vat_number": "412345678"
}
]