# Company Risk Report

`POST /company_risk`

- Live: `POST https://gdapi.globaldata.net.au/api/v2/company_risk`
- Sandbox: `POST https://sandbox-gdapi.globaldata.net.au/api/v2/company_risk`

Requests a company risk report using an ABN or ACN. The response confirms the job was queued and returns an
`api_reference`. Poll `GET /company_risk/{api_reference}` until the report payload is ready.

## Request rules

- Provide **either** `abn` or `acn` (not both).
- The report is generated in the background. Use the `api_reference` to retrieve it.

## Sandbox dataset

Use the following sandbox companies to receive deterministic responses:

| Company Name                        | ABN         | ACN       | Notes                                       |
|:------------------------------------|:------------|:----------|:--------------------------------------------|
| Copper Finch Construction Pty Ltd   | 94782610486 | 782610486 | Risk report returns immediately             |
| Marble Kookaburra Interiors Pty Ltd | 84655375652 | 655375652 | Risk report may require additional polling  |

## Request body

Parameters describing the company to report on.

| Field | Type | Description |
|-------|------|-------------|
| `abn` | string or null | Required when `acn` is not supplied. Provide 11 digits (whitespace ignored). Example: `94782610486` |
| `acn` | string or null | Required when `abn` is not supplied. Provide 9 digits (whitespace ignored). Example: `782610486` |

**Sample request**

```json
{
    "abn": "94782610486",
    "acn": "782610486"
}
```

## Responses

### 200 Report request accepted.

Content type: `application/json`

| Field | Type | Description |
|-------|------|-------------|
| `message` | string | Always `Ok` on success. Example: `Ok` |
| `function` | string | The API function that handled the request. Example: `company_risk` |
| `api_reference` | string (uuid) | Audit reference for this report request. Poll `/company_risk/{api_reference}` for results. Example: `fe4291ca-d831-4760-96df-c9cb03b3cd95` |

**Sample response**

```json
{
    "message": "Ok",
    "function": "company_risk",
    "api_reference": "fe4291ca-d831-4760-96df-c9cb03b3cd95"
}
```

Standard error responses: 400, 401, 402, 403, 429, 5XX (see [Common error responses](/docs/reference/general/common-error-responses.md))

