> For the complete documentation index, see [llms.txt](https://sahamati.gitbook.io/aa-common-service/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sahamati.gitbook.io/aa-common-service/central-registry/cr-api-details.md).

# CR API Details

The Central Registry API can be accessed using the following URL format:

> #### https\://\<path-to-cr>.sahamati.org.in/entityInfo/**{Entity\_Type}**

The *`<path-to-cr>`* varies for UAT/PROD environments and can be requested from Sahamati services.&#x20;

The Central Registry API can be used by the caller to fetch the details of all entities, subject to restrictions based on the role of the API caller (as per the role in the identity token).

API callers that present an identity `token.roles = AA` will be able to fetch details of all FIPs and FIUs (but not that of other AAs). If the request is for `Entity_type = AA`, they will get their own details only in the response.

API callers that present an identity `token.roles = FIU` will be able to fetch details of all AAs and all FIPs (but not that of other FIUs). If the request is for `Entity_type = FIU`, they will get their own details only in the response.

API callers that present an identity `token.roles = FIP` will be able to fetch details of all AAs (but not that of other FIPs or FIUs). If the request is for `Entity_type = FIP`, they will get their own details only in the response.

### Authentication Header

Every request to Central Registry API requires an authentication header present in the request.

<table><thead><tr><th width="157.68019518764805">Header Name</th><th>Description</th></tr></thead><tbody><tr><td>Authorization</td><td>Access token with prefix <code>Bearer</code> is required</td></tr></tbody></table>

### Request Type

`HTTP GET` method is expected for the Central Registry API.

#### Sample response:

```
{
    "ver": "1.0",
    "timestamp": "2020-06-01 09:09:32.0",
    "txnid": "29ae-11e8-a8d7-0210",
    "requester": {
        "name": "Bank Ltd.",
        "id": "fiu@bank"
    },
    "entityinfo": {
        "name": "Bank Ltd.",
        "id": "fiu@bank",
        "code": "BANKFIU",
        "entityhandle": "",
        "Identifiers": [
            {
                "category": "STRONG",
                "type": "MOBILE"
            }
        ],
        "baseurl": "https://fiu.bank.com/v1",
        "webviewurl": null,
        "fitypes": [
            ""
        ],
        "certificate": {
            "kty": "RSA",
            "e": "AQAB",
            "use": "sig",
            "kid": "sig-1634660208",
            "alg": "RS256",
            "n": "gn4pXGuRcuAzmqecSGEzThUXhIdy7ud2c4Pmdcl7YwhBrRfKSVPJ3sswX7pyRR_G5f_KkVILDGc8n1Fk6tmfguCC9NqdXR8js_83KOOakQgdar21pcJrpsko8nWe1PDSpihhKC6KbT1ihialRWwBkNPLtec3HDf5_pqbkqWnMwHpM19lFgavgmxCpVS2OmAx2f6Mcvz512AefgkxKKN5y6eaJc34bxZiacXrKjKnZGYMv0rl1JWkL9kajBr6ilUCsW8o1TBN3SimEawzvh1C4jApBCU94yqj8obM5-d3mwijJDUiHyDsutQBUXkM1f87fs6P5eBpvRAEZ7tw6qLzIQ"
        },
        "tokeninfo": {
            "desc": ""
        },
        "gsp": null,
        "signature": {
            "signValue": "pqYW98PLbK_PdiVGKPsqzmaIsLa7sa2aEanHa1uaLNafauUiC891"
        },
        "inboundports": null,
        "outboundports": null,
        "ips": null,
        "credentialsPk": null
    }
}
```

### Error Codes

| Code    | Description                          |
| ------- | ------------------------------------ |
| **200** | OK                                   |
| **400** | Bad Request                          |
| **401** | Unauthorized or Invalid Access Token |
| **403** | Forbidden                            |
| **404** | Not Found                            |
| **500** | Internal Server Error                |


---

# 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://sahamati.gitbook.io/aa-common-service/central-registry/cr-api-details.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.
