# Fee collection events

Fee collection events

Endpoint: POST Fee collection events
Version: 1.159.0

## Request fields (application/json):

  - `id` (string, required)
    Event unique identifier

  - `created_at` (string, required)
    Date and time when the event was created. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `type` (string, required)
    Event type
    Enum: "FEE_COLLECTION.CREATED", "FEE_COLLECTION.FINALISED", "FEE_COLLECTION.CANCELLED"

  - `object` (object, required)
    A fee collection, which processes a fee amount charged to an account. The amount either originates from a fee calculation performed by Upvest or is a pre-calculated amount supplied by the client.

  - `object.id` (string, required)
    The unique identifier of the fee collection, as a UUID.

  - `object.created_at` (string, required)
    Date and time when the resource was created. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `object.updated_at` (string, required)
    Date and time when the resource was last updated. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `object.account_id` (string, required)
    Universally Unique Identifier (UUID) of the account.

  - `object.account_group_id` (string, required)
    Universally Unique Identifier (UUID) of the account group.

  - `object.type` (string, required)
    Type of the fee collection.
* SERVICE_FEE — Service fee intake in a pre-defined cadence, for example monthly.
* SERVICE_FEE_LIQUIDATION — Service fee intake resulting from a portfolio liquidation.
    Enum: "SERVICE_FEE", "SERVICE_FEE_LIQUIDATION"

  - `object.collection_amount` (string, required)
    A positive cash amount, as a decimal string with up to two decimal places.

  - `object.processed_amount` (object, required)
    How much of the fee amount has been covered so far, split by the source of the cash, together with any amount still outstanding.

  - `object.processed_amount.cash_balance` (string)
    A positive cash amount, as a decimal string with up to two decimal places.

  - `object.processed_amount.sell_to_cover` (string)
    A positive cash amount, as a decimal string with up to two decimal places.

  - `object.processed_amount.total_residual_amount` (string)
    A positive cash amount, as a decimal string with up to two decimal places.

  - `object.sell_to_cover_orders` (array)
    The sell-to-cover orders placed to raise cash for this fee collection.

  - `object.sell_to_cover_orders.id` (string, required)
    The unique identifier of the sell-to-cover order placed to raise cash for a fee amount, as a UUID.

  - `object.sell_to_cover_orders.residual_amount` (string, required)
    A positive cash amount, as a decimal string with up to two decimal places.

  - `object.currency` (string, required)
    Alphabetic three-letter [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.
* EUR — Euro.
* GBP — Pound Sterling.
    Enum: "EUR", "GBP"

  - `object.status` (string, required)
    Status of the fee collection.
* PROCESSING — The fee collection is in progress.
* FINALISED — The fees have been collected from the account and the funds transferred to the client.
* CANCELLED — The fee collection was cancelled.
    Enum: "PROCESSING", "FINALISED", "CANCELLED"

  - `object.period_start` (string, required)
    The start date of the fee collection period, as a [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) full date in `YYYY-MM-DD` format.

  - `object.period_end` (string, required)
    The end date of the fee collection period, as a [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) full date in `YYYY-MM-DD` format.

  - `object.calculation_breakdown` (array)
    Breakdown of the fee collection by fee model and subperiod. Populated only for fee collections created from daily fee model calculations.

  - `object.calculation_breakdown.fee_model_id` (string, required)
    The unique identifier of the fee model, as a UUID. Upvest provides this value when a fee model is set up.

  - `object.calculation_breakdown.subperiod_start` (string, required)
    The start date of the fee subperiod, as a [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) full date in `YYYY-MM-DD` format.

  - `object.calculation_breakdown.subperiod_end` (string, required)
    The end date of the fee subperiod, as a [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) full date in `YYYY-MM-DD` format.

  - `object.calculation_breakdown.subtotal_amount` (string, required)
    A positive cash amount, as a decimal string with up to two decimal places.

  - `object.calculation_breakdown.components` (array, required)
    Individual fee components contributing to the subtotal.

  - `object.calculation_breakdown.components.type` (string, required)
    The kind of fee this component represents.
* TRANSACTION_LUMP_SUM — Lump sum transaction fee.
* PLATFORM — Platform fee.
* SERVICE — Service fee for a client portfolio.
* VAT — Value-added tax.
    Enum: "TRANSACTION_LUMP_SUM", "PLATFORM", "SERVICE", "VAT"

  - `object.calculation_breakdown.components.amount` (string, required)
    A positive cash amount, as a decimal string with up to two decimal places.

  - `object.replaced_collection_id` (string)
    The unique identifier of the fee collection, as a UUID.

  - `webhook_id` (string, required)
    Webhook unique identifier.

## Request examples:

  - `CREATED` (unknown)

  - `FINALISED` (unknown)

## Response 200:

  - `200` (unknown)
    Request has been processed successfully.

