# New Features

CRCLA V2.1 introduces several improvements designed to make the API faster and more scalable.

## Key Highlights

* **Improved Performance:** Endpoints now return lighter responses by moving large related datasets to paginated URLs.
* **Versioning:** All v2.1 endpoints are available under the `/api/v2p1/` namespace.
* **Hyperlinked Relationships:** Instead of embedding large nested arrays, related records are now referenced by hyperlinks you can query separately.

***

## Changes to Related Endpoints

To speed up queries and improve response times, three fields that previously returned all records inline have been updated to provide paginated URLs instead.

| Field                | Type         | Documentation Link                                                                              |
| -------------------- | ------------ | ----------------------------------------------------------------------------------------------- |
| `case_documents_url` | string (URL) | [#case\_documents\_url](/api-reference-v2p1/objects/case/pagination-urls.md#case_documents_url) |
| `case_dockets_url`   | string (URL) | [#case\_dockets\_url](/api-reference-v2p1/objects/case/pagination-urls.md#case_dockets_url)     |
| `case_resources_url` | string (URL) | [#case\_resources\_url](/api-reference-v2p1/objects/case/pagination-urls.md#case_resources_url) |

These fields now return a link you can follow to retrieve related records in a paginated format.

To learn more about pagination behavior, see [Pagination](/api-reference-v2p1/new-features/pagination.md).

### Removed Fields

As part of this change, a few fields that previously contained large serialized data has been removed and replaced by the URL fields listed above:

* `case_documents`
* `case_dockets`
* `case_resources`

If your integration relied on these fields, you will now need to follow the corresponding URL to retrieve related records.

***

### Query Related Records Directly

In addition to using the `*_url` fields returned in each `Case` object, you can also **query related records directly by filtering on the `case` parameter**.

This allows you to retrieve all related resources for a case without relying only on hyperlinks.

#### Examples

* Retrieve all resources for a specific case: `/api/v2p1/resources/?case=15150`
* Retrieve all documents for a specific case: `/api/v2p1/documents/?case=15150`
* Retrieve all dockets for a specific case: `/api/v2p1/dockets/?case=15150`

To learn more about query behavior, see [Query Behavior](/api-reference-v2p1/new-features/query-behavior.md).

***

### Accessing Extracted Text from Documents

The documents endpoint returns a paginated list of document objects in results. Each document object now includes new `has_text` and `text_url` fields that provide access to extracted document text (OCR or transcription), when available.

To learn more about these fields, see [Text URL](/api-reference-v2p1/objects/document/text-url.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.clearinghouse.net/api-reference-v2p1/new-features.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
