---
title: "Client Data Custom Aggregate"
method: POST
path: "/api/analytics/contributor/custom-aggregate"
tags: ["Contributor Data"]
---

# Client Data Custom Aggregate

`POST /api/analytics/contributor/custom-aggregate`

## Request

- Base URL: `https://api.creditbenchmark.com`
- URL: `https://api.creditbenchmark.com/api/analytics/contributor/custom-aggregate`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/creditbenchmark/apis/credit-benchmark-api/docs/api/analytics/contributor/custom-aggregate/post.ts> (a function with typed inputs; its response is checked against the schema)

Return client aggregate trend metrics.

## Request body

- RequestEnvelopeClientDataAggregateRequest
  - `Parameters` ClientDataAggregateRequest, required
    - `portfolio` Portfolio, required
      - `name` string, required
      - `entities` FlexibleCBPortfolio, required
        - `CBId` string[]
    - `EffectiveDateId` integer
    - `effectivedateid_min_lag_months` integer
    - `use_client_scale` boolean
    - `facet_column` string: Optional column to group by (e.g., Sector, Industry)

## Response `200`

Client data aggregate calculation successful

- ClientDataAggregateResponse: Response containing client data aggregate trend lines
  - `EffectiveDateId` integer[], required: Effective date identifiers
  - `EntityCount` integer[], required: Number of entities in client aggregate
  - `ClientPD_log` number[], required: Log-transformed client PD values
  - `ClientPD` number[], required: Client's aggregate probability of default
  - `ClientPD_index` number[], required: Client PD index value (relative to first date)
  - `ClientRating` string[], required: Client's aggregate rating
  - `ClientRatingNotch` integer[], required: Client's aggregate rating notch
  - `ExMePD_log` number[], required: Log-transformed benchmark PD values (excluding client)
  - `ExMePD` number[], required: Benchmark aggregate probability of default (excluding client)
  - `ExMePD_index` number[], required: Benchmark PD index value (relative to first date)
  - `ExMeRating` string[], required: Benchmark aggregate rating (excluding client)
  - `ExMeRatingNotch` integer[], required: Benchmark aggregate rating notch (excluding client)

## Other responses

- `400`: Bad request - invalid parameters
- `401`: Unauthorized - invalid or missing JWT token
- `403`: Forbidden - insufficient permissions or access denied
- `422`: Validation error - request parameters are invalid
- `500`: Internal server error

---

[API](https://skmtc.dev/creditbenchmark/apis/credit-benchmark-api.md) - [All operations](https://skmtc.dev/creditbenchmark/apis/credit-benchmark-api/llms.txt) - [OpenAPI document](https://skmtc.dev/creditbenchmark/apis/credit-benchmark-api/revisions/b357bbdb41e6?raw)
