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

# Retrieve a plan's cost sharing

GET https://test.api.kota.io/plans/{plan_id}/cost_sharing

Retrieves a plan's `plan_cost_sharing` object, which holds the limits that apply across the whole plan. Limits on a single benefit are on the `plan_benefit`.

Reference: https://docs.kota.io/api-reference/plan-benefits/retrieve-plan-cost-sharing

## Authentication

- `Authorization` header (bearer token, required) — Authorization header using the Bearer scheme

## Servers

- `https://test.api.kota.io` (test, default)
- `https://api.kota.io` (production)

## Request

### Path parameters

- `plan_id` (string, required) — Unique identifier for the plan. Prefixed with `pl_`.

### Headers

- `Kota-Version` (string, optional) — API version, as `yyyy-MM-dd`. Only `2026-05-16` is supported.
- `Kota-Taxonomy-Version` (string, optional) — Taxonomy version, as `yyyy-MM-dd`. The latest taxonomy is always returned, as it includes every earlier version.

## Response

### 200

OK

- `plan_id` (string, required) — Identifier of the plan. Prefixed with `pl_`.
- `items` (list of PlanCostSharingItem, required) — The limits that apply across the whole plan, such as a yearly out-of-pocket maximum.
- `extensions` (map from string to JsonNode, optional, nullable) — Extra fields with no standard equivalent. Only present when there are any.
- `object` (string, optional) — Object type. Always `plan_cost_sharing`.

## Errors

### 400 Bad Request Error

Bad Request

- `type` (string, optional, nullable)
- `title` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)
- `errors` (map from string to list of string, optional)

### 404 Not Found Error

Not Found

- `any`

## Types

### PlanCostSharingItem

- `kind` (string, required) — The limit type, for example `limit` or `oop_max`.
- `amount` (double, required) — The limit amount.
- `currency` (string, required) — Three-letter ISO 4217 currency code.
- `period` (string, required) — The period the limit covers, for example `annual` or `lifetime`.
- `direction` (string, required) — Who the limit applies to: `member_pays` or `plan_pays`.
- `note` (string, optional, nullable) — Free-text note about the limit.

### JsonNode

- `options` (JsonNodeOptions, optional)
- `parent` (JsonNode, optional)
- `root` (JsonNode, optional)

### JsonNodeOptions

- `property_name_case_insensitive` (boolean, optional)

## Examples

**Response**

```json
{
  "plan_id": "pl_3b1333d87d9d4fd6ad83ba7f6b0e951a",
  "items": [
    {
      "kind": "string",
      "amount": 123.45,
      "currency": "string",
      "period": "string",
      "direction": "string",
      "note": null
    }
  ],
  "extensions": {},
  "object": "string"
}
```

**SDK Code**

```python
import requests

url = "https://test.api.kota.io/plans/pl_3b1333d87d9d4fd6ad83ba7f6b0e951a/cost_sharing"

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

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

print(response.json())
```

```javascript
const url = 'https://test.api.kota.io/plans/pl_3b1333d87d9d4fd6ad83ba7f6b0e951a/cost_sharing';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

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

```go
package main

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

func main() {

	url := "https://test.api.kota.io/plans/pl_3b1333d87d9d4fd6ad83ba7f6b0e951a/cost_sharing"

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

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

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://test.api.kota.io/plans/pl_3b1333d87d9d4fd6ad83ba7f6b0e951a/cost_sharing")

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

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

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://test.api.kota.io/plans/pl_3b1333d87d9d4fd6ad83ba7f6b0e951a/cost_sharing")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://test.api.kota.io/plans/pl_3b1333d87d9d4fd6ad83ba7f6b0e951a/cost_sharing', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://test.api.kota.io/plans/pl_3b1333d87d9d4fd6ad83ba7f6b0e951a/cost_sharing");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test.api.kota.io/plans/pl_3b1333d87d9d4fd6ad83ba7f6b0e951a/cost_sharing")! 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()
```