> ## Documentation Index
> Fetch the complete documentation index at: https://octo-98895abd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# v2 events

> <Warning>Preview, not deployed. The v2 gateway is built but not deployed yet; this call works once the owner deploys `silo-api`.</Warning>

What was filed or restated? Company IPE filings, fund documents, restatements, judicial recovery.

Example: `/v2/events?id=PETR4`

Kinds:

- `company`: api.company_events: IPE filings, newest first. Paged by date windows.
- `fund`: api.fund_documents: FNET documents, newest first, each version its own fnet_id. Refuses above 1000 rows: narrow from or pin category.
- `restatements`: api.fund_restatements: one row per document with versao > 1, with the version it most plausibly replaced and whether SILO diffed the pair.
- `restatement_diff`: api.fund_restatement_diff: one row per field that changed between a restated document and its predecessor (the FIDC informe mensal for now).
- `judicial_recovery`: api.rj_listed_documents: judicial recovery (recuperacao judicial) filings of listed companies, newest first.

With no `from`, a dated kind reads the last 12 months to `to`.

id is a ticker, 14-digit CNPJ or CVM code for kind company and judicial_recovery, and a fund CNPJ for kind fund, restatements and restatement_diff.

Dates are delivery days. With no to, company and judicial_recovery end today and the fund kinds have no upper bound.

`GET /v2/events?help` describes the main parameters, `?help=all` adds the hidden ones.



## OpenAPI

````yaml /api-docs/v2/openapi.json get /events
openapi: 3.1.0
info:
  title: SILO API v2 (preview, not deployed)
  version: v2
  description: >-
    The v2 gateway over SILO's schema `api`: 14 resources, five shared
    parameters, one envelope and one error object. Generated from
    supabase/functions/silo-api/registry.ts by scripts/gen_openapi_v2.py; do not
    edit by hand. Preview, not deployed. The v2 gateway is built but not
    deployed yet; this call works once the owner deploys `silo-api`.
servers:
  - url: https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2
    description: The silo-api Edge Function (preview, not deployed).
security:
  - apikey: []
  - apikey: []
    bearerAuth: []
paths:
  /events:
    get:
      summary: v2 events
      description: >-
        <Warning>Preview, not deployed. The v2 gateway is built but not deployed
        yet; this call works once the owner deploys `silo-api`.</Warning>


        What was filed or restated? Company IPE filings, fund documents,
        restatements, judicial recovery.


        Example: `/v2/events?id=PETR4`


        Kinds:


        - `company`: api.company_events: IPE filings, newest first. Paged by
        date windows.

        - `fund`: api.fund_documents: FNET documents, newest first, each version
        its own fnet_id. Refuses above 1000 rows: narrow from or pin category.

        - `restatements`: api.fund_restatements: one row per document with
        versao > 1, with the version it most plausibly replaced and whether SILO
        diffed the pair.

        - `restatement_diff`: api.fund_restatement_diff: one row per field that
        changed between a restated document and its predecessor (the FIDC
        informe mensal for now).

        - `judicial_recovery`: api.rj_listed_documents: judicial recovery
        (recuperacao judicial) filings of listed companies, newest first.


        With no `from`, a dated kind reads the last 12 months to `to`.


        id is a ticker, 14-digit CNPJ or CVM code for kind company and
        judicial_recovery, and a fund CNPJ for kind fund, restatements and
        restatement_diff.


        Dates are delivery days. With no to, company and judicial_recovery end
        today and the fund kinds have no upper bound.


        `GET /v2/events?help` describes the main parameters, `?help=all` adds
        the hidden ones.
      operationId: v2_events
      parameters:
        - name: kind
          in: query
          required: false
          description: >-
            company: a listed company's IPE filings (fatos relevantes,
            comunicados, ...). fund: a fund's FNET documents. restatements: FNET
            documents re-filed as a new version (with no id: every fund's).
            restatement_diff: field by field, what changed in a fund's restated
            documents. judicial_recovery: listed companies' judicial recovery
            filings (with no id: every company's). Default: company.
          schema:
            type: string
            enum:
              - company
              - fund
              - restatements
              - restatement_diff
              - judicial_recovery
            default: company
        - name: category
          in: query
          required: false
          description: >-
            One label, matched exactly as the source labels it. kind=company:
            the IPE categoria (e.g. Fato Relevante). kind=fund and
            restatement_diff: the FNET tipo_documento. kind=judicial_recovery:
            the CVM Tipo (accented as published). Default: all.
          schema:
            type: string
            default: all
        - name: id
          in: query
          required: false
          description: >-
            By kind: company takes a listed company's ticker, 14-digit CNPJ or
            CVM code; fund, restatement_diff take a 14-digit fund CNPJ
            (punctuation allowed); restatements takes a 14-digit fund CNPJ
            (punctuation allowed; none: every fund's); judicial_recovery takes a
            listed company's ticker, 14-digit CNPJ or CVM code (none: every
            company's). Required for kinds company, fund, restatement_diff.
            Default: none.
          schema:
            type: string
          example: PETR4
        - name: from
          in: query
          required: false
          description: >-
            First date of the window, YYYY-MM-DD. Default: the resource's
            default window, counted back from to.
          schema:
            type: string
            format: date
        - name: to
          in: query
          required: false
          description: >-
            Last date of the window, YYYY-MM-DD. Default: the latest complete
            period, from coverage.
          schema:
            type: string
            format: date
        - name: limit
          in: query
          required: false
          description: >-
            The page size. More rows than one page come through next_page_url,
            never cut silently; a call stops at the tier's rows-per-call cap
            with meta.tier_cap_reached. Default: the tier's page maximum (10
            anonymous, 100 signed in); a larger value is coerced to it.
          schema:
            type: integer
            minimum: 1
        - name: cursor
          in: query
          required: false
          description: >-
            The opaque cursor from a previous next_page_url. It carries every
            other parameter: send it alone (another parameter with a different
            value is bad_request). Default: none: the first page.
          schema:
            type: string
        - name: family
          in: query
          required: false
          description: >-
            Hidden parameter (`?help=all` lists it). kind=restatements: the FNET
            fund type link (FII, FIDC or ETF). all includes documents not linked
            to a fund type yet. Default: all.
          schema:
            type: string
            enum:
              - all
              - fii
              - fidc
              - etf
            default: all
      responses:
        '200':
          description: The v2 envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        default:
          description: >-
            The v2 error object. A SILO refusal (over_limit) keeps its message,
            hint and details verbatim.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Envelope:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items: {}
          description: Always a list. Rows as the endpoint returned them; null stays null.
        meta:
          type: object
          required:
            - resource
            - kind
            - request
            - id_known
          properties:
            resource:
              type: string
            kind:
              type:
                - string
                - 'null'
            request:
              type: object
              description: Every parameter the resource takes, with the default applied.
            id_known:
              type:
                - boolean
                - 'null'
              description: Whether SILO holds the id; null when the call names none.
            endpoint:
              type: string
              description: The api.* endpoint that answered.
          additionalProperties: true
        next_page_url:
          type: string
          description: Present only when more rows remain. It carries one opaque cursor.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - target
            - innererror
          properties:
            code:
              type: string
              enum:
                - bad_request
                - unknown_parameter
                - unknown_id
                - unauthorized
                - forbidden_for_tier
                - over_limit
                - rate_limited
                - timeout
                - unavailable
                - internal
            message:
              type: string
            target:
              type:
                - string
                - 'null'
            innererror:
              type: object
              properties:
                sqlstate:
                  type:
                    - string
                    - 'null'
                hint:
                  type:
                    - string
                    - 'null'
                details:
                  type:
                    - string
                    - 'null'
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        The public publishable key. It identifies the project, not you, and is
        the anonymous tier.
      x-default: sb_publishable__yfFQsykAglrvc9GS6_PYw_B24ex437
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Optional. A user JWT from Supabase Auth, for the signed-in tier. Never a
        secret key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.