> For the complete documentation index, see [llms.txt](https://developer.sahamati.org.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.sahamati.org.in/sahamatinet-agent-sna/integration-guide/dispatch-input-reference.md).

# Dispatch Input Reference

Your AA service sends API transaction details to SNA by calling the snalib `sna.dispatch()` method at each integration point. snalib sends these details to the SNA agent running in your infrastructure.

**SNA API:** `POST /sna/v1/aa` **snalib method:** `sna.dispatch()`

The same method and input structure are used on both the AA-FIP and AA-FIU interfaces.

#### Input Fields

| Key        | Type    | Required                   | Description                                                                                           |
| ---------- | ------- | -------------------------- | ----------------------------------------------------------------------------------------------------- |
| callType   | string  | Yes                        | Type of transaction call. See Call Types.                                                             |
| route      | string  | Yes                        | ReBIT API endpoint route, e.g. `/FI/request`                                                          |
| peerId     | string  | Yes                        | Entity ID of the peer: the FIP on the AA-FIP interface, the FIU on the AA-FIU interface               |
| peerType   | string  | Yes                        | Entity type of the peer: `FIP` or `FIU`                                                               |
| txnCorId   | string  | Yes                        | UUID correlating a request with its response. The request and its response must carry the same value. |
| customerId | string  | No                         | Customer ID related to the transaction                                                                |
| httpStatus | integer | Responses only             | HTTP status code of the response. Applies only to `responseIn` and `responseOut`.                     |
| addlAttr   | json    | Yes (at least `eventTime`) | Additional attributes. See Additional Attributes (addlAttr).                                          |
| body       | json    | Yes                        | The actual request or response body. The `encryptedFI` field may be redacted; see below.              |

#### Call Types

| callType    | Meaning                             | AA-FIP point | AA-FIU point |
| ----------- | ----------------------------------- | ------------ | ------------ |
| requestOut  | AA sends a request to the peer      | A            | E            |
| responseIn  | AA receives the peer's response     | B            | F            |
| requestIn   | AA receives a request from the peer | C            | G            |
| responseOut | AA sends its response to the peer   | D            | H            |

For every `requestOut`, call `sna.dispatch()` with a matching `responseIn` carrying the same `txnCorId`, including when the call fails, times out, or the connection drops. For every `requestIn`, call `sna.dispatch()` with a matching `responseOut`.

#### Additional Attributes Summary

| Attribute         | Required    | Applies to                                               |
| ----------------- | ----------- | -------------------------------------------------------- |
| eventTime         | Yes         | All calls, both interfaces                               |
| consentTypes      | Yes         | FI/request (AA-FIU); AA-FIP for future use               |
| cnsCorId          | Optional    | Consent APIs, both interfaces (for future use)           |
| fiuCnsId          | Optional    | Consent APIs on the AA-FIP interface (for future use)    |
| ssnCorId          | Optional    | Data-fetch APIs, both interfaces (for future use)        |
| fiuSsnId          | Optional    | Data-fetch APIs on the AA-FIP interface (for future use) |
| fiFetchEncDataLen | Conditional | FI/fetch responses, when `encryptedFI` is redacted       |

For full details of each attribute, see Additional Attributes (addlAttr).

#### Redacting encryptedFI

If you prefer not to share the encrypted FI payload with SNA, you can redact or mask the `encryptedFI` field in FI/fetch responses. Continue to send the rest of the body, and add the length of the original `encryptedFI` string as `fiFetchEncDataLen` in `addlAttr`.

#### Example: FI/request received from an FIU (Point G)

All values below are synthetic and for illustration only.

```json
{
  "callType": "requestIn",
  "route": "/FI/request",
  "peerId": "fiu-test-001",
  "peerType": "FIU",
  "txnCorId": "00000000-0000-0000-0000-000000000001",
  "customerId": "customer-test-001",
  "addlAttr": {
    "eventTime": "2026-01-01T10:00:00.000Z",
    "consentTypes": ["PROFILE", "SUMMARY", "TRANSACTIONS"],
    "ssnCorId": "session-uuid-test-001"
  },
  "body": { "...": "FI/request body as received" }
}
```

#### Example: Response sent to the FIU (Point H)

```json
{
  "callType": "responseOut",
  "route": "/FI/request",
  "peerId": "fiu-test-001",
  "peerType": "FIU",
  "txnCorId": "00000000-0000-0000-0000-000000000001",
  "httpStatus": 200,
  "addlAttr": {
    "eventTime": "2026-01-01T10:00:00.250Z",
    "consentTypes": ["PROFILE", "SUMMARY", "TRANSACTIONS"]
  },
  "body": { "...": "FI/request response as sent" }
}
```


---

# 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://developer.sahamati.org.in/sahamatinet-agent-sna/integration-guide/dispatch-input-reference.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.
