# ASIC Extract

`POST /asic_extract`

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

Requests an ASIC company or person extract. The response confirms the job was queued and returns an `api_reference`.
Poll `GET /asic_extract/{api_reference}` until the extract payload is ready.

## Request scenarios

- **Company extract** – set `type` to `company`, provide either an ABN or ACN, and choose an `extract_type`:
  - `current`: Requests an ASIC Current Extract.
  - `historical`: Requests an ASIC Current and Historical Extract.
  - `relational`: Request an ASIC Relational Extract.
- **Person extract** – set `type` to `person` and supply the `person_id`, `search_id`, legal `name`, and `birth_date`
  exactly as returned by `/asic_extract_person_search`. Linked identifiers from that search should be listed in
  `additional_person_ids` so the resulting extract stitches together all associated roles/shareholdings. The primary
  `person_id` must not appear inside `additional_person_ids`.

## Sandbox dataset

The sandbox accepts deterministic identifiers so you can exercise both request types without billing. Use one of the
following combinations:

### Companies

| Name                    | ABN         | ACN       | extract_type       | Notes                                                        |
|:------------------------|:------------|:----------|:-------------------|:-------------------------------------------------------------|
| Tech Innovators Ltd     | 32111111114 | 111111114 | current             | Current Extract                                             |
| Green Energy Solutions  | 11123456780 | 123456780 | historical          | Current and Historical Extract                              |
| Urban Development Corp  | 54222222228 | 222222228 | relational          | Relational Extract                                          |
| Creative Media Agency   | 33234567894 | 234567894 | current             | Current  Extract simulating multiple polling for completion |

### People

| Name                        | Birth Date | Extract Type | person_id | Search ID |  Additional Person Id |
|:----------------------------|:-----------|:-------------|:----------|:----------|:----------------------|
| JOHN MICHAEL DOE            | 1980-05-15 | historical   | 123456780 | 11223344  | 123456781             |
| JANE ALICE SMITH            | 1987-03-22 | current      | 123456790 | 55667788  | 123456791             |
| LUCAS BENJAMIN CARTER       | 1992-08-09 | current      | 998877660 | 77889900  | (none)                |

## Request body

Parameters describing the ASIC entity you wish to extract.

| Field | Type | Description |
|-------|------|-------------|
| `type` | string | **Required.** "company" for organisation extracts or "person" for individual extracts. Enum: `company`, `person` Example: `company` |
| `extract_type` | string | **Required.** Company extracts accept `current`, `historical`, or `relational`. Person extracts accept `current` or `historical` only. Enum: `current`, `historical`, `relational` Example: `current` |
| `abn` | string or null | Required when `type` is `company` and an ACN is not supplied. Provide 11 digits (whitespace ignored). Example: `32111111114` |
| `acn` | string or null | Required when `type` is `company` and an ABN is not supplied. Provide 9 digits (whitespace ignored). Example: `111111114` |
| `person_id` | string or null | Required for person extracts. Copy the `person_id` provided by `/asic_extract_person_search`. Example: `123456780` |
| `additional_person_ids` | array of strings or null | Optional list of related ASIC person identifiers. Do **not** repeat the primary `person_id`. Use the additional IDs returned by `/asic_extract_person_search` (or derived from sandbox keys containing `\|`). |
| `search_id` | string or null | Required for person extracts. Copy the `search_id` returned by `/asic_extract_person_search`. Example: `11223344` |
| `name` | string or null | Required for person extracts. Uppercase legal name matching the search result. Example: `JOHN MICHAEL DOE` |
| `birth_date` | string (date) or null | Required for person extracts. ISO `YYYY-MM-DD` date of birth taken from the search result. Example: `1980-05-15` |

**Sample request**

```json
{
    "type": "company",
    "extract_type": "current",
    "abn": "32111111114",
    "acn": "111111114",
    "person_id": "123456780",
    "additional_person_ids": [
        "123456781"
    ],
    "search_id": "11223344",
    "name": "JOHN MICHAEL DOE",
    "birth_date": "1980-05-15"
}
```

## Responses

### 200 Extract 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: `asic_extract` |
| `api_reference` | string (uuid) | Audit reference for this extract request. Poll `/asic_extract/{api_reference}` to retrieve results. Example: `fe4291ca-d831-4760-96df-c9cb03b3cd95` |

**Sample response**

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

### 501 Summary extracts are not implemented.

Content type: `application/json`

| Field | Type | Description |
|-------|------|-------------|
| `message` | string | Static error returned when `summary=true` is requested. Example: `Summary ASIC extracts are not supported yet.` |

**Sample response**

```json
{
    "message": "Summary ASIC extracts are not supported yet."
}
```

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

