# `Codat.Platform.CustomData`
[🔗](https://github.com/iamkanishka/codat.git/blob/v1.0.0/lib/codat/platform/supplemental_data.ex#L148)

Read custom data pulled from integrations via supplemental data configuration.

After configuring supplemental data via `Codat.Platform.SupplementalData`,
you can read the custom fields using the standard list/get endpoints —
they will appear in the `supplementalData.content` map on each record.

This module also provides access to raw custom data endpoints for integrations
that support them (e.g. reading raw QuickBooks objects by their native type).

## Example

    # Read invoices — supplementalData is included automatically
    {:ok, page} = Codat.Accounting.Invoices.list(client, company_id)

    invoice = hd(page.results)
    invoice["supplementalData"]["content"]["PONumber"]  # => "PO-4521"

# `get`

```elixir
@spec get(
  Codat.Client.t() | String.t(),
  String.t(),
  String.t(),
  String.t() | keyword()
) ::
  {:ok, map()} | {:error, Codat.Error.t()}
```

Returns a single custom data record by ID.

## Example

    {:ok, record} = Codat.Platform.CustomData.get(client, company_id, "CustomTransaction", "record-id")

# `list`

```elixir
@spec list(
  Codat.Client.t() | String.t(),
  String.t(),
  String.t() | keyword(),
  keyword()
) ::
  {:ok, Codat.Pagination.t()} | {:error, Codat.Error.t()}
```

Returns a paginated list of custom data records for a company and data type.

This reads from the raw integration data pulled by Codat (not normalized).

## Example

    {:ok, page} = Codat.Platform.CustomData.list(client, company_id, "CustomTransaction")

---

*Consult [api-reference.md](api-reference.md) for complete listing*
