> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/public-finance/technology/architecture/low-level-design/digit-exchange.md).

# DIGIT Exchange

## Overview

The DIGIT Exchange Service is a robust data interchange platform designed to facilitate the seamless and secure exchange of digital information between two endpoints. Built with a fixed schema for headers and dynamic messaging capabilities, this service ensures reliable communication while prioritizing data integrity and confidentiality.

### Dependencies

DIGIT-exchange can implement any service if it has the same request structure as the program.

* [Program Service](/public-finance/technology/architecture/low-level-design/program-service.md)

## API Specifications

**Base Path:** /digit-exchange/

### API Contract Link

API spec [YAML is here.](https://raw.githubusercontent.com/egovernments/DIGIT-Specs/refs/heads/ifix-v2.2/Common%20Services/digit-exchange.yaml) Click below to view it in Swagger Editor.

{% embed url="<https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/egovernments/DIGIT-Specs/refs/heads/ifix-v2.2/Common+Services/digit-exchange.yaml>" %}

### APIs

{% openapi src="<https://raw.githubusercontent.com/egovernments/DIGIT-Specs/ifix-v2.2/Common%20Services/digit-exchange.yaml>" path="/exchange/EXCHANGE\_TYPE" method="post" %}
<https://raw.githubusercontent.com/egovernments/DIGIT-Specs/ifix-v2.2/Common%20Services/digit-exchange.yaml>
{% endopenapi %}

## Exchange Flow

<figure><img src="https://content.gitbook.com/content/87Hm8H5AqaC0eGkOXZPE/blobs/WDZkdoXFjlqNuA7QB6qB/ifix-digit-exchange.drawio%20(3).png" alt=""><figcaption></figcaption></figure>

## Data Model&#x20;

### DB Schema Diagram

<div align="left"><figure><img src="https://content.gitbook.com/content/87Hm8H5AqaC0eGkOXZPE/blobs/u92Rpc2gKyc7i6W2YvJ4/digit-exchange.png" alt=""><figcaption></figcaption></figure></div>

### Web Sequence Diagrams

#### Sequence of exchange between two environments

<figure><img src="https://content.gitbook.com/content/87Hm8H5AqaC0eGkOXZPE/blobs/tPPqc8ZcvFHlDxjcMKIG/image.png" alt=""><figcaption></figcaption></figure>

#### Exchange Service example of an exchange

<figure><img src="https://3242432517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F87Hm8H5AqaC0eGkOXZPE%2Fuploads%2FMl6ymtXZ2OS4w9HHDn6H%2Fimage.png?alt=media&amp;token=a8adaec9-2fe3-47e4-984c-0c59c03a0f21" alt=""><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/public-finance/technology/architecture/low-level-design/digit-exchange.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
