# Get company registry facts

Read company-register facts for a customer with an organisation number. Returns facts: null when no matching registry record exists. An unavailable register returns an error instead.

POST https://api.brigg.app/v1/operations/customers.GetCompanyRegistryFacts

## Access & visibility

Allow `customers.GetCompanyRegistryFacts` on your API key. Resource read permissions: `core:Company`.

**Acting member required.** Send `Brigg-Act-As` with an [approved member account ID](https://developer.brigg.app/authentication#member-delegation). The key supplies permissions; the member selects whose data is used.

The selected member must be active and approved by the credential. This selects whose private data is used; the credential supplies permissions. Private ownership and project boundaries still apply.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The core:Company record. At least 1 character. |

## Response

Returns **200 OK** with a JSON body.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `facts` | null or [object](#getcompanyregistryfactsfacts-response-facts) | Yes | Company-register facts, or null when no matching register record exists. |

### GetCompanyRegistryFactsFacts · response.facts

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `org_number` | string | Yes | Official organization number as text; preserve leading zeros. |
| `employees` | null or number | Yes | Employee count reported by the source. |
| `city` | null or string | Yes | Postal town or city. |
| `founded_date` | null or string | Yes | Company founding date from the register. |
| `status_flag` | null or string | Yes | Company status reported by the register. |
| `financials` | null or [object](#response-facts-financials) | Yes | Financial reports returned for this company. |

### response.facts.financials

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fiscal_year` | number | Yes | Fiscal year to which these financial figures apply. |
| `revenue` | null or number | Yes | Revenue in the source financial report's units. |
| `net_result` | null or number | Yes | Net profit or loss in the source financial report's units. |

## Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. Supply Brigg-Act-As with a member authorized by the key’s delegation grant. The selected member must be active and approved by the credential. This selects whose private data is used; the credential supplies permissions. Private ownership and project boundaries still apply. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. |

## Next steps

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Example request

Fictional values. Replace IDs and business details with values from your workspace.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/customers.GetCompanyRegistryFacts' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Brigg-Act-As: $BRIGG_ACT_AS" \
  --data-raw '{
  "id": "e_example"
}'
```

#### TypeScript


```typescript
const actAs = process.env.BRIGG_ACT_AS;
if (!actAs) throw new Error("Set BRIGG_ACT_AS to an approved member account ID.");

const response = await fetch("https://api.brigg.app/v1/operations/customers.GetCompanyRegistryFacts", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
    "Brigg-Act-As": actAs,
  },
  body: JSON.stringify({
    "id": "e_example"
  }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

payload = {
  "id": "e_example"
}
request = Request(
    "https://api.brigg.app/v1/operations/customers.GetCompanyRegistryFacts",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
        "Brigg-Act-As": os.environ["BRIGG_ACT_AS"],
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "facts": null
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "description": "The core:Company record."
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "id": "e_example"
    }
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "facts": {
      "description": "Company-register facts, or null when no matching register record exists.",
      "title": "GetCompanyRegistryFactsFacts",
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "object",
          "properties": {
            "org_number": {
              "type": "string",
              "description": "Official organization number as text; preserve leading zeros."
            },
            "employees": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "number"
                }
              ],
              "description": "Employee count reported by the source."
            },
            "city": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string"
                }
              ],
              "description": "Postal town or city."
            },
            "founded_date": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string"
                }
              ],
              "description": "Company founding date from the register."
            },
            "status_flag": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "const": "bankrupt"
                },
                {
                  "type": "string",
                  "const": "winding_down"
                },
                {
                  "type": "string",
                  "const": "forced_liquidation"
                },
                {
                  "type": "string",
                  "const": "deleted"
                }
              ],
              "description": "Company status reported by the register."
            },
            "financials": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "object",
                  "properties": {
                    "fiscal_year": {
                      "type": "number",
                      "description": "Fiscal year to which these financial figures apply."
                    },
                    "revenue": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "number"
                        }
                      ],
                      "description": "Revenue in the source financial report's units."
                    },
                    "net_result": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "number"
                        }
                      ],
                      "description": "Net profit or loss in the source financial report's units."
                    }
                  },
                  "required": [
                    "fiscal_year",
                    "revenue",
                    "net_result"
                  ],
                  "additionalProperties": false
                }
              ],
              "description": "Financial reports returned for this company."
            }
          },
          "required": [
            "org_number",
            "employees",
            "city",
            "founded_date",
            "status_flag",
            "financials"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "facts"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "facts": null
    }
  ]
}
```

