---
title: "Entity Rating Change"
method: POST
path: "/api/analytics/entity-rating-change"
tags: ["Entity Data"]
---

# Entity Rating Change

`POST /api/analytics/entity-rating-change`

## Request

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

Return entity rating changes.

## Request body

- RequestEnvelopeEntityRatingChangeRequest
  - `Parameters` EntityRatingChangeRequest, required
    - `portfolio` Portfolio, required
      - `name` string, required
      - `entities` FlexibleCBPortfolio, required
        - `CBId` string[]
    - `EffectiveDateId` integer
    - `rating_change_months` integer
    - `use_oci` boolean
    - `use_client_scale` boolean
    - `descriptor_columns` string[]
    - `filters` RatingChangeFilters
      - `rating_change_type` 'upgrades' | 'downgrades'
      - `sort_by` string
      - `sort_descending` boolean
      - `n` integer

## Response `200`

Entity rating changes retrieved successfully

- EntityRatingChangeResponse: Response containing entity rating change data
  - `CBId` string[], required: Credit Benchmark entity identifiers
  - `CBEntityName` string[], required: Entity names
  - `CCR` string[], required: Current aggregate credit ratings
  - `CCR6M` string[], required: Credit ratings 6 months ago (or rating_change_months ago)
  - `CCR100PDMid` number[], required: Current probability of default (mid)
  - `CCR100PDMid6M` number[], required: Probability of default 6 months ago (mid)
  - `rating_change` integer[], required: Rating change in notches (negative = downgrade, positive = upgrade)
  - `pd_change` number[], required: Change in probability of default

## 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)
