> For the complete documentation index, see [llms.txt](https://help.santesuite.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.santesuite.org/developers/service-apis/health-data-service-interface-hdsi/synchronization-api.md).

# Synchronization API

{% hint style="danger" %}
This page is part of a proposed enhancement to SanteDB's APIs. It may not be present in the current version of SanteDB
{% endhint %}

## Synchronization API

OpenIZ and SanteDB's iCDR and dCDR subscription model was classically based on the [HDSI Query Syntax](/developers/service-apis/health-data-service-interface-hdsi/hdsi-query-syntax.md) using the ?\_subscription parameter which allows clients to control the type of data that they wished to receive.&#x20;

This API was useful as it allowed the server to define subscriptions with custom, optimized SQL, however it was sub-optimal in that several requests would need to be made to each resource which the dCDR would want to download.&#x20;

The new API proposes a solution whereby a client's onboarding process creates a registration of selected subscriptions which the client is creating. The server may then decide the best order of loading, and can use the UNION functionality and stored queries to obtain the list of data which needs to be subscribed to.&#x20;

It also allows the server to "prepare" a subscription batch&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.santesuite.org/developers/service-apis/health-data-service-interface-hdsi/synchronization-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
