> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rating

> Star ratings from 0 to 5

Rating attributes are a numeric value from 0 to 5. In the UI, they are presented as a proportion of 5 stars.

There are no default rating attributes in Attio, but they can be created by users and in the API.

Only single-select rating attributes are permitted.

### Reading values

Rating attribute values have a `value` property:

<CodeGroup>
  ```jsonc Example: 3 out of 5 stars theme={"system"}
  {
    "active_from": "2023-04-03T15:21:06.447000000Z",
    "active_until": null,
    "created_by_actor": {
      /*...*/
    },
    "attribute_type": "rating",
    "value": 3
  }
  ```
</CodeGroup>

### Writing values

To write rating values, you can either pass an integer directly, or an object with a single key, `value`.

As all rating attributes are single-select, you may pass the value directly or as an array containing a single element.

<CodeGroup>
  ```json Using number theme={"system"}
  {
    "performance": 4
  }
  ```

  ```json Using object theme={"system"}
  {
    "performance": [
      {
        "value": 4
      }
    ]
  }
  ```
</CodeGroup>

### Filtering

Ratings can be filtered by the operators `$eq`, `$gte`, `$gt`,`$lte`,`$lt`. The implicit syntax does an exact equality check:

<CodeGroup>
  ```json Finding records rated 4 stars theme={"system"}
  {
    "filter": {
      "performance": 4
    }
  }
  ```

  ```json ... with more than 3 stars theme={"system"}
  {
    "filter": {
      "performance": {
        "value": {
          "$gte": 3
        }
      }
    }
  }
  ```
</CodeGroup>
