> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cail.health/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cail.health/_mcp/server.

# Get aggregated PREM metrics

GET https://staging.cail.health/v1/prem/summary

Returns aggregated satisfaction metrics for the operator’s organisation across the requested reporting window. Includes total responses, average rating, low-score and high-score counts, and the per-rating distribution. Use this endpoint for dashboard summary tiles; use the list endpoint to drill into individual responses.

Reference: https://docs.cail.health/api-references/api-reference/share-feedback/summary

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: cail-api
  version: 1.0.0
paths:
  /v1/prem/summary:
    get:
      operationId: summary
      summary: Get aggregated PREM metrics
      description: >-
        Returns aggregated satisfaction metrics for the operator’s organisation
        across the requested reporting window. Includes total responses, average
        rating, low-score and high-score counts, and the per-rating
        distribution. Use this endpoint for dashboard summary tiles; use the
        list endpoint to drill into individual responses.
      tags:
        - subpackage_shareFeedback
      parameters:
        - name: periodStart
          in: query
          description: >-
            ISO 8601 lower bound for the reporting window. Defaults to the start
            of time (epoch).
          required: false
          schema:
            type: string
        - name: periodEnd
          in: query
          description: ISO 8601 upper bound for the reporting window. Defaults to now.
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Aggregated PREM metrics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PremSummaryResponse'
servers:
  - url: https://staging.cail.health
    description: https://staging.cail.health
components:
  schemas:
    PremSummaryResponse:
      type: object
      properties:
        totalResponses:
          type: number
          format: double
          description: Total number of PREM responses recorded within the reporting window.
        averageRating:
          type: number
          format: double
          description: >-
            Mean satisfaction rating across all responses (1-5), rounded to one
            decimal place.
        lowScoreCount:
          type: number
          format: double
          description: Number of responses with a rating of 2 or below.
        highScoreCount:
          type: number
          format: double
          description: Number of responses with a rating of 4 or above.
        ratingDistribution:
          type: object
          additionalProperties:
            type: integer
          description: >-
            Distribution of ratings across 1-5. Keys are numeric strings (1..5)
            mapping to the count of responses at that rating.
      required:
        - totalResponses
        - averageRating
        - lowScoreCount
        - highScoreCount
        - ratingDistribution
      title: PremSummaryResponse
  securitySchemes:
    auth0Bearer:
      type: http
      scheme: bearer

```

## Examples



**Response**

```json
{
  "totalResponses": 184,
  "averageRating": 4.3,
  "lowScoreCount": 12,
  "highScoreCount": 138,
  "ratingDistribution": {
    "1": 4,
    "2": 8,
    "3": 22,
    "4": 60,
    "5": 90
  }
}
```

**SDK Code**

```python A 30-day window with a positive distribution
import requests

url = "https://staging.cail.health/v1/prem/summary"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript A 30-day window with a positive distribution
const url = 'https://staging.cail.health/v1/prem/summary';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A 30-day window with a positive distribution
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://staging.cail.health/v1/prem/summary"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A 30-day window with a positive distribution
require 'uri'
require 'net/http'

url = URI("https://staging.cail.health/v1/prem/summary")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java A 30-day window with a positive distribution
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://staging.cail.health/v1/prem/summary")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php A 30-day window with a positive distribution
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://staging.cail.health/v1/prem/summary', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp A 30-day window with a positive distribution
using RestSharp;

var client = new RestClient("https://staging.cail.health/v1/prem/summary");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift A 30-day window with a positive distribution
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://staging.cail.health/v1/prem/summary")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```