diff --git a/.github/ISSUE_TEMPLATE/standard_change_request.md b/.github/ISSUE_TEMPLATE/standard_change_request.md new file mode 100644 index 0000000..62a0051 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/standard_change_request.md @@ -0,0 +1,52 @@ +--- +name: "Standard Change Request" +about: "Propose a change or addition to the DCI standard" +title: "[Change Request] Short Description" +labels: ["change request", "triage"] +assignees: "" +--- + +### Summary + +A short summary of the proposed change. + +--- + +### Affected Module(s) + +- [ ] Core Standard +- [ ] Disability Registry +- [ ] Farmer Registry +- [ ] CRVS +- [ ] Social Registry +- [ ] Employment System +- [ ] ID System +- [ ] Early Warning System + +--- + +### Description + +Clearly describe the issue or enhancement. Why is the change needed? What problem H7does it solve? + +--- + +### Proposed Change + +Provide the exact changes you're proposing to the standard. + +--- + +### Impact + +- [ ] Backward compatible +- [ ] Requires version bump +- [ ] Affects existing integrations + +Explain the impact on systems already using the current standard. + +--- + +### Additional Context + +Add any references, links, or diagrams that help understand the request.C7 diff --git a/.gitignore b/.gitignore index fc04581..d2a3f6b 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ proguard/ captures/ # IntelliJ +.idea *.iml .idea/workspace.xml .idea/codeStyles/Project.xml diff --git a/README.md b/README.md index 175d7ad..1791293 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # API documentation The APIs are accessible through - 1. DCI: [standards](https://spdci.github.io/standards/release/index.html) - 2. G2P Community: [specifications](https://g2p-connect.github.io/specs/release/index.html) + 1. DCI: [standards](https://standards.spdci.org/standards) ## Discussion forum @@ -10,9 +9,9 @@ To initiate any discussion please visit [discussion page](https://github.com/org **IMPORTANT NOTES:** 1. Final release for consuming these APIs (yaml, html) are available in specs/release folder. -2. Contribute to G2P Connect specification or DCI standards APIs through pull requests in respective specs/src folder. +2. Contribute to DCI standards APIs through pull requests in respective specs/src folder. 3. specs/release folder files are auto generated and it's NOT recommended to edit these directly. -4. specs/release filder API files are for final consumption by solution providers to make their services compatible with G2P Connect / DCI standards. +4. specs/release filder API files are for final consumption by solution providers to make their services compatible with DCI standards. ### Reference Links 1. Build [Instructions](./build/build_instructions.md) @@ -36,29 +35,27 @@ To initiate any discussion please visit [discussion page](https://github.com/org ├── security ├── extensions ├── dci - ├── openId - ├── fhir - ├── cdpi + ├── dr + ├── fr + ├── ibr + ├── social ├── registry ├── schema - ├── core - ├── civil - ├── farmer - ├── disability + ├── dr + ├── fr + ├── ibr + ├── schema + ├── social ├── registry_core_api_v1.0.0.yaml - ├── registry_civil_api_v1.0.0.yaml - ├── registry_nid_api_v1.0.0.yaml - ├── registry_farmer_api_v1.0.0.yaml - ├── registry_disability_api_v1.0.0.yaml + ├── social_api_v1.0.0.yaml + ├── dr_api_v1.0.0.yaml + ├── fr_api_v1.0.0.yaml + ├── ibr_api_v1.0.0.yaml ├── mapper ├── schema ├── core ├── fa - ├── mapper_core_api_v1.0.0.yaml - ├── disbure - ├── schema - ├── core - ├── disburse_core_api_v1.0.0.yaml + ## Change request diff --git a/build/build_apis.cmd b/build/build_apis.cmd index c6e82b0..b45bfb8 100755 --- a/build/build_apis.cmd +++ b/build/build_apis.cmd @@ -1,13 +1,32 @@ -# This file auto generates all g2p connect yaml files. -# Assumes the command is run from the root folder i.e ./specs +# This file auto generates all yaml files. +# Assumes the command is run from the root folder i.e ./standards # For each new category, please make sure to add a reference link in this file for easy auto generation of yamls. +# build auth APIs swagger-cli -f 2 -t yaml bundle ./src/authz/authz_core_api_v1.0.0.yaml -o ./release/yaml/authz_core_api_v1.0.0.yaml -swagger-cli -f 2 -t yaml bundle ./src/registry/registry_core_api_v1.0.0.yaml -o ./release/yaml/registry_core_api_v1.0.0.yaml -swagger-cli -f 2 -t yaml bundle ./src/mapper/mapper_core_api_v1.0.0.yaml -o ./release/yaml/mapper_core_api_v1.0.0.yaml -swagger-cli -f 2 -t yaml bundle ./src/disburse/disburse_core_api_v1.0.0.yaml -o ./release/yaml/disburse_core_api_v1.0.0.yaml - redocly build-docs ./release/yaml/authz_core_api_v1.0.0.yaml -o ./release/html/authz_core_api_v1.0.0.html + +# build APIs +swagger-cli -f 2 -t yaml bundle ./src/registry/registry_core_api_v1.0.0.yaml -o ./release/yaml/registry_core_api_v1.0.0.yaml redocly build-docs ./release/yaml/registry_core_api_v1.0.0.yaml -o ./release/html/registry_core_api_v1.0.0.html -redocly build-docs ./release/yaml/mapper_core_api_v1.0.0.yaml -o ./release/html/mapper_core_api_v1.0.0.html -redocly build-docs ./release/yaml/disburse_core_api_v1.0.0.yaml -o ./release/html/disburse_core_api_v1.0.0.html \ No newline at end of file + +swagger-cli -f 2 -t yaml bundle ./src/registry/ibr_api_v1.0.0.yaml -o ./release/yaml/ibr_api_v1.0.0.yaml +redocly build-docs ./release/yaml/ibr_api_v1.0.0.yaml -o ./release/html/ibr_api_v1.0.0.html + +swagger-cli -f 2 -t yaml bundle ./src/registry/social_api_v1.0.0.yaml -o ./release/yaml/social_api_v1.0.0.yaml +redocly build-docs ./release/yaml/social_api_v1.0.0.yaml -o ./release/html/social_api_v1.0.0.html + + +# build locations APIs +swagger-cli -f 2 -t yaml bundle ./src/locations/locations_core_api_v1.0.0.yaml -o ./release/yaml/locations_core_api_v1.0.0.yaml +redocly build-docs ./release/yaml/locations_core_api_v1.0.0.yaml -o ./release/html/locations_core_api_v1.0.0.html + +# build jwks APIs +swagger-cli -f 2 -t yaml bundle ./src/jwks/jwks_core_api_v1.0.0.yaml -o ./release/yaml/jwks_core_api_v1.0.0.yaml +redocly build-docs ./release/yaml/jwks_core_api_v1.0.0.yaml -o ./release/html/jwks_core_api_v1.0.0.html + + +# swagger-cli -f 2 -t yaml bundle ./src/mapper/mapper_core_api_v1.0.0.yaml -o ./release/yaml/mapper_core_api_v1.0.0.yaml +# swagger-cli -f 2 -t yaml bundle ./src/disburse/disburse_core_api_v1.0.0.yaml -o ./release/yaml/disburse_core_api_v1.0.0.yaml +# redocly build-docs ./release/yaml/mapper_core_api_v1.0.0.yaml -o ./release/html/mapper_core_api_v1.0.0.html +# redocly build-docs ./release/yaml/disburse_core_api_v1.0.0.yaml -o ./release/html/disburse_core_api_v1.0.0.html diff --git a/build/build_instructions.md b/build/build_instructions.md index 4a5af45..26bccaf 100644 --- a/build/build_instructions.md +++ b/build/build_instructions.md @@ -66,3 +66,11 @@ bundled successfully in: ./release/html/registry_core_api_v1.0.0.html ``` 6. Commit the changes and push the updated code to git repo. Create pull requests for teams to collaborate and merge to main branch! + +## How this published on website + +The github actions used to publish this as website, you can map branch / folder which to be published as webpages root path. + +Below link will help to understand how it works + +https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..4f14cf2 --- /dev/null +++ b/changelog.md @@ -0,0 +1,26 @@ +# DCI Standards – Changelog + +All notable changes to this project are documented in this file. +This project follows [semantic versioning](https://semver.org/). + +# Release Notes + +## [1.0.0] – 2025-09-19 + +### Decision Summary +- +- +- + +--- + +### Changes + +| Type | Field / Item | Description | Ref / Notes | +|--------------- |-------------------------------|------------------------------ |-------------| +| 🟢 **Added** |-------------------------------|------------------------------ |-------------| +| 🔴 **Breaking** |-------------------------------|------------------------------ |-------------| +| ❌ **Removed** |-------------------------------|------------------------------ |-------------| +| 🟡 **Updated** |-------------------------------|------------------------------ |-------------| + + diff --git a/errors.json b/errors.json new file mode 100644 index 0000000..a2f452a --- /dev/null +++ b/errors.json @@ -0,0 +1,175 @@ +{ + "totals": { + "errors": 11, + "warnings": 0, + "ignored": 0 + }, + "version": "1.16.0", + "problems": [ + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1search/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1on-search/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1subscribe/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1on-subscribe/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1notify/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1unsubscribe/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1on-unsubscribe/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1txn~1status/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1txn~1on-status/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1sync~1search/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + }, + { + "ruleId": "security-defined", + "severity": "error", + "message": "There is no `Authorization` security scheme defined.", + "location": [ + { + "source": { + "ref": "src/registry/crvs_api_v1.0.0.yaml" + }, + "pointer": "#/paths/~1registry~1sync~1txn~1status/post/security/0/Authorization", + "reportOnKey": true + } + ], + "suggest": [] + } + ] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..558bb19 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "standards", + "lockfileVersion": 2, + "requires": true, + "packages": {} +} diff --git a/profiles/CONTRIBUTING.md b/profiles/CONTRIBUTING.md new file mode 100644 index 0000000..ba1e075 --- /dev/null +++ b/profiles/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Policy on Local Profile Submission for DCI Standards + +To ensure **consistency, transparency, and quality**, all local profiles within the DCI Standards must be submitted, reviewed, and approved according to the following workflow. + +--- + +## 📥 Submission + +- Profiles (**apis and associated metadata**) must be submitted as a **GitHub Pull Request (PR)** to the DCI standards repository. +- Submissions must follow: + - Prescribed api guidelines + - Metadata format + - Naming conventions + +**Each PR must include:** +1. API definition +2. Metadata description (version, authorship, intended use case) +3. Changelog entry (for updates) + +--- + +## 📂 Repository Management Team Review + +**Responsibilities:** +- ✅ Triage new PRs for completeness and adherence to contribution guidelines +- ✅ Check formatting, metadata, and file placement +- ✅ Assign PRs to the **Standards Development Team** for technical review +- ✅ Ensure process transparency by tagging and labeling PRs appropriately + +--- + +## 🛠 Standards Development Team Review + +**Responsibilities:** +- 🔍 Conduct a technical evaluation of the submitted profile, verifying: + - Alignment with **DCI interoperability principles** + - Consistency with existing profiles + - Backward compatibility (where relevant) + +- 🔄 Request changes and provide technical feedback directly on the PR +- 👍 Approve or 👎 reject submissions based on technical merit and compliance + +--- + +## ✅ Approval & Registry Update + +Once **approved** by the Standards Development Team: + +- The profile is **marked as approved** in `registry-index.yaml` +- The PR is **merged** into the main branch of the repository +- The profile becomes an **official DCI-compliant profile** + +--- diff --git a/profiles/README.md b/profiles/README.md new file mode 100644 index 0000000..969974e --- /dev/null +++ b/profiles/README.md @@ -0,0 +1,90 @@ +## Profile Submission Policy + +All local profiles must be submitted via Pull Request and follow the DCI review workflow. +See the full policy and workflow [here](./CONTRIBUTING.md). + +# Template Profile for SPD-CI APIs + +This folder provides a **template profile** for SPD-CI APIs. A **profile** is a localized or implementation-specific adaptation of the base API specifications, ensuring compliance with **DCI standards**. + +The template profile allows **country or organization implementers** to copy it and add their customizations while referencing the main SPD-CI APIs. + +--- + +## Purpose + +A profile may: + +* Restrict API endpoints to specific enumerations or parameters. +* Add optional or required fields relevant to the local context. +* Remove unnecessary endpoints or parameters from the base API. +* Provide sample request/response payloads aligned with the profile. + +--- + +## How to Create a New Profile + +1. **Copy this folder** and rename it to your country or organization name, e.g.: + `profiles/uganda/` + +2. Update the `profile-metadata.yaml` with: + + * Profile name and description. + * Country, language, and version information. + * Contact details for maintainers. + * Links to relevant documentation. + * Pointer to your `apis.yaml` file. + +3. Create or update the `apis.yaml` file to define which API specifications your profile includes: + + * By default, reference APIs from `common/` and `extensions/` in the main `spdci-api` repo. + * If your country/organization modifies an API (e.g., adds a custom endpoint), copy that API definition into your profile folder, make the changes, and reference the new file in `apis.yaml`. + * This way, only changed APIs are duplicated, while the rest continue to point to the base `common/` and `extensions/`. + + Example `apis.yaml`: + + ``` + includes: + - common/v1/registry_core_api_v1.0.0.yaml + - profiles/uganda/extensions/social/v1/social_api_v1.0.0.yaml # override + ``` + +4. Validate your profile against the base APIs to ensure compliance. + +5. Submit your profile as a **pull request** to this repository. + +--- + +## Notes + +* Profiles should **not overwrite the base APIs directly**; instead, they extend or override them via their own `apis.yaml`. +* Each profile has its own `apis.yaml` that acts as the authoritative list of included APIs. +* Only modified APIs should be copied into a profile directory; all unchanged files continue to reference `common/` and `extensions/`. +* Changes should be tracked in version control for transparency. + +--- + +## Directory Structure + +``` +template_profile/ +├── src # Profile-specific adaptations referencing main APIs +│ ├── common # Optional overrides or extensions +│ ├── extensions # Optional extensions (CRVS, FR, DR) +│ ├── registry # Profile adaptations for registry APIs +├── build # files generate +├── profile-metadata.yaml # Metadata describing the profile +└── apis.yaml # Lists the APIs included in the profile +``` + +--- + +## Build Instructions + +See the main [SPD-CI API Build Instructions](../build/build_instructions.md) to generate release artifacts. + +--- + +## Discussion Forum + +For questions, issues, or discussion regarding profiles, visit the [SPD-CI Discussions](https://github.com/orgs/spdci/discussions). diff --git a/profiles/registry-index.yaml b/profiles/registry-index.yaml new file mode 100644 index 0000000..e7a0794 --- /dev/null +++ b/profiles/registry-index.yaml @@ -0,0 +1,76 @@ +registries: + - name: core + slug: common + description: Profiles for Core DCI API. + countries: + - code: + name: + path: + version: 1.0.0 + last_updated: + maintainer: + - name: CRVS + slug: crvs + description: Profiles for Civil registry API. + countries: + - code: + name: + path: + version: 1.0.0 + last_updated: 2025-08-12 + maintainer: + - name: Social Registry + slug: sr + description: Profiles for social registry API. + countries: + - code: + name: + path: + version: 1.0.0 + last_updated: 2025-08-12 + maintainer: + + - name: Integrated Beneficiary Registry + slug: IBR + description: Profiles for IBR API. + countries: + - code: + name: + path: + version: + last_updated: + maintainer: + + - name: Disability Registry + slug: DR + description: Profiles for Disability Registry API. + countries: + - code: + name: + path: + version: + last_updated: + maintainer: + + - name: Farmer Registry + slug: fr + description: Profiles for farmer registry API. + countries: + - code: + name: + path: + version: 1.0.0 + last_updated: + maintainer: + + - name: Employment Registry + slug: Er + description: Profiles for Employment registry API. + countries: + - code: + name: + path: + version: 1.0.0 + last_updated: + maintainer: + diff --git a/profiles/template_profile/apis.yaml b/profiles/template_profile/apis.yaml new file mode 100644 index 0000000..14bc6d9 --- /dev/null +++ b/profiles/template_profile/apis.yaml @@ -0,0 +1,17 @@ +includes: + # Core APIs + - build/release/yaml/registry_core_api_v1.0.0.yaml + - build/release/yaml/social_api_v1.0.0.yaml + - build/release/yaml/ibr_api_v1.0.0.yaml + - build/release/yaml/dr_api_v1.0.0.yaml + - build/release/yaml/fr_api_v1.0.0.yaml + - build/release/html/registry_core_api_v1.0.0.html + - build/release/html/social_api_v1.0.0.html + - build/release/html/ibr_api_v1.0.0.html + - build/release/html/dr_api_v1.0.0.html + - build/release/html/fr_api_v1.0.0.html + + # Example override for implementer-specific API + # - profiles//release/yaml/fr_api_v1.0.0.yaml # override + + diff --git a/profiles/template_profile/profile-metadata.yaml b/profiles/template_profile/profile-metadata.yaml new file mode 100644 index 0000000..770e819 --- /dev/null +++ b/profiles/template_profile/profile-metadata.yaml @@ -0,0 +1,36 @@ +profileName: "Template Profile" +description: "This is a template for creating localized profiles of the DCI standards." +version: "1.0.0" +baseSchemaVersion: "v1.0.0" + +country: + name: "Country Name" + isoCode: "XXX" +language: "en" + +maintainer: + organization: "Your Organization Name" + contactEmail: "contact@example.org" + website: "https://example.org" + +applicableModules: + - Core Standard + - Farmer Registry + - Disability Registry + - Social Registry + - CRVS + - Employment System + - ID System + - Early Warning System + +apisIndex: "apis.yaml" + +changeLog: + - date: "YYYY-MM-DD" + author: "Your Name" + description: "Initial creation from template." + +notes: + - "Explain any deviations from the base APIs here." + - "List additional code lists or reference documents." + diff --git a/release/html/authz_core_api_v1.0.0.html b/release/html/authz_core_api_v1.0.0.html index 26c1c12..c1ef7ae 100644 --- a/release/html/authz_core_api_v1.0.0.html +++ b/release/html/authz_core_api_v1.0.0.html @@ -12,367 +12,354 @@ margin: 0; } - -

Interoperability APIs - Authz (1.0.0)

Download OpenAPI specification:Download

G2P Connect: info@cdpi.dev License: CDPI CC BY-SA 4.0

Provide access_token to registered clients/services. Issue OAuth2 compliant authorization token.

-

AUTHZ-TOKN : /oauth2/client/token


Client integration notes:
1. This end point is in compliance with OAuth2 RFC 6749 to authenticate registered confidential clients with grant_type=client_credentials over HTTPS channel.
2. Clients MUST obtain client_id, client_secret as part of client registration.
2. Clients MUST ensure to secure sensitive information e.g, client_secret, access_token, etc.,
3. RFC 6749 section 4.4.3 recommends NO support for refresh access_token.
4. Successfully authenticated clients SHALL receive bearer type access_token.
5. Clients MUST set HTTP "Authorization: Bearer " in HTTP header to access any g2p compliant api end points.
6. Rest end points SHALL return http status 401 when access_token is invalid or expired.

-
Authorizations:
Authorization
header Parameters
accept-language
string
Example: en

Default value: en

-
timestamp
required
string
Example: Tue, 06 Mar 2020 21:00:00 GMT

request timestamp in HTTP Date format - Tue, 06 Mar 2020 21:00:00 GMT

-
message_id
string
Example: 123456789020211216223812

Unique message id to communicate between sender and receiver systems and it's scope is restricted to transport layer only to successfully devier the message between sender and receiver.

-
Request Body schema: application/x-www-form-urlencoded
grant_type
required
string

Value must be set to client_credentials

-
client_id
required
string

The client identifier issued to the client during the registration process described by RFC 6749 Section 2.2.

-
client_secret
required
string

client secret shared to clients as part of client registration process or regualar rotation of client_secret.

-
scope
string (OidcScope)

OIDC complaint auth tokens issued by an authorization service for OAuth2, OIDC complaint clients.

This is an indicative list:
disburse, on-disburse, disburse/status, disburse/on-status, mapper/link, mapper/unlink, etc.,

-

Responses

Response samples

Content type
application/json
{
  • "access_token": "2YotnFZFEjr1zCsicMWpAA",
  • "token_type": "bearer",
  • "expires_in": "36000"
}
+ " fill="currentColor">

Interoperability APIs - Authz (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

Provide access_token to registered clients/services. Issue OAuth2 compliant authorization token.

+

AUTHZ-TOKN : /oauth2/client/token


Client integration notes:
1. This end point is in compliance with OAuth2 RFC 6749 to authenticate registered confidential clients with grant_type=client_credentials over HTTPS channel.
2. Clients MUST obtain client_id, client_secret as part of client registration.
2. Clients MUST ensure to secure sensitive information e.g, client_secret, access_token, etc.,
3. RFC 6749 section 4.4.3 recommends NO support for refresh access_token.
4. Successfully authenticated clients SHALL receive bearer type access_token.
5. Clients MUST set HTTP "Authorization: Bearer " in HTTP header to access any g2p compliant api end points.
6. Rest end points SHALL return http status 401 when access_token is invalid or expired.

+
Authorizations:
Authorization
header Parameters
accept-language
string
Example: en

Default value: en

+
timestamp
required
string
Example: Tue, 06 Mar 2020 21:00:00 GMT

request timestamp in HTTP Date format - Tue, 06 Mar 2020 21:00:00 GMT

+
message_id
string
Example: 123456789020211216223812

Unique message id to communicate between sender and receiver systems and it's scope is restricted to transport layer only to successfully devier the message between sender and receiver.

+
Request Body schema: application/x-www-form-urlencoded
required
grant_type
required
string

Value must be set to client_credentials

+
client_id
required
string

The client identifier issued to the client during the registration process described by RFC 6749 Section 2.2.

+
client_secret
required
string

client secret shared to clients as part of client registration process or regualar rotation of client_secret.

+
scope
string (OidcScope)

OIDC complaint auth tokens issued by an authorization service for OAuth2, OIDC complaint clients.

This is an indicative list:
disburse, on-disburse, disburse/status, disburse/on-status, mapper/link, mapper/unlink, etc.,

+

Responses

Response samples

Content type
application/json
{
  • "access_token": "2YotnFZFEjr1zCsicMWpAA",
  • "token_type": "bearer",
  • "expires_in": "36000"
}
+ + + + + +

Interoperability APIs - CRVS (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

The CRVS interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between CRVS registry and SP system. +You can now help us improve the API whether it's by making changes to the definition itself or to the code. +That way, with time, we can improve the API in general, and expose some of the new features in upcoming version.

+
    +
  1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query
  2. +
  3. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point
  4. +
  5. Request status check: The request status checking APIs implement to check status of request sent in any above APIs
  6. +
+

Gitbook reference link:

+ +

Code directory links:

+ +

Data Objects:

+ +

Each request is build up of three parts

+
    +
  • signature
  • +
  • header
  • +
  • message
  • +
+

Async

Async endpoints

+

/registry/subscribe

Subscribe to a life event with registry

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeRequest (object) or EncryptedMessage (object)

Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-subscribe

Subscribe results through callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeResponse (object) or EncryptedMessage (object)

Subscription information

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/notify

Registry to notify a life event to subscrbiers

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
NotifyEventRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/unsubscribe

Unsubscribe existing subscription(s) by subscription_code

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeRequest (object) or EncryptedMessage (object)

The unsubscribe request that contain subscription ids which to be removed from subscription list

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-unsubscribe

Unsubscribe response as a callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/status

Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s)

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/on-status

Response to async status check of previous civil registrt transanctions using callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

+

/registry/sync/txn/status

Sync status check of registry Async APIs

+
Authorizations:
Authorization
Request Body schema: application/json
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

SearchRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
    +
  1. Batch requests enable multiple individual requests with respective consent/authorize codes
  2. +
+
{
  • "transaction_id": "XZFHYTY",
  • "search_request": [
    ]
}

SearchResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "subscribe_request": [
    ]
}

SubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "subscribe_response": [
    ]
}

NotifyEventRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "notify_event": [
    ]
}

UnSubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
subscription_codes
required
Array of strings[ items <= 99 characters ]
{
  • "transaction_id": "XZFHYTY",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
status
required
string
Enum: "rcvd" "pdng" "succ" "rjct"

Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected

+
status_reason_code
string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
status_reason_message
string <= 999 characters

Status reason code message. Helps actionanble messaging for systems/end users

+
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "status": "rcvd",
  • "status_reason_code": "rjct.reference_id.invalid",
  • "status_reason_message": "string",
  • "subscription_status": [
    ]
}

TxnStatusRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "txnstatus_response": {
    }
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

+
encrypted_key
required
string

The base64-url encoded encrypted key

+
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

+
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

+
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.search_criteria.invalid" "rjct.filter.invalid" "rjct.sort.invalid" "rjct.pagination.invalid" "rjct.search.too_many_records_found"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"

SubscribeStatusReasonCode

string (SubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.notify_types.invalid" "rjct.notify_details.invalid" "rjct.person_id.invalid" "rjct.event.already_subscribed"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"

UnSubscribeStatusReasonCode

string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"
+ + + + diff --git a/release/html/dci-logo.png b/release/html/dci-logo.png new file mode 100644 index 0000000..e649819 Binary files /dev/null and b/release/html/dci-logo.png differ diff --git a/release/html/disburse_core_api_v1.0.0.html b/release/html/disburse_core_api_v1.0.0.html deleted file mode 100644 index 523fa45..0000000 --- a/release/html/disburse_core_api_v1.0.0.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - - - Interoperability APIs - G2P Disbursements - - - - - - - - - -

Interoperability APIs - G2P Disbursements (1.0.0)

Download OpenAPI specification:Download

G2P Connect: info@cdpi.dev License: CDPI CC BY-SA 4.0
    -
  1. Category: G2P Disbursements
  2. -
  3. Feature: Enable G2P Disbursements with reconciliation
  4. -
  5. Specification Level: Draft
  6. -
-

Async

Async endpoints

-

/disburse

Initiate payment through disbursement instructions

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
DisburseRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/on-disburse

Disburse response through callback

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
DisburseResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/disburse/txn/status

Status check of previous disbursement transanctions using transaction_id and/or reference_id(s)

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/disburse/txn/on-status

Status check response through callback

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

-

/disburse/sync/disburse

Initiate payment through disbursement instructions through sync call

-
Authorizations:
Authorization
Request Body schema: application/json
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
DisburseRequest (object) or EncryptedMessage (object)

The search data using which registry search to be performed

-

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/disburse/sync/txn/status

Sync status check of disburse Async APIs

-
Authorizations:
Authorization
Request Body schema: application/json
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

DisburseRequest

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
Array of objects
{
  • "transaction_id": 123456789,
  • "disbursements": [
    ]
}

DisburseResponse

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "disbursements_status": [
    ]
}

SearchRequest

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "search_criteria": [
    ]
}

SearchResponse

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "disbursements_status": [
    ]
}

TxnStatusRequest

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
object
{
  • "transaction_id": 123456789,
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
correlation_id
required
string <= 99 characters
    -
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. -
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. -
-
required
object
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "txnstatus_response": {
    }
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

-
encrypted_key
required
string

The base64-url encoded encrypted key

-
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

-
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

-
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

DisburseStatusReasonCode

string (DisburseStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.payer_fa.invalid" "rjct.payee_fa.invalid" "rjct.amount.invalid" "rjct.schedule_ts.invalid" "rjct.currency_code.invalid"

Disbursement status reason codes

-
"rjct.reference_id.invalid"

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.request_type.invalid" "rjct.attribute_type.invalid" "rjct.srch_transaction_id.invalid" "rjct.srch_transaction_id.not_found" "rjct_srch_reference_id.invalid" "rjct_srch_reference_id.not_found" "rjct.srch.too_many_records_found" "rjct.srch_payer_fa.invalid" "rjct.srch_payee_fa.invalid" "rjct.share_attributes.invalid"

Disbursement search reason codes

-
"rjct.reference_id.invalid"
- - - - diff --git a/release/html/dr_api_v1.0.0.html b/release/html/dr_api_v1.0.0.html new file mode 100644 index 0000000..31f89ab --- /dev/null +++ b/release/html/dr_api_v1.0.0.html @@ -0,0 +1,886 @@ + + + + + + Interoperability APIs - Disability registries + + + + + + + + + +

Interoperability APIs - Disability registries (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

The Disability Registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between Disability registry and SP system. +You can now help us improve the API whether it's by making changes to the definition itself or to the code. +That way, with time, we can improve the API in general, and expose some of the new features in upcoming version.

+
    +
  1. Search: The Search API provides functionality to search disabled people based on demographic, identifiers and custom query
  2. +
  3. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point
  4. +
  5. Request status check: The request status checking APIs implement to check status of request sent in any above APIs
  6. +
+

Gitbook reference link:

+ +

Code directory links:

+ +

Data Objects:

+ +

Each request is build up of three parts

+
    +
  • signature
  • +
  • header
  • +
  • message
  • +
+

Async

Async endpoints

+

/registry/subscribe

Subscribe to a life event with registry

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeRequest (object) or EncryptedMessage (object)

Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-subscribe

Subscribe results through callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeResponse (object) or EncryptedMessage (object)

Subscription information

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/notify

Registry to notify a life event to subscrbiers

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
NotifyEventRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/unsubscribe

Unsubscribe existing subscription(s) by subscription_code

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeRequest (object) or EncryptedMessage (object)

The unsubscribe request that contain subscription ids which to be removed from subscription list

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-unsubscribe

Unsubscribe response as a callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/status

The /registry/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/on-status

The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well.

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

+

/registry/sync/get-disability-support

check if member is registered as disabled

+
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
GetDisabilitySupportRequest (object) or EncryptedMessage (object)

The search data using which registry search to be performed

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/sync/get-disability-details

check if member is registered as disabled

+
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
GetDisabilitySupportRequest (object) or EncryptedMessage (object)

The search data using which registry search to be performed

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/sync/get-disability-status

check if member is registered as disabled

+
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
DisabledRequest (object) or EncryptedMessage (object)

The search data using which registry search to be performed

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

SearchRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
    +
  1. Batch requests enabel multiple individual requests with respective consent/authorize codes
  2. +
+
{
  • "transaction_id": "XZFHYTY",
  • "search_request": [
    ]
}

SearchResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "subscribe_request": [
    ]
}

SubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "subscribe_response": [
    ]
}

UnSubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
subscription_codes
required
Array of strings[ items <= 99 characters ]
{
  • "transaction_id": "XZFHYTY",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
status
required
string
Enum: "rcvd" "pdng" "succ" "rjct"

Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected

+
status_reason_code
string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
status_reason_message
string <= 999 characters

Status reason code message. Helps actionanble messaging for systems/end users

+
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "status": "rcvd",
  • "status_reason_code": "rjct.reference_id.invalid",
  • "status_reason_message": "string",
  • "subscription_status": [
    ]
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

+
encrypted_key
required
string

The base64-url encoded encrypted key

+
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

+
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

+
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.search_criteria.invalid" "rjct.filter.invalid" "rjct.sort.invalid" "rjct.pagination.invalid" "rjct.search.too_many_records_found"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"

SubscribeStatusReasonCode

string (SubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.notify_types.invalid" "rjct.notify_details.invalid" "rjct.person_id.invalid" "rjct.event.already_subscribed"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"

UnSubscribeStatusReasonCode

string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"
+ + + + diff --git a/release/html/ess_api_v1.0.0.html b/release/html/ess_api_v1.0.0.html new file mode 100644 index 0000000..65b8159 --- /dev/null +++ b/release/html/ess_api_v1.0.0.html @@ -0,0 +1,940 @@ + + + + + + Interoperability APIs - Employment Support System + + + + + + + + + +

Interoperability APIs - Employment Support System (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

The ESS(Employment Support System) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between ESS and SP-System. +You can now help us improve the API whether it's by making changes to the definition itself or to the code. +That way, with time, we can improve the API in general, and expose some of the new features in upcoming version.

+
    +
  1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query
  2. +
  3. checkEnrolment : the check-enrolled API is a special type of search to return the enrolment status , can be executed from SP to ESS or vice versa
  4. +
+

Gitbook reference link[WIP]:

+ +

Code directory links:

+ +

Data Objects:

+ +

Each request is build up of three parts

+
    +
  • signature
  • +
  • header
  • +
  • message
  • +
+

Information about each part is given below

+

Signature:

+
    +
  • The signature is used to verify the integrity of the message.
  • +
  • The signature is a hash of the message and is encrypted using the private key of the sender.
  • +
  • The receiver can verify the signature using the public key of the sender.
  • +
+

Header:

+
    +
  • The header contains information about various message header, refer to the header schema for more details.
  • +
+

Message:

+
    +
  • The message contains the actual payload of the message.
  • +
  • Refer example section to get sample data and also read Gitbook for details data objects
  • +
  • The receiver can decrypt the message using the private key of the "err.receiver_id.invalid"
  • +
+

Async

Async endpoints

+

/registry/subscribe

Subscribe to a change event with registry

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeRequest (object) or EncryptedMessage (object)

Subscription request which contain query with frequency and other info on which notification to be sent by registry to subscriber

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

/registry/on-subscribe

Subscribe results through callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeResponse (object) or EncryptedMessage (object)

Subscription information

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

/registry/notify

Registry to notify an event to subscribers

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
NotifyEventRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

/registry/unsubscribe

Unsubscribe existing subscription(s) by subscription_code

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeRequest (object) or EncryptedMessage (object)

The unsubscribe request that contain subscription ids which to be removed from subscription list

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

/registry/on-unsubscribe

Unsubscribe response as a callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

/registry/txn/status

The /registry/txn/status will be implemented by ESS or SP-System. This will check status of reach request using transaction_id and/or reference_id(s).

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

/registry/txn/on-status

The /registry/txn/on-status will be implemented by receiver system. The response with information about request and in some case it may contain data as well.

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "message": {
    }
}

Sync

Sync endpoints

+

/registry/sync/check-enrollment

check status of a person if remain enrolled

+
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
EnrolledRequest (object) or EncryptedMessage (object)

The search data using which registry search to be performed

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

SearchRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
    +
  1. Batch requests enable multiple individual requests with respective consent/authorize codes
  2. +
+
{
  • "transaction_id": "XZFHYTY",
  • "search_request": [
    ]
}

SearchResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "subscribe_request": [
    ]
}

SubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "subscribe_response": [
    ]
}

NotifyEventRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "notify_event": [
    ]
}

UnSubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
subscription_codes
required
Array of strings (SubscriptionCode) [ items <= 99 characters ]
{
  • "transaction_id": "XZFHYTY",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
status
required
string
Enum: "rcvd" "pdng" "succ" "rjct"

Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected

+
status_reason_code
string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
status_reason_message
string <= 999 characters

Status reason code message. Helps actionanble messaging for systems/end users

+
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "status": "rcvd",
  • "status_reason_code": "rjct.reference_id.invalid",
  • "status_reason_message": "string",
  • "subscription_status": [
    ]
}

EnrolledRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
object

Enrolled query

+
{
  • "transaction_id": "XZFHYTY",
  • "enrolled_criteria": {
    }
}

EnrolledResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "enrolled_response": [
    ]
}

TxnStatusRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "txnstatus_response": {
    }
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

+
encrypted_key
required
string

The base64-url encoded encrypted key

+
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

+
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

+
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.search_criteria.invalid" "rjct.filter.invalid" "rjct.sort.invalid" "rjct.pagination.invalid" "rjct.search.too_many_records_found"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"
+ + + + diff --git a/release/html/fr_api_v1.0.0.html b/release/html/fr_api_v1.0.0.html new file mode 100644 index 0000000..ceed35a --- /dev/null +++ b/release/html/fr_api_v1.0.0.html @@ -0,0 +1,900 @@ + + + + + + Interoperability APIs - Farmer registries + + + + + + + + + +

Interoperability APIs - Farmer registries (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

The Farmer registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between Farmer registry and SP system. +You can now help us improve the API whether it's by making changes to the definition itself or to the code. +That way, with time, we can improve the API in general, and expose some of the new features in upcoming version.

+
    +
  1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query
  2. +
  3. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in farmer registry it sends event details on notify end point
  4. +
  5. Request status check: The request status checking APIs implement to check status of request sent in any above APIs
  6. +
+

Gitbook reference link:

+ +

Code directory links:

+ +

Data Objects:

+ +

Each request is build up of three parts

+
    +
  • signature
  • +
  • header
  • +
  • message
  • +
+

Async

Async endpoints

+

/registry/notify

Registry to notify an event to subscribers

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
NotifyEventRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/subscribe

Subscribe to a life event with registry

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeRequest (object) or EncryptedMessage (object)

Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-subscribe

Subscribe results through callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeResponse (object) or EncryptedMessage (object)

Subscription information

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/unsubscribe

Unsubscribe existing subscription(s) by subscription_code

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeRequest (object) or EncryptedMessage (object)

The unsubscribe request that contain subscription ids which to be removed from subscription list

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-unsubscribe

Unsubscribe response as a callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/status

The /registry/txn/status will be implemented by FR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/on-status

The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well.

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

+

/registry/sync/txn/status

The /registry/sync/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Request Body schema: application/json
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

SearchRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
    +
  1. Batch requests enabel multiple individual requests with respective consent/authorize codes
  2. +
+
{
  • "transaction_id": "XZFHYTY",
  • "search_request": [
    ]
}

SearchResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "subscribe_request": [
    ]
}

SubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "subscribe_response": [
    ]
}

NotifyEventRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "notify_event": [
    ]
}

UnSubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
subscription_codes
required
Array of strings[ items <= 99 characters ]
{
  • "transaction_id": "XZFHYTY",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
status
required
string
Enum: "rcvd" "pdng" "succ" "rjct"

Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected

+
status_reason_code
string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
status_reason_message
string <= 999 characters

Status reason code message. Helps actionanble messaging for systems/end users

+
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "status": "rcvd",
  • "status_reason_code": "rjct.reference_id.invalid",
  • "status_reason_message": "string",
  • "subscription_status": [
    ]
}

TxnStatusRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "txnstatus_response": {
    }
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

+
encrypted_key
required
string

The base64-url encoded encrypted key

+
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

+
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

+
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.search_criteria.invalid" "rjct.filter.invalid" "rjct.sort.invalid" "rjct.pagination.invalid" "rjct.search.too_many_records_found"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"

SubscribeStatusReasonCode

string (SubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.notify_types.invalid" "rjct.notify_details.invalid" "rjct.person_id.invalid" "rjct.event.already_subscribed"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"

UnSubscribeStatusReasonCode

string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"
+ + + + diff --git a/release/html/ibr_api_v1.0.0.html b/release/html/ibr_api_v1.0.0.html new file mode 100644 index 0000000..8b811b4 --- /dev/null +++ b/release/html/ibr_api_v1.0.0.html @@ -0,0 +1,1042 @@ + + + + + + Interoperability APIs - Integrated Beneficiary Registry + + + + + + + + + +

Interoperability APIs - Integrated Beneficiary Registry (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

The IBR(Integrated Beneficiary Registry) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between IBR registry and SP-System. +You can now help us improve the API whether it's by making changes to the definition itself or to the code. +That way, with time, we can improve the API in general, and expose some of the new features in upcoming version.

+
    +
  1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query
  2. +
  3. Enrollment updates: The enrollment updates API send details of beneficiaries enrolled in programs from SP-System
  4. +
  5. Enrolled : the enrolled API is a special type of search to return the programs a beneficiary is enrolled in
  6. +
+

Gitbook reference link[WIP]:

+ +

Code directory links:

+ +

Data Objects:

+ +

Each request is build up of three parts

+
    +
  • signature
  • +
  • header
  • +
  • message
  • +
+

Information about each part is given below

+

Signature:

+
    +
  • The signature is used to verify the integrity of the message.
  • +
  • The signature is a hash of the message and is encrypted using the private key of the sender.
  • +
  • The receiver can verify the signature using the public key of the sender.
  • +
+

Header:

+
    +
  • The header contains information about various message header, refer to the header schema for more details.
  • +
+

Message:

+
    +
  • The message contains the actual payload of the message.
  • +
  • Refer example section to get sample data and also read Gitbook for details data objects
  • +
  • The receiver can decrypt the message using the private key of the "err.receiver_id.invalid"
  • +
+

Async

Async endpoints

+

/registry/subscribe

Subscribe to a life event with registry

+
Authorizations:
None
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeRequest (object) or EncryptedMessage (object)

Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-subscribe

Subscribe results through callback

+
Authorizations:
None
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeResponse (object) or EncryptedMessage (object)

Subscription information

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/notify

Registry to notify an event to subscribers

+
Authorizations:
None
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
NotifyEventRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/unsubscribe

Unsubscribe existing subscription(s) by subscription_code

+
Authorizations:
None
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeRequest (object) or EncryptedMessage (object)

The unsubscribe request that contain subscription ids which to be removed from subscription list

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-unsubscribe

Unsubscribe response as a callback

+
Authorizations:
None
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/status

The /registry/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Authorizations:
None
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/on-status

The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well.

+
Authorizations:
None
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

+

/registry/sync/enrollment/updates

The /registry/enrollments/updates endpoint will be implemented by IBR to receive details of beneficiaries enrolled in programs from SP-System. +The receipt_type and beneficiaries will be required to make request. +Three receipt types are supported as of now, they are

+
    +
  1. Enrolled beneficiaries
  2. +
  3. Updated beneficiaries details +The beneficiaries will contain list of beneficiaries information for which enrollments updated to be generated.
  4. +
+
Authorizations:
None
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
EnrollmentUpdatesRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/sync/enrolled

search programmes person is enrolled in

+
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
EnrolledRequest (object) or EncryptedMessage (object)

The search data using which registry search to be performed

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/sync/txn/status

The /registry/sync/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Request Body schema: application/json
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

SearchRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
    +
  1. Batch requests enable multiple individual requests with respective consent/authorize codes
  2. +
+
{
  • "transaction_id": "XZFHYTY",
  • "search_request": [
    ]
}

SearchResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "subscribe_request": [
    ]
}

SubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "subscribe_response": [
    ]
}

NotifyEventRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "notify_event": [
    ]
}

UnSubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
subscription_codes
required
Array of strings (SubscriptionCode) [ items <= 99 characters ]
{
  • "transaction_id": "XZFHYTY",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
status
required
string
Enum: "rcvd" "pdng" "succ" "rjct"

Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected

+
status_reason_code
string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
status_reason_message
string <= 999 characters

Status reason code message. Helps actionanble messaging for systems/end users

+
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "status": "rcvd",
  • "status_reason_code": "rjct.reference_id.invalid",
  • "status_reason_message": "string",
  • "subscription_status": [
    ]
}

EnrollmentUpdatesRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
object

Receipt information contains receipt type and list of beneficiaries

+
    +
  1. Enrolled beneficiaries - It return the beneficiaries enrolled into system.
  2. +
  3. Updated beneficiaries - If return updated status
  4. +
+
{
  • "transaction_id": "XZFHYTY",
  • "enrolled_updates": {
    }
}

EnrollmentUpdatesResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "enrolled_response": [
    ]
}

EnrolledRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
object

Enrolled query

+
{
  • "transaction_id": "XZFHYTY",
  • "enrolled_criteria": {
    }
}

EnrolledResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "enrolled_response": [
    ]
}

TxnStatusRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "txnstatus_response": {
    }
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

+
encrypted_key
required
string

The base64-url encoded encrypted key

+
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

+
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

+
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.search_criteria.invalid" "rjct.filter.invalid" "rjct.sort.invalid" "rjct.pagination.invalid" "rjct.search.too_many_records_found"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"
+ + + + diff --git a/release/html/jwks_core_api_v1.0.0.html b/release/html/jwks_core_api_v1.0.0.html new file mode 100644 index 0000000..f8438d5 --- /dev/null +++ b/release/html/jwks_core_api_v1.0.0.html @@ -0,0 +1,321 @@ + + + + + + Interoperability APIs - JWKs + + + + + + + + + +

Interoperability APIs - JWKs (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

Provide JSON Web Key Set to registered clients/services.

+

JWKs : /.well-known/jwks.json

This end point is in compliance with RFC 7517 to share the encryption & signature verification public keys over HTTPS channel

+

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ]
}
+ + + + diff --git a/release/html/locations_core_api_v1.0.0.html b/release/html/locations_core_api_v1.0.0.html new file mode 100644 index 0000000..b4c0d0e --- /dev/null +++ b/release/html/locations_core_api_v1.0.0.html @@ -0,0 +1,321 @@ + + + + + + Interoperability APIs - Locations + + + + + + + + + +

Interoperability APIs - Locations (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

Provide the location structure tree of the CRVS system

+

Locations : /.well-known/locations.json

This endpoint can be used to build a location tree of the CRVS system or to find a specific location details

+

Responses

Response samples

Content type
application/json
{
  • "@context": {},
  • "@type": "LocationHierarchy",
  • "last_updated": "2023-10-17T11:26:02.512+00:00",
  • "locations": [
    ]
}
+ + + + diff --git a/release/html/mapper_core_api_v1.0.0.html b/release/html/mapper_core_api_v1.0.0.html deleted file mode 100644 index d369bba..0000000 --- a/release/html/mapper_core_api_v1.0.0.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - Interoperability APIs - Financial Address Mapper Mgmt - - - - - - - - - -

Interoperability APIs - Financial Address Mapper Mgmt (1.0.0)

Download OpenAPI specification:Download

    -
  1. Category: Financial Address Mapper
  2. -
  3. Feature: Manage financial address mapper registry
  4. -
  5. Specification Level: Draft
  6. -
-

Async

Async endpoints

-

/mapper/update

Updating fa details against an id in mapper registry

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
UpdateRequest (object) or EncryptedMessage (object)

The search data using which registry search to be performed

-

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/mapper/on-update

Update response through callback

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
UpdateResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/mapper/resolve

Resolve fa / beneficiary id to a store of value

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
ResolveRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/mapper/on-resolve

Resolve response through callback end point

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
ResolveResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/mapper/txn/status

Perform async status check of previous mapper transanctions using transaction_id and/or reference_id(s)

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/mapper/txn/on-status

Response to async status check of previous mapper transanctions using callback

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

-

/mapper/sync/update

Update ID or Financial Address in the mapper registry

-
Authorizations:
Authorization
Request Body schema: application/json
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
UpdateRequest (object) or EncryptedMessage (object)

The link data to map id to fa

-

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/mapper/sync/resolve

Resolve ID to a Financial Address in the mapper registry

-
Authorizations:
Authorization
Request Body schema: application/json
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
ResolveRequest (object) or EncryptedMessage (object)

Request message to resolve id to a fa

-

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/sync/txn/status

Perform sync status check of previous civil registry transanctions using transaction_id and/or reference_id(s)

-
Authorizations:
Authorization
Request Body schema: application/json
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

LinkRequest

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "link_request": [
    ]
}

LinkResponse

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
correlation_id
string <= 99 characters
    -
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. -
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "link_response": [
    ]
}

ResolveRequest

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "resolve_request": [
    ]
}

ResolveResponse

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
correlation_id
string <= 99 characters
    -
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. -
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "resolve_response": [
    ]
}

UpdateRequest

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "update_request": [
    ]
}

UpdateResponse

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
correlation_id
string <= 99 characters
    -
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. -
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "update_response": [
    ]
}

UnlinkRequest

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "unlink_request": [
    ]
}

UnlinkResponse

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
correlation_id
string <= 99 characters
    -
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. -
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. -
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "unlink_response": [
    ]
}

TxnStatusRequest

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
required
object
{
  • "transaction_id": 123456789,
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string (TransactionId) <= 99 characters
    -
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. -
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. -
-
correlation_id
required
string <= 99 characters
    -
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. -
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. -
-
required
object
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "txnstatus_response": {
    }
}

LinkStatusReasonCode

string (LinkStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.id.invalid" "rjct.fa.invalid" "rjct.name.invalid" "rjct.mobile_number.invalid" "rjct.unknown.retry" "rjct.other.error"

FA Mapper Link status reason codes

-
"rjct.reference_id.invalid"

ResolveStatusReasonCode

string (ResolveStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.id.invalid" "rjct.fa.invalid" "rjct.resolve_type.not_supported" "succ.fa.active" "succ.fa.inactive" "succ.fa.not_found" "succ.fa.not_linked_to_id" "succ.id.active" "succ.id.inactive" "succ.id.not_found"

FA Mapper Resolve status reason codes

-
"rjct.reference_id.invalid"

UpdateStatusReasonCode

string (UpdateStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.beneficiary_name.invalid"

FA Mapper Update status reason codes

-
"rjct.reference_id.invalid"

UnlinkStatusReasonCode

string (UnlinkStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.beneficiary_name.invalid"

FA Mapper Unlink status reason codes

-
"rjct.reference_id.invalid"
- - - - diff --git a/release/html/registry_core_api_v1.0.0.html b/release/html/registry_core_api_v1.0.0.html index 5b8fa7d..ad6871b 100644 --- a/release/html/registry_core_api_v1.0.0.html +++ b/release/html/registry_core_api_v1.0.0.html @@ -3,7 +3,7 @@ - Interoperability APIs - Federated Registry Data Access + Interoperability APIs - CORE - -

Interoperability APIs - Federated Registry Data Access (1.0.0)

Download OpenAPI specification:Download

G2P Connect: info@cdpi.dev License: CDPI CC BY-SA 4.0
    -
  1. Category: Civil & Other Federated Registries
  2. -
  3. Feature: Enables Data & Verifiable Credential Access
  4. -
  5. Specification Level: Draft
  6. + " fill="currentColor">

Interoperability APIs - CORE (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

The DCI Core interoperability APIs describes different APIs. They are generalized APIs to perform interoperable operations between a registry and SP System. +You can now help us improve the API whether it's by making changes to the definition itself or to the code. +That way, with time, we can improve the API in general, and expose some of the new features in upcoming version.

+
    +
  1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query
  2. +
  3. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in the registry it sends event details on notify end point
  4. +
  5. Request status check: The request status checking APIs implement to check status of request sent in any above APIs
-

Async

Async endpoints

-

/registry/subscribe

Subscribe to a life event with registry

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
SubscribeRequest (object) or EncryptedMessage (object)

Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber

-

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-subscribe

Subscribe results through callback

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
SubscribeResponse (object) or EncryptedMessage (object)

Subscription information

-

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/notify

Registry to notify a life event to subscrbiers

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
NotifyEventRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/unsubscribe

Unsubscribe existing subscription(s) by subscription_code

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
UnSubscribeRequest (object) or EncryptedMessage (object)

The unsubscribe request that contain subscription ids which to be removed from subscription list

-

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-unsubscribe

Unsubscribe response as a callback

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
UnSubscribeResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/status

Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s)

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/on-status

Response to async status check of previous civil registrt transanctions using callback

-
Authorizations:
Authorization
Request Body schema:
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

-

/registry/sync/txn/status

Sync status check of registry Async APIs

-
Authorizations:
Authorization
Request Body schema: application/json
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

-
required
object

Message header

-
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"g2p\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

SearchRequest

transaction_id
required
string (TransactionId) <= 99 characters
    +

    Gitbook reference link :

    + +

    Code directory links:

    + +

    Data Objects:

    + +

    Each request is build up of three parts

    +
      +
    • signature
    • +
    • header
    • +
    • message
    • +
    +

    Information about each part is given below

    +

    Signature:

    +
      +
    • The signature is used to verify the integrity of the message.
    • +
    • The signature is a hash of the message and is encrypted using the private key of the sender.
    • +
    • The receiver can verify the signature using the public key of the sender.
    • +
    +

    Header:

    +
      +
    • The header contains information about various message header, refer to the header schema for more details.
    • +
    +

    Message:

    +
      +
    • The message contains the actual payload of the message.
    • +
    • Refere example section to get sample data and also read Gitbook for details data objects
    • +
    • The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" version: 1.0.0
    • +
    +

Async

Async endpoints

+

/registry/on-search

The /registry/on-search end point to be implemented by SPMIS to receive search results from registry. +The registry will send data in format explained in SearchResponse.yaml. The reg_records will contains data +that in explained in Person, Member , Group.

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
SearchResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/subscribe

Subscribe to a life event with registry

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeRequest (object) or EncryptedMessage (object)

Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-subscribe

Subscribe results through callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeResponse (object) or EncryptedMessage (object)

Subscription information

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/notify

Registry to notify a life event to subscrbiers

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
NotifyEventRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/unsubscribe

Unsubscribe existing subscription(s) by subscription_code

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeRequest (object) or EncryptedMessage (object)

The unsubscribe request that contain subscription ids which to be removed from subscription list

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-unsubscribe

Unsubscribe response as a callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/status

The /registry/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/on-status

The /registry/txn/on-status will be implemented by SPMIS. The response with information about request and in some case it may contain data as well.

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

+

/registry/sync/txn/status

The /registry/sync/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Authorizations:
Authorization
Request Body schema: application/json
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

SearchRequest

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
required
Array of objects
    +
required
Array of objects
  1. Batch requests enabel multiple individual requests with respective consent/authorize codes
-
{
  • "transaction_id": 123456789,
  • "search_request": [
    ]
}

SearchResponse

transaction_id
required
string (TransactionId) <= 99 characters
    +
{
  • "transaction_id": "XZFHYTY",
  • "search_request": [
    ]
}

SearchResponse

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
correlation_id
required
string <= 99 characters
    +
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

transaction_id
required
string (TransactionId) <= 99 characters
    +
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "subscribe_request": [
    ]
}

SubscribeResponse

transaction_id
required
string (TransactionId) <= 99 characters
    +
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "subscribe_request": [
    ]
}

SubscribeResponse

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
correlation_id
required
string <= 99 characters
    +
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "subscribe_response": [
    ]
}

NotifyEventRequest

transaction_id
required
string (TransactionId) <= 99 characters
    +
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "subscribe_response": [
    ]
}

NotifyEventRequest

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
required
Array of objects
{
  • "transaction_id": 123456789,
  • "notify_event": [
    ]
}

UnSubscribeRequest

transaction_id
required
string (TransactionId) <= 99 characters
    +
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "notify_event": [
    ]
}

UnSubscribeRequest

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
timesstamp
string <date-time> (DateTime)
    +
timestamp
required
string <date-time>
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
-
subscription_codes
Array of strings (SubscriptionCode) [ items <= 99 characters ]
{
  • "transaction_id": 123456789,
  • "timesstamp": "",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

transaction_id
required
string (TransactionId) <= 99 characters
    +
subscription_codes
required
Array of strings (SubscriptionCode) [ items <= 99 characters ]
{
  • "transaction_id": "XZFHYTY",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
correlation_id
required
string <= 99 characters
    +
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
-
timesatmp
string <date-time> (DateTime)
    +
timestamp
required
string <date-time>
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
-
status
required
string (RequestStatus)
Enum: "rcvd" "pdng" "succ" "rjct"

Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected

-
status_reason_code
string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

-
status_reason_message
string <= 999 characters

Status reason code message. Helps actionanble messaging for systems/end users

-
Array of objects
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "timesatmp": "",
  • "status": "rcvd",
  • "status_reason_code": "rjct.reference_id.invalid",
  • "status_reason_message": "string",
  • "subscription_status": [
    ]
}

TxnStatusRequest

transaction_id
required
string (TransactionId) <= 99 characters
    +
status
required
string
Enum: "rcvd" "pdng" "succ" "rjct"

Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected

+
status_reason_code
string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
status_reason_message
string <= 999 characters

Status reason code message. Helps actionanble messaging for systems/end users

+
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "status": "rcvd",
  • "status_reason_code": "rjct.reference_id.invalid",
  • "status_reason_message": "string",
  • "subscription_status": [
    ]
}

TxnStatusRequest

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
required
object
{
  • "transaction_id": 123456789,
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string (TransactionId) <= 99 characters
    +
required
object
{
  • "transaction_id": "XZFHYTY",
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string <= 99 characters
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. -
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id should be same across processing systems/service end points.
  6. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
-
correlation_id
required
string <= 99 characters
    +
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
-
required
object
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "txnstatus_response": {
    }
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

-
encrypted_key
required
string

The base64-url encoded encrypted key

-
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

-
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

-
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.search_criteria.invalid" "rjct.filter.invalid" "rjct.sort.invalid" "rjct.pagination.invalid" "rjct.search.too_many_records_found"

Identity verification request status reason codes

-
"rjct.reference_id.invalid"

SubscribeStatusReasonCode

string (SubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.notify_types.invalid" "rjct.notify_details.invalid" "rjct.person_id.invalid" "rjct.event.already_subscribed"

Identity verification request status reason codes

-
"rjct.reference_id.invalid"

UnSubscribeStatusReasonCode

string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

-
"rjct.reference_id.invalid"
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "txnstatus_response": {
    }
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

+
encrypted_key
required
string

The base64-url encoded encrypted key

+
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

+
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

+
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.search_criteria.invalid" "rjct.filter.invalid" "rjct.sort.invalid" "rjct.pagination.invalid" "rjct.search.too_many_records_found"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"
+ + + + + +

Interoperability APIs - Social Registry (1.0.0)

Download OpenAPI specification:Download

DCI Social Protection: info@spdci.org License: DCI Social Protection License

The Social Registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between social registry and SPMIS. +You can now help us improve the API whether it's by making changes to the definition itself or to the code. +That way, with time, we can improve the API in general, and expose some of the new features in upcoming version.

+
    +
  1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query
  2. +
  3. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point
  4. +
  5. Request status check: The request status checking APIs implement to check status of request sent in any above APIs
  6. +
+

Gitbook reference link :

+ +

Code directory links:

+ +

Data Objects:

+ +

Each request is build up of three parts

+
    +
  • signature
  • +
  • header
  • +
  • message
  • +
+

Information about each part is given below

+

Signature:

+
    +
  • The signature is used to verify the integrity of the message.
  • +
  • The signature is a hash of the message and is encrypted using the private key of the sender.
  • +
  • The receiver can verify the signature using the public key of the sender.
  • +
+

Header:

+
    +
  • The header contains information about various message header, refer to the header schema for more details.
  • +
+

Message:

+
    +
  • The message contains the actual payload of the message.
  • +
  • Refere example section to get sample data and also read Gitbook for details data objects
  • +
  • The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" version: 1.0.0
  • +
+

Async

Async endpoints

+

/registry/subscribe

Subscribe to a life event with registry

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeRequest (object) or EncryptedMessage (object)

Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-subscribe

Subscribe results through callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
SubscribeResponse (object) or EncryptedMessage (object)

Subscription information

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/notify

Registry to notify an event to subscribers

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
NotifyEventRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/unsubscribe

Unsubscribe existing subscription(s) by subscription_code

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeRequest (object) or EncryptedMessage (object)

The unsubscribe request that contain subscription ids which to be removed from subscription list

+

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/on-unsubscribe

Unsubscribe response as a callback

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
UnSubscribeResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/status

The /registry/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

/registry/txn/on-status

The /registry/txn/on-status will be implemented by SPMIS. The response with information about request and in some case it may contain data as well.

+
Authorizations:
Authorization
Request Body schema:
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
TxnStatusResponse (object) or EncryptedMessage (object)

Responses

Request samples

Content type
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {
    },
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Sync

Sync endpoints

+

/registry/sync/txn/status

The /registry/sync/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s).

+
Authorizations:
Authorization
Request Body schema: application/json
required
signature
string (MsgSignature)

Signature of {header}+{message} body verified using sender's signing public key

+
required
object

Message header

+
required
TxnStatusRequest (object) or EncryptedMessage (object)

Responses

Request samples

Content type
application/json
{
  • "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
  • "header": {},
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

SearchRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
    +
  1. Batch requests enable multiple individual requests with respective consent/authorize codes
  2. +
+
{
  • "transaction_id": "XZFHYTY",
  • "search_request": [
    ]
}

SearchResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "subscribe_request": [
    ]
}

SubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "subscribe_response": [
    ]
}

NotifyEventRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "notify_event": [
    ]
}

UnSubscribeRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
subscription_codes
required
Array of strings[ items <= 99 characters ]
{
  • "transaction_id": "XZFHYTY",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
timestamp
required
string <date-time>
    +
  1. All dates and timestamps are represented in ISO 8601 format including timezone - e.g 2022-12-04T17:20:07-04:00.
  2. +
+
status
required
string
Enum: "rcvd" "pdng" "succ" "rjct"

Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected

+
status_reason_code
string (UnSubscribeStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed"

Identity verification request status reason codes

+
status_reason_message
string <= 999 characters

Status reason code message. Helps actionanble messaging for systems/end users

+
Array of objects
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "timestamp": "2022-12-04T17:20:07-04:00",
  • "status": "rcvd",
  • "status_reason_code": "rjct.reference_id.invalid",
  • "status_reason_message": "string",
  • "subscription_status": [
    ]
}

TxnStatusRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "txnstatus_request": {
    }
}

TxnStatusResponse

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be same across processing systems/service end points.
  4. +
  5. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
correlation_id
required
string <= 99 characters ^[a-zA-Z0-9-]+$
    +
  1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  2. +
  3. correlation_id uniqueness is ensured by txn processing system (i.e receiver)
  4. +
+
required
object
{
  • "transaction_id": "XZFHYTY",
  • "correlation_id": "ABC9876543210",
  • "txnstatus_response": {
    }
}

EncryptedMessage

required
object
ciphertext
required
string

This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded.

+
encrypted_key
required
string

The base64-url encoded encrypted key

+
tag
required
string

This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data

+
iv
required
string

This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used.

+
{
  • "header": {
    },
  • "ciphertext": "string",
  • "encrypted_key": "string",
  • "tag": "string",
  • "iv": "string"
}

SearchStatusReasonCode

string (SearchStatusReasonCode)
Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.search_criteria.invalid" "rjct.filter.invalid" "rjct.sort.invalid" "rjct.pagination.invalid" "rjct.search.too_many_records_found"

Identity verification request status reason codes

+
"rjct.reference_id.invalid"
+ + + + diff --git a/release/index.md b/release/index.md index b8219c4..0f842a7 100644 --- a/release/index.md +++ b/release/index.md @@ -1,18 +1,18 @@ -## G2P Connect APIs Specifications +## DCI APIs Specifications ### Specification Level: Draft * Identity * Civil & Federated Registries - * Data & Verifiable Crendential Access - [html](https://g2p-connect.github.io/specs/release/html/registry_core_api_v1.0.0.html), [yaml](https://g2p-connect.github.io/specs/release/yaml/registry_core_api_v1.0.0.yaml) + * Data & Verifiable Crendential Access - [html](https://standards.spdci.org/standards/release/html/registry_core_api_v1.0.0.html), [yaml](https://standards.spdci.org/standards/release/yaml/registry_core_api_v1.0.0.yaml) * Beneficiary Management * Registration * Assess * Enroll - * Financial Address Mapper - [html](https://g2p-connect.github.io/specs/release/html/mapper_core_api_v1.0.0.html), [yaml](https://g2p-connect.github.io/specs/release/yaml/mapper_core_api_v1.0.0.yaml) + * Financial Address Mapper * Program Management * Program Management * Eligibility Rules - * Dibursement - [html](https://g2p-connect.github.io/specs/release/html/disburse_core_api_v1.0.0.html), [yaml](https://g2p-connect.github.io/specs/release/yaml/disburse_core_api_v1.0.0.yaml) + * Dibursement * Financial Service Provider (FSP) * Check Fund Availability * Hold/Release Funds @@ -27,6 +27,6 @@ * Telemetry Events * Grievance Mgmt * Security - * Authorization - [html](https://g2p-connect.github.io/specs/release/html/authz_core_api_v1.0.0.html), [yaml](https://g2p-connect.github.io/specs/release/yaml/authz_core_api_v1.0.0.yaml) + * Authorization - [html](https://standards.spdci.org/standards/release/html/authz_core_api_v1.0.0.html), [yaml](https://standards.spdci.org/standards/release/yaml/authz_core_api_v1.0.0.yaml) * API source code - * Github [repository](https://github.com/G2P-Connect/specs) \ No newline at end of file + * Github [repository](https://standards.spdci.org/standards/src) \ No newline at end of file diff --git a/release/sample-jsons/assets/css/dci-api-sample.css b/release/sample-jsons/assets/css/dci-api-sample.css new file mode 100644 index 0000000..c01abeb --- /dev/null +++ b/release/sample-jsons/assets/css/dci-api-sample.css @@ -0,0 +1,116 @@ + ::-webkit-scrollbar { + width: 8px; + } + + ::-webkit-scrollbar-thumb { + background: rgba(51, 51, 51, .3); + border-radius: 8px; + } + + ::-webkit-scrollbar-track { + background-color: #e5e5e5; + border-radius: 8px; + } + + ::-webkit-scrollbar:horizontal { + height: 8px; + } + + + p.options label { + margin-right: 10px; + } + + p.options input[type=checkbox] { + vertical-align: middle; + } + + textarea#json-input { + width: 100%; + height: 200px; + } + + pre { + background-color: rgb(17, 23, 26); + border: 1px solid #aaa; + color: white; + } + + .json-string { + color: rgb(160, 251, 170); + } + + .json-boolean { + color: red; + } + + .json-document { + height: 500px; + } + + .arrow::before { + content: "\25BA"; + float: left; + transform: rotate(90deg); + transition: transform 0.3s; + } + + .collapsed .arrow::before { + transform: rotate(0deg); + } + + .mainusecasediv { + margin-top: 10px; + margin-bottom: 20px; + } + + ::-webkit-scrollbar { + width: 8px; + } + + + ::-webkit-scrollbar-thumb { + background: rgba(51, 51, 51, .3); + border-radius: 8px; + } + + ::-webkit-scrollbar-track { + background-color: #e5e5e5; + border-radius: 8px; + } + + ::-webkit-scrollbar:horizontal { + height: 8px; + } + + + p.options label { + margin-right: 10px; + } + + p.options input[type=checkbox] { + vertical-align: middle; + } + + textarea#json-input { + width: 100%; + height: 200px; + } + + pre { + background-color: rgb(17, 23, 26); + border: 1px solid #aaa; + color: white; + } + + .json-string { + color: rgb(160, 251, 170); + } + + .json-boolean { + color: red; + } + + .json-document { + height: 500px; + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow1req copy.json b/release/sample-jsons/assets/example_files/crvs/processflow1req copy.json new file mode 100644 index 0000000..a6d0d39 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow1req copy.json @@ -0,0 +1,52 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "sender_id": "sp-system", + "receiver_id": "crvs", + "action": "search", + "total_count": "1", + "encrypted": false, + "async": false, + "callback_endpoint": "" + }, + "message": { + "transaction_id": "0c96614c-7255-4774-b109-cd53ee851769", + "search_request": { + "version": "1.0.0", + "data": [ + { + "reference_id": "0c96614c-7255-4774-b109-cd53ee851769", + "timestamp": "2023-07-19T12:15:04.555Z", + "registry_type": "CIVIL", + "search_criteria": { + "query": { + "identifier": [ + { + "identifier_type": "NATIONAL_ID", + "identifier_value": "3076375167" + } + ] + } + }, + "filter": [ + "" + ], + "sort": [ + { + "attribute_name": "name", + "sort_order": "ASC" + } + ], + "pagination": { + "page_number": 10, + "page_size": 10 + }, + "locale": "en" + } + ] + } + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow1req.json b/release/sample-jsons/assets/example_files/crvs/processflow1req.json new file mode 100644 index 0000000..e59aa11 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow1req.json @@ -0,0 +1,46 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "crvs", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "idtype-value", + "query": { + "type": "UIN", + "value": "847951632" + }, + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow1res copy.json b/release/sample-jsons/assets/example_files/crvs/processflow1res copy.json new file mode 100644 index 0000000..e7decc8 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow1res copy.json @@ -0,0 +1,52 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "sender_id": "sp-system", + "receiver_id": "crvs", + "action": "search", + "total_count": "1", + "encrypted": false, + "async": false, + "callback_endpoint": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "query": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "person": [ + { + "identifier": [ + { + "identifier_type": "UIN", + "identifier_value": "345678916" + } + ], + "name": { + "suffix": "Jr", + "prefix": "Mr.", + "first_name": "John", + "middle_name": "Doe", + "last_name": "Jackson" + }, + "date_of_birth":"1958-01-01" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1, + "total_records": 20 + }, + "locale": { + "code": "", + "language": "" + } + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow1res.json b/release/sample-jsons/assets/example_files/crvs/processflow1res.json new file mode 100644 index 0000000..ddee6c8 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow1res.json @@ -0,0 +1,185 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "crvs", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/common/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "CRVS_Person", + "@type": "CRVS_Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "birth_place": { + "@id": "Place", + "@type": "Place", + "name": "Koh Samui", + "address_line": "", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5604, + "longitude": 100.0245 + }, + "contained_in_place": "", + "contains_place": [ + { + "@id": "Place_1", + "@type": "Place", + "name": "Fisherman's Village", + "address": "Bophut\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5617, + "longitude": 100.0259 + } + }, + { + "@id": "Place_4", + "@type": "Place", + "name": "Big Buddha Beach", + "address": "Big Buddha Beach\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5736, + "longitude": 100.0587 + } + } + ] + }, + "death_date": "", + "death_place": {}, + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + } + ], + "marital_status": "M", + "marriage_date": ["2019-09-21T11:20:00"], + "divorce_date": [], + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + } + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow2req.json b/release/sample-jsons/assets/example_files/crvs/processflow2req.json new file mode 100644 index 0000000..0fef064 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow2req.json @@ -0,0 +1,54 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "crvs", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "expression", + "query": [ + { + "seq_num": "", + "expression1": { + "attribute_name": "UIN", + "operator": "eq", + "attribute_value": "847951632" + }, + "condition": "", + "expression2": "" + } + ], + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow2res.json b/release/sample-jsons/assets/example_files/crvs/processflow2res.json new file mode 100644 index 0000000..ddee6c8 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow2res.json @@ -0,0 +1,185 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "crvs", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/common/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "CRVS_Person", + "@type": "CRVS_Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "birth_place": { + "@id": "Place", + "@type": "Place", + "name": "Koh Samui", + "address_line": "", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5604, + "longitude": 100.0245 + }, + "contained_in_place": "", + "contains_place": [ + { + "@id": "Place_1", + "@type": "Place", + "name": "Fisherman's Village", + "address": "Bophut\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5617, + "longitude": 100.0259 + } + }, + { + "@id": "Place_4", + "@type": "Place", + "name": "Big Buddha Beach", + "address": "Big Buddha Beach\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5736, + "longitude": 100.0587 + } + } + ] + }, + "death_date": "", + "death_place": {}, + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + } + ], + "marital_status": "M", + "marriage_date": ["2019-09-21T11:20:00"], + "divorce_date": [], + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + } + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow3req.json b/release/sample-jsons/assets/example_files/crvs/processflow3req.json new file mode 100644 index 0000000..e59aa11 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow3req.json @@ -0,0 +1,46 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "crvs", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "idtype-value", + "query": { + "type": "UIN", + "value": "847951632" + }, + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow3res.json b/release/sample-jsons/assets/example_files/crvs/processflow3res.json new file mode 100644 index 0000000..ddee6c8 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow3res.json @@ -0,0 +1,185 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "crvs", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/common/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "CRVS_Person", + "@type": "CRVS_Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "birth_place": { + "@id": "Place", + "@type": "Place", + "name": "Koh Samui", + "address_line": "", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5604, + "longitude": 100.0245 + }, + "contained_in_place": "", + "contains_place": [ + { + "@id": "Place_1", + "@type": "Place", + "name": "Fisherman's Village", + "address": "Bophut\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5617, + "longitude": 100.0259 + } + }, + { + "@id": "Place_4", + "@type": "Place", + "name": "Big Buddha Beach", + "address": "Big Buddha Beach\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5736, + "longitude": 100.0587 + } + } + ] + }, + "death_date": "", + "death_place": {}, + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + } + ], + "marital_status": "M", + "marriage_date": ["2019-09-21T11:20:00"], + "divorce_date": [], + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + } + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow4req.json b/release/sample-jsons/assets/example_files/crvs/processflow4req.json new file mode 100644 index 0000000..0fef064 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow4req.json @@ -0,0 +1,54 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "crvs", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "expression", + "query": [ + { + "seq_num": "", + "expression1": { + "attribute_name": "UIN", + "operator": "eq", + "attribute_value": "847951632" + }, + "condition": "", + "expression2": "" + } + ], + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow4res.json b/release/sample-jsons/assets/example_files/crvs/processflow4res.json new file mode 100644 index 0000000..ddee6c8 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow4res.json @@ -0,0 +1,185 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "crvs", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/common/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "CRVS_Person", + "@type": "CRVS_Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "birth_place": { + "@id": "Place", + "@type": "Place", + "name": "Koh Samui", + "address_line": "", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5604, + "longitude": 100.0245 + }, + "contained_in_place": "", + "contains_place": [ + { + "@id": "Place_1", + "@type": "Place", + "name": "Fisherman's Village", + "address": "Bophut\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5617, + "longitude": 100.0259 + } + }, + { + "@id": "Place_4", + "@type": "Place", + "name": "Big Buddha Beach", + "address": "Big Buddha Beach\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5736, + "longitude": 100.0587 + } + } + ] + }, + "death_date": "", + "death_place": {}, + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + } + ], + "marital_status": "M", + "marriage_date": ["2019-09-21T11:20:00"], + "divorce_date": [], + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + } + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow5req.json b/release/sample-jsons/assets/example_files/crvs/processflow5req.json new file mode 100644 index 0000000..e59aa11 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow5req.json @@ -0,0 +1,46 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "crvs", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "idtype-value", + "query": { + "type": "UIN", + "value": "847951632" + }, + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow5res.json b/release/sample-jsons/assets/example_files/crvs/processflow5res.json new file mode 100644 index 0000000..ddee6c8 --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow5res.json @@ -0,0 +1,185 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "crvs", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/common/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "CRVS_Person", + "@type": "CRVS_Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "birth_place": { + "@id": "Place", + "@type": "Place", + "name": "Koh Samui", + "address_line": "", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5604, + "longitude": 100.0245 + }, + "contained_in_place": "", + "contains_place": [ + { + "@id": "Place_1", + "@type": "Place", + "name": "Fisherman's Village", + "address": "Bophut\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5617, + "longitude": 100.0259 + } + }, + { + "@id": "Place_4", + "@type": "Place", + "name": "Big Buddha Beach", + "address": "Big Buddha Beach\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5736, + "longitude": 100.0587 + } + } + ] + }, + "death_date": "", + "death_place": {}, + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + } + ], + "marital_status": "M", + "marriage_date": ["2019-09-21T11:20:00"], + "divorce_date": [], + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + } + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow6req.json b/release/sample-jsons/assets/example_files/crvs/processflow6req.json new file mode 100644 index 0000000..f15265d --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow6req.json @@ -0,0 +1,54 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "crvs", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "expression", + "query": [ + { + "seq_num": "", + "expression1": { + "attribute_name": "UIN", + "operator": "eq", + "attribute_value": "847951632" + }, + "condition": "", + "expression2": "" + } + ], + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/processflow6res.json b/release/sample-jsons/assets/example_files/crvs/processflow6res.json new file mode 100644 index 0000000..ecea49f --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/processflow6res.json @@ -0,0 +1,185 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "crvs", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/common/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "CRVS_Person", + "@type": "CRVS_Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "birth_place": { + "@id": "Place", + "@type": "Place", + "name": "Koh Samui", + "address_line": "", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5604, + "longitude": 100.0245 + }, + "contained_in_place": "", + "contains_place": [ + { + "@id": "Place_1", + "@type": "Place", + "name": "Fisherman's Village", + "address": "Bophut\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5617, + "longitude": 100.0259 + } + }, + { + "@id": "Place_4", + "@type": "Place", + "name": "Big Buddha Beach", + "address": "Big Buddha Beach\nKoh Samui\nSurat Thani 84320\nThailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5736, + "longitude": 100.0587 + } + } + ] + }, + "death_date": "", + "death_place": {}, + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + } + ], + "marital_status": "M", + "marriage_date": ["2019-09-21T11:20:00"], + "divorce_date": [], + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + } + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/crvs/usecaselist.json b/release/sample-jsons/assets/example_files/crvs/usecaselist.json new file mode 100644 index 0000000..eb761cb --- /dev/null +++ b/release/sample-jsons/assets/example_files/crvs/usecaselist.json @@ -0,0 +1,26 @@ +[ + { + "processflow_id" : "processflow1", + "processflow_name": "Process Flow 1 : Generic process workflow between SP-System and CRVS" + }, + { + "processflow_id" : "processflow2", + "processflow_name": "Process Flow 2 : Enrollment in the old age allowance scheme" + }, + { + "processflow_id" : "processflow3", + "processflow_name": "Process Flow 3 : Ceasing allowance upon death notification" + }, + { + "processflow_id" : "processflow4", + "processflow_name": "Process Flow 4 : Enrollment in widow allowance scheme" + }, + { + "processflow_id" : "processflow5", + "processflow_name": "Process Flow 5 : Enrollment in child allowance scheme" + }, + { + "processflow_id" : "processflow6", + "processflow_name": "Process Flow 6 : Proactive enrollment in child allowance scheme" + } +] \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/dr/processflow1req.json b/release/sample-jsons/assets/example_files/dr/processflow1req.json new file mode 100644 index 0000000..3600907 --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/processflow1req.json @@ -0,0 +1,51 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"SPMIS|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "verify", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "DR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "txn-1234567890", + "search_request": { + "reference_id": "12345678901234567890", + "timestamp": "", + "search_criteria": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:DR", + "reg_event_type": "spdci-common:RegistryEventType:DisabledPerson", + "query_type": "expression", + "query": { + "type": "ns:org:QueryType:expression", + "value": { + "expression": { + "query": { + "$and": [ + { + "disability_status": {"$eq": "Approved"} + }, + { + "disability_details.impairment_type" : {"$eq":"Mobility"} + } + ] + } + } + } + }, + "sort": [], + "pagination": {}, + "consent": {}, + "authorize": {} + }, + "locale": "en" + } + + } + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/dr/processflow1res.json b/release/sample-jsons/assets/example_files/dr/processflow1res.json new file mode 100644 index 0000000..b6e6fd0 --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/processflow1res.json @@ -0,0 +1,86 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"DR|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746200\", expires=\"1691832600\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "1a2b3c4d-5678-90ab-cdef-1234567890ab", + "message_ts": "2024-08-11T10:00:00.000Z", + "action": "check_disability_status", + "status": "ack", + "status_reason_code": "200", + "status_reason_message": "Person is confirmed as disabled", + "total_count": "1", + "completed_count": "1", + "sender_id": "DR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "txn-9876543210", + "message": { + "timestamp": "2024-08-11T10:00:00.000Z", + "correlation_id": "1234567890", + "search_response": [ + { + "reference_id": "12345678901234567890", + "timestamp": "", + "status": "rcvd", + "status_reason_code": "rjct.reference_id.invalid", + "status_reason_message": "string", + "data": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:DR", + "reg_event_type": "spdci-common:RegistryEventType:DisabledPerson", + "reg_record_type": "spdci-extensions-dci:DisabledPerson", + "reg_records": { + "type": "object", + "example": { + "personal_details": { + "identifier": "123456", + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15", + "gender": "Male" + }, + "disability_status": "Approved", + "disability_level": "Severe", + "disability_details": [ + { + "impairment_type": "Physical and movement related functions", + "impairment_level": "Severe impairment or difficulty", + "impairment_cause": "Work Accident", + "age_on_set": "Working age" + } + ], + "disability_support": [ + { + "human_assistance":{ + "frequency": "Permanent", + "type": "mobility", + "support_status": "Required" + } + } + ], + "transport_requirement": "Adaptable vehical", + "housing_type": "Social housing", + "programs_enrollments":[ + { + "programme_name" : "financial_assistance", + "programme_identifier": "AD234" + } + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + } + } + }, + "pagination": {}, + "locale": "en" + } + ] + } + } + } + \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/dr/processflow2req.json b/release/sample-jsons/assets/example_files/dr/processflow2req.json new file mode 100644 index 0000000..436a7ca --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/processflow2req.json @@ -0,0 +1,30 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"SP-System|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746200\", expires=\"1691832600\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "b2a5c6d7-8e9f-4a1b-9d2c-34567890abcd", + "message_ts": "2024-08-11T11:00:00.000Z", + "action": "get_disability_info", + "status": "request", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "SP-System", + "receiver_id": "DR", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "txn-abcdef1234", + "disabled_criteria": { + "query_type": "expression", + "query": { + "personal_details.member_identifier": { + "eq": "ABC451123" + } + } +} + } + } + \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/dr/processflow2res.json b/release/sample-jsons/assets/example_files/dr/processflow2res.json new file mode 100644 index 0000000..fe87aaa --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/processflow2res.json @@ -0,0 +1,31 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"DR|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746600\", expires=\"1691833000\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "a1b2c3d4-5678-90ef-gh12-34567890ijkl", + "message_ts": "2024-08-11T11:30:00.000Z", + "action": "get_disability_info", + "status": "success", + "status_reason_code": "200", + "status_reason_message": "Disability information retrieved successfully", + "total_count": "1", + "completed_count": "1", + "sender_id": "DR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "txn-abcdef1234", + "disabled_response": [ + { + "reference_id": "12345678901234567890", + "timestamp": "", + "status": "rcvd", + "status_reason_message": "string", + "disabled_status": "yes" + } + ] + } + } + \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/dr/processflow3req.json b/release/sample-jsons/assets/example_files/dr/processflow3req.json new file mode 100644 index 0000000..1535bcf --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/processflow3req.json @@ -0,0 +1,60 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"SP-System|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "DR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [{ + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "SEARCH", + "query_type": "expression", + "response_entity": "DRPerson", + "query": { + "type": "ns:org:QueryType:NoSql", + "value": { + "expression": { + "collection": "DRPerson", + "query": { + "$and": [ + { + "member.demographic_info.birth_date": { + "$gt": "1950-08-18T00:00:00Z" + } + }, + { + "disability_status": {"$eq": "Approved"} + } + ] + + } + } + } + }, + "sort": [{ + "attribute_name": "demographic_info.birth_date", + "sort_order": "asc" + }], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "EN/GB" + }] + } + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/dr/processflow3res.json b/release/sample-jsons/assets/example_files/dr/processflow3res.json new file mode 100644 index 0000000..48a868e --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/processflow3res.json @@ -0,0 +1,104 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"DR|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691833700\", expires=\"1691920100\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "1234567890", + "message_ts": "2024-08-11T13:15:00.000Z", + "action": "search", + "status": "success", + "status_reason_code": "200", + "status_reason_message": "Search request processed successfully", + "total_count": "3", + "sender_id": "DR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "results": [ + { + "personal_details": { + "identifier": "123456", + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15", + "gender": "Male" + }, + "disability_status": "Approved", + "disability_level": "Severe", + "disability_details": [ + { + "impairment_type": "Physical and movement related functions", + "impairment_level": "Severe impairment or difficulty", + "impairment_cause": "Work Accident", + "age_on_set": "Working age" + } + ], + "disability_support": [ + { + "human_assistance":{ + "frequency": "Permanent", + "type": "mobility", + "support_status": "Required" + } + } + ], + "transport_requirement": "Adaptable vehical", + "housing_type": "Social housing", + "programs_enrollments":[ + { + "programme_name" : "financial_assistance", + "programme_identifier": "AD234" + } + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + + }, + { + "personal_details": { + "identifier": "1236", + "name": { + "first_name": "Jane", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15", + "gender": "FeMale" + }, + "disability_status": "Approved", + "disability_level": "Severe", + "disability_details": [ + { + "impairment_type": "Physical and movement related functions", + "impairment_level": "Severe impairment or difficulty", + "impairment_cause": "Work Accident", + "age_on_set": "Working age" + } + ], + "disability_support": [ + { + "human_assistance":{ + "frequency": "Permanent", + "type": "mobility", + "support_status": "Required" + } + } + ], + "transport_requirement": "Adaptable vehical", + "housing_type": "Social housing", + "programs_enrollments":[ + { + "programme_name" : "financial_assistance", + "programme_identifier": "AD234" + } + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + + } + ] + } + } + \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/dr/processflow4req.json b/release/sample-jsons/assets/example_files/dr/processflow4req.json new file mode 100644 index 0000000..530ac0f --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/processflow4req.json @@ -0,0 +1,76 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"SP-System|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746200\", expires=\"1691832600\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "4567890123", + "message_ts": "2024-08-11T12:00:00.000Z", + "action": "subscribe", + "sender_id": "SP-System", + "sender_uri": "https://spmis.example.org/{namespace}/callback/on-new-disabled-newborn", + "receiver_id": "DR", + "total_count": 1, + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "transaction_id": "txn-9876543210", + "subscribe_request": [ + { + "reference_id": "20240818-001", + "timestamp": "2024-08-18T12:00:00.000Z", + "subscribe_criteria": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:Disability", + "reg_event_type": "spdci-common:RegistryEventType:NewDisabledNewborn", + "frequency": { + "start_time": "2024-08-18T00:00:00.000Z", + "frequency": "daily" + }, + "filter_type": "expression", + "filter": { + "type": "ns:org:QueryType:NoSql", + "value": { + "expression": { + "collection": "DRPerson", + "query": { + "$and": [ + { + "disability_status": { + "$eq": "Approved" + } + } + ] + } + } + } + }, + "notify_record_type": "spdci-extensions-dci:Person", + "authorize": { + "@context": "https://standards.spdci.org/schemas/Authorize", + "@type": "Authorize", + "ts": { + "$ref": "#/components/schemas/DateTime" + }, + "purpose": { + "text": { + "type": "string", + "description": "Authorization for subscription to new disabled newborn events" + }, + "code": { + "type": "string", + "description": "Subscription authorization code" + }, + "ref_uri": { + "type": "string", + "format": "uri", + "description": "URI providing more information on authorization codes" + } + } + } + }, + "locale": "en" + } + ] + } +} + diff --git a/release/sample-jsons/assets/example_files/dr/processflow4res.json b/release/sample-jsons/assets/example_files/dr/processflow4res.json new file mode 100644 index 0000000..2c6090f --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/processflow4res.json @@ -0,0 +1,29 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"DR|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746600\", expires=\"1691833000\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "4567890124", + "message_ts": "2024-08-11T12:10:00.000Z", + "action": "subscribe", + "status": "acknowledged", + "status_reason_code": "200", + "status_reason_message": "Subscription request acknowledged successfully", + "total_count": "1", + "completed_count": "1", + "sender_id": "DR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "ack_status": "ACK", + "timestamp": "2024-08-18T12:10:00.000Z", + "correlation_id": "txn-9876543210", + "error": { + "code": "", + "message": "" + } + } + } + + \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/dr/usecaselist.json b/release/sample-jsons/assets/example_files/dr/usecaselist.json new file mode 100644 index 0000000..3b532e1 --- /dev/null +++ b/release/sample-jsons/assets/example_files/dr/usecaselist.json @@ -0,0 +1,18 @@ +[ + { + "processflow_id" : "processflow1", + "processflow_name": "Process Flow 1 : SP-System queries the DR to request individuals with a specific disability criteria" + }, + { + "processflow_id" : "processflow2", + "processflow_name": "Process Flow 2 : SP-System queries the DR to confirm disability status " + }, + { + "processflow_id" : "processflow3", + "processflow_name": "Process Flow 3 : Eligibility check in a Grants for Old Age Scheme enrollment" + }, + { + "processflow_id" : "processflow4", + "processflow_name": "Process Flow 4 : Register for persons with disability notifications with status approved" + } +] \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ess/processflow1req.json b/release/sample-jsons/assets/example_files/ess/processflow1req.json new file mode 100644 index 0000000..8cc4022 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/processflow1req.json @@ -0,0 +1,55 @@ +{ +"signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", +"header": { +"version": "1.0.0", +"message_id": "123", +"message_ts": "2022-12-04T17:20:07-04:00", +"action": "subscribe", +"sender_id": "ess.example.org", +"sender_uri": "https://ess.example.org/on-notify", +"receiver_id": "spmis.example.org", +"total_count": 21800, +"is_msg_encrypted": false, +"meta": { } +}, +"message": { + "transaction_id": "XZFHYTY", + "subscribe_request": [ + { + "reference_id": "SDFRTYUX", + "timestamp": "2022-12-04T17:20:07-04:00", + "subscribe_criteria": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:ESS", + "reg_event_type": "enrolment", + "frequency": { + "start_time": "2022-12-04T17:20:07-04:00", + "end_time": "2022-12-04T17:20:07-04:00", + "frequency": "real-time" + }, + "filter_type": "expression", + "filter": { + "type": "ns:org:QueryType:graphql", + "value": { + "expression": "subscription NewEligibleEnrolments {\n enrolment(\n employment_status: \"not employed\",\n age_gt: 18,\n age_lt: 64\n ) {\n id\n demographic_info {\n name {\n given_name\n surname\n }\n email\n phone_number\n }\n }\n}\n" + } + }, + "notify_record_type": "Member", + "authorize": { + "@context": "https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld", + "@type": "Authorize", + "ts": { + "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp" + }, + "purpose": { + "text": "Identify working-age unemployed members for employment services", + "code": "ESS_WORKING_AGE_UNEMPLOYED", + "ref_uri": "https://example.org/purpose-codes" + } + } + }, + "locale": "eng" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ess/processflow1res.json b/release/sample-jsons/assets/example_files/ess/processflow1res.json new file mode 100644 index 0000000..07e7830 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/processflow1res.json @@ -0,0 +1,66 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"spmis.example.org|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1708070400\", expires=\"1708156800\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "MSG-000789", + "message_ts": "2026-02-16T10:30:00Z", + "action": "notify", + "status": "rcvd", + "status_reason_code": "success", + "status_reason_message": "Notification delivered", + "total_count": 1, + "completed_count": 1, + "sender_id": "spmis.example.org", + "receiver_id": "ess.example.org", + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "transaction_id": "TXN-ESS-SP-001", + "notify_event": [ + { + "reference_id": "ESS-AGE-ELIGIBLE-001", + "timestamp": "2026-02-16T10:30:00Z", + "data": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:ESS", + "reg_event_type": "enrolment", + "reg_record_type": "Member", + "reg_records": { + "@context": { + "spdci": "https://schema.spdci.org/extensions/ESS/v1/", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/member/123456789", + "@type": "spdci:Member", + "member_identifier": [ + { + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "9876543210" + } + ], + "demographic_info": { + "@type": "ESS_Person", + "name": { + "@type": "Name", + "surname": "Johnson", + "given_name": "Bob", + "prefix": "", + "suffix": "" + }, + "birth_date": "1992-03-15", + "sex": "male", + "email": ["bob.johnson@example.com"], + "phone_number": ["+66892345678"] + }, + "employment_status": "not employed", + "registration_date": "2026-01-15T08:00:00Z", + "last_updated": "2026-02-15T10:00:00Z" + } + }, + "locale": "eng" + } + ] + } +} diff --git a/release/sample-jsons/assets/example_files/ess/processflow2req.json b/release/sample-jsons/assets/example_files/ess/processflow2req.json new file mode 100644 index 0000000..144ee5f --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/processflow2req.json @@ -0,0 +1,54 @@ +{ +"signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", +"header": { +"version": "1.0.0", +"message_id": "123", +"message_ts": "2022-12-04T17:20:07-04:00", +"action": "subscribe", +"sender_id": "spmis.example.org", +"sender_uri": "https://spmis.example.com/on-notify", +"receiver_id": "ess.example.org", +"total_count": 21800, +"is_msg_encrypted": false, +"meta": { } +}, +"message": + { + "transaction_id": "TXN-REF-ESS-002", + "subscribe_request": [ + { + "reference_id": "REF-ESS-LONGTERM-001", + "timestamp": "2026-02-16T10:30:00Z", + "subscribe_criteria": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:ESS", + "reg_event_type": "enrolment", + "frequency": { + "start_time": "2026-02-16T10:30:00Z", + "end_time": "2027-02-16T10:30:00Z", + "frequency": "real-time" + }, + "filter_type": "expression", + "filter": { + "type": "ns:org:QueryType:graphql", + "value": { + "expression": "subscription LongTermUnemployedEnrolment {\n enrolment(\n employment_status: \"not employed\",\n employment_info: { end_date_lt: \"2024-02-16\" }\n ) {\n id\n demographic_info {\n name { given_name surname }\n phone_number\n email\n }\n }\n}\n" + } + }, + "notify_record_type": "Member", + "authorize": { + "@context": "https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld", + "@type": "Authorize", + "ts": "2026-02-16T10:30:00Z", + "purpose": { + "text": "Identify long-term unemployed members eligible for support referral", + "code": "LONG_TERM_UNEMPLOYED_REFERRAL", + "ref_uri": "https://example.org/purpose-codes" + } + } + }, + "locale": "eng" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ess/processflow2res.json b/release/sample-jsons/assets/example_files/ess/processflow2res.json new file mode 100644 index 0000000..49e66f4 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/processflow2res.json @@ -0,0 +1,74 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"ess.example.org|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1708070400\", expires=\"1708156800\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "MSG-001234", + "message_ts": "2026-02-16T10:40:00Z", + "action": "notify", + "status": "rcvd", + "status_reason_code": "success", + "status_reason_message": "Notification delivered", + "total_count": 1, + "completed_count": 1, + "sender_id": "ess.example.org", + "receiver_id": "spmis.example.org", + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "transaction_id": "TXN-SP-ESS-002", + "notify_event": [ + { + "reference_id": "SP-LTU-001", + "timestamp": "2026-02-16T10:40:00Z", + "data": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:ESS", + "reg_event_type": "enrolment", + "reg_record_type": "Member", + "reg_records": { + "@context": { + "spdci": "https://schema.spdci.org/extensions/ESS/v1/", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/member/987654321", + "@type": "spdci:Member", + "member_identifier": [ + { + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "42343545654" + } + ], + "demographic_info": { + "@type": "PES_Person", + "name": { + "@type": "Name", + "surname": "Smith", + "given_name": "Alice", + "prefix": "Ms.", + "suffix": "" + }, + "birth_date": "1985-05-20", + "sex": "female", + "email": ["alice.smith@example.com"], + "phone_number": ["+66891234567"] + }, + "employment_status": "not employed", + + "employment_info": { + "employer": "Previous Employer Ltd", + "start_date": "2019-01-01", + "end_date": "2024-01-15", + "employment_type":"Seasonal", + "job_title":"farmer" + }, + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2026-02-15T10:00:00Z" + } + }, + "locale": "eng" + } + ] + } +} diff --git a/release/sample-jsons/assets/example_files/ess/processflow3req.json b/release/sample-jsons/assets/example_files/ess/processflow3req.json new file mode 100644 index 0000000..26042e0 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/processflow3req.json @@ -0,0 +1,83 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"spmis.example.org|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1708070400\", expires=\"1708156800\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "MSG-SEARCH-GROUP-002", + "message_ts": "2026-02-16T12:30:00Z", + "action": "search", + "sender_id": "ess.example.org", + "receiver_id": "spmis.example.org", + "total_count": 0, + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "transaction_id": "TXN-SP-GROUP-002", + "search_request": [ + { + "reference_id": "SR-GROUP-BIRTHDATE-001", + "timestamp": "2026-02-16T12:30:00Z", + "search_criteria": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:SP", + "reg_record_type": "Group", + "query_type": "expression", + "query": { + "type": "ns:org:QueryType:expression", + "value": { + "expression": { + "collection": "Group", + "query": { + "$and": [ + { + "member_list": { + "$elemMatch": { + "employment_status": { "$eq": "not employed" }, + "demographic_info.birth_date": { + "$gte": "1962-02-16", + "$lte": "2008-02-16" + } + } + } + } + ] + } + } + } + }, + "sort": [ + { + "attribute_name": "group_size", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 100, + "page_number": 1 + }, + "consent": { + "@context": "https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld", + "@type": "Consent", + "ts": "2026-02-16T12:30:00Z", + "purpose": { + "text": "Fetch groups with working-age unemployed members", + "code": "SP_GROUP_SEARCH", + "ref_uri": "https://sp.example.org/consent-codes" + } + }, + "authorize": { + "@context": "https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld", + "@type": "Authorize", + "ts": "2026-02-16T12:30:00Z", + "purpose": { + "text": "Authorized group search for SP social protection programs", + "code": "SP_GROUP_SEARCH_AUTH", + "ref_uri": "https://sp.example.org/authorize-codes" + } + } + }, + "locale": "eng" + } + ] + } +} diff --git a/release/sample-jsons/assets/example_files/ess/processflow3res.json b/release/sample-jsons/assets/example_files/ess/processflow3res.json new file mode 100644 index 0000000..e2cfa87 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/processflow3res.json @@ -0,0 +1,212 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"ess.example.org|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1708070400\", expires=\"1708156800\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "MSG-ONSEARCH-GROUP-002", + "message_ts": "2026-02-16T13:00:00Z", + "action": "on-search", + "status": "success", + "status_reason_code": "ok", + "status_reason_message": "Groups returned successfully", + "total_count": 2, + "completed_count": 2, + "sender_id": "spmis.example.org", + "receiver_id": "ess.example.org", + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "transaction_id": "TXN-SP-GROUP-002", + "correlation_id": "SR-GROUP-BIRTHDATE-001", + "search_response": [ + { + "reference_id": "SR-GROUP-BIRTHDATE-001", + "timestamp": "2026-02-16T13:00:00Z", + "status": "success", + "status_reason_code": "ok", + "status_reason_message": "2 groups fetched", + "data": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:SP", + "reg_record_type": "Group", + "reg_records": [ + { + "@context": { + "spdci": "https://schema.spdci.org/extensions/core/v1/data", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/group/001", + "@type": "spdci:Group", + "group_identifier": { + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "GRP-001" + }, + "group_type": "household", + "geographical_location": "Bangkok", + "group_head_info": { + "@type": "spdci:Member", + "@id": "https://example.org/member/111", + "member_identifier": [ + { + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "1234567890" + } + ], + "demographic_info": { + "name": { + "given_name": "John", + "surname": "Doe" + }, + "sex": "male", + "birth_date": "1990-04-15", + "email": ["john.doe@example.com"], + "phone_number": ["+66891234567"] + }, + "employment_status": "not employed" + }, + "group_size": 4, + "member_list": [ + { + "@type": "spdci:Member", + "@id": "https://example.org/member/111", + "demographic_info": { + "name": { "given_name": "John", "surname": "Doe" }, + "sex": "male", + "birth_date": "1990-04-15", + "email": ["john.doe@example.com"], + "phone_number": ["+66891234567"] + }, + "employment_status": "not employed" + }, + { + "@type": "spdci:Member", + "@id": "https://example.org/member/112", + "demographic_info": { + "name": { "given_name": "Jane", "surname": "Doe" }, + "sex": "female", + "birth_date": "1992-07-20" + }, + "employment_status": "not employed" + }, + { + "@type": "spdci:Member", + "@id": "https://example.org/member/113", + "demographic_info": { + "name": { "given_name": "Mark", "surname": "Doe" }, + "sex": "male", + "birth_date": "2000-03-10" + }, + "employment_status": "not employed" + }, + { + "@type": "spdci:Member", + "@id": "https://example.org/member/114", + "demographic_info": { + "name": { "given_name": "Lisa", "surname": "Doe" }, + "sex": "female", + "birth_date": "1985-09-05" + }, + "employment_status": "not employed" + } + ], + "registration_date": "2026-01-15T08:00:00Z", + "last_updated": "2026-02-15T10:00:00Z", + "additional_attributes": [ + { + "notes": "Eligible for SP support" + } + ] + }, + { + "@context": { + "spdci": "https://schema.spdci.org/extensions/core/v1/data", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/group/002", + "@type": "spdci:Group", + "group_identifier": { + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "GRP-002" + }, + "group_type": "household", + "geographical_location": "Chiang Mai", + "group_head_info": { + "@type": "spdci:Member", + "@id": "https://example.org/member/222", + "member_identifier": [ + { + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "0987654321" + } + ], + "demographic_info": { + "name": { + "given_name": "Alice", + "surname": "Smith" + }, + "sex": "female", + "birth_date": "1988-11-30", + "email": ["alice.smith@example.com"], + "phone_number": ["+66898765432"] + }, + "employment_status": "not employed" + }, + "group_size": 3, + "member_list": [ + { + "@type": "spdci:Member", + "@id": "https://example.org/member/222", + "demographic_info": { + "name": { "given_name": "Alice", "surname": "Smith" }, + "sex": "female", + "birth_date": "1988-11-30", + "email": ["alice.smith@example.com"], + "phone_number": ["+66898765432"] + }, + "employment_status": "not employed" + }, + { + "@type": "spdci:Member", + "@id": "https://example.org/member/223", + "demographic_info": { + "name": { "given_name": "Tom", "surname": "Smith" }, + "sex": "male", + "birth_date": "1995-06-18" + }, + "employment_status": "not employed" + }, + { + "@type": "spdci:Member", + "@id": "https://example.org/member/224", + "demographic_info": { + "name": { "given_name": "Emma", "surname": "Smith" }, + "sex": "female", + "birth_date": "2005-01-22" + }, + "employment_status": "not employed" + } + ], + "registration_date": "2026-01-20T08:00:00Z", + "last_updated": "2026-02-15T10:00:00Z", + "additional_attributes": [ + { + "notes": "Eligible for SP support" + } + ] + } + ] + }, + "pagination": { + "page_size": 100, + "page_number": 1, + "total_count": 2 + }, + "locale": "eng" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ess/processflow4req.json b/release/sample-jsons/assets/example_files/ess/processflow4req.json new file mode 100644 index 0000000..84b7667 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/processflow4req.json @@ -0,0 +1,27 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"spmis.example.org|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1708070400\", expires=\"1708156800\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "MSG-SEARCH-STATUS-001", + "message_ts": "2026-02-16T14:30:00Z", + "action": "search-status", + "sender_id": "spmis.example.org", + "receiver_id": "ess.example.org", + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "transaction_id": "TXN-SEARCH-001", + "search_activity_id": "SR-ABC9876543210", + "reference_id": "SDFRTYUX", + "search_criteria": { + "query_type": "expression", + "response_entity": "Member", + "query": { + "person_identifier": { + "eq": "ABC451123" + } + } + } + } +} diff --git a/release/sample-jsons/assets/example_files/ess/processflow4res.json b/release/sample-jsons/assets/example_files/ess/processflow4res.json new file mode 100644 index 0000000..8860cf9 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/processflow4res.json @@ -0,0 +1,31 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"ess.example.org|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1708070400\", expires=\"1708156800\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "MSG-ONSEARCH-STATUS-001", + "message_ts": "2026-02-16T13:00:00Z", + "action": "on-search-status", + "status": "success", + "status_reason_code": "ok", + "status_reason_message": "Status returned successfully", + "total_count": 2, + "completed_count": 2, + "sender_id": "ess.example.org", + "receiver_id": "spmis.example.org", + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "transaction_id": "TXN-ONSEARCH-STATUS-001", + "correlation_id": "SR-ABC9876543210", + "enrolled_response": [ + { + "reference_id": "SDFRTYUX", + "timestamp": "2026-02-16T15:00:10Z", + "status": "rcvd", + "status_reason_message": "Member enrolment verified successfully", + "enrolled_status": "Active" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ess/usecaselist.json b/release/sample-jsons/assets/example_files/ess/usecaselist.json new file mode 100644 index 0000000..c52abcf --- /dev/null +++ b/release/sample-jsons/assets/example_files/ess/usecaselist.json @@ -0,0 +1,19 @@ +[ + { + "processflow_id" : "processflow1", + "processflow_name": "Process Flow 1 : Referral of Social Protection Program Beneficiaries to Employment Support Programs - Ex 1: Cash assistance program refers beneficiaries to an employment support program" + }, + { + "processflow_id":"processflow2", + "processflow_name": "Process Flow 2 : Referral of Employment Support Programs Applicants to Social Assistance Programs - Ex 2: Employment Support Program Refers an Applicant to a SP Program" + }, + { + "processflow_id":"processflow3", + "processflow_name": "Process Flow 3 : Proactive Enrolment of SP Registered Households in Employment Support Programs - Ex 1 / Ex 2" + }, + { + "processflow_id": "processflow4", + "processflow_name": "Process Flow 5 : Program Updates for Case Management - Ex 1: Integrated Case Management for Social Services and Employment Support" + } + +] \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/fr/processflow1req.json b/release/sample-jsons/assets/example_files/fr/processflow1req.json new file mode 100644 index 0000000..7d82627 --- /dev/null +++ b/release/sample-jsons/assets/example_files/fr/processflow1req.json @@ -0,0 +1,48 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"SPMIS|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "verify", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "FR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "txn-1234567890", + "search_request": { + "reference_id": "12345678901234567890", + "timestamp": "", + "search_criteria": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:DR", + "reg_event_type": "spdci-common:RegistryEventType:Farmer", + "query_type": "expression", + "query": { + "type": "ns:org:QueryType:NoSql", + "value": { + "expression": { + "query": { + "$and": [ + { + "famer_personal_details.member_identifier.identifier_value": {"$eq": "M123456"} + } + ] + } + } + } + }, + "sort": [], + "pagination": {}, + "consent": {}, + "authorize": {} + }, + "locale": "en" + } + + } + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/fr/processflow1res.json b/release/sample-jsons/assets/example_files/fr/processflow1res.json new file mode 100644 index 0000000..27bf38d --- /dev/null +++ b/release/sample-jsons/assets/example_files/fr/processflow1res.json @@ -0,0 +1,193 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"DR|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746200\", expires=\"1691832600\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "1a2b3c4d-5678-90ab-cdef-1234567890ab", + "message_ts": "2024-08-11T10:00:00.000Z", + "action": "check_disability_status", + "status": "ack", + "status_reason_code": "200", + "status_reason_message": "Person is confirmed as disabled", + "total_count": "1", + "completed_count": "1", + "sender_id": "FR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "txn-9876543210", + "message": { + "timestamp": "2024-08-11T10:00:00.000Z", + "correlation_id": "1234567890", + "search_response": [ + { + "reference_id": "12345678901234567890", + "timestamp": "", + "status": "rcvd", + "status_reason_code": "rjct.reference_id.invalid", + "status_reason_message": "string", + "data": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:FR", + "reg_event_type": "spdci-common:RegistryEventType:DisabledPerson", + "reg_record_type": "spdci-extensions-dci:DisabledPerson", + "reg_records": { + "type": "array", + "example": [ + { + "famer_personal_details": { + "member_identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "demographic_info": { + "identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15T00:00:00Z", + "gender": "Male" + } + }, + "family_details": { + "group_identifier": [ + { + "identifier_type": "NationalID", + "identifier_value": "G9876543210" + } + ], + "group_type": "family", + "poverty_score": 45.2, + "poverty_score_type": "income-based", + "group_head_info": { + "member_identifier": [ + { + "identifier_type": "NationalID", + "identifier_value": "M123456" + } + ], + "demographic_info": { + "identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15T00:00:00Z", + "gender": "Male" + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "1990-06-10T08:00:00Z" + }, + "group_size": 2, + "member_list": [ + { + "member_identifier": [ + { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "M9876543210" + } + ], + "demographic_info": { + "spdci:identifier": [ + { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "1234567890" + } + ], + "name": { + "@type": "Name", + "surname": "Doe", + "given_name": "Jane", + "prefix": "Mr.", + "suffix": "" + }, + "sex": "female", + "birth_date": "1982-03-15T00:00:00Z", + "registration_date": "2022-01-10T08:00:00Z" + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "2022-01-10T08:00:00Z" + } + ], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }, + "farm_details":[ { + "place":{ + "name": "Koh Samui", + "geo": { + "@type": "spdci:GeoLocation", + "latitude": 9.5604, + "longitude": 100.0245 + } + }, + "land_tenure":"Leased (Rented from someone else)", + "land_size": 3000, + "measurement": "Acre", + "farm_type":"Small subsistence-oriented farms", + "farming_activities":[{ + "crop_production": [{ + "activity_group":"perennial crops", + "crop_type":"Fruit and nuts", + "variety":"local", + "season":"winter", + "end_use":["Food for human consumption"], + "irrigation":true, + "irrigation_water":["Mixed surface water and groundwater"], + "fertilizer_type":["Organic fertilizers"], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + }], + "animal_production":[{ + "type":"Sheep and goats", + "count":10, + "livestock_system":"Mixed system", + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + }], + "mixed_farming":true, + "agri_support_activities":["Support activities for crop production"], + "aqua_support_activities":"Support activities for fishing and aquaculture", + "aqua_culture":["Marine aquafarming"], + "agroforestry":["Reforestation (replanting trees)"], + "registration_date": "2023-06-15T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }], + "machineries_details": [ + { + "type": "Machine powered equipment", + "count": 2, + "equipement_source": "Provided by a cooperative", + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + } + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + } + ] + } + }, + "pagination": {}, + "locale": "en" + } + ] + } + } + } + \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/fr/processflow2req.json b/release/sample-jsons/assets/example_files/fr/processflow2req.json new file mode 100644 index 0000000..cfe216a --- /dev/null +++ b/release/sample-jsons/assets/example_files/fr/processflow2req.json @@ -0,0 +1,51 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"SPMIS|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "verify", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "FR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "txn-1234567890", + "search_request": { + "reference_id": "12345678901234567890", + "timestamp": "", + "search_criteria": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:DR", + "reg_event_type": "spdci-common:RegistryEventType:DisabledPerson", + "query_type": "expression", + "query": { + "type": "ns:org:QueryType:NoSql", + "value": { + "expression": { + "query": { + "$and": [ + { + "farm_type": {"$eq": "Small subsistence-oriented farms"} + }, + { + "farm_details.size" : {"$gt":300} + } + ] + } + } + } + }, + "sort": [], + "pagination": {}, + "consent": {}, + "authorize": {} + }, + "locale": "en" + } + + } + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/fr/processflow2res.json b/release/sample-jsons/assets/example_files/fr/processflow2res.json new file mode 100644 index 0000000..1ab861e --- /dev/null +++ b/release/sample-jsons/assets/example_files/fr/processflow2res.json @@ -0,0 +1,374 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"DR|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746200\", expires=\"1691832600\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "1a2b3c4d-5678-90ab-cdef-1234567890ab", + "message_ts": "2024-08-11T10:00:00.000Z", + "action": "check_disability_status", + "status": "ack", + "status_reason_code": "200", + "status_reason_message": "Person is confirmed as disabled", + "total_count": "1", + "completed_count": "1", + "sender_id": "FR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "txn-9876543210", + "message": { + "timestamp": "2024-08-11T10:00:00.000Z", + "correlation_id": "1234567890", + "search_response": [ + { + "reference_id": "12345678901234567890", + "timestamp": "", + "status": "rcvd", + "status_reason_code": "rjct.reference_id.invalid", + "status_reason_message": "string", + "data": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:FR", + "reg_event_type": "spdci-common:RegistryEventType:DisabledPerson", + "reg_record_type": "spdci-extensions-dci:DisabledPerson", + "reg_records": { + "type": "array", + "example": [ + { + "famer_personal_details": { + "member_identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "demographic_info": { + "identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15T00:00:00Z", + "gender": "Male" + } + }, + "family_details": { + "group_identifier": [ + { + "identifier_type": "NationalID", + "identifier_value": "G9876543210" + } + ], + "group_type": "family", + "poverty_score": 45.2, + "poverty_score_type": "income-based", + "group_head_info": { + "member_identifier": [ + { + "identifier_type": "NationalID", + "identifier_value": "M123456" + } + ], + "demographic_info": { + "identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15T00:00:00Z", + "gender": "Male" + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "1990-06-10T08:00:00Z" + }, + "group_size": 2, + "member_list": [ + { + "member_identifier": [ + { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "M9876543210" + } + ], + "demographic_info": { + "spdci:identifier": [ + { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "1234567890" + } + ], + "name": { + "@type": "Name", + "surname": "Doe", + "given_name": "Jane", + "prefix": "Mr.", + "suffix": "" + }, + "sex": "female", + "birth_date": "1982-03-15T00:00:00Z", + "registration_date": "2022-01-10T08:00:00Z" + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "2022-01-10T08:00:00Z" + } + ], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }, + "farm_type": "Small subsistence-oriented farms", + "farm_details": { + "place": { + "name": "Koh Samui", + "geo": { + "@type": "spdci:GeoLocation", + "latitude": 9.5604, + "longitude": 100.0245 + } + }, + "land_tenure": "Leased (Rented from someone else)", + "land_size": 3000, + "measurement": "Acre", + "farming_activities": [ + { + "crop_production": [ + { + "activity_group": "perennial crops", + "crop_type": "Fruit and nuts", + "variety": "local", + "season": "winter", + "end_use": [ + "Food for human consumption" + ], + "irrigation": true, + "irrigation_water": [ + "Mixed surface water and groundwater" + ], + "fertilizer_type": [ + "Organic fertilizers" + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + } + ], + "animal_production": [ + { + "type": "Sheep and goats", + "count": 10, + "livestock_system": "Mixed system", + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + } + ], + "mixed_farming": true, + "agri_support_activities": [ + "Support activities for crop production" + ], + "aqua_support_activities": "Support activities for fishing and aquaculture", + "aqua_culture": [ + "Marine aquafarming" + ], + "agroforestry": [ + "Reforestation (replanting trees)" + ], + "registration_date": "2023-06-15T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + } + ], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }, + "machineries_details": [ + { + "type": "Machine powered equipment", + "count": 2, + "equipement_source": "Provided by a cooperative", + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + } + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + }, + { + "famer_personal_details": { + "member_identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "demographic_info": { + "identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15T00:00:00Z", + "gender": "Male" + } + }, + "family_details": { + "group_identifier": [ + { + "identifier_type": "NationalID", + "identifier_value": "G9876543210" + } + ], + "group_type": "family", + "poverty_score": 45.2, + "poverty_score_type": "income-based", + "group_head_info": { + "member_identifier": [ + { + "identifier_type": "NationalID", + "identifier_value": "M123456" + } + ], + "demographic_info": { + "identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15T00:00:00Z", + "gender": "Male" + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "1990-06-10T08:00:00Z" + }, + "group_size": 2, + "member_list": [ + { + "member_identifier": [ + { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "M9876543210" + } + ], + "demographic_info": { + "spdci:identifier": [ + { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "1234567890" + } + ], + "name": { + "@type": "Name", + "surname": "Doe", + "given_name": "Jane", + "prefix": "Mr.", + "suffix": "" + }, + "sex": "female", + "birth_date": "1982-03-15T00:00:00Z", + "registration_date": "2022-01-10T08:00:00Z" + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "2022-01-10T08:00:00Z" + } + ], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }, + "farm_details":[ { + "place": { + "name": "Koh Samui", + "geo": { + "@type": "spdci:GeoLocation", + "latitude": 9.5604, + "longitude": 100.0245 + } + }, + "land_tenure": "Leased (Rented from someone else)", + "land_size": 4000, + "measurement": "Acre", + "farm_type": "Small subsistence-oriented farms", + "farming_activities": [ + { + "crop_production": [ + { + "activity_group": "perennial crops", + "crop_type": "Fruit and nuts", + "variety": "local", + "season": "winter", + "end_use": [ + "Food for human consumption" + ], + "irrigation": true, + "irrigation_water": [ + "Mixed surface water and groundwater" + ], + "fertilizer_type": [ + "Organic fertilizers" + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + } + ], + "animal_production": [ + { + "type": "Sheep and goats", + "count": 10, + "livestock_system": "Mixed system", + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + } + ], + "mixed_farming": true, + "agri_support_activities": [ + "Support activities for crop production" + ], + "aqua_support_activities": "Support activities for fishing and aquaculture", + "aqua_culture": [ + "Marine aquafarming" + ], + "agroforestry": [ + "Reforestation (replanting trees)" + ], + "registration_date": "2023-06-15T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + } + ], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }], + "machineries_details": [ + { + "type": "Machine powered equipment", + "count": 2, + "equipement_source": "Provided by a cooperative", + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + } + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + } + ] + } + }, + "pagination": {}, + "locale": "en" + } + ] + } + } + } + \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/fr/processflow3req.json b/release/sample-jsons/assets/example_files/fr/processflow3req.json new file mode 100644 index 0000000..994432e --- /dev/null +++ b/release/sample-jsons/assets/example_files/fr/processflow3req.json @@ -0,0 +1,76 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"SP-System|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746200\", expires=\"1691832600\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "4567890123", + "message_ts": "2024-08-11T12:00:00.000Z", + "action": "subscribe", + "sender_id": "SP-System", + "sender_uri": "https://spmis.example.org/{namespace}/callback/on-new-farmer-registration", + "receiver_id": "FR", + "total_count": 1, + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "transaction_id": "txn-9876543210", + "subscribe_request": [ + { + "reference_id": "20240818-001", + "timestamp": "2024-08-18T12:00:00.000Z", + "subscribe_criteria": { + "version": "1.0.0", + "reg_type": "ns:org:RegistryType:FR", + "reg_event_type": "spdci-common:RegistryEventType:NewFarmer", + "frequency": { + "start_time": "2024-08-18T00:00:00.000Z", + "frequency": "daily" + }, + "filter_type": "expression", + "filter": { + "type": "ns:org:QueryType:NoSql", + "value": { + "expression": { + "collection": "FRPerson", + "query": { + "$and": [ + { + "registration_date": { + "$gt": "2024-12-12T00:00:00Z" + } + } + ] + } + } + } + }, + "notify_record_type": "spdci-extensions-dci:Person", + "authorize": { + "@context": "https://standards.spdci.org/schemas/Authorize", + "@type": "Authorize", + "ts": { + "$ref": "#/components/schemas/DateTime" + }, + "purpose": { + "text": { + "type": "string", + "description": "Authorization for subscription to new disabled newborn events" + }, + "code": { + "type": "string", + "description": "Subscription authorization code" + }, + "ref_uri": { + "type": "string", + "format": "uri", + "description": "URI providing more information on authorization codes" + } + } + } + }, + "locale": "en" + } + ] + } +} + diff --git a/release/sample-jsons/assets/example_files/fr/processflow3res.json b/release/sample-jsons/assets/example_files/fr/processflow3res.json new file mode 100644 index 0000000..45b9cad --- /dev/null +++ b/release/sample-jsons/assets/example_files/fr/processflow3res.json @@ -0,0 +1,29 @@ +{ + "signature": "Signature: namespace=\"spdci\", kidId=\"DR|unique_key_id|ed25519\", algorithm=\"ed25519\", created=\"1691746600\", expires=\"1691833000\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)\"", + "header": { + "version": "1.0.0", + "message_id": "4567890124", + "message_ts": "2024-08-11T12:10:00.000Z", + "action": "subscribe", + "status": "acknowledged", + "status_reason_code": "200", + "status_reason_message": "Subscription request acknowledged successfully", + "total_count": "1", + "completed_count": "1", + "sender_id": "FR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": {} + }, + "message": { + "ack_status": "ACK", + "timestamp": "2024-08-18T12:10:00.000Z", + "correlation_id": "txn-9876543210", + "error": { + "code": "", + "message": "" + } + } + } + + \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/fr/usecaselist.json b/release/sample-jsons/assets/example_files/fr/usecaselist.json new file mode 100644 index 0000000..993093b --- /dev/null +++ b/release/sample-jsons/assets/example_files/fr/usecaselist.json @@ -0,0 +1,15 @@ +[ + { + "processflow_id" : "processflow1", + "processflow_name": "Process Flow 1 : SP-System queries the FR to request farmer with a member id" + }, + { + "processflow_id" : "processflow2", + "processflow_name": "Process Flow 2 : SP-System queries the FR to request farmers that have Small subsistence-oriented farms greater than 3000 acres" + }, + { + "processflow_id" : "processflow3", + "processflow_name": "Process Flow 3 : Register for new farmers" + } + +] \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow1req.json b/release/sample-jsons/assets/example_files/ibr/processflow1req.json new file mode 100644 index 0000000..495fe3d --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow1req.json @@ -0,0 +1,88 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "register", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "IBR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "receipt_information": { + "receipt_type": "enrollment", + "beneficiaries": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/extensions/ibr/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Beneficiary", + "@type": "Beneficiary", + "assistance_unit": "1", + "member": { + "member_identifier": [ { + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "demographic_info": { + "person": { + "identifier":[ { + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "name": { + "first_name": "Test", + "second_name": "Test2", + "surname": "Test3" + }, + "sex": "F", + "birth_date": "1980-04-12T00:00", + "death_date": "", + "address": "", + "phone_number": "", + "email": "" + } + }, + "relationship_head": "", + "related_person": "", + "is_disabled": "0", + "disability_info": "", + "marital_status": "Single", + "employment_status": "employed", + "occupation": "Caregiver", + "income_level": "", + "language_code": "Eng", + "education_level": "Highschool", + "additional_attributes": "", + "registration_date": "2024-04-12T00:00", + "last_update": "", + "programme_identifier": { + "programme": { + "programme_identifier": "DCI001", + "programme_name": "Test Programme" + }, + "enrolment_date": "2024-04-12T00:00", + "enrolment_status": "Active", + "status_change_date": "", + "benefits": { + "benefit_type": "Cash", + "benefit_date": "02.05.2024", + "benefit_value": "USD 50", + "benefit_frequency": "Monthly" + } + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow1res.json b/release/sample-jsons/assets/example_files/ibr/processflow1res.json new file mode 100644 index 0000000..afe98f4 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow1res.json @@ -0,0 +1,27 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "register", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "IBR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "message": { + "ack_status": "ACK", + "timestamp": "", + "correlation_id": "9876543210" + } + + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow2req.json b/release/sample-jsons/assets/example_files/ibr/processflow2req.json new file mode 100644 index 0000000..a8fc767 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow2req.json @@ -0,0 +1,29 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "IBR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "enrolled_criteria": + { + "query_type": "expression", + "response_entity": "Beneficiary", + "query": { + "attribute_name": "person_identifier", + "operator": "eq", + "attribute_value": "847951632" + } + } + + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow2res.json b/release/sample-jsons/assets/example_files/ibr/processflow2res.json new file mode 100644 index 0000000..363f9ad --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow2res.json @@ -0,0 +1,61 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "IBR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + + "programme_identifier": { + "programme": { + "programme_identifier": "DCI001", + "programme_name": "Test Programme" + }, + "enrolment_date": "2024-04-12T00:00", + "enrolment_status": "Active", + "status_change_date": "", + "benefits": { + "benefit_type": "Cash", + "benefit_date": "2024-04-12T00:00", + "benefit_value": "USD 50", + "benefit_frequency": "Monthly" + } + } + + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3areq.json b/release/sample-jsons/assets/example_files/ibr/processflow3areq.json new file mode 100644 index 0000000..e59aa11 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3areq.json @@ -0,0 +1,46 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "crvs", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "idtype-value", + "query": { + "type": "UIN", + "value": "847951632" + }, + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3ares.json b/release/sample-jsons/assets/example_files/ibr/processflow3ares.json new file mode 100644 index 0000000..0e36bd2 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3ares.json @@ -0,0 +1,144 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "crvs", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/extensions/ibr/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Person", + "@type": "Person", + "identifier": [ + { + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "household_status": "", + "benefiting_entity": "1", + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "sub_region_code": "SH", + "marital_status": "M", + "poverty_score": "", + "is_disabled": "2", + "household_identifier": "", + "programme": [ + { + "@id": "Programme", + "@type": "Programme", + "programme_name": "", + "programme_identifier": "", + "registration_date": "2022-09-21T11:20:00", + "enrolment_date": "2022-10-21T11:20:00", + "suspension_date": "2023-09-21T11:20:00", + "graduation_date": "2022-09-21T11:20:00", + "enrolment_status": "3" + }, + { + "@id": "Programme", + "@type": "Programme", + "programme_name": "", + "programme_identifier": "", + "registration_date": "2022-10-21T11:20:00", + "enrolment_date": "2022-11-21T11:20:00", + "suspension_date": "2023-09-21T11:20:00", + "graduation_date": "2022-09-21T11:20:00", + "enrolment_status": "3" + } + ], + "benefit": [ + { + "@id": "Benefit", + "@type": "Benefit", + "benefit_type": "2", + "benefit_date": "2022-09-21T11:20:00", + "benefit_value": "EUR 85" + }, + { + "@id": "Benefit", + "@type": "Benefit", + "benefit_type": "2", + "benefit_date": "2022-09-21T11:20:00", + "benefit_value": "EUR 110" + } + ], + "payroll": [ + { + "@id": "Payroll", + "@type": "Payroll", + "payroll_amount": "EUR 250", + "payment_credit_date": "2010-09-21T11:20:00", + "payment_credit_amount": "EUR 85", + "payment_charges": "EUR 50", + "payment_status": "1" + }, + { + "@id": "Payroll", + "@type": "Payroll", + "payroll_amount": "EUR 120", + "payment_credit_date": "2011-09-21T11:20:00", + "payment_credit_amount": "EUR 70", + "payment_charges": "EUR 50", + "payment_status": "1" + } + ] + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3breq.json b/release/sample-jsons/assets/example_files/ibr/processflow3breq.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3breq.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3bres.json b/release/sample-jsons/assets/example_files/ibr/processflow3bres.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3bres.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3creq.json b/release/sample-jsons/assets/example_files/ibr/processflow3creq.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3creq.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3cres.json b/release/sample-jsons/assets/example_files/ibr/processflow3cres.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3cres.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3dreq.json b/release/sample-jsons/assets/example_files/ibr/processflow3dreq.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3dreq.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3dres.json b/release/sample-jsons/assets/example_files/ibr/processflow3dres.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3dres.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3req.json b/release/sample-jsons/assets/example_files/ibr/processflow3req.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3req.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow3res.json b/release/sample-jsons/assets/example_files/ibr/processflow3res.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3res.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow4req.json b/release/sample-jsons/assets/example_files/ibr/processflow4req.json new file mode 100644 index 0000000..e59aa11 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow4req.json @@ -0,0 +1,46 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "crvs", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "idtype-value", + "query": { + "type": "UIN", + "value": "847951632" + }, + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow4res.json b/release/sample-jsons/assets/example_files/ibr/processflow4res.json new file mode 100644 index 0000000..b16352f --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow4res.json @@ -0,0 +1,146 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "crvs", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/extensions/ibr/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Person", + "@type": "Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "household_status": "", + "benefiting_entity": "1", + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "sub_region_code": "SH", + "marital_status": "M", + "poverty_score": "", + "is_disabled": "2", + "household_identifier": "", + "programme": [ + { + "@id": "Programme", + "@type": "Programme", + "programme_name": "", + "programme_identifier": "", + "registration_date": "2022-09-21T11:20:00", + "enrolment_date": "2022-10-21T11:20:00", + "suspension_date": "2023-09-21T11:20:00", + "graduation_date": "2022-09-21T11:20:00", + "enrolment_status": "3" + }, + { + "@id": "Programme", + "@type": "Programme", + "programme_name": "", + "programme_identifier": "", + "registration_date": "2022-10-21T11:20:00", + "enrolment_date": "2022-11-21T11:20:00", + "suspension_date": "2023-09-21T11:20:00", + "graduation_date": "2022-09-21T11:20:00", + "enrolment_status": "3" + } + ], + "benefit": [ + { + "@id": "Benefit", + "@type": "Benefit", + "benefit_type": "2", + "benefit_date": "2022-09-21T11:20:00", + "benefit_value": "EUR 85" + }, + { + "@id": "Benefit", + "@type": "Benefit", + "benefit_type": "2", + "benefit_date": "2022-09-21T11:20:00", + "benefit_value": "EUR 110" + } + ], + "payroll": [ + { + "@id": "Payroll", + "@type": "Payroll", + "payroll_amount": "EUR 250", + "payment_credit_date": "2010-09-21T11:20:00", + "payment_credit_amount": "EUR 85", + "payment_charges": "EUR 50", + "payment_status": "1" + }, + { + "@id": "Payroll", + "@type": "Payroll", + "payroll_amount": "EUR 120", + "payment_credit_date": "2011-09-21T11:20:00", + "payment_credit_amount": "EUR 70", + "payment_charges": "EUR 50", + "payment_status": "1" + } + ] + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow5req.json b/release/sample-jsons/assets/example_files/ibr/processflow5req.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow5req.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/processflow5res.json b/release/sample-jsons/assets/example_files/ibr/processflow5res.json new file mode 100644 index 0000000..6eb9be5 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow5res.json @@ -0,0 +1,5 @@ +{ + "signature": "", + "headers": "", + "message": "" +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/ibr/usecaselist.json b/release/sample-jsons/assets/example_files/ibr/usecaselist.json new file mode 100644 index 0000000..3a6971e --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/usecaselist.json @@ -0,0 +1,10 @@ +[ + { + "processflow_id" : "processflow1", + "processflow_name": "Process Flow 1 : Enrollment of beneficiaries in programs for SP-System system" + }, + { + "processflow_id" : "processflow2", + "processflow_name": "Process Flow 2 : Search programs a beneficiary is enrolled in" + } +] \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow1-1req.json b/release/sample-jsons/assets/example_files/social/processflow1-1req.json new file mode 100644 index 0000000..0805358 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-1req.json @@ -0,0 +1,56 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "SR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [{ + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "SEARCH", + "query_type": "expression", + "response_entity": "Group", + "query": { + "type": "ns:org:QueryType:NoSql", + "value": { + "expression": { + "collection": "Group", + "query": { + "$and": [ + { + "poverty_score": { + "$lt": 5 + } + } + ] + } + } + } + }, + "sort": [{ + "attribute_name": "poverty_score", + "sort_order": "asc" + }], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "EN/GB" + }] +} +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow1-1res.json b/release/sample-jsons/assets/example_files/social/processflow1-1res.json new file mode 100644 index 0000000..5b0c73e --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-1res.json @@ -0,0 +1,117 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "SR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "123456789", + "correlation_id": "9876543210", + "search_response": [ + { + "data": { + "version": "1.0.0", + "reg_records": [ + { + "@context": { + "@vocab": "https://schema.spdci.org/extensions/social/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Group", + "@type": "Group", + "group_identifier":[ { + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "place": { + "geo": { + "latitude": "40.712776", + "longitude": "-74.005974" + }, + "address": "123 Main St, Anytown, CountryName" + }, + "place_address":1, + "poverty_score": "4.0", + "poverty_score_type": "", + "group_size": "1", + "group_head_info": { + "person": { + "identifier":[{ + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "name": { + "first_name": "Test", + "second_name": "Test2", + "surname": "Test3" + }, + "sex": "F", + "birth_date": "1985-05-20T00:00:00Z" + } + }, + "member_list": [ + { + "household_member": { + "member_identifier": [{ + "identifier_type": "NID", + "identifier_value": "HS0205202401" + }], + "demographic_info": { + "person": { + "identifier":[{ + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "name": { + "first_name": "Test", + "second_name": "Test2", + "surname": "Test3" + }, + "sex": "F", + "birth_date": "1985-05-20T00:00:00Z" + } + }, + "relationship_head": "self", + "related_person": { }, + "is_disabled": "0", + "marital_status": "Single", + "employment_status": "employed", + "occupation": "Caregiver", + "income_level": " ", + "language_code": "Eng", + "education_level": "Highschool", + "registration_date": "1985-05-20T00:00:00Z" + } + } + ], + "additional_attributes": [ ], + "registration_date": "1985-05-20T00:00:00Z", + "last_update": " " + } + ] + }, + "pagination": null, + "locale": null, + "reference_id": "12345678901234567890", + "timestamp": null, + "status": "rcvd", + "status_reason_code": "rjct.reference_id.invalid", + "status_reason_message": "string" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow1-2req.json b/release/sample-jsons/assets/example_files/social/processflow1-2req.json new file mode 100644 index 0000000..d929dc0 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-2req.json @@ -0,0 +1,56 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "SR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [{ + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "SEARCH", + "query_type": "expression", + "response_entity": "Household", + "query": { + "type": "ns:org:QueryType:NoSql", + "value": { + "expression": { + "collection": "HouseHold", + "query": { + "$and": [ + { + "household_size": { + "$lt": 5 + } + } + ] + } + } + } + }, + "sort": [{ + "attribute_name": "household_size", + "sort_order": "asc" + }], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "EN/GB" + }] + } + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow1-2res.json b/release/sample-jsons/assets/example_files/social/processflow1-2res.json new file mode 100644 index 0000000..db0381d --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-2res.json @@ -0,0 +1,117 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "SR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "123456789", + "correlation_id": "9876543210", + "search_response": [ + { + "data": { + "version": "1.0.0", + "reg_records": [ + { + "@context": { + "@vocab": "https://github.com/spdci/schemas/tree/main/extensions/social/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Group", + "@type": "Group", + "group_identifier":[ { + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "place": { + "geo": { + "latitude": "40.712776", + "longitude": "-74.005974" + }, + "address": "123 Main St, Anytown, CountryName" + }, + "place_address":1, + "poverty_score": "4.0", + "poverty_score_type": "", + "group_size": "1", + "group_head_info": { + "person": { + "identifier":[{ + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "name": { + "first_name": "Test", + "second_name": "Test2", + "surname": "Test3" + }, + "sex": "F", + "birth_date": "1985-05-20T00:00:00Z" + } + }, + "member_list": [ + { + "household_member": { + "member_identifier": [{ + "identifier_type": "NID", + "identifier_value": "HS0205202401" + }], + "demographic_info": { + "person": { + "identifier":[{ + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "name": { + "first_name": "Test", + "second_name": "Test2", + "surname": "Test3" + }, + "sex": "F", + "birth_date": "1985-05-20T00:00:00Z" + } + }, + "relationship_head": "self", + "related_person": { }, + "is_disabled": "0", + "marital_status": "Single", + "employment_status": "employed", + "occupation": "Caregiver", + "income_level": " ", + "language_code": "Eng", + "education_level": "Highschool", + "registration_date": "1985-05-20T00:00:00Z" + } + } + ], + "additional_attributes": [ ], + "registration_date": "1985-05-20T00:00:00Z", + "last_update": " " + } + ] + }, + "pagination": null, + "locale": null, + "reference_id": "12345678901234567890", + "timestamp": null, + "status": "rcvd", + "status_reason_code": "rjct.reference_id.invalid", + "status_reason_message": "string" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow1-3req.json b/release/sample-jsons/assets/example_files/social/processflow1-3req.json new file mode 100644 index 0000000..b29f5a8 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-3req.json @@ -0,0 +1,61 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "SP-System", + "sender_uri": "", + "receiver_id": "SR", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [{ + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "SEARCH", + "query_type": "expression", + "response_entity": "member", + "query": { + "type": "ns:org:QueryType:NoSql", + "value": { + "expression": { + "collection": "Group", + "query": { + "$and": [ + { + "demographic_info.person.sex": { + "$eq": "female" + } + }, + { + "marital_status":{ + "$eq":"W" + } + } + ] + } + } + } + }, + "sort": [{ + "attribute_name": "poverty_score", + "sort_order": "asc" + }], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "EN/GB" + }] + } + } \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow1-3res.json b/release/sample-jsons/assets/example_files/social/processflow1-3res.json new file mode 100644 index 0000000..cea00ee --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-3res.json @@ -0,0 +1,75 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "SR", + "receiver_id": "SP-System", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "123456789", + "correlation_id": "9876543210", + "search_response": [ + { + "data": { + "version": "1.0.0", + "reg_records": [ + { + "member_identifier": [{ + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "demographic_info": { + "person": { + "identifier":[{ + "identifier_type": "NID", + "identifier_value": "0205202401" + }], + "name": { + "first_name": "Test", + "second_name": "Test2", + "surname": "Test3" + }, + "sex": "F", + "birth_date": "1985-05-20T00:00:00Z", + "death_date": " ", + "address": { }, + "phone_number": "", + "email": " " + } + }, + "relationship_head": "self", + "related_person": { }, + "is_disabled": "0", + "disability_info": " ", + "marital_status": "Widow", + "employment_status": "employed", + "occupation": "Caregiver", + "income_level": " ", + "language_code": "Eng", + "education_level": "Highschool", + "registration_date": "2022-01-10T08:00:00Z" + } + + ] + }, + "pagination": null, + "locale": null, + "reference_id": "12345678901234567890", + "timestamp": null, + "status": "rcvd", + "status_reason_code": "rjct.reference_id.invalid", + "status_reason_message": "string" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow2req.json b/release/sample-jsons/assets/example_files/social/processflow2req.json new file mode 100644 index 0000000..c87b9d8 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow2req.json @@ -0,0 +1,54 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "social", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "expression", + "query": [ + { + "seq_num": "", + "expression1": { + "attribute_name": "UIN", + "operator": "eq", + "attribute_value": "847951632" + }, + "condition": "", + "expression2": "" + } + ], + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow2res.json b/release/sample-jsons/assets/example_files/social/processflow2res.json new file mode 100644 index 0000000..cd8dcee --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow2res.json @@ -0,0 +1,135 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "social", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://github.com/spdci/schemas/tree/main/extensions/social/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "SRPerson", + "@type": "SRPerson", + "identifier": [ + { + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": { + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "marital_status": "M", + "is_disabled": "2", + "disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "disability_type": [ + "716710007" + ], + "functional_limitation_type": [ + "d132" + ], + "functional_severity": [ + "0" + ], + "nationality": [ + "ISO 3166-2:AF" + ], + "employment_status": "", + "is_deceased": "3", + "death_date": "", + "ethnicity": [], + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH" + + } + ], + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "household_identifier": "", + "household_status": "1", + "poverty_score": "", + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + }, + "registration_date": "2020-09-21T11:20:00", + "last_updated": "" + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow3areq.json b/release/sample-jsons/assets/example_files/social/processflow3areq.json new file mode 100644 index 0000000..b6daf12 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow3areq.json @@ -0,0 +1,64 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "social", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "expression", + "query": [{ + "seq_num": 1, + "expression1": { + "attribute_name" : "age", + "operator" : "lt", + "attribute_value" : "25" + }, + "condition" : "and", + "expression2": { + "attribute_name" : "poverty_score", + "operator" : "lt", + "attribute_value" : "2.5" + + }, + "condition" : "and", + "expression3": { + "attribute_name" : "gender", + "operator" : "eq", + "attribute_value" : "m" + + } + }], + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow3ares.json b/release/sample-jsons/assets/example_files/social/processflow3ares.json new file mode 100644 index 0000000..c8f830a --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow3ares.json @@ -0,0 +1,175 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "social", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://github.com/spdci/schemas/tree/main/extensions/social/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Person", + "@type": "Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": [ + { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + } + ], + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "marital_status": "M", + "is_disabled": "2", + "disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "disability_type": [ + "716710007" + ], + "functional_limitation_type": [ + "d132" + ], + "functional_severity": [ + "0" + ], + "nationality": [ + "ISO 3166-2:AF" + ], + "employment_status": "", + "is_deceased": "3", + "death_date": "", + "ethnicity": [], + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + } + ], + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "household_identifier": "", + "household_status": "1", + "poverty_score": "", + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + }, + "registration_date": "2020-09-21T11:20:00", + "last_updated": "" + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow4req.json b/release/sample-jsons/assets/example_files/social/processflow4req.json new file mode 100644 index 0000000..f76b2db --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow4req.json @@ -0,0 +1,64 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "sender_id": "sp-system", + "sender_uri": "", + "receiver_id": "social", + "total_count": "1", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "search_request": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "search_criteria": { + "version": "1.0.0", + "reg_event_type": "REGISTER", + "query_type": "expression", + "query": [{ + "seq_num": 1, + "expression1": { + "attribute_name" : "age", + "operator" : "lt", + "attribute_value" : "3" + }, + "condition" : "and", + "expression2": { + "attribute_name" : "gender", + "operator" : "lt", + "attribute_value" : "m" + + }, + "condition" : "and", + "expression3": { + "attribute_name" : "poverty_score", + "operator" : "eq", + "attribute_value" : "5" + + } + }], + "sort": [ + { + "attribute_name": "UIN", + "sort_order": "asc" + } + ], + "pagination": { + "page_size": 10, + "page_number": 1 + }, + "consent": "", + "authorize": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/processflow4res.json b/release/sample-jsons/assets/example_files/social/processflow4res.json new file mode 100644 index 0000000..c8f830a --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow4res.json @@ -0,0 +1,175 @@ +{ + "signature": "Signature: namespace=\"dci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)", + "header": { + "version": "1.0.0", + "message_id": "0c96614c-7255-4774-b109-cd53ee851769", + "message_ts": "2023-07-19T12:15:04.555Z", + "action": "search", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "total_count": "1", + "completed_count": "", + "sender_id": "sp-system", + "receiver_id": "social", + "is_msg_encrypted": false, + "meta": "" + }, + "message": { + "transaction_id": "", + "correlation_id": "", + "search_response": [ + { + "reference_id": "", + "timestamp": "2022-12-04T17:20:07-04:00", + "status": "rcvd", + "status_reason_code": "", + "status_reason_message": "", + "data": { + "version": "", + "reg_records": [ + { + "@context": { + "@vocab": "https://github.com/spdci/schemas/tree/main/extensions/social/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Person", + "@type": "Person", + "identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "BRN", + "identifier_value": "947951532" + } + ], + "name": [ + { + "@id": "Name", + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "maiden_name": "", + "prefix": "Dr.", + "suffix": "PhD" + } + ], + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "marital_status": "M", + "is_disabled": "2", + "disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "disability_type": [ + "716710007" + ], + "functional_limitation_type": [ + "d132" + ], + "functional_severity": [ + "0" + ], + "nationality": [ + "ISO 3166-2:AF" + ], + "employment_status": "", + "is_deceased": "3", + "death_date": "", + "ethnicity": [], + "address": [ + { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + } + ], + "phone_number": [ + "+1 (425) 555-1212", + "+1 (425) 555-1321" + ], + "email": [ + "PhumchaiS@isp.com" + ], + "household_identifier": "", + "household_status": "1", + "poverty_score": "", + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847941632" + }, + "registration_date": "2020-09-21T11:20:00", + "last_updated": "" + } + ] + }, + "pagination": { + "page_size": 10, + "page_number": 1, + "total_count": "" + }, + "locale": "" + } + ] + } +} \ No newline at end of file diff --git a/release/sample-jsons/assets/example_files/social/usecaselist.json b/release/sample-jsons/assets/example_files/social/usecaselist.json new file mode 100644 index 0000000..6b80cc6 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/usecaselist.json @@ -0,0 +1,14 @@ +[ + { + "processflow_id" : "processflow1-1", + "processflow_name": "Process Flow 1 : Search by Poverty Score" + }, + { + "processflow_id" : "processflow1-2", + "processflow_name": "Process Flow 2 : Search by group Size" + }, + { + "processflow_id" : "processflow1-3", + "processflow_name": "Process Flow 3 : Search for female Widows" + } +] diff --git a/release/sample-jsons/assets/js/json-viewer/jquery.json-viewer.css b/release/sample-jsons/assets/js/json-viewer/jquery.json-viewer.css new file mode 100644 index 0000000..57aa450 --- /dev/null +++ b/release/sample-jsons/assets/js/json-viewer/jquery.json-viewer.css @@ -0,0 +1,57 @@ +/* Root element */ +.json-document { + padding: 1em 2em; +} + +/* Syntax highlighting for JSON objects */ +ul.json-dict, ol.json-array { + list-style-type: none; + margin: 0 0 0 1px; + border-left: 1px dotted #ccc; + padding-left: 2em; +} +.json-string { + color: #0B7500; +} +.json-literal { + color: #1A01CC; + font-weight: bold; +} + +/* Toggle button */ +a.json-toggle { + position: relative; + color: inherit; + text-decoration: none; +} +a.json-toggle:focus { + outline: none; +} +a.json-toggle:before { + font-size: 1.1em; + color: #c0c0c0; + content: "\25BC"; /* down arrow */ + position: absolute; + display: inline-block; + width: 1em; + text-align: center; + line-height: 1em; + left: -1.2em; +} +a.json-toggle:hover:before { + color: #aaa; +} +a.json-toggle.collapsed:before { + /* Use rotated down arrow, prevents right arrow appearing smaller than down arrow in some browsers */ + transform: rotate(-90deg); +} + +/* Collapsable placeholder links */ +a.json-placeholder { + color: #aaa; + padding: 0 1em; + text-decoration: none; +} +a.json-placeholder:hover { + text-decoration: underline; +} diff --git a/release/sample-jsons/assets/js/json-viewer/jquery.json-viewer.js b/release/sample-jsons/assets/js/json-viewer/jquery.json-viewer.js new file mode 100644 index 0000000..e5518c8 --- /dev/null +++ b/release/sample-jsons/assets/js/json-viewer/jquery.json-viewer.js @@ -0,0 +1,183 @@ +/** + * jQuery json-viewer + * @author: Alexandre Bodelot + * @link: https://github.com/abodelot/jquery.json-viewer + */ +(function($) { + + /** + * Check if arg is either an array with at least 1 element, or a dict with at least 1 key + * @return boolean + */ + function isCollapsable(arg) { + return arg instanceof Object && Object.keys(arg).length > 0; + } + + /** + * Check if a string looks like a URL, based on protocol + * This doesn't attempt to validate URLs, there's no use and syntax can be too complex + * @return boolean + */ + function isUrl(string) { + var protocols = ['http', 'https', 'ftp', 'ftps']; + for (var i = 0; i < protocols.length; ++i) { + if (string.startsWith(protocols[i] + '://')) { + return true; + } + } + return false; + } + + /** + * Return the input string html escaped + * @return string + */ + function htmlEscape(s) { + return s.replace(/&/g, '&') + .replace(//g, '>') + .replace(/'/g, ''') + .replace(/"/g, '"'); + } + + /** + * Transform a json object into html representation + * @return string + */ + function json2html(json, options) { + var html = ''; + if (typeof json === 'string') { + // Escape tags and quotes + json = htmlEscape(json); + + if (options.withLinks && isUrl(json)) { + html += '' + json + ''; + } else { + // Escape double quotes in the rendered non-URL string. + json = json.replace(/"/g, '\\"'); + html += '"' + json + '"'; + } + } else if (typeof json === 'number' || typeof json === 'bigint') { + html += '' + json + ''; + } else if (typeof json === 'boolean') { + html += '' + json + ''; + } else if (json === null) { + html += 'null'; + } else if (json instanceof Array) { + if (json.length > 0) { + html += '[
    '; + for (var i = 0; i < json.length; ++i) { + html += '
  1. '; + // Add toggle button if item is collapsable + if (isCollapsable(json[i])) { + html += ''; + } + html += json2html(json[i], options); + // Add comma if item is not last + if (i < json.length - 1) { + html += ','; + } + html += '
  2. '; + } + html += '
]'; + } else { + html += '[]'; + } + } else if (typeof json === 'object') { + // Optional support different libraries for big numbers + // json.isLosslessNumber: package lossless-json + // json.toExponential(): packages bignumber.js, big.js, decimal.js, decimal.js-light, others? + if (options.bigNumbers && (typeof json.toExponential === 'function' || json.isLosslessNumber)) { + html += '' + json.toString() + ''; + } else { + var keyCount = Object.keys(json).length; + if (keyCount > 0) { + html += '{
    '; + for (var key in json) { + if (Object.prototype.hasOwnProperty.call(json, key)) { + // define a parameter of the json value first to prevent get null from key when the key changed by the function `htmlEscape(key)` + let jsonElement = json[key]; + key = htmlEscape(key); + var keyRepr = options.withQuotes ? + '"' + key + '"' : key; + + html += '
  • '; + // Add toggle button if item is collapsable + if (isCollapsable(jsonElement)) { + html += '' + keyRepr + ''; + } else { + html += keyRepr; + } + html += ': ' + json2html(jsonElement, options); + // Add comma if item is not last + if (--keyCount > 0) { + html += ','; + } + html += '
  • '; + } + } + html += '
}'; + } else { + html += '{}'; + } + } + } + return html; + } + + /** + * jQuery plugin method + * @param json: a javascript object + * @param options: an optional options hash + */ + $.fn.jsonViewer = function(json, options) { + // Merge user options with default options + options = Object.assign({}, { + collapsed: false, + rootCollapsable: true, + withQuotes: false, + withLinks: true, + bigNumbers: false + }, options); + + // jQuery chaining + return this.each(function() { + + // Transform to HTML + var html = json2html(json, options); + if (options.rootCollapsable && isCollapsable(json)) { + html = '' + html; + } + + // Insert HTML in target DOM element + $(this).html(html); + $(this).addClass('json-document'); + + // Bind click on toggle buttons + $(this).off('click'); + $(this).on('click', 'a.json-toggle', function() { + var target = $(this).toggleClass('collapsed').siblings('ul.json-dict, ol.json-array'); + target.toggle(); + if (target.is(':visible')) { + target.siblings('.json-placeholder').remove(); + } else { + var count = target.children('li').length; + var placeholder = count + (count > 1 ? ' items' : ' item'); + target.after('' + placeholder + ''); + } + return false; + }); + + // Simulate click on toggle button when placeholder is clicked + $(this).on('click', 'a.json-placeholder', function() { + $(this).siblings('a.json-toggle').click(); + return false; + }); + + if (options.collapsed == true) { + // Trigger click to collapse all nodes + $(this).find('a.json-toggle').click(); + } + }); + }; +})(jQuery); diff --git a/release/sample-jsons/assets/js/usecase_api.js b/release/sample-jsons/assets/js/usecase_api.js new file mode 100644 index 0000000..afa602f --- /dev/null +++ b/release/sample-jsons/assets/js/usecase_api.js @@ -0,0 +1,106 @@ +$(function () { + $("#logo").load("./logo.html"); +}); +var optionsrenderJson = { + collapsed: false, + rootCollapsable: true, + withQuotes: true, + withLinks: true +}; + +var getFolder = folderId; +console.log("folder", getFolder) + +var download_icon = '' + + ' ' + + ' ' + + '' +$(function () { + + $.getJSON('./assets/example_files/'+getFolder+'/usecaselist.json', function (data) { + + console.log("Data",data); + + $.each(data, function (index, val) { + var usecaseid = val["processflow_id"] + var usecase_name = val["processflow_name"] + var usecaseDiv = '
' + + '
' + + '
Request Json
' +
+                ' 
' + + '
Response Json
' +
+                ' 
'; + $("#usecasesDiv").append(usecaseDiv); + $.getJSON('./assets/example_files/'+ getFolder + '/' + usecaseid + "req.json", function (data) { + renderJson('req' + usecaseid, data) + }); + $.getJSON('./assets/example_files/'+ getFolder+ "/" + usecaseid + "res.json", function (data) { + renderJson('res' + usecaseid, data) + }); + }); + + let hash = window.location.hash; + let value = hash.substring(1); + console.log(value); + $("#collapseCardBody" + value).addClass("show"); + $("#collapseCardheader" + value).removeClass("collapsed"); + + var element = $("#collapseCardheader" + value); + if (element.length) { + $('html, body').animate({ + scrollTop: element.offset().top + }, 2000); + } else { + console.error("Element not found: #collapseCardheader" + value); + } + }); +}); + +function renderJson(divid, jsoninput) { + try { + var input = eval('(' + JSON.stringify(jsoninput) + ')'); + } + catch (error) { + return alert("Cannot eval JSON: " + error); + } + $('#' + divid).jsonViewer(input, optionsrenderJson); +} +function download_file(usecaseid, reqres) { + $.ajax({ + url: './assets/example_files/'+ getFolder+ "/" + usecaseid + reqres + ".json", + dataType: 'json', + success: function (data) { + // Convert JSON object to a string + var jsonString = JSON.stringify(data); + + // Create a element with the JSON data as a download + var link = document.createElement('a'); + link.href = 'data:application/json;charset=utf-8,' + encodeURIComponent(jsonString); + + var match = usecaseid.match(/\d+/); + + // Check if a match is found + var number = "-"; + if (match) { + number = parseInt(match[0]); + console.log(number); // Output: 1 + } else { + console.log("No number found in the string."); + } + + if (reqres == "req") { + link.download = "Process_Flow_" + number + '_Request.json'; + } else if (reqres == "res") { + link.download = "Process_Flow_" + number + '_Response.json'; + } + + // Trigger the download by programmatically clicking the link + link.click(); + }, + error: function () { + console.log('Error loading the JSON file'); + } + }); +} \ No newline at end of file diff --git a/release/sample-jsons/crvs.html b/release/sample-jsons/crvs.html new file mode 100644 index 0000000..dcd6f71 --- /dev/null +++ b/release/sample-jsons/crvs.html @@ -0,0 +1,43 @@ + + + + + + + DCI APIs - CRVS process flow examples + + + + + + +
+ + + + +
+
+
+
+

CRVS process flow examples

+
+
+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/release/sample-jsons/dr.html b/release/sample-jsons/dr.html new file mode 100644 index 0000000..a4dd6b5 --- /dev/null +++ b/release/sample-jsons/dr.html @@ -0,0 +1,73 @@ + + + + + + + DCI APIs - DR process flow examples + + + + + + + + + +
+ + + + +
+ +
+
+ + +
+
+ +
+ +
+
+
+ + + + + + + + + + + + diff --git a/release/sample-jsons/ess.html b/release/sample-jsons/ess.html new file mode 100644 index 0000000..5b77c44 --- /dev/null +++ b/release/sample-jsons/ess.html @@ -0,0 +1,73 @@ + + + + + + + DCI APIs - ESS process flow examples + + + + + + + + + +
+ + + + +
+ +
+
+ + +
+
+ +
+ +
+
+
+ + + + + + + + + + + + diff --git a/release/sample-jsons/fr.html b/release/sample-jsons/fr.html new file mode 100644 index 0000000..1e47613 --- /dev/null +++ b/release/sample-jsons/fr.html @@ -0,0 +1,73 @@ + + + + + + + DCI APIs - FR process flow examples + + + + + + + + + +
+ + + + +
+ +
+
+ + +
+
+ +
+ +
+
+
+ + + + + + + + + + + + diff --git a/release/sample-jsons/ibr.html b/release/sample-jsons/ibr.html new file mode 100644 index 0000000..8049c83 --- /dev/null +++ b/release/sample-jsons/ibr.html @@ -0,0 +1,73 @@ + + + + + + + DCI APIs - IBR process flow examples + + + + + + + + + +
+ + + + +
+ +
+
+ + +
+
+ +
+ +
+
+
+ + + + + + + + + + + + diff --git a/release/sample-jsons/logo.html b/release/sample-jsons/logo.html new file mode 100644 index 0000000..9cf78ef --- /dev/null +++ b/release/sample-jsons/logo.html @@ -0,0 +1,31 @@ +
\ No newline at end of file diff --git a/release/sample-jsons/social.html b/release/sample-jsons/social.html new file mode 100644 index 0000000..89cf3be --- /dev/null +++ b/release/sample-jsons/social.html @@ -0,0 +1,73 @@ + + + + + + + DCI APIs - Social process flow examples + + + + + + + + + +
+ + + + +
+ +
+
+ + +
+
+ +
+ +
+
+
+ + + + + + + + + + + + diff --git a/release/yaml/authz_core_api_v1.0.0.yaml b/release/yaml/authz_core_api_v1.0.0.yaml index 499066e..72b7497 100644 --- a/release/yaml/authz_core_api_v1.0.0.yaml +++ b/release/yaml/authz_core_api_v1.0.0.yaml @@ -1,17 +1,18 @@ openapi: 3.0.3 info: title: Interoperability APIs - Authz + x-logo: + url: 'https://standards.spdci.org/api-documentation/draft/dci-logo.png' + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative description: Provide access_token to registered clients/services. Issue OAuth2 compliant authorization token. version: 1.0.0 contact: - name: G2P Connect - email: info@cdpi.dev + name: DCI Social Protection + email: info@spdci.org license: - name: CDPI CC BY-SA 4.0 - url: 'https://github.com/G2P-Connect/specs/blob/draft/LICENSE.md' -externalDocs: - description: G2P Connect Authorization - url: 'https://g2pconnect.cdpi.dev/protocol/security/authorization' + name: DCI Social Protection License + url: 'https://github.com/spdci/standards/blob/draft/LICENSE.md' servers: - url: 'https://sandbox.spdci.org/namespace/v1.0.0' description: Sandbox Server diff --git a/release/yaml/crvs_api_v1.0.0.yaml b/release/yaml/crvs_api_v1.0.0.yaml new file mode 100644 index 0000000..7c21eb0 --- /dev/null +++ b/release/yaml/crvs_api_v1.0.0.yaml @@ -0,0 +1,2123 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - CRVS + version: 1.0.0 + x-logo: + url: ./dci-logo.png + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: |- + The CRVS interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between CRVS registry and SP system. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link: + - [CRVS - V1.0 ](https://standards.spdci.org/standards/v/crvs-v1.0-1/) + + Code directory links: + - [Vital event types](https://schema.spdci.org/extensions/crvs/v1/code/VitalEventTypeEnum) + + Data Objects: + - [Person](https://schema.spdci.org/extensions/crvs/v1/data/crvsPerson.jsonld) + + Each request is build up of three parts + - signature + - header + - message + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: 'https://api.spdci.org/LICENSE.md' +servers: + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode + - SubscribeStatusReasonCode + - UnSubscribeStatusReasonCode +paths: + /registry/search: + post: + summary: /registry/search + description: Search person(s) in registry using identifier or custom attributes + operationId: post_reg_search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-search: + post: + summary: /registry/on-search + description: Search results through callback + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/subscribe: + post: + summary: /registry/subscribe + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: '#/components/schemas/SubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-subscribe: + post: + summary: /registry/on-subscribe + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/notify: + post: + summary: /registry/notify + description: Registry to notify a life event to subscrbiers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/unsubscribe: + post: + summary: /registry/unsubscribe + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: '#/components/schemas/UnSubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-unsubscribe: + post: + summary: /registry/on-unsubscribe + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: '#/components/schemas/UnSubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/status: + post: + summary: /registry/txn/status + description: Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s) + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/on-status: + post: + summary: /registry/txn/on-status + description: Response to async status check of previous civil registrt transanctions using callback + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-on-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/sync/search: + post: + summary: /registry/sync/search + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Registry search response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false + /registry/sync/txn/status: + post: + summary: /registry/sync/txn/status + description: Sync status check of registry Async APIs + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Transaction status check response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false +components: + schemas: + NotifyEventRequest: + type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + reg_records: + type: object + description: | + The "person" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/crvs/v1/data/CRVSPerson.jsonld
+ @type: "Person"
+ @container: "@set"
+ example: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/crvs/v1/data/CRVSPerson.jsonld
+ @type: "@context"
+ example: + '@context': + '@vocab': 'https://schema.spdci.org/core/v1' + xsd: 'http://www.w3.org/2001/XMLSchema#' + schema: 'http://schema.org/' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + owl: 'http://www.w3.org/2002/07/owl#' + '@id': CRVS_Person_3 + '@type': CRVS_Person + identifier: + - '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '197382465' + name: + '@type': Name + surname: Martinez + given_name: Elena + second_name: '' + prefix: Dr. + suffix: PhD + phone_number: + - '+34612345678' + email: + - elena.martinez@example.com + sex: female + birth_date: '1980-03-23T10:20:15' + birth_place: + name: hospital/Madrid_Central + geo: + '@type': GeoCoordinates + latitude: 9.5604 + longitude: 100.0245 + address_line: '' + contained_in_place: '' + contains_place: + - '@id': Place_3 + '@type': Place + name: Pattaya Floating Market + address: Bophut Koh Samui Surat Thani 84320 Thailand + geo: + '@type': GeoCoordinates + latitude: 9.5617 + longitude: 100.0259 + death_date: '' + death_place: '' + address: + '@id': Address_1 + '@type': Address + address_line1: Bophut Koh Samui + address_line2: 'Surat, Near Big Buddha Beach' + locality: Thani + sub_region_code: SH + region_code: A205 + postal_code: '84320' + country_code: TH + geo_location: + '@id': GeoLocation_1 + '@type': GeoLocation + plus_code: + global_code: 8FW4V900+ + geometry: + '@id': geometry + '@type': GeoLocation + bounds: + '@id': bounds + '@type': geometry + northeast: + '@id': northeast + '@type': GeoCoordinates + latitude: 48.900000000000006 + longitude: 2.4000000000000057 + southwest: + '@id': southwest + '@type': GeoCoordinates + latitude: 48.849999999999994 + longitude: 2.3499999999999943 + location: + '@id': location + '@type': GeoCoordinates + latitude: 48.875 + longitude: 2.375 + marital_status: S + marriage_date: '' + divorce_date: '' + parent1_identifier: + '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '537564821' + parent2_identifier: + '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '564582793' + required: + - reg_record_type + - reg_records + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + SearchRequest: + type: object + description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditional expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. + properties: + transaction_id: + description: | + 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. + 2. transaction_id should be same across processing systems/service end points. + 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) + type: string + maxLength: 99 + example: XZFHYTY + search_request: + type: array + description: | + 1. Batch requests enable multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + query_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + - graphql + example: expression + query: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: 'ns:org:QueryType:graphql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: | + GeBirthRecordById { + person(UIN: "1") { + BRN + name + gender + birthDate + birthPlace + parents + } + } + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + value: + allOf: + - description: Identifier Value of the subject. + - oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: object + example: '1980' + example: '12314567890' + - type: array + items: + type: object + properties: + seq_num: + description: Sequence number to help define precedence for evaluating a list of expression Predicates + type: number + example: 1 + expression1: + type: object + description: Expression + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryAttributes.jsonld
+ @type: "QueryAttributes"
+ + **Notes:** + 1. Query attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + operator: + type: string + description: Operator in an expression + enum: + - gt + - lt + - eq + - ge + - le + - in + example: eq + attribute_value: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1/properties/value/allOf/1' + required: + - attribute_name + - operator + - attribute_value + condition: + type: string + description: Condition in an expression + enum: + - and + - or + - not + example: and + expression2: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2/items/properties/expression1' + required: + - expression1 + sort: + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @type: "Attribute"
+ + **Notes:** + 1. Attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible attribute names. + 3. e.g: UIN, poverty_score, etc., + example: poverty_score + sort_order: + type: string + enum: + - asc + - desc + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + default: 1 + example: 5 + required: + - page_size + consent: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld"
+ @type: "Consent" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld' + '@type': Consent + ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on consent codes + authorize: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld
+ @type: "Authorize" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld' + '@type': Authorize + ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on authorize codes + required: + - query_type + - query + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - search_criteria + required: + - transaction_id + - search_request + SearchResponse: + type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + description: | + 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. + 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) + type: string + maxLength: 99 + pattern: '^[a-zA-Z0-9-]+$' + example: ABC9876543210 + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Civil" + example: 'ns:org:RegistryType:Civil' + reg_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Person" + example: 'spdci-extensions-dci:Person' + reg_records: + description: | + The "Entity" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/crvs/v1/data/CRVSPerson.jsonld
+ @type: "Person"
+ @container: "@set"
+ type: array + items: + type: object + description: | + @context: "https://schema.spdci.org/extensions/crvs/v1/CRVSPerson.jsonld"
+ @type: "Consent" + example: + '@context': + '@vocab': 'https://schema.spdci.org/common/v1' + xsd: 'http://www.w3.org/2001/XMLSchema#' + schema: 'http://schema.org/' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + owl: 'http://www.w3.org/2002/07/owl#' + '@id': CRVS_Person_3 + '@type': CRVS_Person + identifier: + - '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '197382465' + name: + '@type': Name + surname: Martinez + given_name: Elena + second_name: '' + prefix: Dr. + suffix: PhD + phone_number: + - '+34612345678' + email: + - elena.martinez@example.com + sex: female + birth_date: '1980-03-23T10:20:15' + birth_place: + name: hospital/Madrid_Central + geo: + '@type': GeoCoordinates + latitude: 9.5604 + longitude: 100.0245 + address_line: '' + contained_in_place: '' + contains_place: + - '@id': Place_3 + '@type': Place + name: Pattaya Floating Market + address: Bophut Koh Samui Surat Thani 84320 Thailand + geo: + '@type': GeoCoordinates + latitude: 9.5617 + longitude: 100.0259 + death_date: '' + death_place: '' + address: + '@id': Address_1 + '@type': Address + address_line1: Bophut Koh Samui + address_line2: 'Surat, Near Big Buddha Beach' + locality: Thani + sub_region_code: SH + region_code: A205 + postal_code: '84320' + country_code: TH + geo_location: + '@id': GeoLocation_1 + '@type': GeoLocation + plus_code: + global_code: 8FW4V900+ + geometry: + '@id': geometry + '@type': GeoLocation + bounds: + '@id': bounds + '@type': geometry + northeast: + '@id': northeast + '@type': GeoCoordinates + latitude: 48.900000000000006 + longitude: 2.4000000000000057 + southwest: + '@id': southwest + '@type': GeoCoordinates + latitude: 48.849999999999994 + longitude: 2.3499999999999943 + location: + '@id': location + '@type': GeoCoordinates + latitude: 48.875 + longitude: 2.375 + marital_status: S + marriage_date: '' + divorce_date: '' + parent1_identifier: + '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '537564821' + parent2_identifier: + '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '564582793' + required: + - reg_records + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + example: 5 + total_count: + type: number + format: int32 + example: 24250 + required: + - page_size + - page_number + - total_count + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + SearchStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.search_criteria.invalid + - rjct.filter.invalid + - rjct.sort.invalid + - rjct.pagination.invalid + - rjct.search.too_many_records_found + SubscribeRequest: + type: object + description: Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' + reg_event_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' + frequency: + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + end_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency + filter_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + filter: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: 'ns:org:QueryType:graphql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: | + query GetMemberByIdentifier { + member( + identifier: { + value: "1", + type: "uin" + } + ) { + member_identifier { + value + type + } + demographic_info { + name + gender + age + } + } + } + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1' + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2' + notify_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Member" + example: 'spdci-extensions-dci:Member' + authorize: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/authorize' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - subscribe_criteria + required: + - transaction_id + - subscribe_request + SubscribeResponse: + type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + subscriptions: + type: array + items: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/subscription_status/items/properties/status' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + reg_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/reg_type' + reg_event_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/reg_event_type' + frequency: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/frequency' + filter_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + filter: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/filter' + notify_record_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/notify_record_type' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - code + - status + - timestamp + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - subscribe_response + SubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.notify_types.invalid + - rjct.notify_details.invalid + - rjct.person_id.invalid + - rjct.event.already_subscribed + TxnStatusRequest: + type: object + description: Request to fetch txn status on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + txnstatus_request: + type: object + properties: + reference_id: + type: string + description: Unique reference_id set by txn initiating system for each request in a batch + example: SDFRTYUX + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + - subscription_code_list + attribute_value: + anyOf: + - $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + - type: array + items: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + - items: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + locale: + type: string + description: indicates language code. SPDCI Connect supports country codes as per ISO 639.3 standard + pattern: '^[a-z]{3,3}$' + example: eng + required: + - reference_id + - txn_type + - attribute_type + - attribute_value + required: + - transaction_id + - txnstatus_request + TxnStatusResponse: + type: object + description: txn status info on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + txnstatus_response: + type: object + properties: + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + txn_status: + anyOf: + - type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/notify_record_type' + reg_records: + type: object + description: | + The "person" object contains fields expected in response of search + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "Person"
+ @container: "@set"
+ example: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+ example: + '@context': + spdci: 'https://schema.spdci.org/core/v1/data' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + xsd: 'http://www.w3.org/2001/XMLSchema#' + owl: 'http://www.w3.org/2002/07/owl#' + common: 'https://schema.spdci.org/common/v1/' + '@id': 'https://example.org/sr_person/847951632' + '@type': 'spdci:member' + member_identifier: + - '@type': Identifier + identifier_type: UIN + identifier_value: '42343545654' + demographic_info: + '@type': SRPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + name: + '@type': Name + surname: Smith + given_name: Alice + prefix: Ms. + suffix: '' + sex: female + birth_date: '1985-05-20' + related_person: + - '@type': RelatedPerson + relationship_type: spouse + related_member: + '@type': Member + '@id': 'https://example.org/member/123456789' + member_identifier: M123456789 + - '@type': RelatedPerson + relationship_type: child + related_member: + '@type': Member + '@id': 'https://example.org/member/987654322' + 'spdci:member_identifier': M987654322 + is_disabled: false + marital_status: married + employment_status: employed + occupation: teacher + income_level: middle + language_code: + - en + - es + education_level: bachelor + additional_attributes: + - extra_work: volunteer + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' + required: + - reg_record_type + - reg_records + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/UnSubscribeResponse' + required: + - transaction_id + - correlation_id + - txnstatus_response + UnSubscribeRequest: + type: object + description: Un-Subscribe to registred subscriptions + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + subscription_codes: + type: array + items: + type: string + description: | + Unique code to identify the subscription request by the entity providing subscription service. + Helps to check status, unsubscribe etc., + maxLength: 99 + required: + - transaction_id + - timestamp + - subscription_codes + UnSubscribeResponse: + type: object + description: Un-Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + type: string + description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' + enum: + - rcvd + - pdng + - succ + - rjct + status_reason_code: + $ref: '#/components/schemas/UnSubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscription_status: + type: array + items: + type: object + properties: + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + type: string + description: subscription status + enum: + - subscribe + - unsubscribe + required: + - code + - status + required: + - transaction_id + - correlation_id + - timestamp + - status + UnSubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.subscription_code.invalid + - rjct.requester.invalid + - rjct.event.already_unsubscribed + EncryptedMessage: + description: Encrypted payload + type: object + properties: + header: + type: object + properties: + alg: + type: string + description: The JWE algorithm used for encryption + enc: + type: string + description: The encryption algorithm used for encrypting the plaintext + kid: + type: string + description: The key identifier for the encryption key + required: + - alg + - enc + - kid + ciphertext: + type: string + description: This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded. + encrypted_key: + type: string + description: The base64-url encoded encrypted key + tag: + type: string + description: 'This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data' + iv: + type: string + description: This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used. + required: + - header + - ciphertext + - encrypted_key + - tag + - iv + Error: + description: | + Commumication layer Asyn errors that are returned as part of message acknowledgement. + 1. Messages that are not parsable or message integrity check fails. + 2. This object may be used across all transport layer protocols (https, sftp, messaging, etc,) to ack the receipt of a message. + 3. Business context and related validation is NOT in scope of this error object. + type: object + properties: + code: + type: string + description: Standard error code + enum: + - err.request.bad + - err.request.unauthorized + - err.request.forbidden + - err.request.not_found + - err.request.timeout + - err.version.not_supported + - err.request.too_many_requests + - err.sender_id.invalid + - err.sender_uri.invalid + - err.receiver_id.invalid + - err.signature.missing + - err.signature.invalid + - err.encryption.invalid + - err.service.unavailable + message: + type: string + description: message to describe above error code + maxLength: 999 + FileInfo: + type: object + description: File info. Used in file upload feature using HTTPS + properties: + action: + description: SPDCI Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + fileName: + description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record + type: string + format: binary + fileFormat: + description: 'File content format. e.g json, csv, etc.,' + type: string + default: json + example: csv + required: + - action + - fileName + MsgCallbackHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaing protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '789' + message_ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + type: string + description: Message header related common status reason codes + enum: + - rjct.version.invalid + - rjct.message_id.duplicate + - rjct.message_ts.invalid + - rjct.action.invalid + - rjct.action.not_supported + - rjct.total_count.invalid + - rjct.total_count.limit_exceeded + - rjct.errors.too_many + status_reason_message: + description: 'Status reascon code message, if any, Helps actionable messaging for system/end users' + type: string + maxLength: 999 + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + completed_count: + description: No of requests in complteed state. Complete includes success and error requests due to funcational errors + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: civilregistry.example.org + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: registry.example.org + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/meta' + required: + - message_id + - message_ts + - action + - status + MsgHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaing protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '123' + message_ts: + description: | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. + type: string + format: date-time + example: '2022-12-04T17:20:07-04:00' + action: + description: 'spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property.' + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: spp.example.org + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: 'https://spp.example.org/consumer-space/callback/on-search' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: civilregistry.example.org + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Meta.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Additional meta info defined as per implementation context. + 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. + 3. The information SHOULD be privacy preserving + required: + - message_id + - message_ts + - action + - sender_id + - total_count + MsgSignature: + type: string + description: 'Signature of {header}+{message} body verified using sender''s signing public key' + example: 'Signature: namespace="spdci", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' + responses: + Response: + description: Acknowledgement of message received after successful validation of message and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack_status: + type: string + description: | + 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. + 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. + 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. + enum: + - ACK + - NACK + - ERR + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + error: + $ref: '#/components/schemas/Error' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + required: + - ack_status + - timestamp + - correlation_id + HttpErrorResponse: + description: HTTP layer error details + content: + application/json: + schema: + type: object + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' + properties: + errors: + items: + type: object + properties: + code: + type: string + description: error code + message: + type: string + description: error message + securitySchemes: + Authorization: + type: http + scheme: bearer + bearerFormat: jwt + description: User/System authenticated access token; (jwt bearer) token returned from implementing system's authentication/token api end points. All systems must implement token api. diff --git a/release/yaml/disburse_core_api_v1.0.0.yaml b/release/yaml/disburse_core_api_v1.0.0.yaml deleted file mode 100644 index c7918a7..0000000 --- a/release/yaml/disburse_core_api_v1.0.0.yaml +++ /dev/null @@ -1,1336 +0,0 @@ -openapi: 3.0.3 -info: - title: Interoperability APIs - G2P Disbursements - description: | - 1. Category: [G2P Disbursements](https://g2pconnect.cdpi.dev/protocol/interfaces/social-program-management/disbursement) - 2. Feature: Enable G2P Disbursements with reconciliation - 3. Specification Level: **Draft** - version: 1.0.0 - contact: - name: G2P Connect - email: info@cdpi.dev - license: - name: CDPI CC BY-SA 4.0 - url: 'https://github.com/G2P-Connect/specs/blob/draft/LICENSE.md' -servers: - - url: 'https://sandbox.spdci.org/namespace/v1.0.0' - description: Sandbox Server -tags: - - name: Async - description: Async endpoints - - name: Sync - description: Sync endpoints - - name: Schemas - description: Schemas - - name: Status Codes - description: Status Codes - - name: DisburseRequest - x-displayName: DisburseRequest - description: | - - - name: DisburseResponse - x-displayName: DisburseResponse - description: | - - - name: DisburseStatusReasonCode - x-displayName: DisburseStatusReasonCode - description: | - - - name: SearchRequest - x-displayName: SearchRequest - description: | - - - name: SearchResponse - x-displayName: SearchResponse - description: | - - - name: SearchStatusReasonCode - x-displayName: SearchStatusReasonCode - description: | - - - name: TxnStatusRequest - x-displayName: TxnStatusRequest - description: | - - - name: TxnStatusResponse - x-displayName: TxnStatusResponse - description: | - - - name: EncryptedMessage - x-displayName: EncryptedMessage - description: | - -x-tagGroups: - - name: API Definitions - tags: - - Async - - Sync - - name: Schema Objects - tags: - - DisburseRequest - - DisburseResponse - - SearchRequest - - SearchResponse - - TxnStatusRequest - - TxnStatusResponse - - EncryptedMessage - - name: Status Codes - tags: - - DisburseStatusReasonCode - - SearchStatusReasonCode -paths: - /disburse: - post: - summary: /disburse - description: Initiate payment through disbursement instructions - operationId: post_dsbt_disburse - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - disburse - message: - anyOf: - - $ref: '#/components/schemas/DisburseRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - disburse - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /on-disburse: - post: - summary: /on-disburse - description: Disburse response through callback - operationId: post_dsbt_on-disburse - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-disburse - message: - anyOf: - - $ref: '#/components/schemas/DisburseResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - on-disburse - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /disburse/search: - post: - summary: /disbruse/search - description: Search disbursement by searchable attributes - operationId: post_dsbt_search - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - search - message: - anyOf: - - $ref: '#/components/schemas/SearchRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - search - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /disburse/on-search: - post: - summary: /disburse/on-search - description: Disbrusement search results through callback - operationId: post_dsbt_on-search - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-search - message: - anyOf: - - $ref: '#/components/schemas/SearchResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - on-search' - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /disburse/txn/status: - post: - summary: /disburse/txn/status - description: Status check of previous disbursement transanctions using transaction_id and/or reference_id(s) - operationId: post_dsbt_txnstatus - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - on-disburse - - on-search - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - on-disburse - - on-search - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /disburse/txn/on-status: - post: - summary: /disburse/txn/on-status - description: Status check response through callback - operationId: post_dsbt_on-txnstatus - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-disburse - - on-search - message: - anyOf: - - $ref: '#/components/schemas/TxnStatusResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - on-disburse - - on-search - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /disburse/sync/disburse: - post: - summary: /disburse/sync/disburse - description: Initiate payment through disbursement instructions through sync call - operationId: post_dsbt_sync_disbuse - tags: - - Sync - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - search - message: - type: object - description: The search data using which registry search to be performed - anyOf: - - $ref: '#/components/schemas/DisburseRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - description: Disburse response - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-search - message: - type: object - oneOf: - - $ref: '#/components/schemas/DisburseResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - security: - - Authorization: [] - deprecated: false - /disburse/sync/search: - post: - summary: /disburse/sync/search - description: | - 1. Fetch disbursement processing status though sync call - 2. Disbursement processing systems may chose to implement rate limiting at transaction_id level to avoid request flooding - operationId: post_dsbt_sync_search - tags: - - Sync - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - search - message: - type: object - description: The search data using which registry search to be performed - anyOf: - - $ref: '#/components/schemas/SearchRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - description: Registry search response - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-search - message: - type: object - oneOf: - - $ref: '#/components/schemas/SearchResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - security: - - Authorization: [] - deprecated: false - /disburse/sync/txn/status: - post: - summary: /disburse/sync/txn/status - description: Sync status check of disburse Async APIs - operationId: post_dsbt_sync_txnstatus - tags: - - Sync - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - search - - subscribe - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - description: Transaction status check response - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-search - - notify - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - security: - - Authorization: [] - deprecated: false -components: - schemas: - cdpi_PersonId: - type: string - description: | - 1. Person id is case insensitve normative represenation as id-type:id@provider
- 2. This will enumerate foundational and functioanl id's to easily resolvable addressess
- 3. This property is intended to unambiguously refer to an object, such as a person, beneficiary, user, etc.,
- 4. Few examples:
- - id@identifier-type.id-provider e.g token:12345@nid, vid:543215@nid
- - id@civil-registry.issuing-agency e.g id:12345@civil-reg, brn:12345@civil-reg, mrn:12345@civil-reg
- - id@functional-identifier.issuing-agency e.g id:12345@voter-id, id:12345@driving-license, mobile:12345@farmer-reg
- Note: id provider should be made configurable and solutions should adapt to the local jurisdiction and policies. - format: '^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$' - example: 'vid:54321@nid' - cdpi_FinancialAddress: - type: string - description: | - 1. Financial address is case insensitive normative represenation of a store of value account represented as id-type:id@provider - 2. Every payer/payee financial address must resolve to an actual store of value account number for processing the payment instruction - 3. It is recommended the mapping between id and store of value account details to be held only at final store of value entity and intermediaries can hold - 3. Few examples:
- - token@id-provider e.g token:12345@national-id
- - uid@pymt-rail e.g uid:12345@national-id
- - vid@id-provider e.g vid:12345@national-id
- - mobile@mobile-provider e.g mobile:12345@mobile-pymt
- - account-id@bank-psp-code e.g account:12345@national-bank
- - account-no@ifsc-code.ifsc.pymt-rail e.g account:12345@abcd0000001.ifsc.pymt-rail
- - user-id@psp-code e.g. joeuser@national-bank
- - token@psp-code e.g token:123456@a123
- - code@purpose-code.voucher-provider e.g voucher:12345@food.coupon-network
- format: '^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$' - example: 'token:12345@gtbank' - DisburseRequest: - type: object - description: Disbursement request - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - disbursements: - type: array - items: - type: object - description: | - 1. Describes payment schema that enable transfer from payer to payee accounts. - 2. This entity supports immediate and scheduling one time payment request into future. - 3. Recurring payments is not part of the scope of this entity. - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - payer_fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - payee_fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - amount: - $ref: '#/components/schemas/Amount' - scheduled_timestamp: - allOf: - - description: If not present then immediate disbursement else schedule as per scheduled date-time - - $ref: '#/components/schemas/DateTime' - payer_name: - description: Payer account name for easy reference. Usually each scheme may have a seperate holding account. - type: string - example: Farmer draught relief scheme 2023 - payee_name: - description: Payer name for easy reference. Usually beneficiary name as per scheme registration info - type: string - example: Joe John - note: - description: Note to payer/payee to reflect on statements - type: string - maxLength: 99 - purpose: - $ref: '#/components/schemas/Purpose' - instruction: - description: 'Additional systems instruction for interfacing systems/platforms to integrate, reconcile' - type: string - maxLength: 999 - currency_code: - $ref: '#/components/schemas/CurrencyCode' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - payer_fa - - payee_fa - - amount - required: - - transaction_id - - disburemsents - DisburseResponse: - type: object - description: Disburse response - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - disbursements_status: - type: array - items: - type: object - description: | - 1. G2P Disbursement response i.e status of each disburemsent request for reconciliation by sender system - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - description: Disbursement response status datetime in RFC3339 format - type: string - format: date-time - example: '2022-12-04T17:20:07-04:00' - status: - $ref: '#/components/schemas/RequestStatus' - status_reason_code: - $ref: '#/components/schemas/DisburseStatusReasonCode' - status_reason_message: - description: Status reason code message. Helps actionanble messaging for systems/end users - type: string - maxLength: 999 - instruction: - description: 'Additional systems instruction for interfacing systems/platforms to integrate, reconcile' - type: string - maxLength: 999 - amount: - $ref: '#/components/schemas/Amount' - payer_fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - payer_name: - description: Payer account name for easy reference. Usually each scheme may have a seperate holding account. - type: string - example: Farmer draught relief scheme 2023 - payee_fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - payee_name: - description: Payer name for easy reference. Usually beneficiary name as per scheme registration info - type: string - example: Joe John - currency_code: - $ref: '#/components/schemas/CurrencyCode' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - status - required: - - transaction_id - - disbursements_status - DisburseStatusReasonCode: - type: string - description: Disbursement status reason codes - enum: - - rjct.reference_id.invalid - - rjct.reference_id.duplicate - - rjct.timestamp.invalid - - rjct.payer_fa.invalid - - rjct.payee_fa.invalid - - rjct.amount.invalid - - rjct.schedule_ts.invalid - - rjct.currency_code.invalid - SearchRequest: - type: object - description: Search disbursement requests - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - search_criteria: - type: array - items: - type: object - description: | - 1. Request to search disbursement using payer or payee fa - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - request_type: - type: string - enum: - - disburse - attribute_type: - type: string - enum: - - payer_fa - - payee_fa - attribute_value: - oneOf: - - $ref: '#/components/schemas/cdpi_FinancialAddress' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - request_type - - attribute_type - - attribute_value - required: - - transaction_id - - search_criteria - SearchResponse: - type: object - description: Search response - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - disbursements_status: - type: array - items: - type: object - description: Search response record - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - status: - $ref: '#/components/schemas/RequestStatus' - status_reason_code: - $ref: '#/components/schemas/SearchStatusReasonCode' - status_reason_message: - description: Status reason code message. Helps actionanble messaging for systems/end users - type: string - maxLength: 999 - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - status - required: - - transaction_id - - disbursements_status - SearchStatusReasonCode: - type: string - description: Disbursement search reason codes - enum: - - rjct.reference_id.invalid - - rjct.reference_id.duplicate - - rjct.timestamp.invalid - - rjct.request_type.invalid - - rjct.attribute_type.invalid - - rjct.srch_transaction_id.invalid - - rjct.srch_transaction_id.not_found - - rjct_srch_reference_id.invalid - - rjct_srch_reference_id.not_found - - rjct.srch.too_many_records_found - - rjct.srch_payer_fa.invalid - - rjct.srch_payee_fa.invalid - - rjct.share_attributes.invalid - TxnStatusRequest: - type: object - description: Request to fetch txn status on various service requests - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - txnstatus_request: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - txn_type: - type: string - description: txn type to fetch status - enum: - - disburse - - search - attribute_type: - type: string - enum: - - transaction_id - - reference_id_list - - correlation_id - attribute_value: - oneOf: - - $ref: '#/components/schemas/TransactionId' - - $ref: '#/components/schemas/ReferenceIdList' - - $ref: '#/components/schemas/TxnStatusResponse/properties/correlation_id' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - txn_type - - attribute_type - - attribute_value - required: - - transaction_id - - txnstatus_request - TxnStatusResponse: - type: object - description: txn status info on various service requests - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - correlation_id: - description: | - 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. - 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) - type: string - maxLength: 99 - example: '9876543210' - txnstatus_response: - type: object - properties: - txn_type: - type: string - description: txn type to fetch status - enum: - - on-disburse - - on-search - txn_status: - oneOf: - - $ref: '#/components/schemas/DisburseResponse' - - $ref: '#/components/schemas/SearchRequest' - example: - $ref: '#/components/schemas/DisburseResponse' - required: - - txn_type - - txn_status - required: - - transaction_id - - correlation_id - - txnstatus_response - Ack: - type: string - description: | - 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. - 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. - 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. - enum: - - ACK - - NACK - - ERR - AdditionalInfo: - type: object - description: Additional JSON property oject to hold custom user defined contextual data - Amount: - type: string - description: Describes amount in decimal value format - pattern: '^\d{1,13}\.\d{1,2}$' - AttributeNameValue: - type: object - description: Attribute name value object - properties: - name: - type: string - description: | - @context: "https://example.org/schema/Attribute"
- @type: "Attribute"
- - **Notes:** - 1. Attribute names defined as per implementation context. - 2. Usually a list of **enum** values of all possible attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: YOB - value: - $ref: '#/components/schemas/AttributeValue' - required: - - name - - value - AttributeNameValueList: - type: array - description: List of attribute Name/Value - items: - $ref: '#/components/schemas/AttributeNameValue' - AttributeValue: - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: object - example: '1980' - CurrencyCode: - description:
1. Currency code allocated as per ISO 4217 format.
2. Codes for the representation of currencies and funds. - type: string - pattern: '^[A-Z]{3,3}$' - example: SLL - DateTime: - description: | - 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. - type: string - format: date-time - example: '' - EncryptedMessage: - description: Encrypted payload - type: object - properties: - header: - type: object - properties: - alg: - type: string - description: The JWE algorithm used for encryption - enc: - type: string - description: The encryption algorithm used for encrypting the plaintext - kid: - type: string - description: The key identifier for the encryption key - required: - - alg - - enc - - kid - ciphertext: - type: string - description: This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded. - encrypted_key: - type: string - description: The base64-url encoded encrypted key - tag: - type: string - description: 'This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data' - iv: - type: string - description: This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used. - required: - - header - - ciphertext - - encrypted_key - - tag - - iv - Error: - description: | - Commumication layer Asyn errors that are returned as part of message acknowledgement. - 1. Messages that are not parsable or message integrity check fails. - 2. This object may be used across all transport layer protocols (https, sftp, messaging, etc,) to ack the receipt of a message. - 3. Business context and related validation is NOT in scope of this error object. - type: object - properties: - code: - type: string - description: Standard error code - enum: - - err.request.bad - - err.request.unauthorized - - err.request.forbidden - - err.request.not_found - - err.request.timeout - - err.version.not_supported - - err.request.too_many_requests - - err.sender_id.invalid - - err.sender_uri.invalid - - err.receiver_id.invalid - - err.signature.missing - - err.signature.invalid - - err.encryption.invalid - - err.service.unavailable - message: - type: string - description: message to describe above error code - maxLength: 999 - FileInfo: - type: object - description: File info. Used in file upload feature using HTTPS - properties: - action: - description: G2P Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. - type: string - fileName: - description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record - type: string - format: binary - fileFormat: - description: 'File content format. e.g json, csv, etc.,' - type: string - default: json - example: csv - required: - - action - - fileName - LanguageCode: - type: string - description: indicates language code. G2P Connect supports country codes as per ISO 639.3 standard - pattern: '^[a-z]{3,3}$' - example: en - Meta: - type: object - description: | - @context: "https://example.org/schema/Meta"
- @type: "@context"
- - **Notes:** - 1. Additional meta info defined as per implementation context. - 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. - 3. The information SHOULD be privacy preserving - MsgCallbackHeader_V1.0.0: - type: object - description: Message header - properties: - version: - description: Messaing protocol specification version being used - type: string - default: 1.0.0 - message_id: - description: | - 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., - 2. The scope of message_id end with successful ack of the message by the receiver. - 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. - type: string - example: '789' - message_ts: - $ref: '#/components/schemas/DateTime' - action: - description: G2P Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. - type: string - status: - $ref: '#/components/schemas/RequestStatus' - status_reason_code: - $ref: '#/components/schemas/MsgHeaderStatusReasonCode' - status_reason_message: - description: 'Status reascon code message, if any, Helps actionanble messaging for system/end users' - type: string - maxLength: 999 - total_count: - description: Total no of requests present in the message request - type: integer - example: 21800 - completed_count: - description: No of requests in complteed state. Complete includes success and error requests due to funcational errors - type: integer - example: 50 - sender_id: - description: | - 1. sender_id registered with the receiving system or gateway. - 2. Used for authorization, encryption, digital sign verfication, etc., - type: string - example: civilregistry.example.org - receiver_id: - description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' - type: string - example: registry.example.org - is_msg_encrypted: - description: Is message encrypted? - type: boolean - default: false - meta: - $ref: '#/components/schemas/Meta' - required: - - message_id - - message_ts - - action - - status - MsgHeader_V1.0.0: - type: object - description: Message header - properties: - version: - description: Messaing protocol specification version being used - type: string - default: 1.0.0 - message_id: - description: | - 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., - 2. The scope of message_id end with successful ack of the message by the receiver. - 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. - type: string - example: '123' - message_ts: - $ref: '#/components/schemas/DateTime' - action: - description: 'G2P Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps identity payload type in message property.' - type: string - sender_id: - description: | - 1. sender_id registered with the receiving system or gateway. - 2. Used for authorization, encryption, digital sign verfication, etc., - type: string - example: spp.example.org - sender_uri: - description: | - 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. - 2. Default uri is assumed to be configred on the gateway as part of sender/receiver onboarding. - 3. For SFTP based communications, this shall be set to server/folder details. - type: string - format: uri - example: 'https://spp.example.org/{namespace}/callback/on-search' - receiver_id: - description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' - type: string - example: pymts.example.org - total_count: - description: Total no of requests present in the message request - type: integer - example: 21800 - is_msg_encrypted: - description: Is message encrypted? - type: boolean - default: false - meta: - $ref: '#/components/schemas/Meta' - required: - - message_id - - message_ts - - action - - sender_id - - total_count - MsgHeaderStatusReasonCode: - type: string - description: Message header related common status reason codes - enum: - - rjct.version.invalid - - rjct.message_id.duplicate - - rjct.message_ts.invalid - - rjct.action.invalid - - rjct.action.not_supported - - rjct.total_count.invalid - - rjct.total_count.limit_exceeded - - rjct.errors.too_many - MsgSignature: - type: string - description: 'Signature of {header}+{message} body verified using sender''s signing public key' - example: 'Signature: namespace="g2p", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' - Pagination: - description: 'Pagination definition, count starts with 1' - type: object - properties: - page_size: - type: number - format: int32 - example: 2000 - page_number: - type: number - format: int32 - example: 5 - total_count: - type: number - format: int32 - example: 24250 - required: - - page_size - - page_number - - total_count - PaginationRequest: - description: 'Pagination definition, count starts with 1' - type: object - properties: - page_size: - type: number - format: int32 - example: 2000 - page_number: - type: number - format: int32 - default: 1 - example: 5 - required: - - page_size - Purpose: - description: 'Payment disbursement purpose e.g Salary, Farmer Relief 2023, etc.,' - type: string - maxLength: 99 - example: Farmer Relief 2023 - ReferenceId: - type: string - description: Unique reference_id set by txn initiating system for each request in a batch - example: '12345678901234567890' - ReferenceIdList: - type: array - items: - $ref: '#/components/schemas/ReferenceId' - RequestStatus: - type: string - description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' - enum: - - rcvd - - pdng - - succ - - rjct - SearchSort: - description: Sorting definition - type: object - properties: - attribute_name: - type: string - description: | - @context: "https://example.org/schema/Attribute"
- @type: "Attribute"
- - **Notes:** - 1. Attribute names defined as per implementation context. - 2. Usually a list of **enum** values of all possible attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: YOB - sort_order: - type: string - enum: - - asc - - desc - SearchSortList: - type: array - items: - $ref: '#/components/schemas/SearchSort' - TransactionId: - description: | - 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. - 2. transaction_id should be samme across processing systems/service end points. - 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) - type: string - maxLength: 99 - example: 0123456789 - responses: - HttpErrorResponse: - description: HTTP layer error details - content: - application/json: - schema: - type: object - description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' - properties: - errors: - items: - type: object - properties: - code: - type: string - description: error code - message: - type: string - description: error message - Response: - description: Acknowledgement of message received after successful validation of message and signature - content: - application/json: - schema: - type: object - properties: - message: - type: object - properties: - ack_status: - $ref: '#/components/schemas/Ack' - timestamp: - $ref: '#/components/schemas/DateTime' - error: - $ref: '#/components/schemas/Error' - correlation_id: - $ref: '#/components/schemas/TxnStatusResponse/properties/correlation_id' - required: - - ack_status - - timestamp - - correlation_id - securitySchemes: - Authorization: - type: http - scheme: bearer - bearerFormat: jwt - description: User/System authenticated access token; (jwt bearer) token returned from implementing system's authentication/token api end points. All systems must implement token api. diff --git a/release/yaml/dr_api_v1.0.0.yaml b/release/yaml/dr_api_v1.0.0.yaml new file mode 100644 index 0000000..51325f6 --- /dev/null +++ b/release/yaml/dr_api_v1.0.0.yaml @@ -0,0 +1,2455 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Disability registries + version: 1.0.0 + x-logo: + url: ./dci-logo.png + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: |- + The Disability Registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between Disability registry and SP system. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search disabled people based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link: + - [DR - V1.0 ](https://standards.spdci.org/standards/wip-disability-registry) + + Code directory links: + - [Impairment Type](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.01-impairmenttype-functional-limitationtype) + - [Impairment Level](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.02-impairmentlevel-functional-limitationslevel) + - [Human Assistance Type](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.03-humanassistancetype) + - [Support Frequency](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.04-supportfrequency) + - [Support Status](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.05-supportstatusenum) + - [Assistive Technology](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.06-assistivetechnologyenum) + - [Disability Status](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.07-disabilityonset) + - [Impairment Cause](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.08-impairmentcause) + - [Transport Requirement](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.9-transportrequirement) + - [Housing Type](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.10-housingtype) + - [Medical Care](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.11-medicalcareenum) + - [Housing Support](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.12-housingsupportenum) + - [Animal Assistance](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.13-animalassitanceenum) + - [Disability Status](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.14-disabilitystatus) + - [Disability Status Level](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.15-disabilitystatuslevel) + + Data Objects: + - [PWDPerson](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.01-pwdperson) + - [Disability Details](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.02-disabilitydetails) + - [Disability Support](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.03-disabilitysupport) + - [Human Assistance](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.04-humanassistance) + - [Assistive Technology](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.05-assistivetechnology) + - [Medical Care](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.06-medicalcare) + - [Housing Support](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.07-housingsupport) + - [Animal Assistance](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.08-animalassistance) + - [Member](https://standards.spdci.org/standards/v/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.03-member) + + + + Each request is build up of three parts + - signature + - header + - message + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: 'https://api.spdci.org/LICENSE.md' +servers: + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - UnSubscribeRequest + - UnSubscribeResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode + - SubscribeStatusReasonCode + - UnSubscribeStatusReasonCode +paths: + /registry/search: + post: + summary: /registry/search + description: Search members(s) in registry using identifier or custom attributes + operationId: post_reg_search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-search: + post: + summary: /registry/on-search + description: Search results through callback + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/subscribe: + post: + summary: /registry/subscribe + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: '#/components/schemas/SubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-subscribe: + post: + summary: /registry/on-subscribe + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/notify: + post: + summary: /registry/notify + description: Registry to notify a life event to subscrbiers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/unsubscribe: + post: + summary: /registry/unsubscribe + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: '#/components/schemas/UnSubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-unsubscribe: + post: + summary: /registry/on-unsubscribe + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: '#/components/schemas/UnSubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/status: + post: + summary: /registry/txn/status + description: The /registry/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/on-status: + post: + summary: /registry/txn/on-status + description: The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-on-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/sync/search: + post: + summary: /registry/sync/search + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Registry search response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false + /registry/sync/get-disability-support: + post: + summary: /registry/sync/get-disability-support + description: check if member is registered as disabled + operationId: post_reg_get_disability_support + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/GetDisabilitySupportRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: support response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/GetDisabilitySupportResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + deprecated: false + /registry/sync/get-disability-details: + post: + summary: /registry/sync/get-disability-details + description: check if member is registered as disabled + operationId: post_reg_get_disability_details + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/GetDisabilitySupportRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: support response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/GetDisabilityInfoResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + deprecated: false + /registry/sync/disabled: + post: + summary: /registry/sync/get-disability-status + description: check if member is registered as disabled + operationId: post_reg_disabled + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/DisabledRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: support response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/DisabledResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + deprecated: false +components: + schemas: + NotifyEventRequest: + type: object + description: Registry to notify a event to subscribers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + type: string + description: | + The SP-System receives data from Disability registry, usually the DR sends registration and updates events to SP-System + + 1 : Register + enum: + - register + example: register + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + reg_records: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records' + required: + - reg_record_type + - reg_records + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + SearchRequest: + type: object + description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditioanl expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. + properties: + transaction_id: + description: | + 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. + 2. transaction_id should be same across processing systems/service end points. + 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) + type: string + maxLength: 99 + example: XZFHYTY + search_request: + type: array + description: | + 1. Batch requests enabel multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + query_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + - graphql + example: expression + query: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + anyOf: + - $ref: '#/components/schemas/ExpTemplate' + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + value: + allOf: + - description: Identifier Value of the subject. + - oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: object + example: '1980' + example: '12314567890' + - type: array + items: + type: object + properties: + seq_num: + description: Sequence number to help define precedence for evaluating a list of expression Predicates + type: number + example: 1 + expression1: + type: object + description: Expression + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryAttributes.jsonld
+ @type: "QueryAttributes"
+ + **Notes:** + 1. Query attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + operator: + type: string + description: Operator in an expression + enum: + - gt + - lt + - eq + - ge + - le + - in + example: eq + attribute_value: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1/properties/value/allOf/1' + required: + - attribute_name + - operator + - attribute_value + condition: + type: string + description: Condition in an expression + enum: + - and + - or + - not + example: and + expression2: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2/items/properties/expression1' + required: + - expression1 + sort: + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @type: "Attribute"
+ + **Notes:** + 1. Attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible attribute names. + 3. e.g: UIN, poverty_score, etc., + example: poverty_score + sort_order: + type: string + enum: + - asc + - desc + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + default: 1 + example: 5 + required: + - page_size + consent: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld"
+ @type: "Consent" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld' + '@type': Consent + ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on consent codes + authorize: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld
+ @type: "Authorize" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld' + '@type': Authorize + ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on authorize codes + required: + - query_type + - query + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - search_criteria + required: + - transaction_id + - search_request + SearchResponse: + type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + description: | + 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. + 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) + type: string + maxLength: 99 + pattern: '^[a-zA-Z0-9-]+$' + example: ABC9876543210 + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:DR" + example: 'ns:org:RegistryType:DR' + reg_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:DisabledPerson" + example: 'spdci-extensions-dci:DisabledPerson' + reg_records: + type: object + description: | + The "group" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dr/v1/DRPerson.jsonld
+ @type: "DisabledPerson"
+ @container: "@set"
+ example: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + + + @context: https://schema.spdci.org/extensions/dr/v1/DRPerson.jsonld
+ @type: "@context"
+ example: + personal_details: + identifier: '123456' + name: + first_name: John + last_name: Doe + date_of_birth: '1990-05-15' + gender: Male + disability_status: Approved + disability_level: Severe + disability_details: + - impairment_type: Physical and movement related functions + impairment_level: Severe impairment or difficulty + impairment_cause: Work Accident + age_on_set: Working age + disability_support: + - human_assistance: + frequency: Permanent + type: mobility + support_status: Required + transport_requirement: Adaptable vehical + housing_type: Social housing + programs_enrollments: + - programme_name: financial_assistance + programme_identifier: AD234 + registration_date: '2023-01-10T00:00:00Z' + last_updated: '2023-09-20T00:00:00Z' + required: + - reg_record_type + - reg_records + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + example: 5 + total_count: + type: number + format: int32 + example: 24250 + required: + - page_size + - page_number + - total_count + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + SearchStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.search_criteria.invalid + - rjct.filter.invalid + - rjct.sort.invalid + - rjct.pagination.invalid + - rjct.search.too_many_records_found + SubscribeRequest: + type: object + description: Subscribe to a life event with CRVS + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + subscribe_criteria: + type: object + description: Criteria defining the subscription + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + $ref: '#/components/schemas/NotifyEventRequest/properties/notify_event/items/properties/data/properties/reg_event_type' + frequency: + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + end_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency + filter_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + filter: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query' + notify_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + authorize: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/authorize' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - subscribe_criteria + required: + - transaction_id + - subscribe_request + SubscribeResponse: + type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + subscriptions: + type: array + items: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + $ref: '#/components/schemas/SubscriptionStatus' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + $ref: '#/components/schemas/NotifyEventRequest/properties/notify_event/items/properties/data/properties/reg_event_type' + frequency: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/frequency' + filter_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + filter: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query' + notify_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - code + - status + - timestamp + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - subscribe_response + SubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.notify_types.invalid + - rjct.notify_details.invalid + - rjct.person_id.invalid + - rjct.event.already_subscribed + SubscriptionStatus: + type: string + description: subscription status + enum: + - subscribe + - unsubscribe + UnSubscribeRequest: + type: object + description: Un-Subscribe to registred subscriptions + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + subscription_codes: + type: array + items: + type: string + description: | + Unique code to identify the subscription request by the entity providing subscription service. + Helps to check status, unsubscribe etc., + maxLength: 99 + required: + - transaction_id + - timestamp + - subscription_codes + UnSubscribeResponse: + type: object + description: Un-Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + type: string + description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' + enum: + - rcvd + - pdng + - succ + - rjct + status_reason_code: + $ref: '#/components/schemas/UnSubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscription_status: + type: array + items: + type: object + properties: + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + $ref: '#/components/schemas/SubscriptionStatus' + required: + - code + - status + required: + - transaction_id + - correlation_id + - timestamp + - status + UnSubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.subscription_code.invalid + - rjct.requester.invalid + - rjct.event.already_unsubscribed + GetDisabilitySupportRequest: + type: object + description: gets all disabilities information about a member + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + disabled_criteria: + $ref: '#/components/schemas/DisabledRequest/properties/disabled_criteria' + required: + - transaction_id + - disabled_criteria + GetDisabilitySupportResponse: + type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_records: + description: | + The "Disabled" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dr/v1/DisabilitySupport.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + type: object + description: | + Disability support info for a member. + properties: + disabilities: + type: array + description: | + List of a member disability info related to the person we are searching for. + @context: https://schema.spdci.org/extensions/dr/v1/DRPerson.jsonld
+ @type: "@context"
+ items: + type: object + properties: + human_assistance: + type: object + properties: + type: + type: string + frequency: + type: string + support_status: + type: string + caregiver: + type: object + properties: + id: + type: string + name: + type: string + identifier: + type: string + relationship: + type: string + registration_date: + type: string + format: date-time + last_updated: + type: string + format: date-time + assistive_technology: + type: array + items: {} + housing_support: + type: array + items: {} + medical_care: + type: array + items: {} + animal_assistance: + type: array + items: {} + registration_date: + type: string + format: date-time + last_updated: + type: string + format: date-time + example: + - human_assistance: + type: mobility + frequency: Daily + support_status: Needed + caregiver: + id: Person_001 + name: John Doe + identifier: '12345' + relationship: Parent + registration_date: 2024-01-15T10:00:00.000Z + last_updated: 2024-09-20T12:30:00.000Z + assistive_technology: [] + housing_support: [] + medical_care: [] + animal_assistance: [] + registration_date: 2023-05-20T09:00:00.000Z + last_updated: 2024-10-01T11:15:00.000Z + required: + - reg_records + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + GetDisabilityInfoResponse: + type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_records: + description: | + The "Disabled" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dr/v1/DRPerson.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + + + @context: https://schema.spdci.org/extensions/dr/v1/DisabledPerson.jsonld
+ @type: "@context"
+ example: + disability_details: + - impairment_type: Physical and movement related functions + impairment_level: Severe impairment or difficulty + impairment_cause: Work Accident + age_on_set: Working age + required: + - reg_records + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + DisabledRequest: + type: object + description: Verifies is registered member is disabled + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + disabled_criteria: + type: object + description: Disabled query + properties: + query_type: + allOf: + - $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + - description: Type of query + query: + type: object + description: Query expression for the disabled query + example: + member.member_identifier: + eq: ABC451123 + required: + - transaction_id + - disabled_criteria + DisabledResponse: + type: object + description: Response to verify disability status request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + disabled_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + disabled_status: + description: Indicates whether the individual is disabled ('yes') or not ('no'). + type: string + enum: + - 'yes' + - 'no' + required: + - reference_id + - timestamp + - status + - disabled_status + required: + - transaction_id + - correlation_id + - disabled_response + TxnStatusRequest: + type: object + description: Request to fetch txn status on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + txnstatus_request: + type: object + properties: + reference_id: + type: string + description: Unique reference_id set by txn initiating system for each request in a batch + example: SDFRTYUX + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + - subscription_code_list + attribute_value: + anyOf: + - $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + - type: array + items: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + - items: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + locale: + type: string + description: indicates language code. SPDCI Connect supports country codes as per ISO 639.3 standard + pattern: '^[a-z]{3,3}$' + example: eng + required: + - reference_id + - txn_type + - attribute_type + - attribute_value + required: + - transaction_id + - txnstatus_request + TxnStatusResponse: + type: object + description: txn status info on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + txnstatus_response: + type: object + properties: + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + txn_status: + anyOf: + - type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' + reg_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Member" + example: 'spdci-extensions-dci:Member' + reg_records: + type: object + description: | + The "person" object contains fields expected in response of search + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "Person"
+ @container: "@set"
+ example: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+ example: + '@context': + spdci: 'https://schema.spdci.org/core/v1/data' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + xsd: 'http://www.w3.org/2001/XMLSchema#' + owl: 'http://www.w3.org/2002/07/owl#' + common: 'https://schema.spdci.org/common/v1/' + '@id': 'https://example.org/sr_person/847951632' + '@type': 'spdci:member' + member_identifier: + - '@type': Identifier + identifier_type: UIN + identifier_value: '42343545654' + demographic_info: + '@type': SRPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + name: + '@type': Name + surname: Smith + given_name: Alice + prefix: Ms. + suffix: '' + sex: female + birth_date: '1985-05-20' + related_person: + - '@type': RelatedPerson + relationship_type: spouse + related_member: + '@type': Member + '@id': 'https://example.org/member/123456789' + member_identifier: M123456789 + - '@type': RelatedPerson + relationship_type: child + related_member: + '@type': Member + '@id': 'https://example.org/member/987654322' + 'spdci:member_identifier': M987654322 + is_disabled: false + marital_status: married + employment_status: employed + occupation: teacher + income_level: middle + language_code: + - en + - es + education_level: bachelor + additional_attributes: + - extra_work: volunteer + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' + required: + - reg_record_type + - reg_records + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + - type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + subscriptions: + type: array + items: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + $ref: '#/components/schemas/SubscriptionStatus' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + reg_type: + $ref: '#/paths/~1registry~1txn~1on-status/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/txnstatus_response/properties/txn_status/anyOf/0/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' + frequency: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/frequency' + filter_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + filter: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: 'ns:org:QueryType:graphql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: | + query GetMemberByIdentifier { + member( + identifier: { + value: "1", + type: "uin" + } + ) { + member_identifier { + value + type + } + demographic_info { + name + gender + age + } + } + } + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1' + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2' + notify_record_type: + $ref: '#/paths/~1registry~1txn~1on-status/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/txnstatus_response/properties/txn_status/anyOf/0/properties/search_response/items/properties/data/properties/reg_record_type' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - code + - status + - timestamp + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - subscribe_response + - $ref: '#/components/schemas/UnSubscribeResponse' + required: + - transaction_id + - correlation_id + - txnstatus_response + EncryptedMessage: + description: Encrypted payload + type: object + properties: + header: + type: object + properties: + alg: + type: string + description: The JWE algorithm used for encryption + enc: + type: string + description: The encryption algorithm used for encrypting the plaintext + kid: + type: string + description: The key identifier for the encryption key + required: + - alg + - enc + - kid + ciphertext: + type: string + description: This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded. + encrypted_key: + type: string + description: The base64-url encoded encrypted key + tag: + type: string + description: 'This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data' + iv: + type: string + description: This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used. + required: + - header + - ciphertext + - encrypted_key + - tag + - iv + Error: + description: | + Commumication layer Asyn errors that are returned as part of message acknowledgement. + 1. Messages that are not parsable or message integrity check fails. + 2. This object may be used across all transport layer protocols (https, sftp, messaging, etc,) to ack the receipt of a message. + 3. Business context and related validation is NOT in scope of this error object. + type: object + properties: + code: + type: string + description: Standard error code + enum: + - err.request.bad + - err.request.unauthorized + - err.request.forbidden + - err.request.not_found + - err.request.timeout + - err.version.not_supported + - err.request.too_many_requests + - err.sender_id.invalid + - err.sender_uri.invalid + - err.receiver_id.invalid + - err.signature.missing + - err.signature.invalid + - err.encryption.invalid + - err.service.unavailable + message: + type: string + description: message to describe above error code + maxLength: 999 + ExpTemplate: + type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "idtype-value", "expression" + example: 'ns:org:QueryType:expression' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + collection: DPRerson + query: + $and: + - disability_status: + $eq: Approved + - location: + $eq: central_region + FileInfo: + type: object + description: File info. Used in file upload feature using HTTPS + properties: + action: + description: SPDCI Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + fileName: + description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record + type: string + format: binary + fileFormat: + description: 'File content format. e.g json, csv, etc.,' + type: string + default: json + example: csv + required: + - action + - fileName + MsgCallbackHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '789' + message_ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/MsgHeaderStatusReasonCode' + status_reason_message: + description: 'Status reascon code message, if any, Helps actionable messaging for system/end users' + type: string + maxLength: 999 + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + completed_count: + description: No of requests in complteed state. Complete includes success and error requests due to funcational errors + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: dr.example.org + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: spmis.example.org + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/meta' + required: + - message_id + - message_ts + - action + - status + MsgHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '123' + message_ts: + description: | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. + type: string + format: date-time + example: '2022-12-04T17:20:07-04:00' + action: + description: 'spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property.' + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: spmis.example.org + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: 'https://spmis.example.org/consumer-namespace/callback/on-search' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: dr.example.org + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Meta.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Additional meta info defined as per implementation context. + 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. + 3. The information SHOULD be privacy preserving + required: + - message_id + - message_ts + - action + - sender_id + - total_count + MsgHeaderStatusReasonCode: + type: string + description: Message header related common status reason codes + enum: + - rjct.version.invalid + - rjct.message_id.duplicate + - rjct.message_ts.invalid + - rjct.action.invalid + - rjct.action.not_supported + - rjct.total_count.invalid + - rjct.total_count.limit_exceeded + - rjct.errors.too_many + MsgSignature: + type: string + description: 'Signature of {header}+{message} body verified using sender''s signing public key' + example: 'Signature: namespace="spdci", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' + responses: + HttpErrorResponse: + description: HTTP layer error details + content: + application/json: + schema: + type: object + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' + properties: + errors: + items: + type: object + properties: + code: + type: string + description: error code + message: + type: string + description: error message + Response: + description: Acknowledgement of message received after successful validation of message and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack_status: + type: string + description: | + 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. + 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. + 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. + enum: + - ACK + - NACK + - ERR + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + error: + $ref: '#/components/schemas/Error' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + required: + - ack_status + - timestamp + - correlation_id + securitySchemes: + Authorization: + type: http + scheme: bearer + bearerFormat: jwt + description: User/System authenticated access token; (jwt bearer) token returned from implementing system's authentication/token api end points. All systems must implement token api. diff --git a/release/yaml/ess_api_v1.0.0.yaml b/release/yaml/ess_api_v1.0.0.yaml new file mode 100644 index 0000000..444ec5c --- /dev/null +++ b/release/yaml/ess_api_v1.0.0.yaml @@ -0,0 +1,2162 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Employment Support System + version: 1.0.0 + x-logo: + url: ./dci-logo.png + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: |- + The ESS(Employment Support System) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between ESS and SP-System. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 3. checkEnrolment : the check-enrolled API is a special type of search to return the enrolment status , can be executed from SP to ESS or vice versa + + Gitbook reference link[WIP]: + - [ESS - V1.0 ]() + + Code directory links: + - [Employment Type]() + - [Enrollment Status]() + - [Umemployment Reason]() + + Data Objects: + - [Employment Info]() + - [Group]() + - [Member]() + + + Each request is build up of three parts + - signature + - header + - message + + Information about each part is given below + + **Signature:** + - The signature is used to verify the integrity of the message. + - The signature is a hash of the message and is encrypted using the private key of the sender. + - The receiver can verify the signature using the public key of the sender. + + **Header:** + - The header contains information about various message header, refer to the header schema for more details. + + **Message:** + + - The message contains the actual payload of the message. + - Refer example section to get sample data and also read Gitbook for details data objects + - The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: 'https://api.spdci.org/LICENSE.md' +servers: + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EnrolledRequest + x-displayName: EnrolledRequest + description: | + + - name: EnrolledResponse + x-displayName: EnrolledResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - EnrolledRequest + - EnrolledResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode +paths: + /registry/search: + post: + summary: /registry/search + description: |- + The async search api will accept request and will send response to on-search endpoint. The ESS or SP-System will implement /registry/search endpoint and the SP-System or ESS shall implement /registry/on-search to receive data from the sender. + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The ESS or SP-System will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be searched in registry, this can be any of explained in RegistryQueries.yaml + operationId: post_reg_search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/on-search: + post: + summary: /registry/on-search + description: |- + The /registry/on-search end point to be implemented by SP-System to receive search results from ESS or the ESS to receive search results from SP-System. + The Sender system will send data in format explained in SearchResponse.yaml. The reg_records will contains data that can be either a Person, Member or Group depending the collection type. + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-search + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/subscribe: + post: + summary: /registry/subscribe + description: Subscribe to a change event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contain query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: '#/components/schemas/SubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - subscribe + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/on-subscribe: + post: + summary: /registry/on-subscribe + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-subscribe + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/notify: + post: + summary: /registry/notify + description: Registry to notify an event to subscribers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/unsubscribe: + post: + summary: /registry/unsubscribe + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: '#/components/schemas/UnSubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - unsubscribe + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/on-unsubscribe: + post: + summary: /registry/on-unsubscribe + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: '#/components/schemas/UnSubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-unsubscribe + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/txn/status: + post: + summary: /registry/txn/status + description: The /registry/txn/status will be implemented by ESS or SP-System. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-status + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/txn/on-status: + post: + summary: /registry/txn/on-status + description: The /registry/txn/on-status will be implemented by receiver system. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-on-status + responses: + '200': + $ref: '#/components/responses/Response' + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/sync/search: + post: + summary: /registry/sync/search + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The ESS or SP-System will validate the request and will send response directly. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgSyncHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '200': + description: Registry search response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/sync/check-enrollment: + post: + summary: /registry/sync/check-enrollment + description: 'check status of a person if remain enrolled ' + operationId: post_reg_check_enrollment + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgSyncHeader_V1.0.0' + - properties: + action: + enum: + - enrollementstatus + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/EnrolledRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - enrollementstatus + responses: + '200': + description: Transaction status check response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/EnrolledResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + deprecated: false + /registry/sync/txn/status: + post: + summary: /registry/sync/txn/status + description: The /registry/sync/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '200': + description: Transaction status check response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + deprecated: false +components: + schemas: + NotifyEventRequest: + type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + type: string + description: | + The ESS receive data from SP system and vice versa, it has to differenciate of details based on event type, Usually SP system sends referrals and enrollment status change events to ESS + + 1 : enrolment
+ 2 : enrolment_status_change
+ enum: + - enrolment + - enrolment_status_change + example: enrolment + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + reg_records: + type: object + description: | + The "Member" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ibr/v1/Member.jsonld
+ @type: "Member"
+ @container: "@set"
+ example: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items' + required: + - reg_record_type + - reg_records + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + SearchRequest: + type: object + description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditional expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. + properties: + transaction_id: + description: | + 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. + 2. transaction_id should be same across processing systems/service end points. + 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) + type: string + maxLength: 99 + example: XZFHYTY + search_request: + type: array + description: | + 1. Batch requests enable multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + query_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + example: expression + query: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditions. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "idtype-value", "expression" + example: 'ns:org:QueryType:expression' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + collection: Group + query: + $and: + - poverty_score: + $lt: 5 + - location: + $eq: central_region + - group_size: + $lt: 5 + - $ref: '#/components/schemas/SubscriptionInfo/properties/filter/anyOf/1' + - $ref: '#/components/schemas/SubscriptionInfo/properties/filter/anyOf/2' + sort: + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @type: "Attribute"
+ + **Notes:** + 1. Attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible attribute names. + 3. e.g: UIN, poverty_score, etc., + example: poverty_score + sort_order: + type: string + enum: + - asc + - desc + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + default: 1 + example: 5 + required: + - page_size + consent: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld"
+ @type: "Consent" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld' + '@type': Consent + ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on consent codes + authorize: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld
+ @type: "Authorize" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld' + '@type': Authorize + ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on authorize codes + required: + - query_type + - query + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - search_criteria + required: + - transaction_id + - search_request + SearchResponse: + type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + description: | + 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. + 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) + type: string + maxLength: 99 + pattern: '^[a-zA-Z0-9-]+$' + example: ABC9876543210 + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/RegistryType.jsonld
+ @type: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:ESS" + example: 'ns:org:RegistryType:ESS' + reg_record_type: + type: string + description: | + @context: https://schema.spdci.org/extensions/ess/v1/Member.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "Member" + example: Member + reg_records: + description: | + The "Member" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ess/v1/Member.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+ example: + '@context': + spdci: 'https://schema.spdci.org/core/v1/data' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + xsd: 'http://www.w3.org/2001/XMLSchema#' + owl: 'http://www.w3.org/2002/07/owl#' + common: 'https://schema.spdci.org/common/v1/' + '@id': 'https://example.org/ess_person/847951632' + '@type': 'spdci:member' + member_identifier: + - '@type': Identifier + identifier_type: UIN + identifier_value: '42343545654' + demographic_info: + '@type': ESSPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + name: + '@type': Name + surname: Smith + given_name: Alice + prefix: Ms. + suffix: '' + sex: female + birth_date: '1985-05-20' + related_person: + - '@type': RelatedPerson + relationship_type: spouse + related_member: + '@type': Member + '@id': 'https://example.org/member/123456789' + member_identifier: M123456789 + - '@type': RelatedPerson + relationship_type: child + related_member: + '@type': Member + '@id': 'https://example.org/member/987654322' + 'spdci:member_identifier': M987654322 + is_disabled: false + marital_status: married + employment_status: employed + occupation: teacher + income_level: middle + language_code: + - en + - es + education_level: bachelor + additional_attributes: + - extra_work: volunteer + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' + required: + - reg_records + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + example: 5 + total_count: + type: number + format: int32 + example: 24250 + required: + - page_size + - page_number + - total_count + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + SearchStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.search_criteria.invalid + - rjct.filter.invalid + - rjct.sort.invalid + - rjct.pagination.invalid + - rjct.search.too_many_records_found + SubscribeRequest: + type: object + description: Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + $ref: '#/components/schemas/NotifyEventRequest/properties/notify_event/items/properties/data/properties/reg_event_type' + frequency: + $ref: '#/components/schemas/SubscriptionInfo/properties/frequency' + filter_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/filter_type' + filter: + $ref: '#/components/schemas/SubscriptionInfo/properties/filter' + notify_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + authorize: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/authorize' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - subscribe_criteria + required: + - transaction_id + - subscribe_request + SubscribeResponse: + type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscriptions: + type: array + items: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/SubscriptionCode' + status: + $ref: '#/components/schemas/SubscriptionStatus' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + $ref: '#/components/schemas/NotifyEventRequest/properties/notify_event/items/properties/data/properties/reg_event_type' + frequency: + $ref: '#/components/schemas/SubscriptionInfo/properties/frequency' + filter_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/filter_type' + filter: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query' + notify_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - code + - status + - timestamp + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - subscribe_response + SubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.notify_types.invalid + - rjct.notify_details.invalid + - rjct.person_id.invalid + - rjct.event.already_subscribed + SubscriptionCode: + type: string + description: | + Unique code to identify the subscription request by the entity providing subscription service. + Helps to check status, unsubscribe etc., + maxLength: 99 + SubscriptionCodeList: + items: + $ref: '#/components/schemas/SubscriptionCode' + SubscriptionInfo: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/SubscriptionCode' + status: + $ref: '#/components/schemas/SubscriptionStatus' + timestamp: + description: | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. + type: string + format: date-time + example: '2022-12-04T17:20:07-04:00' + reg_type: + type: string + description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' + reg_event_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' + frequency: + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + end_time: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency + filter_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + - graphql + example: expression + filter: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: 'ns:org:QueryType:graphql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: | + query GetMemberByIdentifier { + member( + identifier: { + value: "1", + type: "uin" + } + ) { + member_identifier { + value + type + } + demographic_info { + name + gender + age + } + } + } + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + value: + allOf: + - description: Identifier Value of the subject. + - oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: object + example: '1980' + example: '12314567890' + - type: array + items: + type: object + properties: + seq_num: + description: Sequence number to help define precedence for evaluating a list of expression Predicates + type: number + example: 1 + expression1: + type: object + description: Expression + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryAttributes.jsonld
+ @type: "QueryAttributes"
+ + **Notes:** + 1. Query attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + operator: + type: string + description: Operator in an expression + enum: + - gt + - lt + - eq + - ge + - le + - in + example: eq + attribute_value: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1/properties/value/allOf/1' + required: + - attribute_name + - operator + - attribute_value + condition: + type: string + description: Condition in an expression + enum: + - and + - or + - not + example: and + expression2: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2/items/properties/expression1' + required: + - expression1 + notify_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Member" + example: 'spdci-extensions-dci:Member' + locale: + type: string + description: indicates language code. SPDCI Connect supports country codes as per ISO 639.3 standard + pattern: '^[a-z]{3,3}$' + example: eng + required: + - code + - status + - timestamp + SubscriptionStatus: + type: string + description: subscription status + enum: + - subscribe + - unsubscribe + UnSubscribeRequest: + type: object + description: Un-Subscribe to registred subscriptions + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + subscription_codes: + type: array + items: + $ref: '#/components/schemas/SubscriptionCode' + required: + - transaction_id + - timestamp + - subscription_codes + UnSubscribeResponse: + type: object + description: Un-Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + type: string + description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' + enum: + - rcvd + - pdng + - succ + - rjct + status_reason_code: + $ref: '#/components/schemas/UnSubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscription_status: + type: array + items: + type: object + properties: + code: + $ref: '#/components/schemas/SubscriptionCode' + status: + $ref: '#/components/schemas/SubscriptionStatus' + required: + - code + - status + required: + - transaction_id + - correlation_id + - timestamp + - status + UnSubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.subscription_code.invalid + - rjct.requester.invalid + - rjct.event.already_unsubscribed + TxnStatusRequest: + type: object + description: Request to fetch txn status on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + txnstatus_request: + type: object + properties: + reference_id: + type: string + description: Unique reference_id set by txn initiating system for each request in a batch + example: SDFRTYUX + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - receipt + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + attribute_value: + anyOf: + - $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + - type: array + items: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - txn_type + - attribute_type + - attribute_value + required: + - transaction_id + - txnstatus_request + TxnStatusResponse: + type: object + description: txn status info on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + txnstatus_response: + type: object + properties: + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - receipt + - enrolled + txn_status: + anyOf: + - $ref: '#/components/schemas/SearchResponse' + - type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + receipt_information: + type: object + description: | + Receipt information contains receipt type and list of beneficiaries + 1) Enrolled beneficiaries - It return the beneficiaries enrolled into system. + 2) Updated beneficiaries - If return updated status + properties: + beneficiaries: + type: array + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 2. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + @context: https://schema.spdci.org/extensions/ess/v1/Member.jsonld
+ @type: "@context"
+ items: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items' + required: + - transaction_id + - receipt_information + required: + - txn_type + - txn_status + required: + - transaction_id + - correlation_id + - txnstatus_response + EnrolledRequest: + type: object + description: Registry to notify a event to subscribers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + enrolled_criteria: + type: object + description: | + Enrolled query + properties: + query_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/filter_type' + response_entity: + example: Member + type: string + description: | + Define the type of response to have when executing the search + enum: + - Group + - Member + query: + type: object + description: Query expression for the enrolled query + example: + person_identifier: + eq: ABC451123 + required: + - transaction_id + - enrolled_criteria + EnrolledResponse: + type: object + description: Response to verify enrollment status request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + enrolled_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + enrolled_status: + description: Indicates the status of the beneficiary registered in a program. + type: string + enum: + - Active + - Deceased + - Suspended + - Inactive + - Reinstated + - Awaiting Renewal + required: + - reference_id + - timestamp + - status + - enrolled_status + required: + - transaction_id + - correlation_id + - enrolled_response + EncryptedMessage: + description: Encrypted payload + type: object + properties: + header: + type: object + properties: + alg: + type: string + description: The JWE algorithm used for encryption + enc: + type: string + description: The encryption algorithm used for encrypting the plaintext + kid: + type: string + description: The key identifier for the encryption key + required: + - alg + - enc + - kid + ciphertext: + type: string + description: This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded. + encrypted_key: + type: string + description: The base64-url encoded encrypted key + tag: + type: string + description: 'This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data' + iv: + type: string + description: This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used. + required: + - header + - ciphertext + - encrypted_key + - tag + - iv + Error: + description: | + Commumication layer Asyn errors that are returned as part of message acknowledgement. + 1. Messages that are not parsable or message integrity check fails. + 2. This object may be used across all transport layer protocols (https, sftp, messaging, etc,) to ack the receipt of a message. + 3. Business context and related validation is NOT in scope of this error object. + type: object + properties: + code: + type: string + description: Standard error code + enum: + - err.request.bad + - err.request.unauthorized + - err.request.forbidden + - err.request.not_found + - err.request.timeout + - err.version.not_supported + - err.request.too_many_requests + - err.sender_id.invalid + - err.sender_uri.invalid + - err.receiver_id.invalid + - err.signature.missing + - err.signature.invalid + - err.encryption.invalid + - err.service.unavailable + message: + type: string + description: message to describe above error code + maxLength: 999 + FileInfo: + type: object + description: File info. Used in file upload feature using HTTPS + properties: + action: + description: SPDCI Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + fileName: + description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record + type: string + format: binary + fileFormat: + description: 'File content format. e.g json, csv, etc.,' + type: string + default: json + example: csv + required: + - action + - fileName + MsgCallbackHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to reliable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integrity, ie Signature intact. + type: string + example: '789' + message_ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/MsgHeaderStatusReasonCode' + status_reason_message: + description: 'Status reason code message, if any, Helps actionable messaging for system/end users' + type: string + maxLength: 999 + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + completed_count: + description: No of requests in completed state. Complete includes success and error requests due to functional errors + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: ess.example.org + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: spmis.example.org + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/meta' + required: + - message_id + - message_ts + - action + - status + MsgHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '123' + message_ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + action: + description: 'spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property.' + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: spmis.example.org + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: 'https://spmis.example.org/consumer-namespace/callback/on-search' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: ess.example.org + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Meta.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Additional meta info defined as per implementation context. + 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. + 3. The information SHOULD be privacy preserving + required: + - message_id + - message_ts + - action + - sender_id + - total_count + MsgSyncHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '123' + message_ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + action: + description: 'spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property.' + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: spmis.example.org + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: ess.example.org + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/meta' + required: + - message_id + - message_ts + - action + - sender_id + - total_count + MsgHeaderStatusReasonCode: + type: string + description: Message header related common status reason codes + enum: + - rjct.version.invalid + - rjct.message_id.duplicate + - rjct.message_ts.invalid + - rjct.action.invalid + - rjct.action.not_supported + - rjct.total_count.invalid + - rjct.total_count.limit_exceeded + - rjct.errors.too_many + MsgSignature: + type: string + description: 'Signature of {header}+{message} body verified using sender''s signing public key' + example: 'Signature: namespace="spdci", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' + responses: + HttpErrorResponse: + description: HTTP layer error details + content: + application/json: + schema: + type: object + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' + properties: + errors: + items: + type: object + properties: + code: + type: string + description: error code + message: + type: string + description: error message + Response: + description: Acknowledgement of message received after successful validation of message and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack_status: + type: string + description: | + 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. + 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. + 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. + enum: + - ACK + - NACK + - ERR + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + error: + $ref: '#/components/schemas/Error' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + required: + - ack_status + - timestamp + - correlation_id + securitySchemes: + Authorization: + type: http + scheme: bearer + bearerFormat: jwt + description: User/System authenticated access token; (jwt bearer) token returned from implementing system's authentication/token api end points. All systems must implement token api. diff --git a/release/yaml/fr_api_v1.0.0.yaml b/release/yaml/fr_api_v1.0.0.yaml new file mode 100644 index 0000000..e6ed8ac --- /dev/null +++ b/release/yaml/fr_api_v1.0.0.yaml @@ -0,0 +1,2058 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Farmer registries + version: 1.0.0 + x-logo: + url: ./dci-logo.png + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: |- + The Farmer registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between Farmer registry and SP system. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in farmer registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link: + - [FR - V1.0 ](https://standards.spdci.org/standards/wip-farmers-registry) + + Code directory links: + - [CropTypeEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.01-croptypeenum) + - [CropEndUse](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.02-cropsenduse) + - [LandTenureEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.03-landtenureenum) + - [MeasurementUnitEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.04-measurementunitenum) + - [FarmTypeEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.05-farmtypeenum) + - [MachineriesEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.06-machineriesenum) + - [AnimalsEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.07-animalsenum) + - [AquaCulture](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.08-aquaculture) + - [AgriSupportActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.09-agrisupportactivities) + - [AquaSupportActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.10-aquasupportactivities) + - [FertiliserType](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.11-fertilisertype) + - [livestockSystem](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.12-livestocksystem) + - [EquipmentSource](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.13-equipmentsource) + - [IrrigationWater](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.14-irrigationwater) + - [CropActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.15-cropactivities) + - [ForestActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.16-forestactivities) + + Data Objects: + - [Farmer](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.01-farmer) + - [FarmInfo](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.02-farminfo) + - [FarmingActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.03-farmingactivities) + - [CropDetails](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.04-cropdetails) + - [LiveStockDetails](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.05-livestockdetails) + - [Machinery](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.06-machinery) + - [Group](https://standards.spdci.org/standards/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.02-group) + - [Member](https://standards.spdci.org/standards/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.03-member) + + + Each request is build up of three parts + - signature + - header + - message + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: 'https://api.spdci.org/LICENSE.md' +servers: + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode + - SubscribeStatusReasonCode + - UnSubscribeStatusReasonCode +paths: + /registry/search: + post: + summary: /registry/search + description: Search person(s) in registry using identifier or custom attributes + operationId: post_reg_search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-search: + post: + summary: /registry/on-search + description: Search results through callback + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/notify: + post: + summary: /registry/notify + description: Registry to notify an event to subscribers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/subscribe: + post: + summary: /registry/subscribe + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: '#/components/schemas/SubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-subscribe: + post: + summary: /registry/on-subscribe + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/unsubscribe: + post: + summary: /registry/unsubscribe + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: '#/components/schemas/UnSubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-unsubscribe: + post: + summary: /registry/on-unsubscribe + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: '#/components/schemas/UnSubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/status: + post: + summary: /registry/txn/status + description: The /registry/txn/status will be implemented by FR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/on-status: + post: + summary: /registry/txn/on-status + description: The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-on-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/sync/search: + post: + summary: /registry/sync/search + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The IBR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Registry search response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false + /registry/sync/txn/status: + post: + summary: /registry/sync/txn/status + description: The /registry/sync/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Transaction status check response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + deprecated: false +components: + schemas: + NotifyEventRequest: + type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + type: string + description: | + The SP-System receives data from FR, usually the FR sends registration and updates events to SP-System + + 1 : Register + enum: + - register + example: register + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + reg_records: + type: object + description: | + The "group" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/fr/v1/FRPerson.jsonld
+ @type: "FRPerson"
+ @container: "@set"
+ example: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items' + required: + - reg_record_type + - reg_records + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + SearchRequest: + type: object + description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditioanl expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. + properties: + transaction_id: + description: | + 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. + 2. transaction_id should be same across processing systems/service end points. + 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) + type: string + maxLength: 99 + example: XZFHYTY + search_request: + type: array + description: | + 1. Batch requests enabel multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + query_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + - graphql + example: expression + query: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "expression", "predicate", "idtype-value" , "graphql" + example: 'ns:org:QueryType:expression' + value: + type: object + description: | + @context: https://schema.spdci.org/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + query: + $and: + - farm_info.location.geo.latitude: + $eq: 9.56 + - farm_info.location.geo.longitude: + $eq: 100.0245 + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + value: + allOf: + - description: Identifier Value of the subject. + - oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: object + example: '1980' + example: '12314567890' + - type: array + items: + type: object + properties: + seq_num: + description: Sequence number to help define precedence for evaluating a list of expression Predicates + type: number + example: 1 + expression1: + type: object + description: Expression + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryAttributes.jsonld
+ @type: "QueryAttributes"
+ + **Notes:** + 1. Query attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + operator: + type: string + description: Operator in an expression + enum: + - gt + - lt + - eq + - ge + - le + - in + example: eq + attribute_value: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1/properties/value/allOf/1' + required: + - attribute_name + - operator + - attribute_value + condition: + type: string + description: Condition in an expression + enum: + - and + - or + - not + example: and + expression2: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2/items/properties/expression1' + required: + - expression1 + sort: + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @type: "Attribute"
+ + **Notes:** + 1. Attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible attribute names. + 3. e.g: UIN, poverty_score, etc., + example: poverty_score + sort_order: + type: string + enum: + - asc + - desc + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + default: 1 + example: 5 + required: + - page_size + consent: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld"
+ @type: "Consent" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld' + '@type': Consent + ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on consent codes + authorize: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld
+ @type: "Authorize" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld' + '@type': Authorize + ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on authorize codes + required: + - query_type + - query + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - search_criteria + required: + - transaction_id + - search_request + SearchResponse: + type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + description: | + 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. + 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) + type: string + maxLength: 99 + pattern: '^[a-zA-Z0-9-]+$' + example: ABC9876543210 + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:FR" + example: 'ns:org:RegistryType:FR' + reg_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Farmer" + example: 'spdci-extensions-dci:Farmer' + reg_records: + type: array + description: | + The "Entity" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/fr/v1/FRPerson.jsonld
+ @type: "FRPerson"
+ @container: "@set"
+ items: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + + + @context: https://schema.spdci.org/extensions/gr/v1/FRPerspn.jsonld
+ @type: "@context"
+ example: + famer_personal_details: + member_identifier: + identifier_type: NationalID + identifier_value: M123456 + demographic_info: + identifier: + identifier_type: NationalID + identifier_value: M123456 + name: + first_name: John + last_name: Doe + date_of_birth: '1990-05-15T00:00:00Z' + gender: Male + family_details: + group_identifier: + - identifier_type: NationalID + identifier_value: G9876543210 + group_type: family + poverty_score: 45.2 + poverty_score_type: income-based + group_head_info: + member_identifier: + - identifier_type: NationalID + identifier_value: M123456 + demographic_info: + identifier: + identifier_type: NationalID + identifier_value: M123456 + name: + first_name: John + last_name: Doe + date_of_birth: '1990-05-15T00:00:00Z' + gender: Male + is_disabled: false + marital_status: married + registration_date: '1990-06-10T08:00:00Z' + group_size: 2 + member_list: + - member_identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: M9876543210 + demographic_info: + 'spdci:identifier': + - '@type': Identifier + identifier_type: NationalID + identifier_value: '1234567890' + name: + '@type': Name + surname: Doe + given_name: Jane + prefix: Mr. + suffix: '' + sex: female + birth_date: '1982-03-15T00:00:00Z' + registration_date: '2022-01-10T08:00:00Z' + is_disabled: false + marital_status: married + registration_date: '2022-01-10T08:00:00Z' + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' + farm_details: + - place: + name: Koh Samui + geo: + '@type': 'spdci:GeoLocation' + latitude: 9.5604 + longitude: 100.0245 + farm_type: Small subsistence-oriented farms + farming_activities: + - crop_production: + - activity_group: perennial crops + crop_type: Fruit and nuts + variety: local + season: winter + end_use: + - Food for human consumption + irrigation: true + irrigation_water: + - Mixed surface water and groundwater + fertilizer_type: + - Organic fertilizers + registration_date: '2023-01-10T00:00:00Z' + last_updated: '2023-09-20T00:00:00Z' + animal_production: + - type: Sheep and goats + count: 10 + livestock_system: Mixed system + registration_date: '2023-01-10T00:00:00Z' + last_updated: '2023-09-20T00:00:00Z' + mixed_farming: true + agri_support_activities: + - Support activities for crop production + aqua_support_activities: Support activities for fishing and aquaculture + aqua_culture: + - Marine aquafarming + registration_date: '2023-01-10T00:00:00Z' + last_updated: '2023-09-20T00:00:00Z' + machineries_details: + - type: Machine powered equipment + count: 2 + equipement_source: Provided by a cooperative + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' + registration_date: '2023-01-10T00:00:00Z' + last_updated: '2023-09-20T00:00:00Z' + required: + - reg_record_type + - reg_records + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + example: 5 + total_count: + type: number + format: int32 + example: 24250 + required: + - page_size + - page_number + - total_count + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + SearchStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.search_criteria.invalid + - rjct.filter.invalid + - rjct.sort.invalid + - rjct.pagination.invalid + - rjct.search.too_many_records_found + SubscribeRequest: + type: object + description: Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' + reg_event_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' + frequency: + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + end_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency + filter_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + filter: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: 'ns:org:QueryType:graphql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: | + query GetMemberByIdentifier { + member( + identifier: { + value: "1", + type: "uin" + } + ) { + member_identifier { + value + type + } + demographic_info { + name + gender + age + } + } + } + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1' + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2' + notify_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Member" + example: 'spdci-extensions-dci:Member' + authorize: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/authorize' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - subscribe_criteria + required: + - transaction_id + - subscribe_request + SubscribeResponse: + type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + subscriptions: + type: array + items: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + $ref: '#/components/schemas/SubscriptionStatus' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + reg_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/reg_type' + reg_event_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/reg_event_type' + frequency: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/frequency' + filter_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + filter: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/filter' + notify_record_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/notify_record_type' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - code + - status + - timestamp + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - subscribe_response + SubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.notify_types.invalid + - rjct.notify_details.invalid + - rjct.person_id.invalid + - rjct.event.already_subscribed + SubscriptionStatus: + type: string + description: subscription status + enum: + - subscribe + - unsubscribe + UnSubscribeRequest: + type: object + description: Un-Subscribe to registred subscriptions + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + subscription_codes: + type: array + items: + type: string + description: | + Unique code to identify the subscription request by the entity providing subscription service. + Helps to check status, unsubscribe etc., + maxLength: 99 + required: + - transaction_id + - timestamp + - subscription_codes + UnSubscribeResponse: + type: object + description: Un-Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + type: string + description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' + enum: + - rcvd + - pdng + - succ + - rjct + status_reason_code: + $ref: '#/components/schemas/UnSubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscription_status: + type: array + items: + type: object + properties: + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + $ref: '#/components/schemas/SubscriptionStatus' + required: + - code + - status + required: + - transaction_id + - correlation_id + - timestamp + - status + UnSubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.subscription_code.invalid + - rjct.requester.invalid + - rjct.event.already_unsubscribed + TxnStatusRequest: + type: object + description: Request to fetch txn status on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + txnstatus_request: + type: object + properties: + reference_id: + type: string + description: Unique reference_id set by txn initiating system for each request in a batch + example: SDFRTYUX + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + - subscription_code_list + attribute_value: + anyOf: + - $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + - type: array + items: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + - items: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + locale: + type: string + description: indicates language code. SPDCI Connect supports country codes as per ISO 639.3 standard + pattern: '^[a-z]{3,3}$' + example: eng + required: + - reference_id + - txn_type + - attribute_type + - attribute_value + required: + - transaction_id + - txnstatus_request + TxnStatusResponse: + type: object + description: txn status info on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + txnstatus_response: + type: object + properties: + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + txn_status: + anyOf: + - type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/notify_record_type' + reg_records: + type: object + description: | + The "person" object contains fields expected in response of search + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "Person"
+ @container: "@set"
+ example: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+ example: + '@context': + spdci: 'https://schema.spdci.org/core/v1/data' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + xsd: 'http://www.w3.org/2001/XMLSchema#' + owl: 'http://www.w3.org/2002/07/owl#' + common: 'https://schema.spdci.org/common/v1/' + '@id': 'https://example.org/sr_person/847951632' + '@type': 'spdci:member' + member_identifier: + - '@type': Identifier + identifier_type: UIN + identifier_value: '42343545654' + demographic_info: + '@type': SRPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + name: + '@type': Name + surname: Smith + given_name: Alice + prefix: Ms. + suffix: '' + sex: female + birth_date: '1985-05-20' + related_person: + - '@type': RelatedPerson + relationship_type: spouse + related_member: + '@type': Member + '@id': 'https://example.org/member/123456789' + member_identifier: M123456789 + - '@type': RelatedPerson + relationship_type: child + related_member: + '@type': Member + '@id': 'https://example.org/member/987654322' + 'spdci:member_identifier': M987654322 + is_disabled: false + marital_status: married + employment_status: employed + occupation: teacher + income_level: middle + language_code: + - en + - es + education_level: bachelor + additional_attributes: + - extra_work: volunteer + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' + required: + - reg_record_type + - reg_records + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/UnSubscribeResponse' + required: + - transaction_id + - correlation_id + - txnstatus_response + EncryptedMessage: + description: Encrypted payload + type: object + properties: + header: + type: object + properties: + alg: + type: string + description: The JWE algorithm used for encryption + enc: + type: string + description: The encryption algorithm used for encrypting the plaintext + kid: + type: string + description: The key identifier for the encryption key + required: + - alg + - enc + - kid + ciphertext: + type: string + description: This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded. + encrypted_key: + type: string + description: The base64-url encoded encrypted key + tag: + type: string + description: 'This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data' + iv: + type: string + description: This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used. + required: + - header + - ciphertext + - encrypted_key + - tag + - iv + Error: + description: | + Commumication layer Asyn errors that are returned as part of message acknowledgement. + 1. Messages that are not parsable or message integrity check fails. + 2. This object may be used across all transport layer protocols (https, sftp, messaging, etc,) to ack the receipt of a message. + 3. Business context and related validation is NOT in scope of this error object. + type: object + properties: + code: + type: string + description: Standard error code + enum: + - err.request.bad + - err.request.unauthorized + - err.request.forbidden + - err.request.not_found + - err.request.timeout + - err.version.not_supported + - err.request.too_many_requests + - err.sender_id.invalid + - err.sender_uri.invalid + - err.receiver_id.invalid + - err.signature.missing + - err.signature.invalid + - err.encryption.invalid + - err.service.unavailable + message: + type: string + description: message to describe above error code + maxLength: 999 + FileInfo: + type: object + description: File info. Used in file upload feature using HTTPS + properties: + action: + description: SPDCI Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + fileName: + description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record + type: string + format: binary + fileFormat: + description: 'File content format. e.g json, csv, etc.,' + type: string + default: json + example: csv + required: + - action + - fileName + MsgCallbackHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '789' + message_ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + type: string + description: Message header related common status reason codes + enum: + - rjct.version.invalid + - rjct.message_id.duplicate + - rjct.message_ts.invalid + - rjct.action.invalid + - rjct.action.not_supported + - rjct.total_count.invalid + - rjct.total_count.limit_exceeded + - rjct.errors.too_many + status_reason_message: + description: 'Status reascon code message, if any, Helps actionable messaging for system/end users' + type: string + maxLength: 999 + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + completed_count: + description: No of requests in completed state. Complete includes success and error requests due to funcational errors + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: fr.example.org + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: spmis.example.org + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/meta' + required: + - message_id + - message_ts + - action + - status + MsgHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '123' + message_ts: + description: | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. + type: string + format: date-time + example: '2022-12-04T17:20:07-04:00' + action: + description: 'spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property.' + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: spmis.example.org + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: 'https://spmis.example.org/consumer-namespace/callback/on-search' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: farmer.example.org + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Meta.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Additional meta info defined as per implementation context. + 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. + 3. The information SHOULD be privacy preserving + required: + - message_id + - message_ts + - action + - sender_id + - total_count + MsgSignature: + type: string + description: 'Signature of {header}+{message} body verified using sender''s signing public key' + example: 'Signature: namespace="spdci", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' + responses: + HttpErrorResponse: + description: HTTP layer error details + content: + application/json: + schema: + type: object + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' + properties: + errors: + items: + type: object + properties: + code: + type: string + description: error code + message: + type: string + description: error message + Response: + description: Acknowledgement of message received after successful validation of message and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack_status: + type: string + description: | + 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. + 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. + 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. + enum: + - ACK + - NACK + - ERR + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + error: + $ref: '#/components/schemas/Error' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + required: + - ack_status + - timestamp + - correlation_id + securitySchemes: + Authorization: + type: http + scheme: bearer + bearerFormat: jwt + description: User/System authenticated access token; (jwt bearer) token returned from implementing system's authentication/token api end points. All systems must implement token api. diff --git a/release/yaml/ibr_api_v1.0.0.yaml b/release/yaml/ibr_api_v1.0.0.yaml new file mode 100644 index 0000000..ccbe239 --- /dev/null +++ b/release/yaml/ibr_api_v1.0.0.yaml @@ -0,0 +1,2244 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Integrated Beneficiary Registry + version: 1.0.0 + x-logo: + url: ./dci-logo.png + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: |- + The IBR(Integrated Beneficiary Registry) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between IBR registry and SP-System. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Enrollment updates: The enrollment updates API send details of beneficiaries enrolled in programs from SP-System + 3. Enrolled : the enrolled API is a special type of search to return the programs a beneficiary is enrolled in + + Gitbook reference link[WIP]: + - [Integrated Beneficiary Registry - V1.0 ](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0) + + Code directory links: + - [Assistance Unit](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.01-assistance_unit) + - [Enrollment Status](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.02-enrolment_status) + - [Benefit Type](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.03-benefit_type) + - [Institution Type](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.04-institution_type) + - [Legal Status](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.05-legal_status) + - [Social Protection Functions](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.06-social_protection_functions) + - [Contribution Type](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.07-contribution_type) + - [Programme Type](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.08-programme_type) + + Data Objects: + - [Beneficiary](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/data-objects/do.ibr.01-beneficiary) + - [Programme](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/data-objects/do.ibr.02-programme) + - [Benefit](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/data-objects/do.ibr.03-benefit) + - [Benefit Frequency](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/data-objects/do.ibr.o4-benefit-frequency) + - [Group](https://standards.spdci.org/standards/v/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.02-group) + - [Member](https://standards.spdci.org/standards/v/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.03-member) + + + Each request is build up of three parts + - signature + - header + - message + + Information about each part is given below + + **Signature:** + - The signature is used to verify the integrity of the message. + - The signature is a hash of the message and is encrypted using the private key of the sender. + - The receiver can verify the signature using the public key of the sender. + + **Header:** + - The header contains information about various message header, refer to the header schema for more details. + + **Message:** + + - The message contains the actual payload of the message. + - Refer example section to get sample data and also read Gitbook for details data objects + - The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: 'https://api.spdci.org/LICENSE.md' +servers: + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EnrollmentUpdatesRequest + x-displayName: EnrollmentUpdatesRequest + description: | + + - name: EnrollmentUpdatesResponse + x-displayName: EnrollmentUpdatesResponse + description: | + + - name: EnrolledRequest + x-displayName: EnrolledRequest + description: | + + - name: EnrolledResponse + x-displayName: EnrolledResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - EnrollmentUpdatesRequest + - EnrollmentUpdatesResponse + - EnrolledRequest + - EnrolledResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode +paths: + /registry/search: + post: + summary: /registry/search + description: |- + The async search api will accept request and will send response to on-search endpoint. The IBR will implement /registry/search endpoint and the SP-System shall implement /registry/on-search to receive data from IBR. + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The IBR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + operationId: post_reg_search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-search: + post: + summary: /registry/on-search + description: |- + The /registry/on-search end point tobe implemented by SP-System to receive search results from IBR. + The IBR will send data in format explained in SearchResponse.yaml. The reg_records will containe data that in explained in ibr/v1/Person.jsonld. + Refer example json at github [link](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/1.-crvs/data/data-objects/person#example) + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/subscribe: + post: + summary: /registry/subscribe + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: '#/components/schemas/SubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-subscribe: + post: + summary: /registry/on-subscribe + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/notify: + post: + summary: /registry/notify + description: Registry to notify an event to subscribers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/unsubscribe: + post: + summary: /registry/unsubscribe + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: '#/components/schemas/UnSubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-unsubscribe: + post: + summary: /registry/on-unsubscribe + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: '#/components/schemas/UnSubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/status: + post: + summary: /registry/txn/status + description: The /registry/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/on-status: + post: + summary: /registry/txn/on-status + description: The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-on-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/sync/search: + post: + summary: /registry/sync/search + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The IBR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Registry search response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false + /registry/sync/enrollment/updates: + post: + summary: /registry/sync/enrollment/updates + description: |- + The /registry/enrollments/updates endpoint will be implemented by IBR to receive details of beneficiaries enrolled in programs from SP-System. + The receipt_type and beneficiaries will be required to make request. + Three receipt types are supported as of now, they are + 1) Enrolled beneficiaries + 2) Updated beneficiaries details + The beneficiaries will contain list of beneficiaries information for which enrollments updated to be generated. + operationId: post_reg_enrollments_updates + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/EnrollmentUpdatesRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/schemas/EnrollmentUpdatesResponse' + security: + - Authorization: [] + deprecated: false + /registry/sync/enrolled: + post: + summary: /registry/sync/enrolled + description: search programmes person is enrolled in + operationId: post_reg_enrolled + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/EnrolledRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/schemas/EnrolledResponse' + deprecated: false + /registry/sync/txn/status: + post: + summary: /registry/sync/txn/status + description: The /registry/sync/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Transaction status check response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + deprecated: false +components: + schemas: + NotifyEventRequest: + type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + type: string + description: | + The IBR receive data from SP system , it has to differenciate of details based on event type, Usually SP system sends enrollement and enrollement status change events to IBR + + 1 : enrollement
+ 2 : enrollement_status_change
+ 3 : Deregister
+ enum: + - enrollement + - enrollement_status_change + example: 'spdci-common:RegistryEventType:enrollement' + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + reg_records: + type: object + description: | + The "Member" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ibr/v1/Member.jsonld
+ @type: "Member"
+ @container: "@set"
+ example: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+ example: + '@context': + spdci: 'https://schema.spdci.org/core/v1/data' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + xsd: 'http://www.w3.org/2001/XMLSchema#' + owl: 'http://www.w3.org/2002/07/owl#' + common: 'https://schema.spdci.org/common/v1/' + '@id': 'https://example.org/sr_person/847951632' + '@type': 'spdci:member' + member_identifier: + - '@type': Identifier + identifier_type: UIN + identifier_value: '42343545654' + demographic_info: + '@type': SRPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + name: + '@type': Name + surname: Smith + given_name: Alice + prefix: Ms. + suffix: '' + sex: female + birth_date: '1985-05-20' + related_person: + - '@type': RelatedPerson + relationship_type: spouse + related_member: + '@type': Member + '@id': 'https://example.org/member/123456789' + member_identifier: M123456789 + - '@type': RelatedPerson + relationship_type: child + related_member: + '@type': Member + '@id': 'https://example.org/member/987654322' + 'spdci:member_identifier': M987654322 + is_disabled: false + marital_status: married + employment_status: employed + occupation: teacher + income_level: middle + language_code: + - en + - es + education_level: bachelor + additional_attributes: + - extra_work: volunteer + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' + required: + - reg_record_type + - reg_records + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + EnrollmentUpdatesRequest: + type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + enrolled_updates: + type: object + description: | + Receipt information contains receipt type and list of beneficiaries + 1) Enrolled beneficiaries - It return the beneficiaries enrolled into system. + 2) Updated beneficiaries - If return updated status + properties: + beneficiaries: + type: array + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 2. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+ items: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items' + required: + - transaction_id + - enrolled_updates + EnrollmentUpdatesResponse: + type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + enrolled_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - enrolled_response + SearchRequest: + type: object + description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditional expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. + properties: + transaction_id: + description: | + 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. + 2. transaction_id should be same across processing systems/service end points. + 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) + type: string + maxLength: 99 + example: XZFHYTY + search_request: + type: array + description: | + 1. Batch requests enable multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + query_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + example: expression + query: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "idtype-value", "expression" + example: 'ns:org:QueryType:expression' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + collection: Group + query: + $and: + - poverty_score: + $lt: 5 + - location: + $eq: central_region + - group_size: + $lt: 5 + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + value: + allOf: + - description: Identifier Value of the subject. + - oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: object + example: '1980' + example: '12314567890' + - type: array + items: + type: object + properties: + seq_num: + description: Sequence number to help define precedence for evaluating a list of expression Predicates + type: number + example: 1 + expression1: + type: object + description: Expression + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryAttributes.jsonld
+ @type: "QueryAttributes"
+ + **Notes:** + 1. Query attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + operator: + type: string + description: Operator in an expression + enum: + - gt + - lt + - eq + - ge + - le + - in + example: eq + attribute_value: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1/properties/value/allOf/1' + required: + - attribute_name + - operator + - attribute_value + condition: + type: string + description: Condition in an expression + enum: + - and + - or + - not + example: and + expression2: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2/items/properties/expression1' + required: + - expression1 + sort: + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @type: "Attribute"
+ + **Notes:** + 1. Attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible attribute names. + 3. e.g: UIN, poverty_score, etc., + example: poverty_score + sort_order: + type: string + enum: + - asc + - desc + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + default: 1 + example: 5 + required: + - page_size + consent: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld"
+ @type: "Consent" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld' + '@type': Consent + ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on consent codes + authorize: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld
+ @type: "Authorize" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld' + '@type': Authorize + ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on authorize codes + required: + - query_type + - query + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - search_criteria + required: + - transaction_id + - search_request + SearchResponse: + type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + description: | + 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. + 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) + type: string + maxLength: 99 + pattern: '^[a-zA-Z0-9-]+$' + example: ABC9876543210 + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/RegistryType.jsonld
+ @type: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:IBR" + example: 'ns:org:RegistryType:IBR' + reg_record_type: + type: string + description: | + @context: https://schema.spdci.org/extensions/ibr/v1/Member.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "Member" + example: Member + reg_records: + description: | + The "Beneficiary" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+ example: + '@context': + '@vocab': 'https://schema.spdci.org/extensions/ibr/v1' + xsd: 'http://www.w3.org/2001/XMLSchema#' + schema: 'http://schema.org/' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + owl: 'http://www.w3.org/2002/07/owl#' + '@id': Beneficiary + '@type': Beneficiary + assistance_unit: '1' + member: + member_identifier: HS0205202401 + demographic_info: + person: + identifier_type: NID + identifier_value: '0205202401' + name: + first_name: Test + second_name: Test2 + surname: Test3 + sex: F + birth_date: 02.05.2004 + death_date: '' + address: '' + phone_number: '' + email: '' + relationship_head: '' + related_person: '' + is_disabled: '0' + disability_info: '' + marital_status: Single + employment_status: employed + occupation: Caregiver + income_level: '' + language_code: Eng + education_level: Highschool + additional_attributes: '' + registration_date: 02.05.2024 + last_update: '' + programme_identifier: + programme: + programme_identifier: DCI001 + programme_name: Test Programme + enrolment_date: 02.02.2024 + enrolment_status: Active + status_change_date: '' + benefits: + benefit_type: Cash + benefit_date: 02.05.2024 + benefit_value: USD 50 + benefit_frequency: Monthly + required: + - reg_records + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + example: 5 + total_count: + type: number + format: int32 + example: 24250 + required: + - page_size + - page_number + - total_count + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + SearchStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.search_criteria.invalid + - rjct.filter.invalid + - rjct.sort.invalid + - rjct.pagination.invalid + - rjct.search.too_many_records_found + SubscribeRequest: + type: object + description: Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/reg_type' + reg_event_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/reg_event_type' + frequency: + $ref: '#/components/schemas/SubscriptionInfo/properties/frequency' + filter_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/filter_type' + filter: + $ref: '#/components/schemas/SubscriptionInfo/properties/filter' + notify_record_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/notify_record_type' + authorize: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/authorize' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - subscribe_criteria + required: + - transaction_id + - subscribe_request + SubscribeResponse: + type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + subscriptions: + type: array + items: + $ref: '#/components/schemas/SubscriptionInfo' + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - subscribe_response + SubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.notify_types.invalid + - rjct.notify_details.invalid + - rjct.person_id.invalid + - rjct.event.already_subscribed + SubscriptionCode: + type: string + description: | + Unique code to identify the subscription request by the entity providing subscription service. + Helps to check status, unsubscribe etc., + maxLength: 99 + SubscriptionCodeList: + items: + $ref: '#/components/schemas/SubscriptionCode' + SubscriptionInfo: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/SubscriptionCode' + status: + $ref: '#/components/schemas/SubscriptionStatus' + timestamp: + description: | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. + type: string + format: date-time + example: '2022-12-04T17:20:07-04:00' + reg_type: + type: string + description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' + reg_event_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' + frequency: + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + end_time: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency + filter_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + - graphql + example: expression + filter: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: 'ns:org:QueryType:graphql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: | + query GetMemberByIdentifier { + member( + identifier: { + value: "1", + type: "uin" + } + ) { + member_identifier { + value + type + } + demographic_info { + name + gender + age + } + } + } + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1' + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2' + notify_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Member" + example: 'spdci-extensions-dci:Member' + locale: + type: string + description: indicates language code. SPDCI Connect supports country codes as per ISO 639.3 standard + pattern: '^[a-z]{3,3}$' + example: eng + required: + - code + - status + - timestamp + SubscriptionStatus: + type: string + description: subscription status + enum: + - subscribe + - unsubscribe + UnSubscribeRequest: + type: object + description: Un-Subscribe to registred subscriptions + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + subscription_codes: + type: array + items: + $ref: '#/components/schemas/SubscriptionCode' + required: + - transaction_id + - timestamp + - subscription_codes + UnSubscribeResponse: + type: object + description: Un-Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + type: string + description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' + enum: + - rcvd + - pdng + - succ + - rjct + status_reason_code: + $ref: '#/components/schemas/UnSubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscription_status: + type: array + items: + type: object + properties: + code: + $ref: '#/components/schemas/SubscriptionCode' + status: + $ref: '#/components/schemas/SubscriptionStatus' + required: + - code + - status + required: + - transaction_id + - correlation_id + - timestamp + - status + UnSubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.subscription_code.invalid + - rjct.requester.invalid + - rjct.event.already_unsubscribed + TxnStatusRequest: + type: object + description: Request to fetch txn status on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + txnstatus_request: + type: object + properties: + reference_id: + type: string + description: Unique reference_id set by txn initiating system for each request in a batch + example: SDFRTYUX + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - receipt + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + attribute_value: + anyOf: + - $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + - type: array + items: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - txn_type + - attribute_type + - attribute_value + required: + - transaction_id + - txnstatus_request + TxnStatusResponse: + type: object + description: txn status info on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + txnstatus_response: + type: object + properties: + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - receipt + txn_status: + anyOf: + - $ref: '#/components/schemas/SearchResponse' + - type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + receipt_information: + $ref: '#/components/schemas/EnrollmentUpdatesRequest/properties/enrolled_updates' + required: + - transaction_id + - receipt_information + required: + - txn_type + - txn_status + required: + - transaction_id + - correlation_id + - txnstatus_response + EnrolledRequest: + type: object + description: Registry to notify a event to subscribers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + enrolled_criteria: + type: object + description: | + Enrolled query + properties: + query_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/filter_type' + description: '' + response_entity: + example: Beneficiary + type: string + description: | + Define the type of response to have when executing the search + enum: + - Group + - Member + query: + type: object + description: Query expression for the enrolled query + example: + person_identifier: + eq: ABC451123 + programme_identifier.program.programme_identifier: + eq: DCI001 + required: + - transaction_id + - enrolled_criteria + EnrolledResponse: + type: object + description: Response to verify enrollment status request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + enrolled_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + enrolled_status: + description: Indicates whether the individual is registered as beneficiary ('yes') or not ('no'). + type: string + enum: + - 'yes' + - 'no' + required: + - reference_id + - timestamp + - status + - enrolled_status + required: + - transaction_id + - correlation_id + - enrolled_response + EncryptedMessage: + description: Encrypted payload + type: object + properties: + header: + type: object + properties: + alg: + type: string + description: The JWE algorithm used for encryption + enc: + type: string + description: The encryption algorithm used for encrypting the plaintext + kid: + type: string + description: The key identifier for the encryption key + required: + - alg + - enc + - kid + ciphertext: + type: string + description: This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded. + encrypted_key: + type: string + description: The base64-url encoded encrypted key + tag: + type: string + description: 'This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data' + iv: + type: string + description: This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used. + required: + - header + - ciphertext + - encrypted_key + - tag + - iv + Error: + description: | + Commumication layer Asyn errors that are returned as part of message acknowledgement. + 1. Messages that are not parsable or message integrity check fails. + 2. This object may be used across all transport layer protocols (https, sftp, messaging, etc,) to ack the receipt of a message. + 3. Business context and related validation is NOT in scope of this error object. + type: object + properties: + code: + type: string + description: Standard error code + enum: + - err.request.bad + - err.request.unauthorized + - err.request.forbidden + - err.request.not_found + - err.request.timeout + - err.version.not_supported + - err.request.too_many_requests + - err.sender_id.invalid + - err.sender_uri.invalid + - err.receiver_id.invalid + - err.signature.missing + - err.signature.invalid + - err.encryption.invalid + - err.service.unavailable + message: + type: string + description: message to describe above error code + maxLength: 999 + FileInfo: + type: object + description: File info. Used in file upload feature using HTTPS + properties: + action: + description: SPDCI Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + fileName: + description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record + type: string + format: binary + fileFormat: + description: 'File content format. e.g json, csv, etc.,' + type: string + default: json + example: csv + required: + - action + - fileName + MsgCallbackHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '789' + message_ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/MsgHeaderStatusReasonCode' + status_reason_message: + description: 'Status reascon code message, if any, Helps actionable messaging for system/end users' + type: string + maxLength: 999 + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + completed_count: + description: No of requests in complteed state. Complete includes success and error requests due to funcational errors + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: ibr.example.org + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: spmis.example.org + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/meta' + required: + - message_id + - message_ts + - action + - status + MsgHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '123' + message_ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + action: + description: 'spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property.' + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: spmis.example.org + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: 'https://spmis.example.org/consumer-namespace/callback/on-search' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: ibr.example.org + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Meta.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Additional meta info defined as per implementation context. + 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. + 3. The information SHOULD be privacy preserving + required: + - message_id + - message_ts + - action + - sender_id + - total_count + MsgHeaderStatusReasonCode: + type: string + description: Message header related common status reason codes + enum: + - rjct.version.invalid + - rjct.message_id.duplicate + - rjct.message_ts.invalid + - rjct.action.invalid + - rjct.action.not_supported + - rjct.total_count.invalid + - rjct.total_count.limit_exceeded + - rjct.errors.too_many + MsgSignature: + type: string + description: 'Signature of {header}+{message} body verified using sender''s signing public key' + example: 'Signature: namespace="spdci", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' + responses: + HttpErrorResponse: + description: HTTP layer error details + content: + application/json: + schema: + type: object + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' + properties: + errors: + items: + type: object + properties: + code: + type: string + description: error code + message: + type: string + description: error message + Response: + description: Acknowledgement of message received after successful validation of message and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack_status: + type: string + description: | + 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. + 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. + 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. + enum: + - ACK + - NACK + - ERR + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + error: + $ref: '#/components/schemas/Error' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + required: + - ack_status + - timestamp + - correlation_id + securitySchemas: + Authorization: + type: http + scheme: bearer + bearerFormat: jwt + description: User/System authenticated access token; (jwt bearer) token returned from implementing system's authentication/token api end points. All systems must implement token api. diff --git a/release/yaml/jwks_core_api_v1.0.0.yaml b/release/yaml/jwks_core_api_v1.0.0.yaml new file mode 100644 index 0000000..f10a81b --- /dev/null +++ b/release/yaml/jwks_core_api_v1.0.0.yaml @@ -0,0 +1,97 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - JWKs + x-logo: + url: 'https://standards.spdci.org/api-documentation/draft/dci-logo.png' + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: Provide JSON Web Key Set to registered clients/services. + version: 1.0.0 + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: 'https://github.com/spdci/standards/blob/draft/LICENSE.md' +servers: + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' + description: Sandbox Server +paths: + /.well-known/jwks.json: + get: + summary: 'JWKs : /.well-known/jwks.json' + description: This end point is in compliance with RFC 7517 to share the encryption & signature verification public keys over HTTPS channel + operationId: get_jwks_json + responses: + '200': + description: JSON Web Key Set Response + content: + application/json: + schema: + $ref: '#/components/schemas/JWKSResponse' + '404': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + deprecated: false +components: + schemas: + JWKSResponse: + type: object + properties: + keys: + description: 'An array of public JWKs used for encryption & verification. In addition to the common properties, each JWK will have properties that are key type specific.' + type: array + items: + $ref: '#/components/schemas/JWKSResponse/components/schemas/JWK' + required: + - keys + description: JSON Web Key Set + components: + schemas: + JWK: + type: object + additionalProperties: true + properties: + kty: + description: The cryptographic algorithm family used with the key + type: string + example: RSA + kid: + description: The thumbprint of the key according to RFC 7638 which will be used to match a JWS or JWE 'kid' header parameter value + type: string + use: + description: The intended use of the key + type: string + enum: + - sig + - enc + alg: + description: Identify the algorithm intented for use with the key + type: string + example: RS256 + required: + - kty + - kid + - use + - alg + description: JSON Web Key Set + responses: + HttpErrorResponse: + description: HTTP layer error details + content: + application/json: + schema: + type: object + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' + properties: + errors: + items: + type: object + properties: + code: + type: string + description: error code + message: + type: string + description: error message diff --git a/release/yaml/locations_core_api_v1.0.0.yaml b/release/yaml/locations_core_api_v1.0.0.yaml new file mode 100644 index 0000000..9d9a42e --- /dev/null +++ b/release/yaml/locations_core_api_v1.0.0.yaml @@ -0,0 +1,132 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Locations + x-logo: + url: 'https://standards.spdci.org/api-documentation/draft/dci-logo.png' + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: Provide the location structure tree of the CRVS system + version: 1.0.0 + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: 'https://github.com/spdci/standards/blob/draft/LICENSE.md' +servers: + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' + description: Sandbox Server +paths: + /.well-known/locations.json: + get: + summary: 'Locations : /.well-known/locations.json' + description: This endpoint can be used to build a location tree of the CRVS system or to find a specific location details + operationId: get_locations_json + responses: + '200': + description: Locations response + content: + application/json: + schema: + description: LocationHierarchy + type: object + properties: + '@context': + type: object + description: JSON-LD Schema Context + properties: + '@context': + type: string + const: 'http://spdci.org/' + xsd: + type: string + const: 'http://www.w3.org/2001/XMLSchema#' + schema: + type: string + const: 'http://schema.org/' + required: + - '@context' + - xsd + - schema + '@type': + type: string + const: LocationHierarchy + last_updated: + example: '2023-10-17T11:26:02.512+00:00' + description: | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. + type: string + format: date-time + locations: + type: array + description: An array of all Places in the system with names and parent id's + items: + description: Place + type: object + properties: + '@type': + type: string + const: Place + identifier: + type: array + items: + description: PropertyValue + type: object + properties: + '@type': + type: string + const: PropertyValue + name: + type: string + description: The identifier name + example: crvs-location + identifier: + type: string + description: The identifier itself + example: 12345678-1234-1234-1234-123456789abc + description: The identifiers of the place + name: + type: string + description: The human-readable name of the place + example: Karnataka + additional_type: + type: string + description: Additional type of the place + example: 'crvs:HEALTH_FACILITY' + contained_in_place: + description: 'Identifier of the parent location, set it to null if it is the root location' + type: + - 'null' + - string + required: + - id + - name + - containedInPlace + required: + - '@context' + - '@type' + '404': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + deprecated: false +components: + responses: + HttpErrorResponse: + description: HTTP layer error details + content: + application/json: + schema: + type: object + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' + properties: + errors: + items: + type: object + properties: + code: + type: string + description: error code + message: + type: string + description: error message diff --git a/release/yaml/mapper_core_api_v1.0.0.yaml b/release/yaml/mapper_core_api_v1.0.0.yaml deleted file mode 100644 index 2a9226f..0000000 --- a/release/yaml/mapper_core_api_v1.0.0.yaml +++ /dev/null @@ -1,2218 +0,0 @@ -openapi: 3.0.0 -info: - title: Interoperability APIs - Financial Address Mapper Mgmt - description: | - 1. Category: Financial [Address Mapper](https://g2pconnect.cdpi.dev/protocol/interfaces/beneficiary-management/mapper-architecture) - 2. Feature: Manage financial address mapper registry - 3. Specification Level: **Draft** - version: 1.0.0 - contact: - name: G2P Connect - email: info@g2pconnect.global - license: - name: CDPI CC BY-SA 4.0e - url: 'https://github.com/G2P-Connect/specs/blob/main/LICENSE' -servers: - - url: 'https://sandbox.dpg.org/namespace/v1.0.0' - description: Sandbox Server -tags: - - name: Async - description: Async endpoints - - name: Sync - description: Sync endpoints - - name: Schemas - description: Schemas - - name: Status Codes - description: Status Codes - - name: LinkRequest - x-displayName: LinkRequest - description: | - - - name: LinkResponse - x-displayName: LinkResponse - description: | - - - name: LinkStatusReasonCode - x-displayName: LinkStatusReasonCode - description: | - - - name: ResolveRequest - x-displayName: ResolveRequest - description: | - - - name: ResolveResponse - x-displayName: ResolveResponse - description: | - - - name: ResolveStatusReasonCode - x-displayName: ResolveStatusReasonCode - description: | - - - name: UpdateRequest - x-displayName: UpdateRequest - description: | - - - name: UpdateResponse - x-displayName: UpdateResponse - description: | - - - name: UpdateStatusReasonCode - x-displayName: UpdateStatusReasonCode - description: | - - - name: UnlinkRequest - x-displayName: UnlinkRequest - description: | - - - name: UnlinkResponse - x-displayName: UnlinkResponse - description: | - - - name: UnlinkStatusReasonCode - x-displayName: UnlinkStatusReasonCode - description: | - - - name: TxnStatusRequest - x-displayName: TxnStatusRequest - description: | - - - name: TxnStatusResponse - x-displayName: TxnStatusResponse - description: | - - - name: EncryptedMessage - x-displayName: EncryptedMessage - description: | - -x-tagGroups: - - name: API Definitions - tags: - - Async - - Sync - - name: Schema Objects - tags: - - LinkRequest - - LinkResponse - - ResolveRequest - - ResolveResponse - - UpdateRequest - - UpdateResponse - - UnlinkRequest - - UnlinkResponse - - TxnStatusRequest - - TxnStatusResponse - - name: Status Codes - tags: - - LinkStatusReasonCode - - ResolveStatusReasonCode - - UpdateStatusReasonCode - - UnlinkStatusReasonCode -paths: - /mapper/link: - post: - summary: /mapper/link - description: Linking ID to Financial Address in the mapper registry - operationId: post_mapper_link - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - link - message: - type: object - description: The search data using which registry search to be performed - oneOf: - - $ref: '#/components/schemas/LinkRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - link - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/on-link: - post: - summary: /mapper/on-link - description: Linking response throuhg callback - operationId: post_mapper_on-link - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-link - message: - type: object - oneOf: - - $ref: '#/components/schemas/LinkResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - on-link - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/update: - post: - summary: /mapper/update - description: Updating fa details against an id in mapper registry - operationId: put_g2p_mapper_update - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - update - message: - type: object - description: The search data using which registry search to be performed - oneOf: - - $ref: '#/components/schemas/UpdateRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - update - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/on-update: - post: - summary: /mapper/on-update - description: Update response through callback - operationId: put_mapper_on-update - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-update - message: - type: object - oneOf: - - $ref: '#/components/schemas/UpdateResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - on-update - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/unlink: - post: - summary: /mapper/unlink - description: Unlinking id from mapper registry - operationId: post_mapper_unlink - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - unlink - message: - type: object - oneOf: - - $ref: '#/components/schemas/UnlinkRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - unlink - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/on-unlink: - post: - summary: /mapper/on-unlink - description: Unlinking response through callback end point - operationId: post_mapper_on-unlink - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-unlink - message: - type: object - oneOf: - - $ref: '#/components/schemas/UnlinkResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - on-unlink - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/resolve: - post: - summary: /mapper/resolve - description: Resolve fa / beneficiary id to a store of value - operationId: post_mapper_resolve - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - resolve - message: - type: object - oneOf: - - $ref: '#/components/schemas/ResolveRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - resolve - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/on-resolve: - post: - summary: /mapper/on-resolve - description: Resolve response through callback end point - operationId: post_mapper_on-resolve - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-resolve - message: - type: object - oneOf: - - $ref: '#/components/schemas/ResolveResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - on-resolve - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/txn/status: - post: - summary: /mapper/txn/status - description: | - Perform async status check of previous mapper transanctions using transaction_id and/or reference_id(s) - operationId: post_mapper_txnstatus - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - txn-status - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - txn-status - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/txn/on-status: - post: - summary: /mapper/txn/on-status - description: Response to async status check of previous mapper transanctions using callback - operationId: post_mapper_on-txnstatus - tags: - - Async - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - txn-on-status - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: '#/components/schemas/FileInfo' - - properties: - action: - enum: - - txn-on-status - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - $ref: '#/components/responses/Response' - security: - - Authorization: [] - deprecated: false - /mapper/sync/link: - post: - summary: /mapper/sync/link - description: Linking ID to Financial Address in the mapper registry - operationId: post_reg_sync_link - tags: - - Sync - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - link - message: - type: object - description: The link data to map id to fa - anyOf: - - $ref: '#/components/schemas/LinkRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - description: Linking response throuhg callback - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-search - message: - type: object - oneOf: - - $ref: '#/components/schemas/LinkResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - security: - - Authorization: [] - deprecated: false - /mapper/sync/update: - post: - summary: /mapper/sync/update - description: Update ID or Financial Address in the mapper registry - operationId: post_reg_sync_update - tags: - - Sync - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - link - message: - type: object - description: The link data to map id to fa - anyOf: - - $ref: '#/components/schemas/UpdateRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - description: Linking response throuhg callback - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-search - message: - type: object - oneOf: - - $ref: '#/components/schemas/UpdateResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - security: - - Authorization: [] - deprecated: false - /mapper/sync/unlink: - post: - summary: /mapper/sync/unlink - description: Unlink ID to Financial Address in the mapper registry - operationId: post_reg_sync_unlink - tags: - - Sync - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - link - message: - type: object - description: Request message to unlink id from fa - anyOf: - - $ref: '#/components/schemas/UnlinkRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - description: Unlink response throuhg callback - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-search - message: - type: object - oneOf: - - $ref: '#/components/schemas/UnlinkResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - security: - - Authorization: [] - deprecated: false - /mapper/sync/resolve: - post: - summary: /mapper/sync/resolve - description: Resolve ID to a Financial Address in the mapper registry - operationId: post_reg_sync_resolve - tags: - - Sync - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - link - message: - type: object - description: Request message to resolve id to a fa - anyOf: - - $ref: '#/components/schemas/ResolveRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - description: Resolve response through callback - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - on-search - message: - type: object - oneOf: - - $ref: '#/components/schemas/ResolveResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - security: - - Authorization: [] - deprecated: false - /registry/sync/txn/status: - post: - summary: /registry/sync/txn/status - description: Perform sync status check of previous civil registry transanctions using transaction_id and/or reference_id(s) - operationId: post_reg_sync_txnstatus - tags: - - Sync - requestBody: - description: '' - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgHeader_V1.0.0' - - properties: - action: - enum: - - txn-status - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - '401': - $ref: '#/components/responses/HttpErrorResponse' - '403': - $ref: '#/components/responses/HttpErrorResponse' - '500': - $ref: '#/components/responses/HttpErrorResponse' - default: - description: Transaction status check response - content: - application/json: - schema: - type: object - properties: - signature: - $ref: '#/components/schemas/MsgSignature' - header: - allOf: - - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' - - properties: - action: - enum: - - txn-on-status - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - security: - - Authorization: [] - deprecated: false -components: - schemas: - cdpi_PersonId: - type: string - description: | - 1. Person id is case insensitve normative represenation as id-type:id@provider
- 2. This will enumerate foundational and functioanl id's to easily resolvable addressess
- 3. This property is intended to unambiguously refer to an object, such as a person, beneficiary, user, etc.,
- 4. Few examples:
- - id@identifier-type.id-provider e.g token:12345@nid, vid:543215@nid
- - id@civil-registry.issuing-agency e.g id:12345@civil-reg, brn:12345@civil-reg, mrn:12345@civil-reg
- - id@functional-identifier.issuing-agency e.g id:12345@voter-id, id:12345@driving-license, mobile:12345@farmer-reg
- Note: id provider should be made configurable and solutions should adapt to the local jurisdiction and policies. - format: '^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$' - example: 'vid:54321@nid' - cdpi_FinancialAddress: - type: string - description: | - 1. Financial address is case insensitive normative represenation of a store of value account represented as id-type:id@provider - 2. Every payer/payee financial address must resolve to an actual store of value account number for processing the payment instruction - 3. It is recommended the mapping between id and store of value account details to be held only at final store of value entity and intermediaries can hold - 3. Few examples:
- - token@id-provider e.g token:12345@national-id
- - uid@pymt-rail e.g uid:12345@national-id
- - vid@id-provider e.g vid:12345@national-id
- - mobile@mobile-provider e.g mobile:12345@mobile-pymt
- - account-id@bank-psp-code e.g account:12345@national-bank
- - account-no@ifsc-code.ifsc.pymt-rail e.g account:12345@abcd0000001.ifsc.pymt-rail
- - user-id@psp-code e.g. joeuser@national-bank
- - token@psp-code e.g token:123456@a123
- - code@purpose-code.voucher-provider e.g voucher:12345@food.coupon-network
- format: '^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$' - example: 'token:12345@gtbank' - cdpi_FinancialAddressList: - items: - $ref: '#/components/schemas/cdpi_FinancialAddress' - GooglePlusCode: - type: object - description: 'Refer [Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) for more details' - properties: - global_code: - type: string - example: '' - geometry: - type: object - properties: - bounds: - type: object - properties: - northeast: - $ref: '#/components/schemas/LatLong' - southwest: - $ref: '#/components/schemas/LatLong' - location: - $ref: '#/components/schemas/LatLong' - openid_Address: - title: Address - type: object - description: 'Address info as per OpenID specs' - properties: - address_line1: - description: 'Full mailing address, formatted for display or use on a mailing label. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").' - type: string - example: '' - address_line_2: - description: 'Full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").' - type: string - example: '' - locality: - description: City or locality component. - type: string - example: '' - sub_region_code: - description: District or sub-regional code - type: string - region_code: - description: 'State, province, prefecture, or region component.' - type: string - example: '' - postal_code: - description: Zip code or postal code component. - type: string - example: '' - country_code: - description: 'Country part of an address represented using an ISO 3-letter code [ISO3166-3], e.g., "USA" or "JPN". 2-letter ISO codes [ISO3166-1] e.g. ,e.g. US, JP' - type: string - example: '' - geo_location: - description: | - Refer [Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) for more details - oneOf: - - $ref: '#/components/schemas/LatLong' - - $ref: '#/components/schemas/GooglePlusCode' - openid_PersonRecord: - type: object - description: | - 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. - 2. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. - 3. Person info as per OpenID [Claims](https://openid.net/specs/openid-connect-core-1_0.html#Claims) - 4. Person additional info based on OpenID [name-additional-claims](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html#name-additional-claims-about-end) - properties: - sub: - type: string - description: Subject - Identifier for the End-User at the Issuer. - name: - description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' - type: string - given_name: - description: 'Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.' - type: string - family_name: - description: 'Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.' - type: string - middle_name: - description: 'Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.' - type: string - nickname: - description: 'Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.' - type: string - preferred_username: - description: 'Shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. The RP MUST NOT rely upon this value being unique, as discussed in' - type: string - profile: - description: URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. - type: string - picture: - description: 'URL of the End-User''s profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.' - type: string - website: - description: URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. - type: string - email: - description: 'End-User''s preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.' - type: string - email_verified: - description: 'address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.' - type: boolean - gender: - description: End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. - type: string - birthdate: - description: 'YYYY format is allowed. Note that depending on the underlying platform''s date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.' - type: string - place_of_birth: - description: End-User's place of birth. The value of this member is a JSON structure containing some or all of the following members - type: object - deathdate: - description: 'YYYY format is allowed. Note that depending on the underlying platform''s date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.' - type: string - place_of_death: - description: End-User's place of birth. The value of this member is a JSON structure containing some or all of the following members - type: object - phone_number: - description: 'number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.' - type: string - phone_number_verified: - description: 'True if the End-User''s phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.' - type: string - address: - $ref: '#/components/schemas/openid_Address' - zoneinfo: - description: 'String from zoneinfo [zoneinfo] time zone database representing the End-User''s time zone. For example, Europe/Paris or America/Los_Angeles.' - type: string - locale: - description: 'Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.' - type: string - nationalities: - description: 'End-User''s nationalities using ICAO 3-letter codes [ICAO-Doc9303], e.g., "USA" or "JPN". 2-letter ICAO codes MAY be used in some circumstances for compatibility reasons.' - type: array - items: - type: string - updated_at: - description: 'Time the End-User''s information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time' - type: number - birth_family_name: - description: 'End-User''s family name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the family name later in life for any reason. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.' - type: string - birth_given_name: - description: 'End-User''s given name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the given name later in life for any reason. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.' - type: string - birth_middle_name: - description: 'End-User''s middle name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the middle name later in life for any reason. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.' - type: string - salutation: - description: 'End-User''s salutation, e.g., "Mr."' - type: string - title: - description: 'End-User''s title, e.g., "Dr."' - type: string - msisdn: - description: 'End-User''s mobile phone number formatted according to ITU-T recommendation [E.164], e.g., "1999550123"' - type: string - also_known_as: - description: 'Stage name, religious name or any other type of alias/pseudonym with which a person is known in a specific context besides its legal name. This must be part of the applicable legislation and thus the trust framework (e.g., be an attribute on the identity card).' - type: string - additional_attributes: - $ref: '#/components/schemas/AttributeNameValueList' - openid_PersonDocDetails: - type: object - description: | - 1. Person document detials as per OpenID [identity-assurance](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html#name-evidence-element) - 2. JSON object representing the document used to perform the identity verification. - properties: - type: - description: 'String denoting the type of the document. The OP MAY use other than the predefined values in which case the RPs will either be unable to process the assertion, just store this value for audit purposes, or apply bespoken business logic to it.' - type: string - document_number: - description: 'String Representing an identifier/number that uniquely identifies a document that was issued to the End-User. This is used on one document and will change if it is reissued, e.g., a passport number, certificate number, etc. Note, number can be used as an alias for ''document_number'' for backward compatibility purposes but will be deprecated in future releases, implementers are recommended to use document_number.' - type: string - personal_number: - description: 'String representing an identifier that is assigned to the End-User and is not limited to being used in one document, for example a national identification number, personal identity number, citizen number, social security number, driver number, account number, customer number, licensee number, etc.' - type: string - serial_number: - description: String representing an identifier/number that identifies the document irrespective of any personalization information (this usually only applies to physical artifacts and is present before personalization). - type: string - date_of_issuance: - description: 'The date the document was issued as ISO 8601 [ISO8601] YYYY-MM-DD format.' - type: string - date_of_expiry: - description: 'The date the document will expire as ISO 8601 [ISO8601] YYYY-MM-DD format.' - type: string - issuer: - description: JSON object containing information about the issuer of this document. This object consists of the following properties - type: object - properties: - name: - description: Designation of the issuer of the document - type: string - address: - $ref: '#/components/schemas/openid_Address' - country_code: - description: 'String denoting the country or supranational organization that issued the document as ISO 3166/ICAO 3-letter codes [ICAO-Doc9303], e.g., "USA" or "JPN". 2-letter ICAO codes MAY be used in some circumstances for compatibility reasons.' - type: string - jurisdiction: - description: String containing the name of the region(s)/state(s)/province(s)/municipality(ies) that issuer has jurisdiction over (if this information is not common knowledge or derivable from the address). - type: string - required: - - type - AccountProviderInfo: - type: object - description: Store of value account provider info - properties: - name: - type: string - description: 'entity name like bank name, prepaid card/voucher issuing system, etc.,' - example: National Bank of a Country - code: - type: string - description: 'code to identify the entity like bank, prepaid card/voucher issuing system, etc.,' - example: BANKXXX - subcode: - type: string - description: 'sub code like entity''s branch code, etc.,' - additional_info: - description: 'Additional info, if any' - type: string - maxLength: 999 - required: - - name - - code - LinkRequest: - type: object - description: ID to Store of value account linking request - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - link_request: - type: array - items: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - id: - $ref: '#/components/schemas/cdpi_PersonId' - fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - name: - description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' - type: string - phone_number: - description: 'number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.' - type: string - additional_info: - $ref: '#/components/schemas/AttributeNameValueList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - id - - fa - required: - - transaction_id - - link_request - LinkResponse: - type: object - description: Beneficiary ID to Store of value account linking response - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - correlation_id: - description: | - 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. - 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) - type: string - maxLength: 99 - example: '9876543210' - link_response: - type: array - items: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - status: - $ref: '#/components/schemas/RequestStatus' - status_reason_code: - $ref: '#/components/schemas/LinkStatusReasonCode' - status_reason_message: - description: Status reascon code message. Helps actionanble messaging for systems/end users - type: string - maxLength: 999 - additional_info: - $ref: '#/components/schemas/AttributeNameValueList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - status - required: - - transaction_id - - link_response - LinkStatusReasonCode: - type: string - description: FA Mapper Link status reason codes - enum: - - rjct.reference_id.invalid - - rjct.reference_id.duplicate - - rjct.timestamp.invalid - - rjct.id.invalid - - rjct.fa.invalid - - rjct.name.invalid - - rjct.mobile_number.invalid - - rjct.unknown.retry - - rjct.other.error - ResolveRequest: - type: object - description: | - 1. If id is null then only verify and resolve fa is linked to store of value account. Verification is done by entity issuing fa. - 2. If id is not null then verify and resolve fa is linked store of value account. Additionally verify fa and id are issued to the same individual. If both conditions pass then resolve status can be set to yes. - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - resolve_request: - type: array - items: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - id: - $ref: '#/components/schemas/cdpi_PersonId' - name: - description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' - type: string - scope: - description: Resolve scope to return only yes_no or account provider or id details. Additional authorization based on caller to be enforced by the implementing system to return any sensitive data. - type: string - enum: - - yes_no - - details - default: yes_no - additional_info: - $ref: '#/components/schemas/AttributeNameValueList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - required: - - transaction_id - - resolve_request - ResolveResponse: - type: object - description: Resolve financial address to store of value account info response - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - correlation_id: - $ref: '#/components/schemas/LinkResponse/properties/correlation_id' - resolve_response: - type: array - items: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - id: - $ref: '#/components/schemas/cdpi_PersonId' - account_provider_info: - $ref: '#/components/schemas/AccountProviderInfo' - status: - $ref: '#/components/schemas/RequestStatus' - status_reason_code: - $ref: '#/components/schemas/ResolveStatusReasonCode' - status_reason_message: - description: Status reascon code message. Helps actionanble messaging for systems/end users - type: string - maxLength: 999 - additional_info: - $ref: '#/components/schemas/AttributeNameValueList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - status - required: - - transaction_id - - resolve_response - ResolveStatusReasonCode: - type: string - description: FA Mapper Resolve status reason codes - enum: - - rjct.reference_id.invalid - - rjct.reference_id.duplicate - - rjct.timestamp.invalid - - rjct.id.invalid - - rjct.fa.invalid - - rjct.resolve_type.not_supported - - succ.fa.active - - succ.fa.inactive - - succ.fa.not_found - - succ.fa.not_linked_to_id - - succ.id.active - - succ.id.inactive - - succ.id.not_found - TxnStatusRequest: - type: object - description: Request to fetch txn status on various service requests - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - txnstatus_request: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - txn_type: - type: string - description: txn type to fetch status - enum: - - link - - resolve - - update - - unlink - attribute_type: - type: string - enum: - - transaction_id - - reference_id_list - - correlation_id - attribute_value: - oneOf: - - $ref: '#/components/schemas/TransactionId' - - $ref: '#/components/schemas/ReferenceIdList' - - $ref: '#/components/schemas/LinkResponse/properties/correlation_id' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - txn_type - - attribute_type - - attribute_value - required: - - transaction_id - - txnstatus_request - TxnStatusResponse: - type: object - description: txn status info on various service requests - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - correlation_id: - $ref: '#/components/schemas/LinkResponse/properties/correlation_id' - txnstatus_response: - type: object - properties: - txn_type: - type: string - description: txn type to fetch status - enum: - - on-link - - on-resolve - - on-update - - on-unlink - txn_status: - oneOf: - - $ref: '#/components/schemas/LinkResponse' - - $ref: '#/components/schemas/ResolveResponse' - - $ref: '#/components/schemas/UpdateResponse' - - $ref: '#/components/schemas/UnlinkResponse' - example: - $ref: '#/components/schemas/LinkResponse' - required: - - txn_type - - txn_status - required: - - transaction_id - - correlation_id - - txnstatus_response - UnlinkRequest: - type: object - description: ID to Store of value account unlinking request. Unlink request removes entry against requested id/fa pair. - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - unlink_request: - type: array - items: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - id: - $ref: '#/components/schemas/cdpi_PersonId' - fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - additional_info: - $ref: '#/components/schemas/AttributeNameValueList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - id - required: - - transaction_id - - unlink_request - UnlinkResponse: - type: object - description: ID to Store of value account unlinking response - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - correlation_id: - $ref: '#/components/schemas/LinkResponse/properties/correlation_id' - unlink_response: - type: array - items: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - status: - $ref: '#/components/schemas/RequestStatus' - status_reason_code: - $ref: '#/components/schemas/UnlinkStatusReasonCode' - status_reason_message: - description: 'Status reascon code message, if any, Helps actionanble messaging for systems/end users' - type: string - maxLength: 999 - id: - $ref: '#/components/schemas/cdpi_PersonId' - additional_info: - $ref: '#/components/schemas/AttributeNameValueList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - status - required: - - transaction_id - - unlink_response - UnlinkStatusReasonCode: - type: string - description: FA Mapper Unlink status reason codes - enum: - - rjct.reference_id.invalid - - rjct.reference_id.duplicate - - rjct.timestamp.invalid - - rjct.beneficiary_name.invalid - UpdateRequest: - type: object - description: ID to Store of value account update request. ID can only unlinked. - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - update_request: - type: array - items: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - id: - $ref: '#/components/schemas/cdpi_PersonId' - fa: - $ref: '#/components/schemas/cdpi_FinancialAddress' - name: - description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' - type: string - phone_number: - description: 'number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.' - type: string - additional_info: - $ref: '#/components/schemas/AttributeNameValueList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - id - - fa - required: - - transaction_id - - update_request - UpdateResponse: - type: object - description: ID to Store of value account update response - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - correlation_id: - $ref: '#/components/schemas/LinkResponse/properties/correlation_id' - update_response: - type: array - items: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - timestamp: - $ref: '#/components/schemas/DateTime' - id: - $ref: '#/components/schemas/cdpi_PersonId' - status: - $ref: '#/components/schemas/RequestStatus' - status_reason_code: - $ref: '#/components/schemas/UpdateStatusReasonCode' - status_reason_message: - description: 'Status reascon code message, if any, Helps actionanble messaging for systems/end users' - type: string - maxLength: 999 - additional_info: - $ref: '#/components/schemas/AttributeNameValueList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - timestamp - - fa - - status - required: - - transaction_id - - update_response - UpdateStatusReasonCode: - type: string - description: FA Mapper Update status reason codes - enum: - - rjct.reference_id.invalid - - rjct.reference_id.duplicate - - rjct.timestamp.invalid - - rjct.beneficiary_name.invalid - Ack: - type: string - description: | - 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. - 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. - 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. - enum: - - ACK - - NACK - - ERR - AdditionalInfo: - type: object - description: Additional JSON property oject to hold custom user defined contextual data - AttributeNameValue: - type: object - description: Attribute name value object - properties: - name: - type: string - description: | - @context: "https://example.org/schema/Attribute"
- @type: "Attribute"
- - **Notes:** - 1. Attribute names defined as per implementation context. - 2. Usually a list of **enum** values of all possible attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: YOB - value: - $ref: '#/components/schemas/AttributeValue' - required: - - name - - value - AttributeNameValueList: - type: array - description: List of attribute Name/Value - items: - $ref: '#/components/schemas/AttributeNameValue' - AttributeValue: - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: object - example: '1980' - Consent: - type: object - description: | - @context: "https://example.org/schema/Consent"
- @type: "Consent" - example: - '@context': 'https://example.org/schema/Consent' - '@type': Consent - ts: - $ref: '#/components/schemas/DateTime' - purpose: - text: - type: string - code: - type: string - description: 'From a fixed set, documented at refUri' - refUri: - type: string - format: uri - description: Uri to provide more info on consent codes - DateTime: - description: | - 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. - type: string - format: date-time - example: '' - EncryptedMessage: - description: Encrypted payload - type: object - properties: - header: - type: object - properties: - alg: - type: string - description: The JWE algorithm used for encryption - enc: - type: string - description: The encryption algorithm used for encrypting the plaintext - kid: - type: string - description: The key identifier for the encryption key - required: - - alg - - enc - - kid - ciphertext: - type: string - description: This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded. - encrypted_key: - type: string - description: The base64-url encoded encrypted key - tag: - type: string - description: 'This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data' - iv: - type: string - description: This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used. - required: - - header - - ciphertext - - encrypted_key - - tag - - iv - Error: - description: | - Commumication layer Asyn errors that are returned as part of message acknowledgement. - 1. Messages that are not parsable or message integrity check fails. - 2. This object may be used across all transport layer protocols (https, sftp, messaging, etc,) to ack the receipt of a message. - 3. Business context and related validation is NOT in scope of this error object. - type: object - properties: - code: - type: string - description: Standard error code - enum: - - err.request.bad - - err.request.unauthorized - - err.request.forbidden - - err.request.not_found - - err.request.timeout - - err.version.not_supported - - err.request.too_many_requests - - err.sender_id.invalid - - err.sender_uri.invalid - - err.receiver_id.invalid - - err.signature.missing - - err.signature.invalid - - err.encryption.invalid - - err.service.unavailable - message: - type: string - description: message to describe above error code - maxLength: 999 - ExpCondition: - type: string - description: Condition in an expression - enum: - - and - - or - - not - example: and - ExpOperator: - type: string - description: Operator in an expression - enum: - - gt - - lt - - eq - - ge - - le - - in - example: eq - ExpPredicate: - type: object - description: Expression - properties: - attribute_name: - type: string - description: | - @context: "https://example.org/schema/QueryAttributes"
- @type: "QueryAttributes"
- - **Notes:** - 1. Query attribute names defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: YOB - operator: - $ref: '#/components/schemas/ExpOperator' - attribute_value: - $ref: '#/components/schemas/AttributeValue' - required: - - attribute_name - - operator - - attribute_value - ExpPredicateList: - type: array - description: list of attributes with matching conditions - items: - $ref: '#/components/schemas/ExpPredicate' - ExpPredicateWithCondition: - type: object - properties: - seq_num: - description: Sequence number to help define precedence for evaluating a list of expression Predicates - type: number - example: 1 - expression1: - $ref: '#/components/schemas/ExpPredicate' - condition: - $ref: '#/components/schemas/ExpCondition' - expression2: - $ref: '#/components/schemas/ExpPredicate' - required: - - expression1 - ExpPredicateWithConditionList: - type: array - items: - $ref: '#/components/schemas/ExpPredicateWithCondition' - ExpTemplate: - type: object - description: Identifier type and value object - properties: - type: - type: string - description: | - @context: "https://example.org/schema/QueryType"
- @type: "Queryype"
- - **Notes:** - 1. Query types that helps decode query expressions - 2. Sample query type enums: "GraphQl", "Sql", "NoSql" - example: 'ns:org:QueryType:GraphQl' - value: - type: object - description: | - @context: "https://example.org/schema/QueryExpression"
- @type: "QueryExpression"
- - **Notes:** - 1. Query expression's syntax / format is determined based on query-type. - 2. Query expression as a template with placeholder to pass conditional search parameters - example: - expression: ' query GeBirthRecordById: { person: (UIN: "1") { BRN, name, gender, birthDate, birthPlace, parents } }' - FileInfo: - type: object - description: File info. Used in file upload feature using HTTPS - properties: - action: - description: G2P Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. - type: string - fileName: - description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record - type: string - format: binary - fileFormat: - description: 'File content format. e.g json, csv, etc.,' - type: string - default: json - example: csv - required: - - action - - fileName - LanguageCode: - type: string - description: indicates language code. G2P Connect supports country codes as per ISO 639.3 standard - pattern: '^[a-z]{3,3}$' - example: en - LatLong: - type: object - properties: - latitude: - type: string - example: 11°24'12.2"N - longitude: - type: string - example: 88°50'26.5"E - Meta: - type: object - description: | - @context: "https://example.org/schema/Meta"
- @type: "@context"
- - **Notes:** - 1. Additional meta info defined as per implementation context. - 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. - 3. The information SHOULD be privacy preserving - MsgCallbackHeader_V1.0.0: - type: object - description: Message header - properties: - version: - description: Messaing protocol specification version being used - type: string - default: 1.0.0 - message_id: - description: | - 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., - 2. The scope of message_id end with successful ack of the message by the receiver. - 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. - type: string - example: '789' - message_ts: - $ref: '#/components/schemas/DateTime' - action: - description: G2P Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. - type: string - status: - $ref: '#/components/schemas/RequestStatus' - status_reason_code: - $ref: '#/components/schemas/MsgHeaderStatusReasonCode' - status_reason_message: - description: 'Status reascon code message, if any, Helps actionanble messaging for system/end users' - type: string - maxLength: 999 - total_count: - description: Total no of requests present in the message request - type: integer - example: 21800 - completed_count: - description: No of requests in complteed state. Complete includes success and error requests due to funcational errors - type: integer - example: 50 - sender_id: - description: | - 1. sender_id registered with the receiving system or gateway. - 2. Used for authorization, encryption, digital sign verfication, etc., - type: string - example: civilregistry.example.org - receiver_id: - description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' - type: string - example: registry.example.org - is_msg_encrypted: - description: Is message encrypted? - type: boolean - default: false - meta: - $ref: '#/components/schemas/Meta' - required: - - message_id - - message_ts - - action - - status - MsgHeader_V1.0.0: - type: object - description: Message header - properties: - version: - description: Messaing protocol specification version being used - type: string - default: 1.0.0 - message_id: - description: | - 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., - 2. The scope of message_id end with successful ack of the message by the receiver. - 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. - type: string - example: '123' - message_ts: - $ref: '#/components/schemas/DateTime' - action: - description: 'G2P Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps identity payload type in message property.' - type: string - sender_id: - description: | - 1. sender_id registered with the receiving system or gateway. - 2. Used for authorization, encryption, digital sign verfication, etc., - type: string - example: spp.example.org - sender_uri: - description: | - 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. - 2. Default uri is assumed to be configred on the gateway as part of sender/receiver onboarding. - 3. For SFTP based communications, this shall be set to server/folder details. - type: string - format: uri - example: 'https://spp.example.org/{namespace}/callback/on-search' - receiver_id: - description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' - type: string - example: pymts.example.org - total_count: - description: Total no of requests present in the message request - type: integer - example: 21800 - is_msg_encrypted: - description: Is message encrypted? - type: boolean - default: false - meta: - $ref: '#/components/schemas/Meta' - required: - - message_id - - message_ts - - action - - sender_id - - total_count - MsgHeaderStatusReasonCode: - type: string - description: Message header related common status reason codes - enum: - - rjct.version.invalid - - rjct.message_id.duplicate - - rjct.message_ts.invalid - - rjct.action.invalid - - rjct.action.not_supported - - rjct.total_count.invalid - - rjct.total_count.limit_exceeded - - rjct.errors.too_many - MsgSignature: - type: string - description: 'Signature of {header}+{message} body verified using sender''s signing public key' - example: 'Signature: namespace="g2p", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' - Pagination: - description: 'Pagination definition, count starts with 1' - type: object - properties: - page_size: - type: number - format: int32 - example: 2000 - page_number: - type: number - format: int32 - example: 5 - total_count: - type: number - format: int32 - example: 24250 - required: - - page_size - - page_number - - total_count - PaginationRequest: - description: 'Pagination definition, count starts with 1' - type: object - properties: - page_size: - type: number - format: int32 - example: 2000 - page_number: - type: number - format: int32 - default: 1 - example: 5 - required: - - page_size - ReferenceId: - type: string - description: Unique reference_id set by txn initiating system for each request in a batch - example: '12345678901234567890' - ReferenceIdList: - type: array - items: - $ref: '#/components/schemas/ReferenceId' - RequestStatus: - type: string - description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' - enum: - - rcvd - - pdng - - succ - - rjct - SearchSort: - description: Sorting definition - type: object - properties: - attribute_name: - type: string - description: | - @context: "https://example.org/schema/Attribute"
- @type: "Attribute"
- - **Notes:** - 1. Attribute names defined as per implementation context. - 2. Usually a list of **enum** values of all possible attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: YOB - sort_order: - type: string - enum: - - asc - - desc - SearchSortList: - type: array - items: - $ref: '#/components/schemas/SearchSort' - TransactionId: - description: | - 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. - 2. transaction_id should be samme across processing systems/service end points. - 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) - type: string - maxLength: 99 - example: 0123456789 - parameters: - accept-language: - in: header - name: accept-language - description: 'Default value: en' - required: false - schema: - type: string - example: en - timestamp: - in: header - name: timestamp - description: 'request timestamp in HTTP Date format - Tue, 06 Mar 2020 21:00:00 GMT' - required: true - schema: - type: string - example: 'Tue, 06 Mar 2020 21:00:00 GMT' - transaction_id: - in: path - name: transaction_id - description: 'Unique transaction id set by sender as part of the initiating request to co-relate requests across interface end point, sessions, etc., For e.g transaction_id be used to find status using GET call or correlate the transaction as part of the callback call.' - required: true - schema: - type: string - maxLength: 99 - example: 012345678901234567890 - summary_only: - in: path - name: summary_only - description: 'Optional. Defualt is false, If summary_only set to true then only the message header with stats / status to be returend as part of implementation' - required: true - schema: - type: boolean - default: true - beneficiary_id: - in: path - name: beneficiary_id - required: true - description: '
1. Beneficiary id is a normative represenation represented as id@id-provider
2. This will enumerate foundational and functioanl id''s to easily resolvable addressess
3. Few examples:
- id@id-provider e.g 12345@mosip, 12345@PhilID
- id@civil-registry.issuing-agency e.g 12345@crvs.rwanda, 12345@ejanma.karnataka - id@functional-identifier.issuing-agency e.g 12345@voter.Rwanda, 12345@DL.karnataka, 12345@fruits.karnataka
Note: id-provider should be made configurable and DPGs operating should adapt to the local jurisdiction and policies. e.g fruits.karnataka represents farmer registry in karnataka state govt.
' - schema: - type: string - format: '^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$' - example: 12345@mosip - responses: - HttpErrorResponse: - description: HTTP layer error details - content: - application/json: - schema: - type: object - description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' - properties: - errors: - items: - type: object - properties: - code: - type: string - description: error code - message: - type: string - description: error message - Response: - description: Acknowledgement of message received after successful validation of message and signature - content: - application/json: - schema: - type: object - properties: - message: - type: object - properties: - ack_status: - $ref: '#/components/schemas/Ack' - timestamp: - $ref: '#/components/schemas/DateTime' - error: - $ref: '#/components/schemas/Error' - correlation_id: - $ref: '#/components/schemas/LinkResponse/properties/correlation_id' - required: - - ack_status - - timestamp - - correlation_id - securitySchemes: - Authorization: - type: http - scheme: bearer - bearerFormat: jwt - description: User/System authenticated access token; (jwt bearer) token returned from implementing system's authentication/token api end points. All systems must implement token api. diff --git a/release/yaml/registry_core_api_v1.0.0.yaml b/release/yaml/registry_core_api_v1.0.0.yaml index 6f1d2f8..e8cce1f 100644 --- a/release/yaml/registry_core_api_v1.0.0.yaml +++ b/release/yaml/registry_core_api_v1.0.0.yaml @@ -1,17 +1,69 @@ openapi: 3.0.3 info: - title: Interoperability APIs - Federated Registry Data Access - description: | - 1. Category: Civil & Other Federated [Registries](https://g2pconnect.cdpi.dev/protocol/interfaces/registries) - 2. Feature: Enables Data & Verifiable Credential Access - 2. Specification Level: **Draft** + title: Interoperability APIs - CORE version: 1.0.0 + x-logo: + url: ./dci-logo.png + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: |- + The DCI Core interoperability APIs describes different APIs. They are generalized APIs to perform interoperable operations between a registry and SP System. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in the registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link : + - [Core DCI- V1.0.0 ](https://standards.spdci.org/standards) + + Code directory links: + - [Identifiers](https://schema.spdci.org/core/v1/code/IdentifierTypeEnum.jsonld) + - [Marital Status](https://schema.spdci.org/core/v1/code/MaritalStatusEnum.jsonld) + - [Sex](https://schema.spdci.org/core/v1/code/SexCategoryEnum.jsonld) + - [Relationship Type](https://schema.spdci.org/v1/code/RelationshipTypeEnum.jsonld) + - [Disability Type](https://schema.spdci.org/v1/code/DisabilityTypeEnum.jsonld) + - [Functional Limitation Type](https://schema.spdci.org/core/v1/code/FunctionalLimitationType.jsonld) + - [Functional Severity](https://schema.spdci.org/core/v1/code/FunctionalSeverityEnum.jsonld) + - [Education Level](https://schema.spdci.org/core/v1/code/EducationCode.jsonld) + - [Employment Status](https://schema.spdci.org/core/v1/code/EmploymentStatusEnum.jsonld) + - [Income Level](https://schema.spdci.org/core/v1/code/IncomeLevelEnum.jsonld) + - [Occupation](https://schema.spdci.org/core/v1/code/OccupationEnum.jsonld) + + Data Objects: + - [Person](https://schema.spdci.org/core/v1/data/Person.jsonld) + - [Group](https://schema.spdci.org/core/v1/data/Group.jsonld) + - [Member](https://schema.spdci.org/core/v1/data/Member.jsonld) + - [RelatedPerson](https://schema.spdci.org/core/v1/data/RelatedPerson.jsonld) + - [DisabilityInfo](https://schema.spdci.org/core/v1/data/DisabilityInfo.jsonld) + + Each request is build up of three parts + - signature + - header + - message + + Information about each part is given below + + **Signature:** + - The signature is used to verify the integrity of the message. + - The signature is a hash of the message and is encrypted using the private key of the sender. + - The receiver can verify the signature using the public key of the sender. + + **Header:** + - The header contains information about various message header, refer to the header schema for more details. + + **Message:** + + - The message contains the actual payload of the message. + - Refere example section to get sample data and also read Gitbook for details data objects + - The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" version: 1.0.0 contact: - name: G2P Connect - email: info@cdpi.dev + name: DCI Social Protection + email: info@spdci.org license: - name: CDPI CC BY-SA 4.0 - url: 'https://github.com/G2P-Connect/specs/blob/draft/LICENSE.md' + name: DCI Social Protection License + url: 'https://api.spdci.org/LICENSE.md' servers: - url: 'https://sandbox.spdci.org/namespace/v1.0.0' description: Sandbox Server @@ -35,7 +87,7 @@ tags: - name: SearchStatusReasonCode x-displayName: SearchStatusReasonCode description: | - + - name: SubscribeRequest x-displayName: SubscribeRequest description: | @@ -47,11 +99,11 @@ tags: - name: SubscribeStatusReasonCode x-displayName: SubscribeStatusReasonCode description: | - + - name: NotifyEventRequest x-displayName: NotifyEventRequest description: | - + - name: UnSubscribeRequest x-displayName: UnSubscribeRequest description: | @@ -63,7 +115,7 @@ tags: - name: UnSubscribeStatusReasonCode x-displayName: UnSubscribeStatusReasonCode description: | - + - name: TxnStatusRequest x-displayName: TxnStatusRequest description: | @@ -96,13 +148,17 @@ x-tagGroups: - name: Status Codes tags: - SearchStatusReasonCode - - SubscribeStatusReasonCode - - UnSubscribeStatusReasonCode paths: /registry/search: post: summary: /registry/search - description: Search person(s) in registry using identifier or custome attributes + description: |- + The async search api will accept request and will send response to on-search endpoint. The SR will implement /registry/search endpoint and the SPMIS shall implement /registry/on-search to receive data from SR. + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The SR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml operationId: post_reg_search tags: - Async @@ -155,8 +211,10 @@ paths: /registry/on-search: post: summary: /registry/on-search - description: Search results through callback - operationId: post_reg_on-search + description: |- + The /registry/on-search end point to be implemented by SPMIS to receive search results from registry. + The registry will send data in format explained in SearchResponse.yaml. The reg_records will contains data + that in explained in [Person](https://schema.spdci.org/core/v1/data/Person.jsonld), [Member](https://schema.spdci.org/core/v1/data/Member.jsonld) , [Group](https://schema.spdci.org/core/v1/data/Group.jsonld). tags: - Async requestBody: @@ -356,7 +414,7 @@ paths: '500': $ref: '#/components/responses/HttpErrorResponse' default: - $ref: '#/components/responses/HttpErrorResponse' + $ref: '#/components/responses/Response' security: - Authorization: [] deprecated: false @@ -468,7 +526,7 @@ paths: /registry/txn/status: post: summary: /registry/txn/status - description: Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s) + description: The /registry/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s). operationId: post_reg_txnstatus tags: - Async @@ -520,7 +578,7 @@ paths: /registry/txn/on-status: post: summary: /registry/txn/on-status - description: Response to async status check of previous civil registrt transanctions using callback + description: The /registry/txn/on-status will be implemented by SPMIS. The response with information about request and in some case it may contain data as well. operationId: post_reg_on-txnstatus tags: - Async @@ -571,7 +629,13 @@ paths: /registry/sync/search: post: summary: /registry/sync/search - description: Search person(s) in registry using identifier or custome attributes + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The SR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml operationId: post_reg_sync_search tags: - Sync @@ -637,7 +701,7 @@ paths: /registry/sync/txn/status: post: summary: /registry/sync/txn/status - description: Sync status check of registry Async APIs + description: The /registry/sync/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s). operationId: post_reg_sync_txnstatus tags: - Sync @@ -701,843 +765,21 @@ paths: deprecated: false components: schemas: - cdpi_PersonId: - type: string - description: | - 1. Person id is case insensitve normative represenation as id-type:id@provider
- 2. This will enumerate foundational and functioanl id's to easily resolvable addressess
- 3. This property is intended to unambiguously refer to an object, such as a person, beneficiary, user, etc.,
- 4. Few examples:
- - id@identifier-type.id-provider e.g token:12345@nid, vid:543215@nid
- - id@civil-registry.issuing-agency e.g id:12345@civil-reg, brn:12345@civil-reg, mrn:12345@civil-reg
- - id@functional-identifier.issuing-agency e.g id:12345@voter-id, id:12345@driving-license, mobile:12345@farmer-reg
- Note: id provider should be made configurable and solutions should adapt to the local jurisdiction and policies. - format: '^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$' - example: 'vid:54321@nid' - dci_CRVSPerson: - type: object - description: | - @context: "https://example.org/schema/CRVSPerson"
- @type: "Consent" - example: - '@context': 'https://example.org/schema/CRVSPerson' - '@type': CRVSPerson - '@vocab': 'https://spdci.org/' - schema: 'http://schema.org/' - rdfs: 'http://www.w3.org/2000/01/rdf-schema#' - xsd: 'http://www.w3.org/2001/XMLSchema#' - CRVSPerson: - '@id': 'https://spdci.org/CRVSPerson' - '@type': 'rdfs:Class' - '@context': - name: - '@id': 'schema:name' - '@type': 'xsd:string' - givenName: - '@id': 'schema:givenName' - '@type': 'xsd:string' - familyName: - '@id': 'schema:familyName' - '@type': 'xsd:string' - additionalName: - '@id': 'schema:additionalName' - '@type': 'xsd:string' - gender: - '@id': 'schema:gender' - '@type': 'xsd:string' - birthDate: - '@id': 'schema:birthDate' - '@type': 'xsd:date' - birthPlace: - '@id': 'schema:birthPlace' - '@type': 'schema:GeoCoordinates' - deathDate: - '@id': 'schema:deathDate' - '@type': 'xsd:date' - deathPlace: - '@id': 'schema:deathPlace' - '@type': 'schema:GeoCoordinates' - maritalStatus: - '@id': 'schema:maritalStatus' - '@type': 'xsd:string' - honorificPrefix: - '@id': 'schema:honorificPrefix' - '@type': 'xsd:string' - honorificSuffix: - '@id': 'schema:honorificSuffix' - '@type': 'xsd:string' - emails: - '@container': '@set' - '@id': 'schema:email' - '@type': 'xsd:string' - telephones: - '@container': '@set' - '@id': 'schema:telephone' - '@type': 'xsd:string' - address: - '@id': 'schema:address' - '@type': 'schema:GeoCoordinates' - marriageDate: - '@id': 'https://spdci.org/marriageDate' - '@type': 'xsd:date' - divorceDate: - '@id': 'https://spdci.org/divorceDate' - '@type': 'xsd:date' - parents: - '@id': 'schema:parents' - '@type': 'https://spdci.org/CRVSPerson' - '@id': 'https://spdci.org/CRVSPerson' - dci_IdentifierType: - type: string - description: | - An identifier type includes unique numbers legally assigned to individuals.
- Reference: [Types of ID](https://id4d.worldbank.org/guide/types-id-systems) - - UIN : Unique Identification Number
- BRN : Birth Registration Number or Birth Serial Number
- MRN : Marriage Registration Number
- DRN : Death Registration Number
- enum: - - UIN - - BRN - - MRN - - DRN - dci_IdentifierTypeValue: - type: object - properties: - identifier_type: - $ref: '#/components/schemas/dci_IdentifierType' - identifier_value: - type: string - description: Value of the identifier - dci_MaritalStatus: - type: string - description: | - Marital status reference database: Standardized codes/values representing different marital status categories
- Reference: [FHIR Marital Status](https://hl7.org/fhir/DSTU2/valueset-marital-status.html)
- - Code : Values - Description
- S : Never Married - No marriage contract has ever been entered
- M : Married - A current marriage contract is active
- W : Widow - The spouse has died
- A : Annulled - Marriage contract has been declared null and to not have existed
- D : Divorced - Marriage contract has been declared dissolved and inactive
- L : Legally Separated - Legally Separated
- U : Unmarried - The person is not presently married. The marital history is not known or stated.
- enum: - - S - - M - - W - - A - - D - - L - - U - dci_Name: - type: object - description: | - The name data object represents a person's name with various components.
- Reference: [FHIR XPN - extended person name](https://v2plus.hl7.org/2021Jan/data-type/XPN.html#XPN-1)
- Note: Note: In some cultures, people can have multiple Surname(s), Given name(s), Second name(s), Suffix(s), or Prefix(s) to their name; all can be present in the respective attributes, being separated by separator character like space or /. - properties: - sur_name: - type: string - description: Surname(s) or last name(s) of the applicant - given_name: - type: string - description: Given name(s) or first name(s) of the applicant - second_name: - type: string - description: Second name(s) or middle name(s) of the applicant - suffix: - type: string - description: Suffix part of the applicant's name - prefix: - type: string - description: Prefix part of the applicant's name - dci_PersonRecord: - description: | - 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. - 3. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. - properties: - identifier_type: - $ref: '#/components/schemas/dci_IdentifierType' - identifier: - type: string - description: Value of the identifier - name: - $ref: '#/components/schemas/dci_Name' - phone_number: - description: 'Applicant preferred phone number as in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I/en)' - type: string - phone_number_verified: - description: True if the End-User's phone number has been verified; otherwise false. - type: string - email: - description: 'Applicant preferred e-mail address as in [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322) [addr-spec](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) [specification](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1)' - type: string - email_verified: - description: 'Email address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.' - type: boolean - sex: - $ref: '#/components/schemas/dci_Sex' - birthdate: - description: 'Represents Date and time of the applicant''s birth as in [ISO 8601](https://www.iso.org/standard/40874.html)' - type: string - birthplace: - $ref: '#/components/schemas/openid_Address' - deathdate: - $ref: '#/components/schemas/DateTime' - deathplace: - $ref: '#/components/schemas/openid_Address' - address: - $ref: '#/components/schemas/openid_Address' - marital_status: - $ref: '#/components/schemas/dci_MaritalStatus' - marriagedate: - $ref: '#/components/schemas/DateTime' - divorcedate: - $ref: '#/components/schemas/DateTime' - parent1_identifier: - type: object - properties: - identifier_type: - $ref: '#/components/schemas/dci_IdentifierType' - identifier: - type: string - description: Value of the identifier - parent2_identifier: - type: object - properties: - identifier_type: - $ref: '#/components/schemas/dci_IdentifierType' - identifier: - type: string - description: Value of the identifier - dci_RecordType: - type: string - description: | - Predefined registry record to return in respone as object - enum: - - person - - other - dci_Sex: - type: string - description: | - Standardized codes/values representing diverse Sex categories. - Reference: [FHIR Administrative Gender](https://build.fhir.org/valueset-administrative-gender.html) - 1 : Male - 2 : Female - 3 : Others - 4 : Unknown - enum: - - male - - female - - other - - unknown - dci_VitalEvents: - type: string - description: | - Standardized codes/values represent vital events in an individual's life. - Reference: [Vital Events Statistics](https://mospi.gov.in/sites/default/files/publication_reports/vital_statistics_2010_0.pdf)
- 1 : Live Birth
- 2 : Death
- 3 : Fetal death
- 4 : Marriage
- 5 : Divorce
- 6 : Adoption
- enum: - - live_birth - - death - - fetal_death - - marriage - - divorce - - adoption - GooglePlusCode: - type: object - description: 'Refer [Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) for more details' - properties: - global_code: - type: string - example: '' - geometry: - type: object - properties: - bounds: - type: object - properties: - northeast: - $ref: '#/components/schemas/LatLong' - southwest: - $ref: '#/components/schemas/LatLong' - location: - $ref: '#/components/schemas/LatLong' - mosip_EventType: - type: string - description: | - Standardized codes/values represent key events to [integrate](https://docs.mosip.io/1.2.0/integrations/mosip-opencrvs-integration#scope) with civil registries.

- **Sample flow to explain birth registration between MOSIP and CRVS systems:** - 1. Step 1: MOSIP subscribes to BIRTH_REGISTERED event with CRVS for RegistrationRecord - 2. Step 2: CRVS subscribes to BIRTH_REGISTERED event with MOSIP for MOSIPVerifiableCredential - 3. Step 3: CRVS notifies RegistrationRecord data to MOSIP - 4. Step 4: MOSIP notifies MOSIPVerifiableCredential data to CRVS
- - **Sample flow to explain data modification (push) flow from MOSIP to CRVS systems:** - 1. Step 1: CRVS subscribes to DATA_MODIFICATION event with MOSIP for MOSIPToken data - 2. Step 2: MOSIP notifies MOSIPToken data to CRVS
- - **Note:** - 1. Data modifiation (pull) flow can be accomodated with sync/search or existing mosip's eKyc auth api. - 2. Death, Death Reversal fllows same pattern as described in for birth registration. - enum: - - BIRTH_REGISTERED - - DEATH_REGISTERED - - DEATH_REVERSAL - - DATA_MODIFICATION - mosip_LangaugeValue: - type: object - description: multi language value object - properties: - langugage: - type: string - example: eng - value: - type: string - example: value - mosip_LanguageValueList: - type: array - items: - $ref: '#/components/schemas/mosip_LangaugeValue' - mosip_MOSIPVerifiableCredential: - type: object - description: 'MOSIP Verifiable Credential for a [person](https://github.com/opencrvs/mosip-mediator/blob/master/samples/decrypted-sample-received-credentials.json)' - properties: - issuedTo: - description: '' - type: string - protectedAttributes: - type: array - items: - type: string - credentialSubject: - description: MOSIP Verifiable Credential for Proof of identity - type: object - properties: - gender: - $ref: '#/components/schemas/mosip_LanguageValueList' - city: - $ref: '#/components/schemas/mosip_LanguageValueList' - postalCode: - type: string - example: '14022' - fullName: - type: string - example: Thirteen Mosip - dateOfBirth: - type: string - example: '2022' - province: - $ref: '#/components/schemas/mosip_LanguageValueList' - phone: - type: string - example: '9898989898' - addressLine1: - $ref: '#/components/schemas/mosip_LanguageValueList' - addressLine2: - $ref: '#/components/schemas/mosip_LanguageValueList' - id: - type: string - example: '2835824850916304' - UIN: - type: string - example: '7346597054' - region: - $ref: '#/components/schemas/mosip_LanguageValueList' - email: - type: string - example: thirteen.mosip.123@mailinator.com - id: - type: string - example: 'http://mosip.io/credentials/e2039315-87b0-4012-942e-e0d7c879994b' - type: - type: array - items: - type: string - example: MOSIPVerifiableCredential - consent: - type: string - issuer: - type: string - example: 'https://mosip.io/issuers/' - mosip_RecordType: - type: string - description: | - Predefined registry record to return in respone as object - enum: - - RegistrationRecord - - MOSIPVerifiableCredential - mosip_RegistrationRecord: - type: object - description: 'Birth Registration record to sync with MOSIP. [Reference](https://github.com/mosip/mosip-opencrvs/blob/develop/mediator/src/main/java/io/mosip/opencrvs/dto/SyncDto.java)' - properties: - registrationId: - type: string - packetId: - type: string - additionalInfoReqId: - type: string - name: - type: string - email: - type: string - phone: - type: string - registrationType: - type: string - packetHashValue: - type: string - packetSize: - type: integer - supervisorStatus: - type: string - supervisorComment: - type: string - opentionalValues: - type: array - items: - type: string - langCode: - type: string - createDateTime: - $ref: '#/components/schemas/DateTime' - updateDateTime: - $ref: '#/components/schemas/DateTime' - deletedDateTime: - $ref: '#/components/schemas/DateTime' - isActive: - type: boolean - isDeleted: - type: boolean - nid_DeceasedRecord: - type: object - description: Deceased record obtainable from registries - properties: - reference_number: - description: 'unique reference number mantained in the registry for recording death record or ' - type: string - name: - description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' - type: string - gender: - description: 'End-User''s gender. Values defined by this specification are female, male, transgender.' - type: string - dob: - description: Date of Birth in DDMMYYYY format - type: string - dod: - description: Date of Death in DDMMYYYY format - type: string - reported_date: - description: Date in DDMMYYYY format to record on which the death incident reported - type: string - demo_check_status: - description: whether demo check has been undertaken or not - type: boolean - demo_check_date: - description: Date in DDMMYYYY format to capture the Demo Check Date - type: string - document: - $ref: '#/components/schemas/nid_Document' - nid_Document: - type: object - description: 'Supporting document of the Resident,Reference document collected for registering the deceased information,Document encoded as Base64 string' - properties: - document_name: - description: Name of the document - type: string - document: - description: Bases 64 encoded document - type: string - nid_EKycDetails: - type: object - description: 'eKYC details of the resident ,ekyc Details undertaken by the Resident' - properties: - ekyc_date: - description: Date on which eKYC has been done. A null value indicates that eKYC has not been undertaken - type: string - nid_RecordType: - type: string - description: | - Predefined registry record to return in respone as object - enum: - - resident_record - - deceased_record - nid_ResidentAddress: - type: object - description: Address of the Resident in English Language - properties: - care_of: - description: Care of information - type: string - building: - description: Building identity - type: string - street: - description: Street details - type: string - landmark: - description: Landmark details - type: string - pincode: - description: Pincode - type: string - po-name: - description: Post office name - type: string - vtc: - description: Village Town City Code - type: string - vtc-name: - description: Village/Town/City Name - type: string - sub-district-name: - description: Sub District Name - type: string - district-name: - description: District Name - type: string - state: - description: State Name - type: string - country: - description: Country Name - type: string - nid_ResidentLocalAddress: - type: object - description: Resident Local Address - properties: - local-careof: - description: Care of information in local language - type: string - local-building: - description: Building information in local language - type: string - local-street: - description: Street information in local language - type: string - local-landmark: - description: Landmark information in local language - type: string - local-locality: - description: locality information in local language - type: string - pincode: - description: pincode - type: string - po-name-local: - description: Post office name in local - type: string - local-vtc: - description: vtc information in local language - type: string - local-subdistrict: - description: Sub district information in local language - type: string - local-district: - description: district information in local language - type: string - local-state: - description: State information in local language - type: string - local-country: - description: Country information in local language - type: string - nid_ResidentLocalName: - type: object - description: Resident Local Name - properties: - language_code: - $ref: '#/components/schemas/LanguageCode' - local_name: - description: Local name of the Resident - type: string - nid_ResidentNationality: - type: object - description: 'Resident Nationality Information,Nationality information of the Resident' - properties: - nationality: - description: Nationality information of the Resident - type: string - passport_number: - description: Passport number of the Resident - type: string - passport_valid_upto: - description: Passport validity date in DDMMYYYY format - type: string - visa_number: - description: Visa number of the Resident - type: string - visa_vald_upto: - description: Visa validity details - type: string - oci_number: - description: OCI card deatils - type: string - oci_valid_upto: - description: OCI Validity date in DDMMYYYY format - type: string - nid_ResidentPhoto: - type: object - description: 'Resident Photo,Image encoded as Base64 string' - properties: - photo: - description: Photo encoded as Base64 string - type: string - nid_ResidentRecord: - type: object - description: Resident Information - properties: - name: - description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' - type: string - gender: - description: 'End-User''s gender. Values defined by this specification are female, male, transgender.' - type: string - dob: - description: Date of Birth in DDMMYYYY format - type: string - dob_type: - description: 'Date of Birth Type i.e Declared, Approximate, Verified' - type: string - phone: - description: 'Phone number of the resident. If the number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.' - type: string - email: - description: 'End-User''s preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.' - type: string - address: - $ref: '#/components/schemas/nid_ResidentAddress' - local_name: - $ref: '#/components/schemas/nid_ResidentLocalName' - local_address: - $ref: '#/components/schemas/nid_ResidentLocalAddress' - photo: - $ref: '#/components/schemas/nid_ResidentPhoto' - nationality: - $ref: '#/components/schemas/nid_ResidentNationality' - kyc_status: - $ref: '#/components/schemas/nid_EKycDetails' - document: - $ref: '#/components/schemas/nid_Document' - openid_Address: - title: Address - type: object - description: 'Address info as per OpenID specs' - properties: - address_line1: - description: 'Full mailing address, formatted for display or use on a mailing label. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").' - type: string - example: '' - address_line_2: - description: 'Full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").' - type: string - example: '' - locality: - description: City or locality component. - type: string - example: '' - sub_region_code: - description: District or sub-regional code - type: string - region_code: - description: 'State, province, prefecture, or region component.' - type: string - example: '' - postal_code: - description: Zip code or postal code component. - type: string - example: '' - country_code: - description: 'Country part of an address represented using an ISO 3-letter code [ISO3166-3], e.g., "USA" or "JPN". 2-letter ISO codes [ISO3166-1] e.g. ,e.g. US, JP' - type: string - example: '' - geo_location: - description: | - Refer [Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) for more details - oneOf: - - $ref: '#/components/schemas/LatLong' - - $ref: '#/components/schemas/GooglePlusCode' - openid_PersonRecord: - type: object - description: | - 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. - 2. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. - 3. Person info as per OpenID [Claims](https://openid.net/specs/openid-connect-core-1_0.html#Claims) - 4. Person additional info based on OpenID [name-additional-claims](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html#name-additional-claims-about-end) - properties: - sub: - type: string - description: Subject - Identifier for the End-User at the Issuer. - name: - description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' - type: string - given_name: - description: 'Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.' - type: string - family_name: - description: 'Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.' - type: string - middle_name: - description: 'Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.' - type: string - nickname: - description: 'Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.' - type: string - preferred_username: - description: 'Shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. The RP MUST NOT rely upon this value being unique, as discussed in' - type: string - profile: - description: URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. - type: string - picture: - description: 'URL of the End-User''s profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.' - type: string - website: - description: URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. - type: string - email: - description: 'End-User''s preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.' - type: string - email_verified: - description: 'address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.' - type: boolean - gender: - description: End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. - type: string - birthdate: - description: 'YYYY format is allowed. Note that depending on the underlying platform''s date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.' - type: string - place_of_birth: - description: End-User's place of birth. The value of this member is a JSON structure containing some or all of the following members - type: object - deathdate: - description: 'YYYY format is allowed. Note that depending on the underlying platform''s date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.' - type: string - place_of_death: - description: End-User's place of birth. The value of this member is a JSON structure containing some or all of the following members - type: object - phone_number: - description: 'number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.' - type: string - phone_number_verified: - description: 'True if the End-User''s phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.' - type: string - address: - $ref: '#/components/schemas/openid_Address' - zoneinfo: - description: 'String from zoneinfo [zoneinfo] time zone database representing the End-User''s time zone. For example, Europe/Paris or America/Los_Angeles.' - type: string - locale: - description: 'Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.' - type: string - nationalities: - description: 'End-User''s nationalities using ICAO 3-letter codes [ICAO-Doc9303], e.g., "USA" or "JPN". 2-letter ICAO codes MAY be used in some circumstances for compatibility reasons.' - type: array - items: - type: string - updated_at: - description: 'Time the End-User''s information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time' - type: number - birth_family_name: - description: 'End-User''s family name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the family name later in life for any reason. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.' - type: string - birth_given_name: - description: 'End-User''s given name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the given name later in life for any reason. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.' - type: string - birth_middle_name: - description: 'End-User''s middle name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the middle name later in life for any reason. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.' - type: string - salutation: - description: 'End-User''s salutation, e.g., "Mr."' - type: string - title: - description: 'End-User''s title, e.g., "Dr."' - type: string - msisdn: - description: 'End-User''s mobile phone number formatted according to ITU-T recommendation [E.164], e.g., "1999550123"' - type: string - also_known_as: - description: 'Stage name, religious name or any other type of alias/pseudonym with which a person is known in a specific context besides its legal name. This must be part of the applicable legislation and thus the trust framework (e.g., be an attribute on the identity card).' - type: string - additional_attributes: - $ref: '#/components/schemas/AttributeNameValueList' - openid_PersonDocDetails: - type: object - description: | - 1. Person document detials as per OpenID [identity-assurance](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html#name-evidence-element) - 2. JSON object representing the document used to perform the identity verification. - properties: - type: - description: 'String denoting the type of the document. The OP MAY use other than the predefined values in which case the RPs will either be unable to process the assertion, just store this value for audit purposes, or apply bespoken business logic to it.' - type: string - document_number: - description: 'String Representing an identifier/number that uniquely identifies a document that was issued to the End-User. This is used on one document and will change if it is reissued, e.g., a passport number, certificate number, etc. Note, number can be used as an alias for ''document_number'' for backward compatibility purposes but will be deprecated in future releases, implementers are recommended to use document_number.' - type: string - personal_number: - description: 'String representing an identifier that is assigned to the End-User and is not limited to being used in one document, for example a national identification number, personal identity number, citizen number, social security number, driver number, account number, customer number, licensee number, etc.' - type: string - serial_number: - description: String representing an identifier/number that identifies the document irrespective of any personalization information (this usually only applies to physical artifacts and is present before personalization). - type: string - date_of_issuance: - description: 'The date the document was issued as ISO 8601 [ISO8601] YYYY-MM-DD format.' - type: string - date_of_expiry: - description: 'The date the document will expire as ISO 8601 [ISO8601] YYYY-MM-DD format.' - type: string - issuer: - description: JSON object containing information about the issuer of this document. This object consists of the following properties - type: object - properties: - name: - description: Designation of the issuer of the document - type: string - address: - $ref: '#/components/schemas/openid_Address' - country_code: - description: 'String denoting the country or supranational organization that issued the document as ISO 3166/ICAO 3-letter codes [ICAO-Doc9303], e.g., "USA" or "JPN". 2-letter ICAO codes MAY be used in some circumstances for compatibility reasons.' - type: string - jurisdiction: - description: String containing the name of the region(s)/state(s)/province(s)/municipality(ies) that issuer has jurisdiction over (if this information is not common knowledge or derivable from the address). - type: string - required: - - type - RegistryQueries: - description: | - 1. Implementing systems can define schemas. - 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. - 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
- - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 - - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 - - search all farmers with land area less than 2 acers in district code 504 - oneOf: - - $ref: '#/components/schemas/ExpTemplate' - - $ref: '#/components/schemas/IdentifierTypeValue' - - $ref: '#/components/schemas/ExpPredicateWithConditionList' NotifyEventRequest: type: object description: Registry to notify a event to subscrbiers properties: transaction_id: - $ref: '#/components/schemas/TransactionId' + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' notify_event: type: array items: type: object properties: reference_id: - $ref: '#/components/schemas/ReferenceId' + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' timestamp: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' data: type: object description: | @@ -1547,18 +789,18 @@ components: type: string default: 1.0.0 reg_type: - $ref: '#/components/schemas/RegistryType' + $ref: '#/components/schemas/SubscriptionInfo/properties/reg_type' reg_event_type: - $ref: '#/components/schemas/RegistryEventType' + $ref: '#/components/schemas/SubscriptionInfo/properties/reg_event_type' reg_record_type: - $ref: '#/components/schemas/RegistryRecordType' + $ref: '#/components/schemas/SubscriptionInfo/properties/notify_record_type' reg_records: - $ref: '#/components/schemas/RegistryRecord' + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records' required: - reg_record_type - reg_records locale: - $ref: '#/components/schemas/LanguageCode' + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' required: - reference_id - timestamp @@ -1566,53 +808,7 @@ components: required: - transaction_id - notify_event - RegistryEventType: - type: string - description: | - @context: "https://example.org/schema/RegistryEventType"
- @type: "VitalEvent"
- - **Notes:** - 1. Registry event type values defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable identifiers. - 3. example: "ns:org:RegistryEventType:LiveBirth" - example: 'ns:org:RegistryEventType:LiveBirth' - RegistryRecord: - type: object - description: | - @context: "https://example.org/schema/RecordType"
- @type: "CRVSPerson"
- @container: "@set"
- - **Notes:** - 1. Record type values defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable identifiers. - example: - $ref: '#/components/schemas/dci_CRVSPerson' - RegistryRecordType: - type: string - description: | - @context: "https://example.org/schema/RegistryRecordType"
- @type: "RegistryRecordType"
- - **Notes:** - 1. Registry record type values defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable result sets - 3. Referenced in search_request and notify events - 4. example: "ns:dci:RegistryRecordType:CRVSPerson" - example: 'ns:dci:RegistryRecordType:CRVSPerson' - RegistryType: - type: string - description: | - @context: "https://example.org/schema/RegistryType"
- @type: "RegistryType"
- - **Notes:** - 1. Registry type values defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable functional registries - 3. example: "ns:org:RegistryType:Civil" - example: 'ns:org:RegistryType:Civil' - SearchRequest: + SearchRequest: type: object description: | 1. Functional registry specific extension to search. @@ -1620,7 +816,13 @@ components: 3. Allows Country/Registry specific implementation extensions using key/value pairs. properties: transaction_id: - $ref: '#/components/schemas/TransactionId' + description: | + 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. + 2. transaction_id should be same across processing systems/service end points. + 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) + type: string + maxLength: 99 + example: XZFHYTY search_request: type: array description: | @@ -1629,9 +831,9 @@ components: type: object properties: reference_id: - $ref: '#/components/schemas/ReferenceId' + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' timestamp: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' search_criteria: type: object properties: @@ -1639,26 +841,94 @@ components: type: string default: 1.0.0 reg_type: - $ref: '#/components/schemas/RegistryType' - reg_event_type: - $ref: '#/components/schemas/RegistryEventType' + $ref: '#/components/schemas/SubscriptionInfo/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SubscriptionInfo/properties/notify_record_type' query_type: - $ref: '#/components/schemas/QueryType' + $ref: '#/components/schemas/SubscriptionInfo/properties/filter_type' query: - $ref: '#/components/schemas/RegistryQueries' + $ref: '#/components/schemas/SubscriptionInfo/properties/filter' sort: - $ref: '#/components/schemas/SearchSortList' + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @type: "Attribute"
+ + **Notes:** + 1. Attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible attribute names. + 3. e.g: UIN, poverty_score, etc., + example: poverty_score + sort_order: + type: string + enum: + - asc + - desc pagination: - $ref: '#/components/schemas/PaginationRequest' + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + default: 1 + example: 5 + required: + - page_size consent: - $ref: '#/components/schemas/Consent' + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld"
+ @type: "Consent" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld' + '@type': Consent + ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on consent codes authorize: - $ref: '#/components/schemas/Authorize' + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld
+ @type: "Authorize" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld' + '@type': Authorize + ts: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on authorize codes required: - query_type - query locale: - $ref: '#/components/schemas/LanguageCode' + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' required: - reference_id - timestamp @@ -1671,25 +941,26 @@ components: description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! properties: transaction_id: - $ref: '#/components/schemas/TransactionId' + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' correlation_id: description: | 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) type: string maxLength: 99 - example: '9876543210' + pattern: '^[a-zA-Z0-9-]+$' + example: ABC9876543210 search_response: type: array items: type: object properties: reference_id: - $ref: '#/components/schemas/ReferenceId' + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' timestamp: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' status: - $ref: '#/components/schemas/RequestStatus' + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' status_reason_code: $ref: '#/components/schemas/SearchStatusReasonCode' status_reason_message: @@ -1705,20 +976,102 @@ components: type: string default: 1.0.0 reg_type: - $ref: '#/components/schemas/RegistryType' - reg_event_type: - $ref: '#/components/schemas/RegistryEventType' + $ref: '#/components/schemas/SubscriptionInfo/properties/reg_type' reg_record_type: - $ref: '#/components/schemas/RegistryRecordType' + $ref: '#/components/schemas/SubscriptionInfo/properties/notify_record_type' reg_records: - $ref: '#/components/schemas/RegistryRecord' + type: object + description: | + The "person" object contains fields expected in response of search + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "Person"
+ @container: "@set"
+ example: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+ example: + '@context': + spdci: 'https://schema.spdci.org/core/v1/data' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + xsd: 'http://www.w3.org/2001/XMLSchema#' + owl: 'http://www.w3.org/2002/07/owl#' + common: 'https://schema.spdci.org/common/v1/' + '@id': 'https://example.org/sr_person/847951632' + '@type': 'spdci:member' + member_identifier: + - '@type': Identifier + identifier_type: UIN + identifier_value: '42343545654' + demographic_info: + '@type': SRPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + name: + '@type': Name + surname: Smith + given_name: Alice + prefix: Ms. + suffix: '' + sex: female + birth_date: '1985-05-20' + related_person: + - '@type': RelatedPerson + relationship_type: spouse + related_member: + '@type': Member + '@id': 'https://example.org/member/123456789' + member_identifier: M123456789 + - '@type': RelatedPerson + relationship_type: child + related_member: + '@type': Member + '@id': 'https://example.org/member/987654322' + 'spdci:member_identifier': M987654322 + is_disabled: false + marital_status: married + employment_status: employed + occupation: teacher + income_level: middle + language_code: + - en + - es + education_level: bachelor + additional_attributes: + - extra_work: volunteer + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' required: - reg_record_type - reg_records pagination: - $ref: '#/components/schemas/Pagination' + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + example: 5 + total_count: + type: number + format: int32 + example: 24250 + required: + - page_size + - page_number + - total_count locale: - $ref: '#/components/schemas/LanguageCode' + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' required: - reference_id - timestamp @@ -1744,16 +1097,16 @@ components: description: Subscribe to a life event with crvs properties: transaction_id: - $ref: '#/components/schemas/TransactionId' + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' subscribe_request: type: array items: type: object properties: reference_id: - $ref: '#/components/schemas/ReferenceId' + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' timestamp: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' subscribe_criteria: type: object properties: @@ -1761,25 +1114,25 @@ components: type: string default: 1.0.0 reg_type: - $ref: '#/components/schemas/RegistryType' + $ref: '#/components/schemas/SubscriptionInfo/properties/reg_type' reg_event_type: - $ref: '#/components/schemas/RegistryEventType' + $ref: '#/components/schemas/SubscriptionInfo/properties/reg_event_type' frequency: - $ref: '#/components/schemas/EventFrequency' + $ref: '#/components/schemas/SubscriptionInfo/properties/frequency' filter_type: - $ref: '#/components/schemas/QueryType' + $ref: '#/components/schemas/SubscriptionInfo/properties/filter_type' filter: - $ref: '#/components/schemas/RegistryQueries' + $ref: '#/components/schemas/SubscriptionInfo/properties/filter' notify_record_type: - $ref: '#/components/schemas/RegistryRecordType' + $ref: '#/components/schemas/SubscriptionInfo/properties/notify_record_type' authorize: - $ref: '#/components/schemas/Authorize' + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/authorize' required: - reg_event_type - filter - notify_record_type locale: - $ref: '#/components/schemas/LanguageCode' + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' required: - reference_id - timestamp @@ -1792,7 +1145,7 @@ components: description: Response to subscribe request. properties: transaction_id: - $ref: '#/components/schemas/TransactionId' + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' correlation_id: $ref: '#/components/schemas/SearchResponse/properties/correlation_id' subscribe_response: @@ -1801,15 +1154,15 @@ components: type: object properties: reference_id: - $ref: '#/components/schemas/ReferenceId' + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' timestamp: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' status: - $ref: '#/components/schemas/RequestStatus' + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' status_reason_code: $ref: '#/components/schemas/SubscribeStatusReasonCode' status_reason_message: - description: Status reason code message. Helps actionanble messaging for systems/end users + description: Status reason code message. Helps actionable messaging for systems/end users type: string maxLength: 999 subscriptions: @@ -1817,9 +1170,9 @@ components: items: $ref: '#/components/schemas/SubscriptionInfo' pagination: - $ref: '#/components/schemas/Pagination' + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' locale: - $ref: '#/components/schemas/LanguageCode' + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' required: - reference_id - timestamp @@ -1859,116 +1212,225 @@ components: status: $ref: '#/components/schemas/SubscriptionStatus' timestamp: - $ref: '#/components/schemas/DateTime' + description: | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. + type: string + format: date-time + example: '2022-12-04T17:20:07-04:00' reg_type: - $ref: '#/components/schemas/RegistryType' + type: string + description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' reg_event_type: - $ref: '#/components/schemas/RegistryEventType' + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' frequency: - $ref: '#/components/schemas/EventFrequency' + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + end_time: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency filter_type: - $ref: '#/components/schemas/QueryType' + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + - graphql + example: expression filter: - $ref: '#/components/schemas/RegistryQueries' + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: 'ns:org:QueryType:graphql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: | + query GetMemberByIdentifier { + member( + identifier: { + value: "1", + type: "uin" + } + ) { + member_identifier { + value + type + } + demographic_info { + name + gender + age + } + } + } + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + value: + allOf: + - description: Identifier Value of the subject. + - oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: object + example: '1980' + example: '12314567890' + - type: array + items: + type: object + properties: + seq_num: + description: Sequence number to help define precedence for evaluating a list of expression Predicates + type: number + example: 1 + expression1: + type: object + description: Expression + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryAttributes.jsonld
+ @type: "QueryAttributes"
+ + **Notes:** + 1. Query attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + operator: + type: string + description: Operator in an expression + enum: + - gt + - lt + - eq + - ge + - le + - in + example: eq + attribute_value: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1/properties/value/allOf/1' + required: + - attribute_name + - operator + - attribute_value + condition: + type: string + description: Condition in an expression + enum: + - and + - or + - not + example: and + expression2: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2/items/properties/expression1' + required: + - expression1 notify_record_type: - $ref: '#/components/schemas/RegistryRecordType' - required: - - reg_event_type - - filter - - notify_record_type + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Member" + example: 'spdci-extensions-dci:Member' locale: - $ref: '#/components/schemas/LanguageCode' + type: string + description: indicates language code. SPDCI Connect supports country codes as per ISO 639.3 standard + pattern: '^[a-z]{3,3}$' + example: eng required: - - subscription_code + - code + - status - timestamp - - subscribe_criteria SubscriptionStatus: type: string description: subscription status enum: - subscribe - unsubscribe - TxnStatusRequest: - type: object - description: Request to fetch txn status on various service requests - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - txnstatus_request: - type: object - properties: - reference_id: - $ref: '#/components/schemas/ReferenceId' - txn_type: - type: string - description: txn type to fetch status - enum: - - search - - subscribe - - unsubscribe - attribute_type: - type: string - enum: - - transaction_id - - reference_id_list - - correlation_id - - subscription_code_list - attribute_value: - oneOf: - - $ref: '#/components/schemas/TransactionId' - - $ref: '#/components/schemas/ReferenceIdList' - - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' - - $ref: '#/components/schemas/SubscriptionCodeList' - locale: - $ref: '#/components/schemas/LanguageCode' - required: - - reference_id - - txn_type - - attribute_type - - attribute_value - required: - - transaction_id - - txnstatus_request - TxnStatusResponse: - type: object - description: txn status info on various service requests - properties: - transaction_id: - $ref: '#/components/schemas/TransactionId' - correlation_id: - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' - txnstatus_response: - type: object - properties: - txn_type: - type: string - description: txn type to fetch status - enum: - - on-search - - on-subscribe - - on-unsubscribe - txn_status: - oneOf: - - $ref: '#/components/schemas/SearchResponse' - - $ref: '#/components/schemas/SubscribeResponse' - - $ref: '#/components/schemas/UnSubscribeResponse' - example: - $ref: '#/components/schemas/SearchResponse' - required: - - txn_type - - txn_status - required: - - transaction_id - - correlation_id - - txnstatus_response UnSubscribeRequest: type: object description: Un-Subscribe to registred subscriptions properties: transaction_id: - $ref: '#/components/schemas/TransactionId' - timesstamp: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' subscription_codes: type: array items: @@ -1976,19 +1438,25 @@ components: required: - transaction_id - timestamp - - sunscription_codes + - subscription_codes UnSubscribeResponse: type: object description: Un-Subscribe to a life event with crvs properties: transaction_id: - $ref: '#/components/schemas/TransactionId' + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' correlation_id: $ref: '#/components/schemas/SearchResponse/properties/correlation_id' - timesatmp: - $ref: '#/components/schemas/DateTime' + timestamp: + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' status: - $ref: '#/components/schemas/RequestStatus' + type: string + description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' + enum: + - rcvd + - pdng + - succ + - rjct status_reason_code: $ref: '#/components/schemas/UnSubscribeStatusReasonCode' status_reason_message: @@ -2022,98 +1490,78 @@ components: - rjct.subscription_code.invalid - rjct.requester.invalid - rjct.event.already_unsubscribed - Ack: - type: string - description: | - 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. - 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. - 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. - enum: - - ACK - - NACK - - ERR - AdditionalInfo: - type: object - description: Additional JSON property oject to hold custom user defined contextual data - AttributeNameValue: + TxnStatusRequest: type: object - description: Attribute name value object + description: Request to fetch txn status on various service requests properties: - name: - type: string - description: | - @context: "https://example.org/schema/Attribute"
- @type: "Attribute"
- - **Notes:** - 1. Attribute names defined as per implementation context. - 2. Usually a list of **enum** values of all possible attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: YOB - value: - $ref: '#/components/schemas/AttributeValue' + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + txnstatus_request: + type: object + properties: + reference_id: + type: string + description: Unique reference_id set by txn initiating system for each request in a batch + example: SDFRTYUX + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + - subscription_code_list + attribute_value: + anyOf: + - $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + - type: array + items: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + - $ref: '#/components/schemas/SubscriptionCodeList' + locale: + $ref: '#/components/schemas/SubscriptionInfo/properties/locale' + required: + - reference_id + - txn_type + - attribute_type + - attribute_value required: - - name - - value - AttributeNameValueList: - type: array - description: List of attribute Name/Value - items: - $ref: '#/components/schemas/AttributeNameValue' - AttributeValue: - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: object - example: '1980' - Authorize: - type: object - description: | - @context: "https://example.org/schema/Authorize"
- @type: "Authorize" - example: - '@context': 'https://example.org/schema/Authorize' - '@type': Authorize - ts: - $ref: '#/components/schemas/DateTime' - purpose: - text: - type: string - code: - type: string - description: 'From a fixed set, documented at refUri' - refUri: - type: string - format: uri - description: Uri to provide more info on authorize codes - Consent: + - transaction_id + - txnstatus_request + TxnStatusResponse: type: object - description: | - @context: "https://example.org/schema/Consent"
- @type: "Consent" - example: - '@context': 'https://example.org/schema/Consent' - '@type': Consent - ts: - $ref: '#/components/schemas/DateTime' - purpose: - text: - type: string - code: - type: string - description: 'From a fixed set, documented at refUri' - refUri: - type: string - format: uri - description: Uri to provide more info on consent codes - DateTime: - description: | - 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. - type: string - format: date-time - example: '' + description: txn status info on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + txnstatus_response: + type: object + properties: + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + txn_status: + anyOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/UnSubscribeResponse' + required: + - transaction_id + - correlation_id + - txnstatus_response EncryptedMessage: description: Encrypted payload type: object @@ -2182,123 +1630,12 @@ components: type: string description: message to describe above error code maxLength: 999 - EventFrequency: - type: object - description: | - 1. Frequency at which subscribed services should be notified. - 2. start_time, end_time represent data range where the notification frequency is applicable - properties: - start_time: - $ref: '#/components/schemas/DateTime' - end_time: - $ref: '#/components/schemas/DateTime' - frequency: - type: string - description: | - Frequency at which notification is required. This will be in the form of cron expression. - Example - "0 0 0 5,15 * ? *" - which says At 00:00:00am, on the 5th and 15th day, every month - required: - - start_time - - end_time - - frequency - ExpCondition: - type: string - description: Condition in an expression - enum: - - and - - or - - not - example: and - ExpOperator: - type: string - description: Operator in an expression - enum: - - gt - - lt - - eq - - ge - - le - - in - example: eq - ExpPredicate: - type: object - description: Expression - properties: - attribute_name: - type: string - description: | - @context: "https://example.org/schema/QueryAttributes"
- @type: "QueryAttributes"
- - **Notes:** - 1. Query attribute names defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: YOB - operator: - $ref: '#/components/schemas/ExpOperator' - attribute_value: - $ref: '#/components/schemas/AttributeValue' - required: - - attribute_name - - operator - - attribute_value - ExpPredicateList: - type: array - description: list of attributes with matching conditions - items: - $ref: '#/components/schemas/ExpPredicate' - ExpPredicateWithCondition: - type: object - properties: - seq_num: - description: Sequence number to help define precedence for evaluating a list of expression Predicates - type: number - example: 1 - expression1: - $ref: '#/components/schemas/ExpPredicate' - condition: - $ref: '#/components/schemas/ExpCondition' - expression2: - $ref: '#/components/schemas/ExpPredicate' - required: - - expression1 - ExpPredicateWithConditionList: - type: array - items: - $ref: '#/components/schemas/ExpPredicateWithCondition' - ExpTemplate: - type: object - description: Identifier type and value object - properties: - type: - type: string - description: | - @context: "https://example.org/schema/QueryType"
- @type: "Queryype"
- - **Notes:** - 1. Query types that helps decode query expressions - 2. Sample query type enums: "GraphQl", "Sql", "NoSql" - example: 'ns:org:QueryType:GraphQl' - value: - type: object - description: | - @context: "https://example.org/schema/QueryExpression"
- @type: "QueryExpression"
- - **Notes:** - 1. Query expression's syntax / format is determined based on query-type. - 2. Query expression as a template with placeholder to pass conditional search parameters - example: - expression: ' query GeBirthRecordById: { person: (UIN: "1") { BRN, name, gender, birthDate, birthPlace, parents } }' FileInfo: type: object description: File info. Used in file upload feature using HTTPS properties: action: - description: G2P Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + description: SPDCI Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. type: string fileName: description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record @@ -2312,87 +1649,32 @@ components: required: - action - fileName - IdentifierType: - type: string - description: | - @context: "https://example.org/schema/IdType"
- @type: "IdType"
- - **Notes:** - 1. Identifier type values defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable identifiers. - 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., - example: UIN - IdentifierTypeValue: - type: object - description: Identifier type and value object - properties: - type: - type: string - description: | - @context: "https://example.org/schema/IdType"
- @type: "IdType"
- - **Notes:** - 1. Identifier type values defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable identifiers. - 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., - example: UIN - value: - allOf: - - description: Identifier Value of the subject. - - $ref: '#/components/schemas/AttributeValue' - example: '12314567890' - LanguageCode: - type: string - description: indicates language code. G2P Connect supports country codes as per ISO 639.3 standard - pattern: '^[a-z]{3,3}$' - example: en - LatLong: - type: object - properties: - latitude: - type: string - example: 11°24'12.2"N - longitude: - type: string - example: 88°50'26.5"E - Meta: - type: object - description: | - @context: "https://example.org/schema/Meta"
- @type: "@context"
- - **Notes:** - 1. Additional meta info defined as per implementation context. - 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. - 3. The information SHOULD be privacy preserving MsgCallbackHeader_V1.0.0: type: object description: Message header properties: version: - description: Messaing protocol specification version being used + description: Messaging protocol specification version being used type: string default: 1.0.0 message_id: description: | - 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 1. Unique message id to communicate between sender and receiver systems to reliable deliver the message over any transport layer i.e https, pub/sub, sftp etc., 2. The scope of message_id end with successful ack of the message by the receiver. - 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. type: string example: '789' message_ts: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' action: - description: G2P Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. type: string status: - $ref: '#/components/schemas/RequestStatus' + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' status_reason_code: $ref: '#/components/schemas/MsgHeaderStatusReasonCode' status_reason_message: - description: 'Status reascon code message, if any, Helps actionanble messaging for system/end users' + description: 'Status reason code message, if any, Helps actionable messaging for system/end users' type: string maxLength: 999 total_count: @@ -2400,25 +1682,25 @@ components: type: integer example: 21800 completed_count: - description: No of requests in complteed state. Complete includes success and error requests due to funcational errors + description: No of requests in completed state. Complete includes success and error requests due to functional errors type: integer example: 50 sender_id: description: | 1. sender_id registered with the receiving system or gateway. - 2. Used for authorization, encryption, digital sign verfication, etc., + 2. Used for authorization, encryption, digital sign verification, etc., type: string - example: civilregistry.example.org + example: registry.example.org receiver_id: - description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' type: string - example: registry.example.org + example: spmis.example.org is_msg_encrypted: description: Is message encrypted? type: boolean default: false meta: - $ref: '#/components/schemas/Meta' + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/meta' required: - message_id - message_ts @@ -2429,7 +1711,7 @@ components: description: Message header properties: version: - description: Messaing protocol specification version being used + description: Messaging protocol specification version being used type: string default: 1.0.0 message_id: @@ -2440,28 +1722,28 @@ components: type: string example: '123' message_ts: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' action: - description: 'G2P Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps identity payload type in message property.' + description: 'spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property.' type: string sender_id: description: | 1. sender_id registered with the receiving system or gateway. - 2. Used for authorization, encryption, digital sign verfication, etc., + 2. Used for authorization, encryption, digital sign verification, etc., type: string - example: spp.example.org + example: spmis.example.org sender_uri: description: | 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. - 2. Default uri is assumed to be configred on the gateway as part of sender/receiver onboarding. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. 3. For SFTP based communications, this shall be set to server/folder details. type: string format: uri - example: 'https://spp.example.org/{namespace}/callback/on-search' + example: 'https://spmis.example.org/consumer-namespace/callback/on-search' receiver_id: - description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' type: string - example: pymts.example.org + example: registry.example.org total_count: description: Total no of requests present in the message request type: integer @@ -2471,7 +1753,15 @@ components: type: boolean default: false meta: - $ref: '#/components/schemas/Meta' + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Meta.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Additional meta info defined as per implementation context. + 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. + 3. The information SHOULD be privacy preserving required: - message_id - message_ts @@ -2493,100 +1783,7 @@ components: MsgSignature: type: string description: 'Signature of {header}+{message} body verified using sender''s signing public key' - example: 'Signature: namespace="g2p", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' - Pagination: - description: 'Pagination definition, count starts with 1' - type: object - properties: - page_size: - type: number - format: int32 - example: 2000 - page_number: - type: number - format: int32 - example: 5 - total_count: - type: number - format: int32 - example: 24250 - required: - - page_size - - page_number - - total_count - PaginationRequest: - description: 'Pagination definition, count starts with 1' - type: object - properties: - page_size: - type: number - format: int32 - example: 2000 - page_number: - type: number - format: int32 - default: 1 - example: 5 - required: - - page_size - QueryType: - type: string - description: | - 1. Query format allow multiple ways to search registry - 2. Templatized query expressions with placeholder for conditional values - enum: - - idtype-value - - expression - - predicate - example: idtype-value - ReferenceId: - type: string - description: Unique reference_id set by txn initiating system for each request in a batch - example: '12345678901234567890' - ReferenceIdList: - type: array - items: - $ref: '#/components/schemas/ReferenceId' - RequestStatus: - type: string - description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' - enum: - - rcvd - - pdng - - succ - - rjct - SearchSort: - description: Sorting definition - type: object - properties: - attribute_name: - type: string - description: | - @context: "https://example.org/schema/Attribute"
- @type: "Attribute"
- - **Notes:** - 1. Attribute names defined as per implementation context. - 2. Usually a list of **enum** values of all possible attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: YOB - sort_order: - type: string - enum: - - asc - - desc - SearchSortList: - type: array - items: - $ref: '#/components/schemas/SearchSort' - TransactionId: - description: | - 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. - 2. transaction_id should be samme across processing systems/service end points. - 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) - type: string - maxLength: 99 - example: 0123456789 + example: 'Signature: namespace="spdci", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' responses: HttpErrorResponse: description: HTTP layer error details @@ -2617,9 +1814,17 @@ components: type: object properties: ack_status: - $ref: '#/components/schemas/Ack' + type: string + description: | + 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. + 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. + 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. + enum: + - ACK + - NACK + - ERR timestamp: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/SubscriptionInfo/properties/timestamp' error: $ref: '#/components/schemas/Error' correlation_id: diff --git a/release/yaml/social_api_v1.0.0.yaml b/release/yaml/social_api_v1.0.0.yaml new file mode 100644 index 0000000..7e1aa32 --- /dev/null +++ b/release/yaml/social_api_v1.0.0.yaml @@ -0,0 +1,2237 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Social Registry + version: 1.0.0 + x-logo: + url: ./dci-logo.png + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: |- + The Social Registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between social registry and SPMIS. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link : + - [Social Registry - V1.0 ](https://standards.spdci.org/standards/wip-social-registry-v1.0.0) + + Code directory links: + - [Identifiers](https://schema.spdci.org/core/v1/code/IdentifierTypeEnum.jsonld) + - [Marital Status](https://schema.spdci.org/core/v1/code/MaritalStatusEnum.jsonld) + - [Sex](https://schema.spdci.org/core/v1/code/SexCategoryEnum.jsonld) + - [Relationship Type](https://schema.spdci.org/v1/code/RelationshipTypeEnum.jsonld) + - [Disability Type](https://schema.spdci.org/v1/code/DisabilityTypeEnum.jsonld) + - [Functional Limitation Type](https://schema.spdci.org/core/v1/code/FunctionalLimitationType.jsonld) + - [Functional Severity](https://schema.spdci.org/core/v1/code/FunctionalSeverityEnum.jsonld) + - [Education Level](https://schema.spdci.org/core/v1/code/EducationCode.jsonld) + - [Employment Status](https://schema.spdci.org/core/v1/code/EmploymentStatusEnum.jsonld) + - [Income Level](https://schema.spdci.org/core/v1/code/IncomeLevelEnum.jsonld) + - [Occupation](https://schema.spdci.org/core/v1/code/OccupationEnum.jsonld) + + Data Objects: + - [Person](https://schema.spdci.org/extensions/social/v1/data/Person.jsonld) + - [Group](https://schema.spdci.org/extensions/social/v1/data/Group.jsonld) + - [Member](https://schema.spdci.org/extensions/social/v1/data/Member.jsonld) + - [RelatedPerson](https://schema.spdci.org/core/v1/data/RelatedPerson.jsonld) + - [DisabilityInfo](https://schema.spdci.org/core/v1/data/DisabilityInfo.jsonld) + + Each request is build up of three parts + - signature + - header + - message + + Information about each part is given below + + **Signature:** + - The signature is used to verify the integrity of the message. + - The signature is a hash of the message and is encrypted using the private key of the sender. + - The receiver can verify the signature using the public key of the sender. + + **Header:** + - The header contains information about various message header, refer to the header schema for more details. + + **Message:** + + - The message contains the actual payload of the message. + - Refere example section to get sample data and also read Gitbook for details data objects + - The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" version: 1.0.0 + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: 'https://api.spdci.org/LICENSE.md' +servers: + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode +paths: + /registry/search: + post: + summary: /registry/search + description: |- + The async search api will accept request and will send response to on-search endpoint. The SR will implement /registry/search endpoint and the SPMIS shall implement /registry/on-search to receive data from SR. + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The SR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + operationId: post_reg_search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-search: + post: + summary: /registry/on-search + description: |- + The /registry/on-search end point tobe implemented by SPMIS to receive search results from SR. + The SR will send data in format explained in SearchResponse.yaml. The reg_records will containe data that in explained in social/v1/Person.jsonld. + Refer example json at gitbook [link](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/1.-crvs/data/data-objects/person#example). + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-search + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/subscribe: + post: + summary: /registry/subscribe + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: '#/components/schemas/SubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - subscribe + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-subscribe: + post: + summary: /registry/on-subscribe + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-subscribe + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/notify: + post: + summary: /registry/notify + description: Registry to notify an event to subscribers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/unsubscribe: + post: + summary: /registry/unsubscribe + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: '#/components/schemas/UnSubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-unsubscribe: + post: + summary: /registry/on-unsubscribe + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: '#/components/schemas/UnSubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/status: + post: + summary: /registry/txn/status + description: The /registry/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-status + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + security: + - Authorization: [] + deprecated: false + /registry/txn/on-status: + post: + summary: /registry/txn/on-status + description: The /registry/txn/on-status will be implemented by SPMIS. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-on-status + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/sync/search: + post: + summary: /registry/sync/search + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The SR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Registry search response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false + /registry/sync/txn/status: + post: + summary: /registry/sync/txn/status + description: The /registry/sync/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Transaction status check response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false +components: + schemas: + NotifyEventRequest: + type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_event_type: + type: string + description: | + The SP-System receives data from SR, usually the SR sends registration and updates events to SP-System + + 1 : Register + 2 : spdci:common:RegistryEventType:NewHouseHoldMember + enum: + - REGISTER + - NewHouseHoldMember + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + reg_records: + type: object + description: | + The "Group" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/social/v1/Group.jsonld
+ @type: "Group"
+ @container: "@set"
+ example: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items' + required: + - reg_record_type + - reg_records + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + SearchRequest: + type: object + description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditional expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. + properties: + transaction_id: + description: | + 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. + 2. transaction_id should be same across processing systems/service end points. + 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) + type: string + maxLength: 99 + example: XZFHYTY + search_request: + type: array + description: | + 1. Batch requests enable multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_type' + reg_record_type: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_record_type' + query_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + example: expression + response_entity: + type: string + description: | + Define the type of response to have when executing the search + enum: + - Group + - Member + query: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "idtype-value", "expression" + example: 'ns:org:QueryType:expression' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + collection: Group + query: + $and: + - poverty_score: + $lt: 5 + - location: + $eq: central_region + - group_size: + $lt: 5 + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + value: + allOf: + - description: Identifier Value of the subject. + - oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: object + example: '1980' + example: '12314567890' + - type: array + items: + type: object + properties: + seq_num: + description: Sequence number to help define precedence for evaluating a list of expression Predicates + type: number + example: 1 + expression1: + type: object + description: Expression + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryAttributes.jsonld
+ @type: "QueryAttributes"
+ + **Notes:** + 1. Query attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + operator: + type: string + description: Operator in an expression + enum: + - gt + - lt + - eq + - ge + - le + - in + example: eq + attribute_value: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1/properties/value/allOf/1' + required: + - attribute_name + - operator + - attribute_value + condition: + type: string + description: Condition in an expression + enum: + - and + - or + - not + example: and + expression2: + $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2/items/properties/expression1' + required: + - expression1 + sort: + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @type: "Attribute"
+ + **Notes:** + 1. Attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible attribute names. + 3. e.g: UIN, poverty_score, etc., + example: poverty_score + sort_order: + type: string + enum: + - asc + - desc + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + default: 1 + example: 5 + required: + - page_size + consent: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld"
+ @type: "Consent" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld' + '@type': Consent + ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on consent codes + authorize: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld
+ @type: "Authorize" + example: + '@context': 'https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld' + '@type': Authorize + ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + ref_uri: + type: string + format: uri + description: Uri to provide more info on authorize codes + required: + - query_type + - query + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - search_criteria + required: + - transaction_id + - search_request + SearchResponse: + type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + description: | + 1. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction. + 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) + type: string + maxLength: 99 + pattern: '^[a-zA-Z0-9-]+$' + example: ABC9876543210 + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' + reg_record_type: + type: string + description: | + @context: https://schema.spdci.org/extensions/social/v1/SRPerson.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "SRPerson" + example: SRPerson + reg_records: + description: | + The "Entity" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/social/v1/Group.jsonld
+ @type: "Group"
+ @container: "@set"
+ type: array + items: + type: object + description: | + 1. Attributes of a group to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/social/v1/Group.jsonld
+ @type: "@context"
+ example: + '@context': + spdci: 'https://schema.spdci.org/extensions/social/v1/' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + xsd: 'http://www.w3.org/2001/XMLSchema#' + owl: 'http://www.w3.org/2002/07/owl#' + common: 'https://schema.spdci.org/common/v1/' + '@id': 'https://example.org/group/001' + '@type': 'spdci:Group' + group_identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: G9876543210 + group_type: family + place: + '@type': Place + geo: + '@type': GeoCoordinates + latitude: '40.712776' + longitude: '-74.005974' + address: '123 Main St, Anytown, CountryName' + place_address: 1 + poverty_score: 45.2 + poverty_score_type: income-based + group_head_info: + '@type': 'spdci:Member' + '@id': 'https://example.org/member/987654321' + member_identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: M9876543210 + demographic_info: + '@type': SRPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + name: + '@type': Name + surname: Smith + given_name: Alice + prefix: Ms. + suffix: '' + sex: female + address: + '@type': Address + street_address: 123 Main St + city: Anytown + postal_code: '12345' + country: CountryName + birth_date: '1985-05-20T00:00:00Z' + registration_date: '2022-01-10T08:00:00Z' + is_disabled: false + marital_status: married + registration_date: '2022-01-10T08:00:00Z' + group_size: 4 + member_list: + - '@type': Member + '@id': 'https://example.org/member/987654321' + member_identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: M9876543210 + demographic_info: + '@type': SRPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + name: + '@type': Name + surname: Smith + given_name: Alice + prefix: Ms. + suffix: '' + sex: female + address: + '@type': Address + street_address: 123 Main St + city: Anytown + postal_code: '12345' + country: CountryName + birth_date: '1985-05-20T00:00:00Z' + registration_date: '2022-01-10T08:00:00Z' + is_disabled: false + marital_status: married + registration_date: '2022-01-10T08:00:00Z' + - '@type': Member + '@id': 'https://example.org/member/123456789' + member_identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: M9876543210 + demographic_info: + '@type': SRPerson + 'spdci:identifier': + - '@type': Identifier + identifier_type: NationalID + identifier_value: '1234567890' + name: + '@type': Name + surname: Smith + given_name: Bob + prefix: Mr. + suffix: '' + sex: male + address: + '@type': Address + street_address: 123 Main St + city: Anytown + postal_code: '12345' + country: CountryName + birth_date: '1982-03-15T00:00:00Z' + registration_date: '2022-01-10T08:00:00Z' + is_disabled: false + marital_status: married + registration_date: '2022-01-10T08:00:00Z' + - '@type': Member + '@id': 'https://example.org/member/987654322' + member_identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543210' + demographic_info: + '@type': SRPerson + ':identifier': + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543221' + name: + '@type': cName + surname: Smith + given_name: Charlie + prefix: '' + suffix: '' + sex: male + address: + '@type': Address + street_address: 123 Main St + city: Anytown + postal_code: '12345' + country: CountryName + birth_date: '2010-07-05T00:00:00Z' + registration_date: '2022-01-10T08:00:00Z' + is_disabled: false + marital_status: single + registration_date: '2022-01-10T08:00:00Z' + - '@type': Member + '@id': 'https://example.org/member/987654323' + member_identifier: M987654323 + demographic_info: + '@type': SRPerson + identifier: + - '@type': Identifier + identifier_type: NationalID + identifier_value: '9876543232' + name: + '@type': Name + surname: Smith + given_name: Daisy + prefix: '' + suffix: '' + sex: female + address: + '@type': Address + street_address: 123 Main St + city: Anytown + postal_code: '12345' + country: CountryName + birth_date: '2012-09-22T00:00:00Z' + sregistration_date: '2022-01-10T08:00:00Z' + is_disabled: false + marital_status: single + 'spdci:registration_date': '2022-01-10T08:00:00Z' + registration_date: '2022-01-10T08:00:00Z' + last_updated: '2023-06-15T10:00:00Z' + additional_attributes: + - services: receives_subsidy + required: + - reg_records + pagination: + description: 'Pagination definition, count starts with 1' + type: object + properties: + page_size: + type: number + format: int32 + example: 2000 + page_number: + type: number + format: int32 + example: 5 + total_count: + type: number + format: int32 + example: 24250 + required: + - page_size + - page_number + - total_count + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + SearchStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.search_criteria.invalid + - rjct.filter.invalid + - rjct.sort.invalid + - rjct.pagination.invalid + - rjct.search.too_many_records_found + SubscribeRequest: + type: object + description: Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' + reg_event_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' + frequency: + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + end_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency + filter_type: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + - graphql + example: expression + filter: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + anyOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: 'ns:org:QueryType:graphql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: | + query GetMemberByIdentifier { + member( + identifier: { + value: "1", + type: "uin" + } + ) { + member_identifier { + value + type + } + demographic_info { + name + gender + age + } + } + } + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/1' + - $ref: '#/paths/~1registry~1search/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/search_request/items/properties/search_criteria/properties/query/anyOf/2' + notify_record_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Member" + example: 'spdci-extensions-dci:Member' + authorize: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/authorize' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - subscribe_criteria + required: + - transaction_id + - subscribe_request + SubscribeResponse: + type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + subscriptions: + type: array + items: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/subscription_status/items/properties/status' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + reg_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/reg_type' + reg_event_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/reg_event_type' + frequency: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/frequency' + filter_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/filter_type' + filter: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/filter' + notify_record_type: + $ref: '#/components/schemas/SubscribeRequest/properties/subscribe_request/items/properties/subscribe_criteria/properties/notify_record_type' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - code + - status + - timestamp + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - subscribe_response + SubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.notify_types.invalid + - rjct.notify_details.invalid + - rjct.person_id.invalid + - rjct.event.already_subscribed + UnSubscribeRequest: + type: object + description: Un-Subscribe to registred subscriptions + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + subscription_codes: + type: array + items: + type: string + description: | + Unique code to identify the subscription request by the entity providing subscription service. + Helps to check status, unsubscribe etc., + maxLength: 99 + required: + - transaction_id + - timestamp + - subscription_codes + UnSubscribeResponse: + type: object + description: Un-Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + type: string + description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' + enum: + - rcvd + - pdng + - succ + - rjct + status_reason_code: + $ref: '#/components/schemas/UnSubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscription_status: + type: array + items: + type: object + properties: + code: + $ref: '#/components/schemas/UnSubscribeRequest/properties/subscription_codes/items' + status: + type: string + description: subscription status + enum: + - subscribe + - unsubscribe + required: + - code + - status + required: + - transaction_id + - correlation_id + - timestamp + - status + UnSubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.subscription_code.invalid + - rjct.requester.invalid + - rjct.event.already_unsubscribed + TxnStatusRequest: + type: object + description: Request to fetch txn status on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + txnstatus_request: + type: object + properties: + reference_id: + type: string + description: Unique reference_id set by txn initiating system for each request in a batch + example: SDFRTYUX + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - receipt + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + attribute_value: + anyOf: + - $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + - type: array + items: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + locale: + type: string + description: indicates language code. SPDCI Connect supports country codes as per ISO 639.3 standard + pattern: '^[a-z]{3,3}$' + example: eng + required: + - reference_id + - txn_type + - attribute_type + - attribute_value + required: + - transaction_id + - txnstatus_request + TxnStatusResponse: + type: object + description: txn status info on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + txnstatus_response: + type: object + properties: + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - receipt + txn_status: + anyOf: + - type: object + description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionable messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/RegistryType.jsonld
+ @type: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:IBR" + example: 'ns:org:RegistryType:IBR' + reg_record_type: + type: string + description: | + @context: https://schema.spdci.org/extensions/ibr/v1/Member.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "Member" + example: Member + reg_records: + description: | + The "Beneficiary" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+ example: + '@context': + '@vocab': 'https://schema.spdci.org/extensions/ibr/v1' + xsd: 'http://www.w3.org/2001/XMLSchema#' + schema: 'http://schema.org/' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + owl: 'http://www.w3.org/2002/07/owl#' + '@id': Beneficiary + '@type': Beneficiary + assistance_unit: '1' + member: + member_identifier: HS0205202401 + demographic_info: + person: + identifier_type: NID + identifier_value: '0205202401' + name: + first_name: Test + second_name: Test2 + surname: Test3 + sex: F + birth_date: 02.05.2004 + death_date: '' + address: '' + phone_number: '' + email: '' + relationship_head: '' + related_person: '' + is_disabled: '0' + disability_info: '' + marital_status: Single + employment_status: employed + occupation: Caregiver + income_level: '' + language_code: Eng + education_level: Highschool + additional_attributes: '' + registration_date: 02.05.2024 + last_update: '' + programme_identifier: + programme: + programme_identifier: DCI001 + programme_name: Test Programme + enrolment_date: 02.02.2024 + enrolment_status: Active + status_change_date: '' + benefits: + benefit_type: Cash + benefit_date: 02.05.2024 + benefit_value: USD 50 + benefit_frequency: Monthly + required: + - reg_records + pagination: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/pagination' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - search_response + - type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + receipt_information: + type: object + description: | + Receipt information contains receipt type and list of beneficiaries + 1) Enrolled beneficiaries - It return the beneficiaries enrolled into system. + 2) Updated beneficiaries - If return updated status + properties: + beneficiaries: + type: array + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 2. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+ items: + $ref: '#/paths/~1registry~1txn~1on-status/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/txnstatus_response/properties/txn_status/anyOf/0/properties/search_response/items/properties/data/properties/reg_records/items' + required: + - transaction_id + - receipt_information + required: + - txn_type + - txn_status + required: + - transaction_id + - correlation_id + - txnstatus_response + EncryptedMessage: + description: Encrypted payload + type: object + properties: + header: + type: object + properties: + alg: + type: string + description: The JWE algorithm used for encryption + enc: + type: string + description: The encryption algorithm used for encrypting the plaintext + kid: + type: string + description: The key identifier for the encryption key + required: + - alg + - enc + - kid + ciphertext: + type: string + description: This is the result of encrypting the plaintext using the CEK and the IV. It's Base64Url-encoded. + encrypted_key: + type: string + description: The base64-url encoded encrypted key + tag: + type: string + description: 'This is a Base64Url-encoded value that provides evidence of the integrity and authenticity of the ciphertext, Initialization Vector, and Additional Authenticated Data' + iv: + type: string + description: This is a Base64Url-encoded random bit string to be used as the Initialization Vector (IV) when encrypting the plaintext to produce the ciphertext. The size of the IV depends on the encryption algorithm used. + required: + - header + - ciphertext + - encrypted_key + - tag + - iv + Error: + description: | + Commumication layer Asyn errors that are returned as part of message acknowledgement. + 1. Messages that are not parsable or message integrity check fails. + 2. This object may be used across all transport layer protocols (https, sftp, messaging, etc,) to ack the receipt of a message. + 3. Business context and related validation is NOT in scope of this error object. + type: object + properties: + code: + type: string + description: Standard error code + enum: + - err.request.bad + - err.request.unauthorized + - err.request.forbidden + - err.request.not_found + - err.request.timeout + - err.version.not_supported + - err.request.too_many_requests + - err.sender_id.invalid + - err.sender_uri.invalid + - err.receiver_id.invalid + - err.signature.missing + - err.signature.invalid + - err.encryption.invalid + - err.service.unavailable + message: + type: string + description: message to describe above error code + maxLength: 999 + FileInfo: + type: object + description: File info. Used in file upload feature using HTTPS + properties: + action: + description: SPDCI Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + fileName: + description: Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record + type: string + format: binary + fileFormat: + description: 'File content format. e.g json, csv, etc.,' + type: string + default: json + example: csv + required: + - action + - fileName + MsgCallbackHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '789' + message_ts: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/MsgHeaderStatusReasonCode' + status_reason_message: + description: 'Status reascon code message, if any, Helps actionable messaging for system/end users' + type: string + maxLength: 999 + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + completed_count: + description: No of requests in completed state. Complete includes success and error requests due to functional errors + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: social.example.org + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: spmis.example.org + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/meta' + required: + - message_id + - message_ts + - action + - status + MsgHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaging protocol specification version being used + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: '123' + message_ts: + description: | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. + type: string + format: date-time + example: '2022-12-04T17:20:07-04:00' + action: + description: 'spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property.' + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: spmis.example.org + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: 'https://spmis.example.org/consumer-namespace/callback/on-search' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: social.example.org + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/Meta.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Additional meta info defined as per implementation context. + 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. + 3. The information SHOULD be privacy preserving + required: + - message_id + - message_ts + - action + - sender_id + - total_count + MsgHeaderStatusReasonCode: + type: string + description: Message header related common status reason codes + enum: + - rjct.version.invalid + - rjct.message_id.duplicate + - rjct.message_ts.invalid + - rjct.action.invalid + - rjct.action.not_supported + - rjct.total_count.invalid + - rjct.total_count.limit_exceeded + - rjct.errors.too_many + MsgSignature: + type: string + description: 'Signature of {header}+{message} body verified using sender''s signing public key' + example: 'Signature: namespace="spdci", kidId="{sender_id}|{unique_key_id}|{algorithm}", algorithm="ed25519", created="1606970629", expires="1607030629", headers="(created) (expires) digest", signature="Base64(signing content)' + responses: + HttpErrorResponse: + description: HTTP layer error details + content: + application/json: + schema: + type: object + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' + properties: + errors: + items: + type: object + properties: + code: + type: string + description: error code + message: + type: string + description: error message + Response: + description: Acknowledgement of message received after successful validation of message and signature + content: + application/json: + schema: + type: object + properties: + message: + type: object + properties: + ack_status: + type: string + description: | + 1. ACK: If the request is valid (for basic checks) and async callback (i.e webhook) will be invoked by reciever back to the sender. + 2. NACK: If the request is valid (for basic checks) and there is no futher updates from reciever back to the sender. + 3. ERR: If the reuqest is invalid and reciver can't process the request. error object holds error code, message. + enum: + - ACK + - NACK + - ERR + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + error: + $ref: '#/components/schemas/Error' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + required: + - ack_status + - timestamp + - correlation_id + securitySchemes: + Authorization: + type: http + scheme: bearer + bearerFormat: jwt + description: User/System authenticated access token; (jwt bearer) token returned from implementing system's authentication/token api end points. All systems must implement token api. diff --git a/src/README.md b/src/README.md index 24d494c..e4885a4 100644 --- a/src/README.md +++ b/src/README.md @@ -1,8 +1,8 @@ **IMPORTANT NOTES:** 1. Final release for consuming these APIs (yaml, html) are available in specs/release folder. -2. Contribute to G2P Connect specification or DCI standards APIs through pull requests in specs/src folder. +2. Contribute to SPDCI Connect specification or DCI standards APIs through pull requests in specs/src folder. 3. specs/release folder files are auto generated and it's NOT recommended to edit these directly. -4. specs/release filder API files are for final consumption by solution providers to make their services compatible with G2P Connect / DCI standards. +4. specs/release filder API files are for final consumption by solution providers to make their services compatible with SPDCI Connect / DCI standards. ### Reference Links 1. Build [Instructions](../build/build_instructions.md) diff --git a/src/authz/README.md b/src/authz/README.md deleted file mode 100644 index 9dd8ff3..0000000 --- a/src/authz/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## G2P Connect Authorization Specs - -### Wiki Pages -1. [Specifications](https://digital-convergence-initiative-d.gitbook.io/dci-standards-1/standards/1.-crvs) - -### Reference Links -1. [Build Instructions](../build_instructions.md) to edit and build swagger yaml files. \ No newline at end of file diff --git a/src/authz/authz_core_api_v1.0.0.yaml b/src/authz/authz_core_api_v1.0.0.yaml deleted file mode 100644 index a8624af..0000000 --- a/src/authz/authz_core_api_v1.0.0.yaml +++ /dev/null @@ -1,78 +0,0 @@ -openapi: 3.0.3 -info: - title: Interoperability APIs - Authz - description: Provide access_token to registered clients/services. Issue OAuth2 compliant authorization token. - version: 1.0.0 - contact: - name: G2P Connect - email: info@cdpi.dev - license: - name: CDPI CC BY-SA 4.0 - url: https://github.com/G2P-Connect/specs/blob/draft/LICENSE.md -externalDocs: - description: G2P Connect Authorization - url: https://g2pconnect.cdpi.dev/protocol/security/authorization -servers: - - url: "https://sandbox.spdci.org/namespace/v1.0.0" - description: Sandbox Server -paths: - /oauth2/client/token: - post: - summary: "AUTHZ-TOKN : /oauth2/client/token" - description: "
- Client integration notes:
- 1. This end point is in compliance with OAuth2 RFC 6749 to authenticate registered confidential clients with grant_type=client_credentials over HTTPS channel.
- 2. Clients MUST obtain client_id, client_secret as part of client registration.
- 2. Clients MUST ensure to secure sensitive information e.g, client_secret, access_token, etc.,
- 3. RFC 6749 section 4.4.3 recommends NO support for refresh access_token.
- 4. Successfully authenticated clients SHALL receive bearer type access_token.
- 5. Clients MUST set HTTP \"Authorization: Bearer \" in HTTP header to access any g2p compliant api end points.
- 6. Rest end points SHALL return http status 401 when access_token is invalid or expired.
" - operationId: post_oauth2_client_token - parameters: - - $ref: "#/components/parameters/accept-language" - - $ref: "#/components/parameters/timestamp" - - $ref: "#/components/parameters/message_id_hdr" - requestBody: - description: "" - required: true - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/OAuth2ClientTokenRequest" - responses: - '200': - description: "Acknowledgement of message received after successful validation of message and signature" - content: - application/json: - schema: - $ref: "#/components/schemas/OAuth2ClientTokenResponse" - '404': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" - security: - - Authorization: [ ] - deprecated: false -components: - schemas: - OAuth2ClientTokenRequest: - $ref: schema/core/OAuth2ClientTokenRequest.yaml - OAuth2ClientTokenResponse: - $ref: schema/core/OAuth2ClientTokenResponse.yaml - OidcScope: - $ref: schema/core/OidcScope.yaml - parameters: - accept-language: - $ref: "../common/parameter/accept-language.yaml" - timestamp: - $ref: "../common/parameter/timestamp.yaml" - message_id_hdr: - $ref: "../common/parameter/message_id_hdr.yaml" - responses: - HttpErrorResponse: - $ref: "../common/response/HttpErrorResponse.yaml" - securitySchemes: - Authorization: - $ref: "../common/security/Authorization.yaml" - \ No newline at end of file diff --git a/src/authz/schema/core/OAuth2ClientTokenRequest.yaml b/src/authz/schema/core/OAuth2ClientTokenRequest.yaml deleted file mode 100644 index b49209b..0000000 --- a/src/authz/schema/core/OAuth2ClientTokenRequest.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -properties: - grant_type: - type: string - description: "Value must be set to client_credentials" - example: "client_credentials" - client_id: - type: string - description: "The client identifier issued to the client during the registration process described by RFC 6749 Section 2.2." - example: "1001" - client_secret: - type: string - description: "client secret shared to clients as part of client registration process or regualar rotation of client_secret." - example: "7Fjfp0ZBr1KtDRbnfVdmIw" - scope: - $ref: "./OidcScope.yaml" -required: - - grant_type - - client_id - - client_secret -description: "Request entity to obtain access token using gant_type = client_credential" \ No newline at end of file diff --git a/src/authz/schema/core/OAuth2ClientTokenResponse.yaml b/src/authz/schema/core/OAuth2ClientTokenResponse.yaml deleted file mode 100644 index 41d464a..0000000 --- a/src/authz/schema/core/OAuth2ClientTokenResponse.yaml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -properties: - access_token: - description: "Clients to share access_token in x-api-token HTTP header." - type: string - example: "2YotnFZFEjr1zCsicMWpAA" - token_type: - description: "" - type: string - example: "bearer" - expires_in: - description: "The lifetime in seconds of the access token.
- 1. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated.
- 2. If omitted, the authorization server SHOULD provide the expiration time via other means or document the default value." - type: string - example: "36000" -required: - - access_token - - token_type -description: "" \ No newline at end of file diff --git a/src/authz/schema/core/OidcScope.yaml b/src/authz/schema/core/OidcScope.yaml deleted file mode 100644 index b352070..0000000 --- a/src/authz/schema/core/OidcScope.yaml +++ /dev/null @@ -1,31 +0,0 @@ -type: string -description: "OIDC complaint auth tokens issued by an authorization service for OAuth2, OIDC complaint clients.

- This is an indicative list:
- disburse, on-disburse, disburse/status, disburse/on-status, mapper/link, mapper/unlink, etc.," -items: - enum: - - "disburse.disburse" - - "disburse.on-disburse" - - "disburse.status" - - "disburse.on-status" - - "mapper.link" - - "mapper.unlink" - - "mapper.update" - - "mapper.on-update" - - "mapper.resolve" - - "mapper.on-resolve" - - "mapper.status" - - "mapper.on-status" - - "registry.search" - - "registry.on-search" - - "registry.subscribe" - - "registry.on-subscribe" - - "registry.notify" - - "" -example: - - "disburse/disburse" - - "disburse/on-disburse" - - "mapper/link" - - "mapper/on-link" - - "registry/search" - - "registry/on-search" \ No newline at end of file diff --git a/src/common/README.md b/src/common/README.md index b881790..ea03cbd 100644 --- a/src/common/README.md +++ b/src/common/README.md @@ -1 +1 @@ -This folder holds all G2P Connect common components used across vairous functional interfaces \ No newline at end of file +This folder holds all SPDCI Connect common components used across various functional interfaces \ No newline at end of file diff --git a/src/common/schema/@context.yaml b/src/common/schema/@context.yaml new file mode 100644 index 0000000..777701d --- /dev/null +++ b/src/common/schema/@context.yaml @@ -0,0 +1,16 @@ +type: object +description: JSON-LD Schema Context +properties: + "@context": + type: string + const: http://spdci.org/ + xsd: + type: string + const: http://www.w3.org/2001/XMLSchema# + schema: + type: string + const: http://schema.org/ +required: + - "@context" + - xsd + - schema diff --git a/src/common/schema/AttributeNameValue.yaml b/src/common/schema/AttributeNameValue.yaml index 734fe68..ad39393 100644 --- a/src/common/schema/AttributeNameValue.yaml +++ b/src/common/schema/AttributeNameValue.yaml @@ -4,7 +4,6 @@ properties: name: type: string description: | - @context: "https://example.org/schema/Attribute"
@type: "Attribute"
**Notes:** diff --git a/src/common/schema/Authorize.yaml b/src/common/schema/Authorize.yaml index 8178752..051ba7f 100644 --- a/src/common/schema/Authorize.yaml +++ b/src/common/schema/Authorize.yaml @@ -1,9 +1,9 @@ type: object description: | - @context: "https://example.org/schema/Authorize"
+ @context: https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld
@type: "Authorize" example: - "@context": "https://example.org/schema/Authorize" + "@context": "https://schema.spdci.org/common/v1/api-schemas/Authorize.jsonld" "@type": "Authorize" ts: $ref: ./DateTime.yaml @@ -13,7 +13,7 @@ example: code: type: string description: From a fixed set, documented at refUri - refUri: + ref_uri: type: string format: uri description: Uri to provide more info on authorize codes diff --git a/src/common/schema/Consent.yaml b/src/common/schema/Consent.yaml index e388cdd..c1dbc01 100644 --- a/src/common/schema/Consent.yaml +++ b/src/common/schema/Consent.yaml @@ -1,9 +1,9 @@ type: object description: | - @context: "https://example.org/schema/Consent"
+ @context: https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld"
@type: "Consent" example: - "@context": "https://example.org/schema/Consent" + "@context": "https://schema.spdci.org/common/v1/api-schemas/Consent.jsonld" "@type": "Consent" ts: $ref: ./DateTime.yaml @@ -13,7 +13,7 @@ example: code: type: string description: From a fixed set, documented at refUri - refUri: + ref_uri: type: string format: uri description: Uri to provide more info on consent codes \ No newline at end of file diff --git a/src/common/schema/CorrelationId.yaml b/src/common/schema/CorrelationId.yaml index b552ab4..483de50 100644 --- a/src/common/schema/CorrelationId.yaml +++ b/src/common/schema/CorrelationId.yaml @@ -3,4 +3,5 @@ description: | 2. correlation_id uniqueness is ensured by txn processing system (i.e receiver) type: string maxLength: 99 -example: "9876543210" \ No newline at end of file +pattern: '^[a-zA-Z0-9-]+$' +example: "ABC9876543210" \ No newline at end of file diff --git a/src/common/schema/DateTime.yaml b/src/common/schema/DateTime.yaml index edbff83..589e996 100644 --- a/src/common/schema/DateTime.yaml +++ b/src/common/schema/DateTime.yaml @@ -2,4 +2,4 @@ description: | 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. type: string format: date-time -example: '' \ No newline at end of file +example: '2022-12-04T17:20:07-04:00' \ No newline at end of file diff --git a/src/common/schema/ExpPredicate.yaml b/src/common/schema/ExpPredicate.yaml index cbc82a3..b69bfd8 100644 --- a/src/common/schema/ExpPredicate.yaml +++ b/src/common/schema/ExpPredicate.yaml @@ -4,7 +4,7 @@ properties: attribute_name: type: string description: | - @context: "https://example.org/schema/QueryAttributes"
+ @context: https://schema.spdci.org/common/v1/api-schemas/QueryAttributes.jsonld
@type: "QueryAttributes"
**Notes:** diff --git a/src/common/schema/ExpTemplate.yaml b/src/common/schema/ExpTemplate.yaml index 8c619c5..44f53f6 100644 --- a/src/common/schema/ExpTemplate.yaml +++ b/src/common/schema/ExpTemplate.yaml @@ -4,31 +4,40 @@ properties: type: type: string description: | - @context: "https://example.org/schema/QueryType"
- @type: "Queryype"
- + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ **Notes:** 1. Query types that helps decode query expressions - 2. Sample query type enums: "GraphQl", "Sql", "NoSql" - example: "ns:org:QueryType:GraphQl" + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: "ns:org:QueryType:graphql" + value: type: object description: | - @context: "https://example.org/schema/QueryExpression"
+ @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
@type: "QueryExpression"
**Notes:** 1. Query expression's syntax / format is determined based on query-type. 2. Query expression as a template with placeholder to pass conditional search parameters - example: - expression: " - query GeBirthRecordById: { - person: (UIN: \"1\") { - BRN, - name, - gender, - birthDate, - birthPlace, - parents + example: + expression: > + query GetMemberByIdentifier { + member( + identifier: { + value: "1", + type: "uin" + } + ) { + member_identifier { + value + type + } + demographic_info { + name + gender + age } - }" \ No newline at end of file + } + } diff --git a/src/common/schema/FileInfo.yaml b/src/common/schema/FileInfo.yaml index 933f180..e4fdc1f 100644 --- a/src/common/schema/FileInfo.yaml +++ b/src/common/schema/FileInfo.yaml @@ -2,7 +2,7 @@ type: object description: 'File info. Used in file upload feature using HTTPS' properties: action: - description: G2P Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + description: SPDCI Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. type: string fileName: description: "Disbursement instruction file representing Disburse or OnDisburse end point elements i.e signature/header/message entities as a file record" diff --git a/src/common/schema/Identifier.yaml b/src/common/schema/Identifier.yaml new file mode 100644 index 0000000..bb4a153 --- /dev/null +++ b/src/common/schema/Identifier.yaml @@ -0,0 +1,19 @@ +type: object +description: Identifier type and value object +properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/identifiertypevalue.jsonld
+ @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: "UIN" + value: + allOf: + - description: Identifier Value of the subject. + - $ref: AttributeValue.yaml + example: "12314567890" \ No newline at end of file diff --git a/src/common/schema/IdentifierType.yaml b/src/common/schema/IdentifierType.yaml index 9c3e3fe..40bc654 100644 --- a/src/common/schema/IdentifierType.yaml +++ b/src/common/schema/IdentifierType.yaml @@ -1,6 +1,6 @@ type: string description: | - @context: "https://example.org/schema/IdType"
+ @context: https://schema.spdci.org/common/v1/api-schemas/IdType.jsonld"
@type: "IdType"
**Notes:** diff --git a/src/common/schema/IdentifierTypeValue.yaml b/src/common/schema/IdentifierTypeValue.yaml index cf2d6b8..613ac0c 100644 --- a/src/common/schema/IdentifierTypeValue.yaml +++ b/src/common/schema/IdentifierTypeValue.yaml @@ -4,7 +4,6 @@ properties: type: type: string description: | - @context: "https://example.org/schema/IdType"
@type: "IdType"
**Notes:** diff --git a/src/common/schema/LanguageCode.yaml b/src/common/schema/LanguageCode.yaml index a2e043c..5ac1e0e 100644 --- a/src/common/schema/LanguageCode.yaml +++ b/src/common/schema/LanguageCode.yaml @@ -1,4 +1,4 @@ type: string -description: indicates language code. G2P Connect supports country codes as per ISO 639.3 standard +description: indicates language code. SPDCI Connect supports country codes as per ISO 639.3 standard pattern: '^[a-z]{3,3}$' -example: "en" \ No newline at end of file +example: "eng" \ No newline at end of file diff --git a/src/common/schema/LatLong.yaml b/src/common/schema/LatLong.yaml index 16d7342..5ba566f 100644 --- a/src/common/schema/LatLong.yaml +++ b/src/common/schema/LatLong.yaml @@ -5,4 +5,4 @@ properties: example: 11°24'12.2"N longitude: type: string - example: 88°50'26.5"E \ No newline at end of file + example: 88°50'26.5"E diff --git a/src/common/schema/Meta.yaml b/src/common/schema/Meta.yaml index 58a6687..620539a 100644 --- a/src/common/schema/Meta.yaml +++ b/src/common/schema/Meta.yaml @@ -1,6 +1,6 @@ type: object description: | - @context: "https://example.org/schema/Meta"
+ @context: https://schema.spdci.org/common/v1/api-schemas/Meta.jsonld
@type: "@context"
**Notes:** diff --git a/src/common/schema/MsgCallbackHeader_V1.0.0.yaml b/src/common/schema/MsgCallbackHeader_V1.0.0.yaml index 430d5b1..19b7a32 100644 --- a/src/common/schema/MsgCallbackHeader_V1.0.0.yaml +++ b/src/common/schema/MsgCallbackHeader_V1.0.0.yaml @@ -15,14 +15,14 @@ properties: message_ts: $ref: DateTime.yaml action: - description: G2P Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. type: string status: $ref: "./RequestStatus.yaml" status_reason_code: $ref: "./MsgHeaderStatusReasonCode.yaml" status_reason_message: - description: "Status reascon code message, if any, Helps actionanble messaging for system/end users" + description: "Status reascon code message, if any, Helps actionable messaging for system/end users" type: string maxLength: 999 total_count: diff --git a/src/common/schema/MsgHeader_V1.0.0.yaml b/src/common/schema/MsgHeader_V1.0.0.yaml index 5ba3adb..fe0090d 100644 --- a/src/common/schema/MsgHeader_V1.0.0.yaml +++ b/src/common/schema/MsgHeader_V1.0.0.yaml @@ -15,26 +15,26 @@ properties: message_ts: $ref: DateTime.yaml action: - description: G2P Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps identity payload type in message property. + description: spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property. type: string sender_id: description: | 1. sender_id registered with the receiving system or gateway. - 2. Used for authorization, encryption, digital sign verfication, etc., + 2. Used for authorization, encryption, digital sign verification, etc., type: string example: 'spp.example.org' sender_uri: description: | 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. - 2. Default uri is assumed to be configred on the gateway as part of sender/receiver onboarding. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. 3. For SFTP based communications, this shall be set to server/folder details. type: string format: uri - example: "https://spp.example.org/{namespace}/callback/on-search" + example: "https://spp.example.org/consumer-space/callback/on-search" receiver_id: - description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions. + description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions. type: string - example: 'pymts.example.org' + example: 'civilregistry.example.org' total_count: description: Total no of requests present in the message request type: integer diff --git a/src/common/schema/MsgSignature.yaml b/src/common/schema/MsgSignature.yaml index cb4e477..326fd58 100644 --- a/src/common/schema/MsgSignature.yaml +++ b/src/common/schema/MsgSignature.yaml @@ -1,7 +1,7 @@ type: string description: Signature of {header}+{message} body verified using sender's signing public key example: "Signature: - namespace=\"g2p\", + namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", diff --git a/src/common/schema/QueryType.yaml b/src/common/schema/QueryType.yaml index e59851d..cbe7097 100644 --- a/src/common/schema/QueryType.yaml +++ b/src/common/schema/QueryType.yaml @@ -2,5 +2,5 @@ type: string description: | 1. Query format allow multiple ways to search registry 2. Templatized query expressions with placeholder for conditional values -enum: ["idtype-value", "expression", "predicate" ] -example: "idtype-value" \ No newline at end of file +enum: ["idtype-value", "expression", "predicate","graphql" ] +example: "expression" \ No newline at end of file diff --git a/src/common/schema/ReferenceId.yaml b/src/common/schema/ReferenceId.yaml index 5ac4f2f..c468c8d 100644 --- a/src/common/schema/ReferenceId.yaml +++ b/src/common/schema/ReferenceId.yaml @@ -1,3 +1,3 @@ type: string description: "Unique reference_id set by txn initiating system for each request in a batch" -example: "12345678901234567890" \ No newline at end of file +example: "SDFRTYUX" \ No newline at end of file diff --git a/src/common/schema/ResponseEntity.yaml b/src/common/schema/ResponseEntity.yaml new file mode 100644 index 0000000..8ed0050 --- /dev/null +++ b/src/common/schema/ResponseEntity.yaml @@ -0,0 +1,6 @@ +type: string +description: | + Define the type of response to have when executing the search +enum: +- "Group" +- "Member" \ No newline at end of file diff --git a/src/common/schema/ResponseFields.yaml b/src/common/schema/ResponseFields.yaml new file mode 100644 index 0000000..050608d --- /dev/null +++ b/src/common/schema/ResponseFields.yaml @@ -0,0 +1,8 @@ +type: array +items: + type: string + description: Field from the response entity +examples: + - "Household.household_size" + - "Household.member_list" +description: Array of fields from the response entity \ No newline at end of file diff --git a/src/common/schema/SearchSort.yaml b/src/common/schema/SearchSort.yaml index 8faf062..3a0559b 100644 --- a/src/common/schema/SearchSort.yaml +++ b/src/common/schema/SearchSort.yaml @@ -4,14 +4,13 @@ properties: attribute_name: type: string description: | - @context: "https://example.org/schema/Attribute"
@type: "Attribute"
**Notes:** 1. Attribute names defined as per implementation context. 2. Usually a list of **enum** values of all possible attribute names. - 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., - example: "YOB" + 3. e.g: UIN, poverty_score, etc., + example: "poverty_score" sort_order: type: string enum: diff --git a/src/common/schema/TransactionId.yaml b/src/common/schema/TransactionId.yaml index e2b478b..0f7fb83 100644 --- a/src/common/schema/TransactionId.yaml +++ b/src/common/schema/TransactionId.yaml @@ -1,7 +1,7 @@ description: | 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. - 2. transaction_id should be samme across processing systems/service end points. + 2. transaction_id should be same across processing systems/service end points. 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) type: string maxLength: 99 -example: "0123456789" \ No newline at end of file +example: "XZFHYTY" \ No newline at end of file diff --git a/src/disburse/schema/DisburseRequest.yaml b/src/disburse/schema/DisburseRequest.yaml deleted file mode 100644 index 1bd9f86..0000000 --- a/src/disburse/schema/DisburseRequest.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: object -description: Disbursement request -properties: - transaction_id: - $ref: "../../common/schema/TransactionId.yaml" - disbursements: - type: array - items: - type: object - description: | - 1. Describes payment schema that enable transfer from payer to payee accounts. - 2. This entity supports immediate and scheduling one time payment request into future. - 3. Recurring payments is not part of the scope of this entity. - properties: - reference_id: - $ref: "../../common/schema/ReferenceId.yaml" - payer_fa: - $ref: "../../extensions/cdpi/FinancialAddress.yaml" - payee_fa: - $ref: "../../extensions/cdpi/FinancialAddress.yaml" - amount: - $ref: "../../common/schema/Amount.yaml" - scheduled_timestamp: - allOf: - - description: If not present then immediate disbursement else schedule as per scheduled date-time - - $ref: "../../common/schema/DateTime.yaml" - payer_name: - description: "Payer account name for easy reference. Usually each scheme may have a seperate holding account." - type: string - example: "Farmer draught relief scheme 2023" - payee_name: - description: "Payer name for easy reference. Usually beneficiary name as per scheme registration info" - type: string - example: "Joe John" - note: - description: "Note to payer/payee to reflect on statements" - type: string - maxLength: 99 - purpose: - $ref: "../../common/schema/Purpose.yaml" - instruction: - description: "Additional systems instruction for interfacing systems/platforms to integrate, reconcile" - type: string - maxLength: 999 - currency_code: - $ref: "../../common/schema/CurrencyCode.yaml" - locale: - $ref: "../../common/schema/LanguageCode.yaml" - required: - - reference_id - - payer_fa - - payee_fa - - amount -required: - - transaction_id - - disburemsents \ No newline at end of file diff --git a/src/disburse/schema/DisburseResponse.yaml b/src/disburse/schema/DisburseResponse.yaml deleted file mode 100644 index 0186e59..0000000 --- a/src/disburse/schema/DisburseResponse.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: object -description: Disburse response -properties: - transaction_id: - $ref: "../../common/schema/TransactionId.yaml" - disbursements_status: - type: array - items: - type: object - description: | - 1. G2P Disbursement response i.e status of each disburemsent request for reconciliation by sender system - properties: - reference_id: - $ref: "../../common/schema/ReferenceId.yaml" - timestamp: - description: "Disbursement response status datetime in RFC3339 format" - type: string - format: date-time - example: '2022-12-04T17:20:07-04:00' - status: - $ref: "../../common/schema/RequestStatus.yaml" - status_reason_code: - $ref: "./DisburseStatusReasonCode.yaml" - status_reason_message: - description: "Status reason code message. Helps actionanble messaging for systems/end users" - type: string - maxLength: 999 - instruction: - description: "Additional systems instruction for interfacing systems/platforms to integrate, reconcile" - type: string - maxLength: 999 - amount: - $ref: "../../common/schema/Amount.yaml" - payer_fa: - $ref: "../../extensions/cdpi/FinancialAddress.yaml" - payer_name: - description: "Payer account name for easy reference. Usually each scheme may have a seperate holding account." - type: string - example: "Farmer draught relief scheme 2023" - payee_fa: - $ref: "../../extensions/cdpi/FinancialAddress.yaml" - payee_name: - description: "Payer name for easy reference. Usually beneficiary name as per scheme registration info" - type: string - example: "Joe John" - currency_code: - $ref: "../../common/schema/CurrencyCode.yaml" - locale: - $ref: "../../common/schema/LanguageCode.yaml" - required: - - reference_id - - timestamp - - status -required: - - transaction_id - - disbursements_status \ No newline at end of file diff --git a/src/disburse/schema/DisburseStatusReasonCode.yaml b/src/disburse/schema/DisburseStatusReasonCode.yaml deleted file mode 100644 index 16c8c3e..0000000 --- a/src/disburse/schema/DisburseStatusReasonCode.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: string -description: Disbursement status reason codes -enum: - - "rjct.reference_id.invalid" - - "rjct.reference_id.duplicate" - - "rjct.timestamp.invalid" - - "rjct.payer_fa.invalid" - - "rjct.payee_fa.invalid" - - "rjct.amount.invalid" - - "rjct.schedule_ts.invalid" - - "rjct.currency_code.invalid" - - - - \ No newline at end of file diff --git a/src/disburse/schema/SearchRequest.yaml b/src/disburse/schema/SearchRequest.yaml deleted file mode 100644 index 10da737..0000000 --- a/src/disburse/schema/SearchRequest.yaml +++ /dev/null @@ -1,38 +0,0 @@ -type: object -description: Search disbursement requests -properties: - transaction_id: - $ref: "../../common/schema/TransactionId.yaml" - search_criteria: - type: array - items: - type: object - description: | - 1. Request to search disbursement using payer or payee fa - properties: - reference_id: - $ref: "../../common/schema/ReferenceId.yaml" - timestamp: - $ref: "../../common/schema/DateTime.yaml" - request_type: - type: string - enum: - - "disburse" - attribute_type: - type: string - enum: - - "payer_fa" - - "payee_fa" - attribute_value: - oneOf: - - $ref: "../../extensions/cdpi/FinancialAddress.yaml" - locale: - $ref: "../../common/schema/LanguageCode.yaml" - required: - - reference_id - - request_type - - attribute_type - - attribute_value -required: - - transaction_id - - search_criteria \ No newline at end of file diff --git a/src/disburse/schema/SearchStatusReasonCode.yaml b/src/disburse/schema/SearchStatusReasonCode.yaml deleted file mode 100644 index 1f28cca..0000000 --- a/src/disburse/schema/SearchStatusReasonCode.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: string -description: Disbursement search reason codes -enum: - - "rjct.reference_id.invalid" - - "rjct.reference_id.duplicate" - - "rjct.timestamp.invalid" - - "rjct.request_type.invalid" - - "rjct.attribute_type.invalid" - - "rjct.srch_transaction_id.invalid" - - "rjct.srch_transaction_id.not_found" - - "rjct_srch_reference_id.invalid" - - "rjct_srch_reference_id.not_found" - - "rjct.srch.too_many_records_found" - - "rjct.srch_payer_fa.invalid" - - "rjct.srch_payee_fa.invalid" - - "rjct.share_attributes.invalid" - \ No newline at end of file diff --git a/src/extensions/cdpi/FinancialAddress.yaml b/src/extensions/cdpi/FinancialAddress.yaml deleted file mode 100644 index 3e0330b..0000000 --- a/src/extensions/cdpi/FinancialAddress.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: string -description: | - 1. Financial address is case insensitive normative represenation of a store of value account represented as id-type:id@provider - 2. Every payer/payee financial address must resolve to an actual store of value account number for processing the payment instruction - 3. It is recommended the mapping between id and store of value account details to be held only at final store of value entity and intermediaries can hold - 3. Few examples:
- - token@id-provider e.g token:12345@national-id
- - uid@pymt-rail e.g uid:12345@national-id
- - vid@id-provider e.g vid:12345@national-id
- - mobile@mobile-provider e.g mobile:12345@mobile-pymt
- - account-id@bank-psp-code e.g account:12345@national-bank
- - account-no@ifsc-code.ifsc.pymt-rail e.g account:12345@abcd0000001.ifsc.pymt-rail
- - user-id@psp-code e.g. joeuser@national-bank
- - token@psp-code e.g token:123456@a123
- - code@purpose-code.voucher-provider e.g voucher:12345@food.coupon-network
-format: "^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$" -example: token:12345@gtbank \ No newline at end of file diff --git a/src/extensions/cdpi/FinancialAddressList.yaml b/src/extensions/cdpi/FinancialAddressList.yaml deleted file mode 100644 index dd4c461..0000000 --- a/src/extensions/cdpi/FinancialAddressList.yaml +++ /dev/null @@ -1,2 +0,0 @@ -items: - $ref: "./FinancialAddress.yaml" \ No newline at end of file diff --git a/src/extensions/cdpi/PersonId.yaml b/src/extensions/cdpi/PersonId.yaml deleted file mode 100644 index 44e4b14..0000000 --- a/src/extensions/cdpi/PersonId.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: string -description: | - 1. Person id is case insensitve normative represenation as id-type:id@provider
- 2. This will enumerate foundational and functioanl id's to easily resolvable addressess
- 3. This property is intended to unambiguously refer to an object, such as a person, beneficiary, user, etc.,
- 4. Few examples:
- - id@identifier-type.id-provider e.g token:12345@nid, vid:543215@nid
- - id@civil-registry.issuing-agency e.g id:12345@civil-reg, brn:12345@civil-reg, mrn:12345@civil-reg
- - id@functional-identifier.issuing-agency e.g id:12345@voter-id, id:12345@driving-license, mobile:12345@farmer-reg
- Note: id provider should be made configurable and solutions should adapt to the local jurisdiction and policies. -format: "^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$" -example: vid:54321@nid \ No newline at end of file diff --git a/src/extensions/crvs/Person.yaml b/src/extensions/crvs/Person.yaml new file mode 100644 index 0000000..940fae4 --- /dev/null +++ b/src/extensions/crvs/Person.yaml @@ -0,0 +1,121 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/crvs/v1/data/CRVSPerson.jsonld
+ @type: "@context"
+example: + { + "@context": { + "@vocab": "https://schema.spdci.org/core/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "CRVS_Person_3", + "@type": "CRVS_Person", + "identifier": [{ + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "197382465" + }], + "name": { + "@type": "Name", + "surname": "Martinez", + "given_name": "Elena", + "second_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "phone_number": ["+34612345678"], + "email": ["elena.martinez@example.com"], + "sex": "female", + "birth_date": "1980-03-23T10:20:15", + "birth_place": { + "name": "hospital/Madrid_Central", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5604, + "longitude": 100.0245 + }, + "address_line": "", + "contained_in_place": "", + "contains_place": [ + { + "@id": "Place_3", + "@type": "Place", + "name": "Pattaya Floating Market", + "address": "Bophut Koh Samui Surat Thani 84320 Thailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5617, + "longitude": 100.0259 + } + } + ] + }, + "death_date" : "", + "death_place" : "", + "address": { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + }, + "marital_status": "S", + "marriage_date": "", + "divorce_date": "", + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "537564821" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "564582793" + } + } diff --git a/src/extensions/dci/CRVSPerson.yaml b/src/extensions/dci/CRVSPerson.yaml deleted file mode 100644 index a4ebf79..0000000 --- a/src/extensions/dci/CRVSPerson.yaml +++ /dev/null @@ -1,72 +0,0 @@ -type: object -description: | - @context: "https://example.org/schema/CRVSPerson"
- @type: "Consent" -example: - "@context": "https://example.org/schema/CRVSPerson" - "@type": "CRVSPerson" - "@vocab": "https://spdci.org/" - "schema": "http://schema.org/" - "rdfs": "http://www.w3.org/2000/01/rdf-schema#" - "xsd": "http://www.w3.org/2001/XMLSchema#" - "CRVSPerson": - "@id": "https://spdci.org/CRVSPerson" - "@type": "rdfs:Class" - "@context": - "name": - "@id": "schema:name" - "@type": "xsd:string" - "givenName": - "@id": "schema:givenName" - "@type": "xsd:string" - "familyName": - "@id": "schema:familyName" - "@type": "xsd:string" - "additionalName": - "@id": "schema:additionalName" - "@type": "xsd:string" - "gender": - "@id": "schema:gender" - "@type": "xsd:string" - "birthDate": - "@id": "schema:birthDate" - "@type": "xsd:date" - "birthPlace": - "@id": "schema:birthPlace" - "@type": "schema:GeoCoordinates" - "deathDate": - "@id": "schema:deathDate" - "@type": "xsd:date" - "deathPlace": - "@id": "schema:deathPlace" - "@type": "schema:GeoCoordinates" - "maritalStatus": - "@id": "schema:maritalStatus" - "@type": "xsd:string" - "honorificPrefix": - "@id": "schema:honorificPrefix" - "@type": "xsd:string" - "honorificSuffix": - "@id": "schema:honorificSuffix" - "@type": "xsd:string" - "emails": - "@container": "@set" - "@id": "schema:email" - "@type": "xsd:string" - "telephones": - "@container": "@set" - "@id": "schema:telephone" - "@type": "xsd:string" - "address": - "@id": "schema:address" - "@type": "schema:GeoCoordinates" - "marriageDate": - "@id": "https://spdci.org/marriageDate" - "@type": "xsd:date" - "divorceDate": - "@id": "https://spdci.org/divorceDate" - "@type": "xsd:date" - "parents": - "@id": "schema:parents" - "@type": "https://spdci.org/CRVSPerson" - "@id": "https://spdci.org/CRVSPerson" \ No newline at end of file diff --git a/src/extensions/dci/Member.yaml b/src/extensions/dci/Member.yaml new file mode 100644 index 0000000..2d26a0e --- /dev/null +++ b/src/extensions/dci/Member.yaml @@ -0,0 +1,71 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+example: + { + "@context": { + "spdci": "https://schema.spdci.org/core/v1/data", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "owl": "http://www.w3.org/2002/07/owl#", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/sr_person/847951632", + "@type": "spdci:member", + "member_identifier": [{ + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "42343545654" + } ], + "demographic_info": { + "@type": "SRPerson", + "identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "9876543210" + } ], + "name":{ + "@type": "Name", + "surname": "Smith", + "given_name": "Alice", + "prefix": "Ms.", + "suffix": "" + }, + "sex": "female", + "birth_date": "1985-05-20" + }, + "related_person": [ + { + "@type": "RelatedPerson", + "relationship_type": "spouse", + "related_member": { + "@type": "Member", + "@id": "https://example.org/member/123456789", + "member_identifier": "M123456789" + } + }, + { + "@type": "RelatedPerson", + "relationship_type": "child", + "related_member": { + "@type": "Member", + "@id": "https://example.org/member/987654322", + "spdci:member_identifier": "M987654322" + } + } + ], + "is_disabled": false, + "marital_status": "married", + "employment_status": "employed", + "occupation": "teacher", + "income_level": "middle", + "language_code": ["en", "es"], + "education_level": "bachelor", + "additional_attributes": ["extra_work": "volunteer"], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" +} diff --git a/src/extensions/dci/Person.yaml b/src/extensions/dci/Person.yaml new file mode 100644 index 0000000..f44e756 --- /dev/null +++ b/src/extensions/dci/Person.yaml @@ -0,0 +1,118 @@ +type: object +description: | + @context: "https://schema.spdci.org/extensions/crvs/v1/CRVSPerson.jsonld"
+ @type: "Consent" +example: + { + "@context": { + "@vocab": "https://schema.spdci.org/common/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "CRVS_Person_3", + "@type": "CRVS_Person", + "identifier": [{ + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "197382465" + }], + "name": { + "@type": "Name", + "surname": "Martinez", + "given_name": "Elena", + "second_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "phone_number": ["+34612345678"], + "email": ["elena.martinez@example.com"], + "sex": "female", + "birth_date": "1980-03-23T10:20:15", + "birth_place": { + "name": "hospital/Madrid_Central", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5604, + "longitude": 100.0245 + }, + "address_line": "", + "contained_in_place": "", + "contains_place": [ + { + "@id": "Place_3", + "@type": "Place", + "name": "Pattaya Floating Market", + "address": "Bophut Koh Samui Surat Thani 84320 Thailand", + "geo": { + "@type": "GeoCoordinates", + "latitude": 9.5617, + "longitude": 100.0259 + } + } + ] + }, + "death_date" : "", + "death_place" : "", + "address": { + "@id": "Address_1", + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + "geo_location": { + "@id": "GeoLocation_1", + "@type": "GeoLocation", + "plus_code": { + "global_code": "8FW4V900+", + "geometry": { + "@id": "geometry", + "@type": "GeoLocation", + "bounds": { + "@id": "bounds", + "@type": "geometry", + "northeast": { + "@id": "northeast", + "@type": "GeoCoordinates", + "latitude": 48.900000000000006, + "longitude": 2.4000000000000057 + }, + "southwest": { + "@id": "southwest", + "@type": "GeoCoordinates", + "latitude": 48.849999999999994, + "longitude": 2.3499999999999943 + } + }, + "location": { + "@id": "location", + "@type": "GeoCoordinates", + "latitude": 48.875, + "longitude": 2.375 + } + } + } + } + }, + "marital_status": "S", + "marriage_date": "", + "divorce_date": "", + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "537564821" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "564582793" + } + } \ No newline at end of file diff --git a/src/extensions/dr/DisabilityInfo.yaml b/src/extensions/dr/DisabilityInfo.yaml new file mode 100644 index 0000000..f482724 --- /dev/null +++ b/src/extensions/dr/DisabilityInfo.yaml @@ -0,0 +1,20 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + + + @context: https://schema.spdci.org/extensions/dr/v1/DisabledPerson.jsonld
+ @type: "@context"
+example: + { + + "disability_details": [ + { + "impairment_type": "Physical and movement related functions", + "impairment_level": "Severe impairment or difficulty", + "impairment_cause": "Work Accident", + "age_on_set": "Working age" + } + ] + + } \ No newline at end of file diff --git a/src/extensions/dr/DisabilitySupport.yaml b/src/extensions/dr/DisabilitySupport.yaml new file mode 100644 index 0000000..4c1a54e --- /dev/null +++ b/src/extensions/dr/DisabilitySupport.yaml @@ -0,0 +1,71 @@ +type: object +description: | + Disability support info for a member. +properties: + disabilities: + type: array + description: | + List of a member disability info related to the person we are searching for. + @context: https://schema.spdci.org/extensions/dr/v1/DRPerson.jsonld
+ @type: "@context"
+ items: + type: object + properties: + human_assistance: + type: object + properties: + type: + type: string + frequency: + type: string + support_status: + type: string + caregiver: + type: object + properties: + id: { type: string } + name: { type: string } + identifier: { type: string } + relationship: { type: string } + registration_date: + type: string + format: date-time + last_updated: + type: string + format: date-time + assistive_technology: + type: array + items: {} + housing_support: + type: array + items: {} + medical_care: + type: array + items: {} + animal_assistance: + type: array + items: {} + registration_date: + type: string + format: date-time + last_updated: + type: string + format: date-time + example: + - human_assistance: + type: mobility + frequency: Daily + support_status: Needed + caregiver: + id: Person_001 + name: John Doe + identifier: "12345" + relationship: Parent + registration_date: 2024-01-15T10:00:00Z + last_updated: 2024-09-20T12:30:00Z + assistive_technology: [] + housing_support: [] + medical_care: [] + animal_assistance: [] + registration_date: 2023-05-20T09:00:00Z + last_updated: 2024-10-01T11:15:00Z diff --git a/src/extensions/dr/DisabledCriteria.yaml b/src/extensions/dr/DisabledCriteria.yaml new file mode 100644 index 0000000..a97a8d9 --- /dev/null +++ b/src/extensions/dr/DisabledCriteria.yaml @@ -0,0 +1,13 @@ +type: object +description: Disabled query +properties: + query_type: + allOf: + - $ref: ../../common/schema/QueryType.yaml + - description: "Type of query" + query: + type: object + description: "Query expression for the disabled query" + example: + member.member_identifier: + eq: "ABC451123" diff --git a/src/extensions/dr/DisabledPerson.yaml b/src/extensions/dr/DisabledPerson.yaml new file mode 100644 index 0000000..09cb97d --- /dev/null +++ b/src/extensions/dr/DisabledPerson.yaml @@ -0,0 +1,49 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + + + @context: https://schema.spdci.org/extensions/dr/v1/DRPerson.jsonld
+ @type: "@context"
+example: + { + "personal_details": { + "identifier": "123456", + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15", + "gender": "Male" + }, + "disability_status": "Approved", + "disability_level": "Severe", + "disability_details": [ + { + "impairment_type": "Physical and movement related functions", + "impairment_level": "Severe impairment or difficulty", + "impairment_cause": "Work Accident", + "age_on_set": "Working age" + } + ], + "disability_support": [ + { + "human_assistance":{ + "frequency": "Permanent", + "type": "mobility", + "support_status": "Required" + } + }, + ], + "transport_requirement": "Adaptable vehical", + "housing_type": "Social housing", + "programs_enrollments":[ + { + "programme_name" : "financial_assistance", + "programme_identifier": "AD234" + } + ], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + + } \ No newline at end of file diff --git a/src/extensions/ess/EnrolledCriteria.yaml b/src/extensions/ess/EnrolledCriteria.yaml new file mode 100644 index 0000000..7fc84d8 --- /dev/null +++ b/src/extensions/ess/EnrolledCriteria.yaml @@ -0,0 +1,16 @@ +type: object +description: | + Enrolled query +properties: + query_type: + $ref: ../../common/schema/QueryType.yaml + response_entity: + $ref: ../../common/schema/ResponseEntity.yaml + example: "Member" + query: + type: object + description: "Query expression for the enrolled query" + example: + { + "person_identifier": { "eq": "ABC451123" } + } \ No newline at end of file diff --git a/src/extensions/ess/Member.yaml b/src/extensions/ess/Member.yaml new file mode 100644 index 0000000..b1fa7bf --- /dev/null +++ b/src/extensions/ess/Member.yaml @@ -0,0 +1,71 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+example: + { + "@context": { + "spdci": "https://schema.spdci.org/core/v1/data", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "owl": "http://www.w3.org/2002/07/owl#", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/ess_person/847951632", + "@type": "spdci:member", + "member_identifier": [{ + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "42343545654" + } ], + "demographic_info": { + "@type": "ESSPerson", + "identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "9876543210" + } ], + "name":{ + "@type": "Name", + "surname": "Smith", + "given_name": "Alice", + "prefix": "Ms.", + "suffix": "" + }, + "sex": "female", + "birth_date": "1985-05-20" + }, + "related_person": [ + { + "@type": "RelatedPerson", + "relationship_type": "spouse", + "related_member": { + "@type": "Member", + "@id": "https://example.org/member/123456789", + "member_identifier": "M123456789" + } + }, + { + "@type": "RelatedPerson", + "relationship_type": "child", + "related_member": { + "@type": "Member", + "@id": "https://example.org/member/987654322", + "spdci:member_identifier": "M987654322" + } + } + ], + "is_disabled": false, + "marital_status": "married", + "employment_status": "employed", + "occupation": "teacher", + "income_level": "middle", + "language_code": ["en", "es"], + "education_level": "bachelor", + "additional_attributes": ["extra_work": "volunteer"], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" +} diff --git a/src/extensions/ess/ReceiptInformation.yaml b/src/extensions/ess/ReceiptInformation.yaml new file mode 100644 index 0000000..4a8e56d --- /dev/null +++ b/src/extensions/ess/ReceiptInformation.yaml @@ -0,0 +1,15 @@ +type: object +description: | + Receipt information contains receipt type and list of beneficiaries + 1) Enrolled beneficiaries - It return the beneficiaries enrolled into system. + 2) Updated beneficiaries - If return updated status +properties: + beneficiaries: + type: array + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 2. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + @context: https://schema.spdci.org/extensions/ess/v1/Member.jsonld
+ @type: "@context"
+ items: + $ref: Member.yaml \ No newline at end of file diff --git a/src/extensions/fr/FRPerson.yaml b/src/extensions/fr/FRPerson.yaml new file mode 100644 index 0000000..0369d2b --- /dev/null +++ b/src/extensions/fr/FRPerson.yaml @@ -0,0 +1,145 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + + + @context: https://schema.spdci.org/extensions/gr/v1/FRPerspn.jsonld
+ @type: "@context"
+example: + { + "famer_personal_details": { + "member_identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "demographic_info": { + "identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15T00:00:00Z", + "gender": "Male" + } + }, + "family_details": { + "group_identifier": [ + { + "identifier_type": "NationalID", + "identifier_value": "G9876543210" + } + ], + "group_type": "family", + "poverty_score": 45.2, + "poverty_score_type": "income-based", + "group_head_info": { + "member_identifier": [ + { + "identifier_type": "NationalID", + "identifier_value": "M123456" + } + ], + "demographic_info": { + "identifier": { + "identifier_type": "NationalID", + "identifier_value": "M123456" + }, + "name": { + "first_name": "John", + "last_name": "Doe" + }, + "date_of_birth": "1990-05-15T00:00:00Z", + "gender": "Male" + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "1990-06-10T08:00:00Z" + }, + "group_size": 2, + "member_list": [ + { + "member_identifier": [ + { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "M9876543210" + } + ], + "demographic_info": { + "spdci:identifier": [ + { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "1234567890" + } + ], + "name": { + "@type": "Name", + "surname": "Doe", + "given_name": "Jane", + "prefix": "Mr.", + "suffix": "" + }, + "sex": "female", + "birth_date": "1982-03-15T00:00:00Z", + "registration_date": "2022-01-10T08:00:00Z" + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "2022-01-10T08:00:00Z" + } + ], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }, + "farm_details":[{ + "place":{ + "name": "Koh Samui", + "geo": { + "@type": "spdci:GeoLocation", + "latitude": 9.5604, + "longitude": 100.0245 + } + }, + "farm_type":"Small subsistence-oriented farms", + "farming_activities":[{ + "crop_production": [{ + "activity_group":"perennial crops", + "crop_type":"Fruit and nuts", + "variety":"local", + "season":"winter", + "end_use":["Food for human consumption"], + "irrigation":true, + "irrigation_water":["Mixed surface water and groundwater"], + "fertilizer_type":["Organic fertilizers"], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + }], + "animal_production":[{ + "type":"Sheep and goats", + "count":10, + "livestock_system":"Mixed system", + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + }], + "mixed_farming":true, + "agri_support_activities":["Support activities for crop production"], + "aqua_support_activities":"Support activities for fishing and aquaculture", + "aqua_culture":["Marine aquafarming"], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + }] + }], + "machineries_details": [{ + "type": "Machine powered equipment", + "count": 2, + "equipement_source": "Provided by a cooperative", + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" + }], + "registration_date": "2023-01-10T00:00:00Z", + "last_updated": "2023-09-20T00:00:00Z" + } \ No newline at end of file diff --git a/src/extensions/google/GooglePlusCode.yaml b/src/extensions/google/GooglePlusCode.yaml deleted file mode 100644 index 4419524..0000000 --- a/src/extensions/google/GooglePlusCode.yaml +++ /dev/null @@ -1,18 +0,0 @@ -type: object -description: Refer [Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) for more details -properties: - global_code: - type: string - example: '' - geometry: - type: object - properties: - bounds: - type: object - properties: - northeast: - $ref: ../../common/schema/LatLong.yaml - southwest: - $ref: ../../common/schema/LatLong.yaml - location: - $ref: ../../common/schema/LatLong.yaml \ No newline at end of file diff --git a/src/extensions/ibr/Beneficiary.yaml b/src/extensions/ibr/Beneficiary.yaml new file mode 100644 index 0000000..9398a53 --- /dev/null +++ b/src/extensions/ibr/Beneficiary.yaml @@ -0,0 +1,69 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+example: + { + "@context": { + "@vocab": "https://schema.spdci.org/extensions/ibr/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Beneficiary", + "@type": "Beneficiary", + "assistance_unit": "1", + "member": { + "member_identifier": "HS0205202401", + "demographic_info": { + "person": { + "identifier_type": "NID", + "identifier_value": "0205202401", + "name": { + "first_name": "Test", + "second_name": "Test2", + "surname": "Test3" + }, + "sex": "F", + "birth_date": "02.05.2004", + "death_date": "", + "address": "", + "phone_number": "", + "email": "" + } + }, + "relationship_head": "", + "related_person": "", + "is_disabled": "0", + "disability_info": "", + "marital_status": "Single", + "employment_status": "employed", + "occupation": "Caregiver", + "income_level": "", + "language_code": "Eng", + "education_level": "Highschool", + "additional_attributes": "", + "registration_date": "02.05.2024", + "last_update": "", + "programme_identifier": { + "programme": { + "programme_identifier": "DCI001", + "programme_name": "Test Programme" + }, + "enrolment_date": "02.02.2024", + "enrolment_status": "Active", + "status_change_date": "", + "benefits": { + "benefit_type": "Cash", + "benefit_date": "02.05.2024", + "benefit_value": "USD 50", + "benefit_frequency": "Monthly" + } + } + } + } + diff --git a/src/extensions/ibr/Benefit.yaml b/src/extensions/ibr/Benefit.yaml new file mode 100644 index 0000000..2fa918f --- /dev/null +++ b/src/extensions/ibr/Benefit.yaml @@ -0,0 +1,6 @@ +type: object +description: | + The Benefit object provide information about benefits + + @context: https://schema.spdci.org/extensions/ibr/v1/Benefit.jsonld
+ @type: "@context"
\ No newline at end of file diff --git a/src/extensions/ibr/BenefitType.yaml b/src/extensions/ibr/BenefitType.yaml new file mode 100644 index 0000000..ca0f2e9 --- /dev/null +++ b/src/extensions/ibr/BenefitType.yaml @@ -0,0 +1,12 @@ +type: string +description: | + The type of benefit provided by a program + 1 : Cash
+ 2 : Voucher
+ 3 : In-kind
+ 4 : Training
+ 5 : Work opportunity
+ 6 : Insurance + + @context: https://schema.spdci.org/extensions/ibr/v1/BenefitTypeEnum.jsonld
+ @type: "@context"
\ No newline at end of file diff --git a/src/extensions/ibr/DisburshmentInfo.yaml b/src/extensions/ibr/DisburshmentInfo.yaml new file mode 100644 index 0000000..775004b --- /dev/null +++ b/src/extensions/ibr/DisburshmentInfo.yaml @@ -0,0 +1,6 @@ +type: object +description: | + The payment information contains details about payment related fields + + @context: https://schema.spdci.org/extensions/ibr/v1/DisbursementInfo.jsonld
+ @type: "@context"
\ No newline at end of file diff --git a/src/extensions/ibr/EnrolledCriteria.yaml b/src/extensions/ibr/EnrolledCriteria.yaml new file mode 100644 index 0000000..e86d193 --- /dev/null +++ b/src/extensions/ibr/EnrolledCriteria.yaml @@ -0,0 +1,20 @@ +type: object +description: | + Enrolled query +properties: + query_type: + $ref: ../../common/schema/QueryType.yaml + description: "" + response_entity: + $ref: ../../common/schema/ResponseEntity.yaml + example: "Beneficiary" + query: + type: object + description: "Query expression for the enrolled query" + example: + { + "person_identifier": { "eq": "ABC451123" }, + "programme_identifier.program.programme_identifier":{"eq":"DCI001"} + + + } \ No newline at end of file diff --git a/src/extensions/ibr/EnrollmentStatus.yaml b/src/extensions/ibr/EnrollmentStatus.yaml new file mode 100644 index 0000000..f9c3e1f --- /dev/null +++ b/src/extensions/ibr/EnrollmentStatus.yaml @@ -0,0 +1,11 @@ +type: string +description: | + The beneficiaries status with a specific program + + 1 : Active
+ 2 : Deceased
+ 3 : Graduated
+ 4 : Suspended
+ + @context: https://schema.spdci.org/extensions/ibr/v1/EnrollmentStatusEnum.jsonld
+ @type: "@context"
\ No newline at end of file diff --git a/src/extensions/ibr/GroupType.yaml b/src/extensions/ibr/GroupType.yaml new file mode 100644 index 0000000..275cb69 --- /dev/null +++ b/src/extensions/ibr/GroupType.yaml @@ -0,0 +1,10 @@ +type: string +description: | + The type of grouping to which a beneficiary belongs. + + 1 : Household
+ 2 : Family
+ 3 : Group
+ + @context: https://schema.spdci.org/extensions/ibr/v1/GroupTypeEnum.jsonld
+ @type: "@context"
\ No newline at end of file diff --git a/src/extensions/ibr/IdentifierType.yaml b/src/extensions/ibr/IdentifierType.yaml new file mode 100644 index 0000000..ebc150a --- /dev/null +++ b/src/extensions/ibr/IdentifierType.yaml @@ -0,0 +1,8 @@ +type: string +description: | + An identifier type includes unique numbers legally assigned to individuals.
+ Reference: [Types of ID](https://id4d.worldbank.org/guide/types-id-systems) + UIN : Unique Identification Number
+ + @context: https://schema.spdci.org/extensions/ibr/v1/IdentifierTypeEnum.jsonld
+ @type: "@context"
\ No newline at end of file diff --git a/src/extensions/ibr/IdentifierTypeValue.yaml b/src/extensions/ibr/IdentifierTypeValue.yaml new file mode 100644 index 0000000..32e3b5a --- /dev/null +++ b/src/extensions/ibr/IdentifierTypeValue.yaml @@ -0,0 +1,7 @@ +type: object +properties: + identifier_type: + $ref: IdentifierType.yaml + identifier_value: + type: string + description: Value of the identifier diff --git a/src/extensions/ibr/Member.yaml b/src/extensions/ibr/Member.yaml new file mode 100644 index 0000000..2d26a0e --- /dev/null +++ b/src/extensions/ibr/Member.yaml @@ -0,0 +1,71 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "@context"
+example: + { + "@context": { + "spdci": "https://schema.spdci.org/core/v1/data", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "owl": "http://www.w3.org/2002/07/owl#", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/sr_person/847951632", + "@type": "spdci:member", + "member_identifier": [{ + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "42343545654" + } ], + "demographic_info": { + "@type": "SRPerson", + "identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "9876543210" + } ], + "name":{ + "@type": "Name", + "surname": "Smith", + "given_name": "Alice", + "prefix": "Ms.", + "suffix": "" + }, + "sex": "female", + "birth_date": "1985-05-20" + }, + "related_person": [ + { + "@type": "RelatedPerson", + "relationship_type": "spouse", + "related_member": { + "@type": "Member", + "@id": "https://example.org/member/123456789", + "member_identifier": "M123456789" + } + }, + { + "@type": "RelatedPerson", + "relationship_type": "child", + "related_member": { + "@type": "Member", + "@id": "https://example.org/member/987654322", + "spdci:member_identifier": "M987654322" + } + } + ], + "is_disabled": false, + "marital_status": "married", + "employment_status": "employed", + "occupation": "teacher", + "income_level": "middle", + "language_code": ["en", "es"], + "education_level": "bachelor", + "additional_attributes": ["extra_work": "volunteer"], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z" +} diff --git a/src/extensions/ibr/PaymentStatus.yaml b/src/extensions/ibr/PaymentStatus.yaml new file mode 100644 index 0000000..e1ee88e --- /dev/null +++ b/src/extensions/ibr/PaymentStatus.yaml @@ -0,0 +1,9 @@ +type: string +description: | + The status of a payment made to a beneficiary + + 1 : Succesful
+ 2 : Not succesful
+ + @context: https://schema.spdci.org/extensions/ibr/v1/PaymentStatusEnum.jsonld
+ @type: "@context"
\ No newline at end of file diff --git a/src/extensions/ibr/Person.yaml b/src/extensions/ibr/Person.yaml new file mode 100644 index 0000000..57f9cb0 --- /dev/null +++ b/src/extensions/ibr/Person.yaml @@ -0,0 +1,58 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/ibr/v1/Person.jsonld
+ @type: "@context"
+example: + { + "@context": { + "@vocab": "https://schema.spdci.org/extensions/ibr/v1", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "schema": "http://schema.org/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#" + }, + "@id": "Person", + "@type": "Person", + "identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + }, + "name": { + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "second_name": "", + "prefix": "Dr.", + "suffix": "PhD" + }, + "household_status": "", + "benefiting_entity": "Person", + "sex": "female", + "birth_date": "1995-09-21T11:20:00", + "sub_region_code": "", + "marital_status": "M", + "poverty_score": "", + "is_disabled": 2, + "household_identifier": "", + "programme_name": "", + "programme_identifier": "", + "registration_date": "2022-09-21T11:20:00", + "enrolment_date": "2022-10-21T11:20:00", + "suspension_date": "2023-09-21T11:20:00", + "graduation_date": "2022-09-21T11:20:00", + "enrolment_status": "3", + "benefit_type": "2", + "benefit_date": "", + "benefit_value": "", + "payroll_date": "", + "payroll_amount": "", + "payment_credit_date": "", + "payment_credit_amount": "", + "payment_charges": "", + "payment_status": "1" +} diff --git a/src/extensions/ibr/Programme.yaml b/src/extensions/ibr/Programme.yaml new file mode 100644 index 0000000..e7c574d --- /dev/null +++ b/src/extensions/ibr/Programme.yaml @@ -0,0 +1,7 @@ +type: object +description: | + 1. + 2. + + @context: https://schema.spdci.org/extensions/ibr/v1/Programme.jsonld
+ @type: "@context"
\ No newline at end of file diff --git a/src/extensions/ibr/ReceiptInformation.yaml b/src/extensions/ibr/ReceiptInformation.yaml new file mode 100644 index 0000000..ff9a94b --- /dev/null +++ b/src/extensions/ibr/ReceiptInformation.yaml @@ -0,0 +1,15 @@ +type: object +description: | + Receipt information contains receipt type and list of beneficiaries + 1) Enrolled beneficiaries - It return the beneficiaries enrolled into system. + 2) Updated beneficiaries - If return updated status +properties: + beneficiaries: + type: array + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 2. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+ items: + $ref: Beneficiary.yaml \ No newline at end of file diff --git a/src/extensions/mosip/EventType.yaml b/src/extensions/mosip/EventType.yaml deleted file mode 100644 index a95dfe8..0000000 --- a/src/extensions/mosip/EventType.yaml +++ /dev/null @@ -1,22 +0,0 @@ -type: string -description: | - Standardized codes/values represent key events to [integrate](https://docs.mosip.io/1.2.0/integrations/mosip-opencrvs-integration#scope) with civil registries.

- **Sample flow to explain birth registration between MOSIP and CRVS systems:** - 1. Step 1: MOSIP subscribes to BIRTH_REGISTERED event with CRVS for RegistrationRecord - 2. Step 2: CRVS subscribes to BIRTH_REGISTERED event with MOSIP for MOSIPVerifiableCredential - 3. Step 3: CRVS notifies RegistrationRecord data to MOSIP - 4. Step 4: MOSIP notifies MOSIPVerifiableCredential data to CRVS
- - **Sample flow to explain data modification (push) flow from MOSIP to CRVS systems:** - 1. Step 1: CRVS subscribes to DATA_MODIFICATION event with MOSIP for MOSIPToken data - 2. Step 2: MOSIP notifies MOSIPToken data to CRVS
- - **Note:** - 1. Data modifiation (pull) flow can be accomodated with sync/search or existing mosip's eKyc auth api. - 2. Death, Death Reversal fllows same pattern as described in for birth registration. - -enum: - - "BIRTH_REGISTERED" - - "DEATH_REGISTERED" - - "DEATH_REVERSAL" - - "DATA_MODIFICATION" \ No newline at end of file diff --git a/src/extensions/mosip/LangaugeValue.yaml b/src/extensions/mosip/LangaugeValue.yaml deleted file mode 100644 index 3f278d4..0000000 --- a/src/extensions/mosip/LangaugeValue.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: object -description: multi language value object -properties: - langugage: - type: string - example: "eng" - value: - type: string - example: "value" \ No newline at end of file diff --git a/src/extensions/mosip/LanguageValueList.yaml b/src/extensions/mosip/LanguageValueList.yaml deleted file mode 100644 index 9b6033e..0000000 --- a/src/extensions/mosip/LanguageValueList.yaml +++ /dev/null @@ -1,3 +0,0 @@ -type: array -items: - $ref: LangaugeValue.yaml \ No newline at end of file diff --git a/src/extensions/mosip/MOSIPVerifiableCredential.yaml b/src/extensions/mosip/MOSIPVerifiableCredential.yaml deleted file mode 100644 index 7367fb3..0000000 --- a/src/extensions/mosip/MOSIPVerifiableCredential.yaml +++ /dev/null @@ -1,60 +0,0 @@ -type: object -description: MOSIP Verifiable Credential for a [person](https://github.com/opencrvs/mosip-mediator/blob/master/samples/decrypted-sample-received-credentials.json) -properties: - issuedTo: - description: "" - type: string - protectedAttributes: - type: array - items: - type: string - credentialSubject: - description: "MOSIP Verifiable Credential for Proof of identity" - type: object - properties: - gender: - $ref: LanguageValueList.yaml - city: - $ref: LanguageValueList.yaml - postalCode: - type: string - example: "14022" - fullName: - type: string - example: "Thirteen Mosip" - dateOfBirth: - type: string - example: "2022" - province: - $ref: LanguageValueList.yaml - phone: - type: string - example: "9898989898" - addressLine1: - $ref: LanguageValueList.yaml - addressLine2: - $ref: LanguageValueList.yaml - id: - type: string - example: "2835824850916304" - UIN: - type: string - example: "7346597054" - region: - $ref: LanguageValueList.yaml - email: - type: string - example: "thirteen.mosip.123@mailinator.com" - id: - type: string - example: "http://mosip.io/credentials/e2039315-87b0-4012-942e-e0d7c879994b" - type: - type: array - items: - type: string - example: "MOSIPVerifiableCredential" - consent: - type: string - issuer: - type: string - example: "https://mosip.io/issuers/" \ No newline at end of file diff --git a/src/extensions/mosip/RecordType.yaml b/src/extensions/mosip/RecordType.yaml deleted file mode 100644 index 1cfb70d..0000000 --- a/src/extensions/mosip/RecordType.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: string -description: | - Predefined registry record to return in respone as object -enum: - - "RegistrationRecord" - - "MOSIPVerifiableCredential" \ No newline at end of file diff --git a/src/extensions/mosip/RegistrationRecord.yaml b/src/extensions/mosip/RegistrationRecord.yaml deleted file mode 100644 index 014ca12..0000000 --- a/src/extensions/mosip/RegistrationRecord.yaml +++ /dev/null @@ -1,41 +0,0 @@ -type: object -description: Birth Registration record to sync with MOSIP. [Reference](https://github.com/mosip/mosip-opencrvs/blob/develop/mediator/src/main/java/io/mosip/opencrvs/dto/SyncDto.java) -properties: - registrationId: - type: string - packetId: - type: string - additionalInfoReqId: - type: string - name: - type: string - email: - type: string - phone: - type: string - registrationType: - type: string - packetHashValue: - type: string - packetSize: - type: integer - supervisorStatus: - type: string - supervisorComment: - type: string - opentionalValues: - type: array - items: - type: string - langCode: - type: string - createDateTime: - $ref: ../../common/schema/DateTime.yaml - updateDateTime: - $ref: ../../common/schema/DateTime.yaml - deletedDateTime: - $ref: ../../common/schema/DateTime.yaml - isActive: - type: boolean - isDeleted: - type: boolean \ No newline at end of file diff --git a/src/extensions/nid/DeceasedRecord.yaml b/src/extensions/nid/DeceasedRecord.yaml deleted file mode 100644 index ac3d01d..0000000 --- a/src/extensions/nid/DeceasedRecord.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: Deceased record obtainable from registries -properties: - reference_number: - description: 'unique reference number mantained in the registry for recording death record or ' - type: string - name: - description: End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. - type: string - gender: - description: End-User's gender. Values defined by this specification are female, male, transgender. - type: string - dob: - description: Date of Birth in DDMMYYYY format - type: string - dod: - description: Date of Death in DDMMYYYY format - type: string - reported_date: - description: Date in DDMMYYYY format to record on which the death incident reported - type: string - demo_check_status: - description: whether demo check has been undertaken or not - type: boolean - demo_check_date: - description: Date in DDMMYYYY format to capture the Demo Check Date - type: string - document: - $ref: Document.yaml diff --git a/src/extensions/nid/Document.yaml b/src/extensions/nid/Document.yaml deleted file mode 100644 index bb14be0..0000000 --- a/src/extensions/nid/Document.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: object -description: Supporting document of the Resident,Reference document collected for registering the deceased information,Document encoded as Base64 string -properties: - document_name: - description: Name of the document - type: string - document: - description: Bases 64 encoded document - type: string diff --git a/src/extensions/nid/EKycDetails.yaml b/src/extensions/nid/EKycDetails.yaml deleted file mode 100644 index 1494407..0000000 --- a/src/extensions/nid/EKycDetails.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: object -description: eKYC details of the resident ,ekyc Details undertaken by the Resident -properties: - ekyc_date: - description: Date on which eKYC has been done. A null value indicates that eKYC has not been undertaken - type: string diff --git a/src/extensions/nid/RecordType.yaml b/src/extensions/nid/RecordType.yaml deleted file mode 100644 index bc7f71b..0000000 --- a/src/extensions/nid/RecordType.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: string -description: | - Predefined registry record to return in respone as object -enum: - - "resident_record" - - "deceased_record" \ No newline at end of file diff --git a/src/extensions/nid/ResidentAddress.yaml b/src/extensions/nid/ResidentAddress.yaml deleted file mode 100644 index 62ef8ff..0000000 --- a/src/extensions/nid/ResidentAddress.yaml +++ /dev/null @@ -1,39 +0,0 @@ -type: object -description: Address of the Resident in English Language -properties: - care_of: - description: Care of information - type: string - building: - description: Building identity - type: string - street: - description: Street details - type: string - landmark: - description: Landmark details - type: string - pincode: - description: Pincode - type: string - po-name: - description: Post office name - type: string - vtc: - description: Village Town City Code - type: string - vtc-name: - description: Village/Town/City Name - type: string - sub-district-name: - description: Sub District Name - type: string - district-name: - description: District Name - type: string - state: - description: State Name - type: string - country: - description: Country Name - type: string \ No newline at end of file diff --git a/src/extensions/nid/ResidentLocalAddress.yaml b/src/extensions/nid/ResidentLocalAddress.yaml deleted file mode 100644 index 7114354..0000000 --- a/src/extensions/nid/ResidentLocalAddress.yaml +++ /dev/null @@ -1,39 +0,0 @@ -type: object -description: Resident Local Address -properties: - local-careof: - description: Care of information in local language - type: string - local-building: - description: Building information in local language - type: string - local-street: - description: Street information in local language - type: string - local-landmark: - description: Landmark information in local language - type: string - local-locality: - description: locality information in local language - type: string - pincode: - description: pincode - type: string - po-name-local: - description: Post office name in local - type: string - local-vtc: - description: vtc information in local language - type: string - local-subdistrict: - description: Sub district information in local language - type: string - local-district: - description: district information in local language - type: string - local-state: - description: State information in local language - type: string - local-country: - description: Country information in local language - type: string \ No newline at end of file diff --git a/src/extensions/nid/ResidentLocalName.yaml b/src/extensions/nid/ResidentLocalName.yaml deleted file mode 100644 index 9a5d5e3..0000000 --- a/src/extensions/nid/ResidentLocalName.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -description: Resident Local Name -properties: - language_code: - $ref: ../../common/schema/LanguageCode.yaml - local_name: - description: Local name of the Resident - type: string \ No newline at end of file diff --git a/src/extensions/nid/ResidentNationality.yaml b/src/extensions/nid/ResidentNationality.yaml deleted file mode 100644 index d5a1a0a..0000000 --- a/src/extensions/nid/ResidentNationality.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: object -description: Resident Nationality Information,Nationality information of the Resident -properties: - nationality: - description: Nationality information of the Resident - type: string - passport_number: - description: Passport number of the Resident - type: string - passport_valid_upto: - description: Passport validity date in DDMMYYYY format - type: string - visa_number: - description: Visa number of the Resident - type: string - visa_vald_upto: - description: Visa validity details - type: string - oci_number: - description: OCI card deatils - type: string - oci_valid_upto: - description: OCI Validity date in DDMMYYYY format - type: string diff --git a/src/extensions/nid/ResidentPhoto.yaml b/src/extensions/nid/ResidentPhoto.yaml deleted file mode 100644 index c1b7847..0000000 --- a/src/extensions/nid/ResidentPhoto.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: object -description: Resident Photo,Image encoded as Base64 string -properties: - photo: - description: Photo encoded as Base64 string - type: string diff --git a/src/extensions/nid/ResidentRecord.yaml b/src/extensions/nid/ResidentRecord.yaml deleted file mode 100644 index fa3d6ff..0000000 --- a/src/extensions/nid/ResidentRecord.yaml +++ /dev/null @@ -1,35 +0,0 @@ -type: object -description: Resident Information -properties: - name: - description: End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. - type: string - gender: - description: End-User's gender. Values defined by this specification are female, male, transgender. - type: string - dob: - description: Date of Birth in DDMMYYYY format - type: string - dob_type: - description: Date of Birth Type i.e Declared, Approximate, Verified - type: string - phone: - description: Phone number of the resident. If the number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. - type: string - email: - description: End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7. - type: string - address: - $ref: ResidentAddress.yaml - local_name: - $ref: ResidentLocalName.yaml - local_address: - $ref: ResidentLocalAddress.yaml - photo: - $ref: ResidentPhoto.yaml - nationality: - $ref: ResidentNationality.yaml - kyc_status: - $ref: EKycDetails.yaml - document: - $ref: Document.yaml diff --git a/src/extensions/openid/Address.yaml b/src/extensions/openid/Address.yaml deleted file mode 100644 index ad4216a..0000000 --- a/src/extensions/openid/Address.yaml +++ /dev/null @@ -1,38 +0,0 @@ -title: Address -type: object -description: Address info as per OpenID specs -properties: - address_line1: - description: 'Full mailing address, formatted for display or use on a mailing label. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").' - type: string - example: '' - address_line_2: - description: 'Full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").' - type: string - example: '' - locality: - description: City or locality component. - type: string - example: '' - sub_region_code: - description: 'District or sub-regional code' - type: string - region_code: - description: 'State, province, prefecture, or region component.' - type: string - example: '' - postal_code: - description: 'Zip code or postal code component.' - type: string - example: '' - country_code: - description: Country part of an address represented using an ISO - 3-letter code [ISO3166-3], e.g., "USA" or "JPN". 2-letter ISO codes [ISO3166-1] e.g. ,e.g. US, JP - type: string - example: '' - geo_location: - description: | - Refer [Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) for more details - oneOf: - - $ref: ../../common/schema/LatLong.yaml - - $ref : ../google/GooglePlusCode.yaml diff --git a/src/extensions/openid/PersonDocDetails.yaml b/src/extensions/openid/PersonDocDetails.yaml deleted file mode 100644 index 26252e7..0000000 --- a/src/extensions/openid/PersonDocDetails.yaml +++ /dev/null @@ -1,40 +0,0 @@ -type: object -description: | - 1. Person document detials as per OpenID [identity-assurance](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html#name-evidence-element) - 2. JSON object representing the document used to perform the identity verification. -properties: - type: - description: String denoting the type of the document. The OP MAY use other than the predefined values in which case the RPs will either be unable to process the assertion, just store this value for audit purposes, or apply bespoken business logic to it. - type: string - document_number: - description: String Representing an identifier/number that uniquely identifies a document that was issued to the End-User. This is used on one document and will change if it is reissued, e.g., a passport number, certificate number, etc. Note, number can be used as an alias for 'document_number' for backward compatibility purposes but will be deprecated in future releases, implementers are recommended to use document_number. - type: string - personal_number: - description: String representing an identifier that is assigned to the End-User and is not limited to being used in one document, for example a national identification number, personal identity number, citizen number, social security number, driver number, account number, customer number, licensee number, etc. - type: string - serial_number: - description: String representing an identifier/number that identifies the document irrespective of any personalization information (this usually only applies to physical artifacts and is present before personalization). - type: string - date_of_issuance: - description: The date the document was issued as ISO 8601 [ISO8601] YYYY-MM-DD format. - type: string - date_of_expiry: - description: The date the document will expire as ISO 8601 [ISO8601] YYYY-MM-DD format. - type: string - issuer: - description: JSON object containing information about the issuer of this document. This object consists of the following properties - type: object - properties: - name: - description: Designation of the issuer of the document - type: string - address: - $ref: "Address.yaml" - country_code: - description: String denoting the country or supranational organization that issued the document as ISO 3166/ICAO 3-letter codes [ICAO-Doc9303], e.g., "USA" or "JPN". 2-letter ICAO codes MAY be used in some circumstances for compatibility reasons. - type: string - jurisdiction: - description: String containing the name of the region(s)/state(s)/province(s)/municipality(ies) that issuer has jurisdiction over (if this information is not common knowledge or derivable from the address). - type: string -required: - - type \ No newline at end of file diff --git a/src/extensions/openid/PersonRecord.yaml b/src/extensions/openid/PersonRecord.yaml deleted file mode 100644 index 2547550..0000000 --- a/src/extensions/openid/PersonRecord.yaml +++ /dev/null @@ -1,103 +0,0 @@ -type: object -description: | - 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. - 2. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. - 3. Person info as per OpenID [Claims](https://openid.net/specs/openid-connect-core-1_0.html#Claims) - 4. Person additional info based on OpenID [name-additional-claims](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html#name-additional-claims-about-end) -properties: - sub: - type: string - description: Subject - Identifier for the End-User at the Issuer. - name: - description: End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. - type: string - given_name: - description: Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. - type: string - family_name: - description: Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. - type: string - middle_name: - description: Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. - type: string - nickname: - description: Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael. - type: string - preferred_username: - description: Shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. The RP MUST NOT rely upon this value being unique, as discussed in - type: string - profile: - description: URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. - type: string - picture: - description: URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User. - type: string - website: - description: URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. - type: string - email: - description: End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7. - type: string - email_verified: - description: address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. - type: boolean - gender: - description: End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. - type: string - birthdate: - description: YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. - type: string - place_of_birth: - description: End-User's place of birth. The value of this member is a JSON structure containing some or all of the following members - type: object - deathdate: - description: YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. - type: string - place_of_death: - description: End-User's place of birth. The value of this member is a JSON structure containing some or all of the following members - type: object - phone_number: - description: number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. - type: string - phone_number_verified: - description: True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. - type: string - address: - $ref: "Address.yaml" - zoneinfo: - description: String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. - type: string - locale: - description: Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well. - type: string - nationalities: - description: End-User's nationalities using ICAO 3-letter codes [ICAO-Doc9303], e.g., "USA" or "JPN". 2-letter ICAO codes MAY be used in some circumstances for compatibility reasons. - type: array - items: - type: string - updated_at: - description: Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time - type: number - birth_family_name: - description: End-User's family name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the family name later in life for any reason. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. - type: string - birth_given_name: - description: End-User's given name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the given name later in life for any reason. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. - type: string - birth_middle_name: - description: End-User's middle name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the middle name later in life for any reason. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. - type: string - salutation: - description: End-User's salutation, e.g., "Mr." - type: string - title: - description: End-User's title, e.g., "Dr." - type: string - msisdn: - description: End-User's mobile phone number formatted according to ITU-T recommendation [E.164], e.g., "1999550123" - type: string - also_known_as: - description: Stage name, religious name or any other type of alias/pseudonym with which a person is known in a specific context besides its legal name. This must be part of the applicable legislation and thus the trust framework (e.g., be an attribute on the identity card). - type: string - additional_attributes: - $ref: ../../common/schema/AttributeNameValueList.yaml diff --git a/src/extensions/social/Group.yaml b/src/extensions/social/Group.yaml new file mode 100644 index 0000000..908ade2 --- /dev/null +++ b/src/extensions/social/Group.yaml @@ -0,0 +1,224 @@ +type: object +description: | + 1. Attributes of a group to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/social/v1/Group.jsonld
+ @type: "@context"
+example: + { + "@context": { + "spdci": "https://schema.spdci.org/extensions/social/v1/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "owl": "http://www.w3.org/2002/07/owl#", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/group/001", + "@type": "spdci:Group", + "group_identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "G9876543210" + }], + "group_type": "family", + "place": { + "@type": "Place", + "geo": { + "@type": "GeoCoordinates", + "latitude": "40.712776", + "longitude": "-74.005974" + }, + "address": "123 Main St, Anytown, CountryName" + }, + "place_address": 1, + "poverty_score": 45.2, + "poverty_score_type": "income-based", + "group_head_info": { + "@type": "spdci:Member", + "@id": "https://example.org/member/987654321", + "member_identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "M9876543210" + }], + "demographic_info": { + "@type": "SRPerson", + "identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "9876543210" + }], + "name": { + "@type": "Name", + "surname": "Smith", + "given_name": "Alice", + "prefix": "Ms.", + "suffix": "" + }, + "sex": "female", + "address": { + "@type": "Address", + "street_address": "123 Main St", + "city": "Anytown", + "postal_code": "12345", + "country": "CountryName" + }, + "birth_date": "1985-05-20T00:00:00Z", + "registration_date": "2022-01-10T08:00:00Z", + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "2022-01-10T08:00:00Z" + }, + "group_size": 4, + "member_list": [ + { + "@type": "Member", + "@id": "https://example.org/member/987654321", + "member_identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "M9876543210" + }], + "demographic_info": { + "@type": "SRPerson", + "identifier":[ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "9876543210" + }], + "name": { + "@type": "Name", + "surname": "Smith", + "given_name": "Alice", + "prefix": "Ms.", + "suffix": "" + } , + "sex": "female", + "address": { + "@type": "Address", + "street_address": "123 Main St", + "city": "Anytown", + "postal_code": "12345", + "country": "CountryName" + }, + "birth_date": "1985-05-20T00:00:00Z", + "registration_date": "2022-01-10T08:00:00Z", + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "2022-01-10T08:00:00Z" + }, + { + "@type": "Member", + "@id": "https://example.org/member/123456789", + "member_identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "M9876543210" + }], + "demographic_info": { + "@type": "SRPerson", + "spdci:identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "1234567890" + }], + "name": { + "@type": "Name", + "surname": "Smith", + "given_name": "Bob", + "prefix": "Mr.", + "suffix": "" + }, + "sex": "male", + "address": { + "@type": "Address", + "street_address": "123 Main St", + "city": "Anytown", + "postal_code": "12345", + "country": "CountryName" + }, + "birth_date": "1982-03-15T00:00:00Z", + "registration_date": "2022-01-10T08:00:00Z", + }, + "is_disabled": false, + "marital_status": "married", + "registration_date": "2022-01-10T08:00:00Z" + }, + { + "@type": "Member", + "@id": "https://example.org/member/987654322", + "member_identifier": [ { + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "9876543210" + }], + "demographic_info": { + "@type": "SRPerson", + ":identifier": [{ + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "9876543221" + }], + "name": { + "@type": "cName", + "surname": "Smith", + "given_name": "Charlie", + "prefix": "", + "suffix": "" + }, + "sex": "male", + "address": { + "@type": "Address", + "street_address": "123 Main St", + "city": "Anytown", + "postal_code": "12345", + "country": "CountryName" + }, + "birth_date": "2010-07-05T00:00:00Z", + "registration_date": "2022-01-10T08:00:00Z" + }, + "is_disabled": false, + "marital_status": "single", + "registration_date": "2022-01-10T08:00:00Z" + }, + { + "@type": "Member", + "@id": "https://example.org/member/987654323", + "member_identifier": "M987654323", + "demographic_info": { + "@type": "SRPerson", + "identifier": [{ + "@type": "Identifier", + "identifier_type": "NationalID", + "identifier_value": "9876543232" + }], + "name": { + "@type": "Name", + "surname": "Smith", + "given_name": "Daisy", + "prefix": "", + "suffix": "" + }, + "sex": "female", + "address": { + "@type": "Address", + "street_address": "123 Main St", + "city": "Anytown", + "postal_code": "12345", + "country": "CountryName" + }, + "birth_date": "2012-09-22T00:00:00Z", + "sregistration_date": "2022-01-10T08:00:00Z" + }, + "is_disabled": false, + "marital_status": "single", + "spdci:registration_date": "2022-01-10T08:00:00Z" + } + ], + "registration_date": "2022-01-10T08:00:00Z", + "last_updated": "2023-06-15T10:00:00Z", + "additional_attributes": ["services":"receives_subsidy"] +} diff --git a/src/extensions/social/Person.yaml b/src/extensions/social/Person.yaml new file mode 100644 index 0000000..9954e8c --- /dev/null +++ b/src/extensions/social/Person.yaml @@ -0,0 +1,49 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + + @context: https://schema.spdci.org/extensions/social/v1/Person.jsonld
+ @type: "@context"
+example: + { + "@context": { + "spdci": "https://schema.spdci.org/extensions/social/v1/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "owl": "http://www.w3.org/2002/07/owl#", + "common": "https://schema.spdci.org/common/v1/" + }, + "@id": "https://example.org/sr_person/847951632", + "@type": "spdci:SR_Person", + "identifier": [ + { + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "847951632" + } + ], + "name": { + "@type": "Name", + "surname": "Phumchai", + "given_name": "Sudarat", + "prefix": "Dr.", + "suffix": "PhD" + }, + "birth_date": "1995-09-21T11:20:00", + "sex": "female", + "address": [ + { + "@type": "Address", + "address_line1": "Bophut Koh Samui", + "address_line2": "Surat, Near Big Buddha Beach", + "locality": "Thani", + "sub_region_code": "SH", + "region_code": "A205", + "postal_code": "84320", + "country_code": "TH", + }], + "phone_number": ["+66891234567"], + "email": ["sudarat.phumchai@example.com"], + "registration_date": "1995-10-21T11:20:00" +} diff --git a/src/extensions/social/ReceiptInformation.yaml b/src/extensions/social/ReceiptInformation.yaml new file mode 100644 index 0000000..2f4ec0a --- /dev/null +++ b/src/extensions/social/ReceiptInformation.yaml @@ -0,0 +1,18 @@ +type: object +description: | + Receipt information contains receipt type and list of beneficiaries + 1) Register - It indicates that beneficiary have registered into system. + 2) Deregister - If receipt is for a programme exit then programm information with suspended date to be recorded +properties: + receipt_type: + $ref: ../../registry/ibr/RegistryEventType.yaml + description: "Receipt type 1) Register 2) Payment 3) Deregister" + beneficiaries: + type: array + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 2. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs. + @context: https://schema.spdci.org/extensions/ibr/v1/Person.jsonld
+ @type: "@context"
+ items: + $ref: Person.yaml \ No newline at end of file diff --git a/src/mapper/schema/AccountProviderInfo.yaml b/src/mapper/schema/AccountProviderInfo.yaml deleted file mode 100644 index bb3e4ab..0000000 --- a/src/mapper/schema/AccountProviderInfo.yaml +++ /dev/null @@ -1,21 +0,0 @@ -type: object -description: 'Store of value account provider info' -properties: - name: - type: string - description: "entity name like bank name, prepaid card/voucher issuing system, etc.," - example: "National Bank of a Country" - code: - type: string - description: "code to identify the entity like bank, prepaid card/voucher issuing system, etc.," - example: "BANKXXX" - subcode: - type: string - description: "sub code like entity's branch code, etc.," - additional_info: - description: "Additional info, if any" - type: string - maxLength: 999 -required: - - name - - code \ No newline at end of file diff --git a/src/mapper/schema/LinkRequest.yaml b/src/mapper/schema/LinkRequest.yaml deleted file mode 100644 index 7e67358..0000000 --- a/src/mapper/schema/LinkRequest.yaml +++ /dev/null @@ -1,36 +0,0 @@ -type: object -description: 'ID to Store of value account linking request' -properties: - transaction_id: - $ref: ../../common/schema/TransactionId.yaml - link_request: - type: array - items: - type: object - properties: - reference_id: - $ref: "../../common/schema/ReferenceId.yaml" - timestamp: - $ref: ../../common/schema/DateTime.yaml - id: - $ref: ../../extensions/cdpi/PersonId.yaml - fa: - $ref: ../../extensions/cdpi/FinancialAddress.yaml - name: - description: End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. - type: string - phone_number: - description: number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. - type: string - additional_info: - $ref: "../../common/schema/AttributeNameValueList.yaml" - locale: - $ref: "../../common/schema/LanguageCode.yaml" - required: - - reference_id - - timestamp - - id - - fa -required: - - transaction_id - - link_request \ No newline at end of file diff --git a/src/mapper/schema/LinkStatusReasonCode.yaml b/src/mapper/schema/LinkStatusReasonCode.yaml deleted file mode 100644 index 3c9480d..0000000 --- a/src/mapper/schema/LinkStatusReasonCode.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: string -description: FA Mapper Link status reason codes -enum: - - "rjct.reference_id.invalid" - - "rjct.reference_id.duplicate" - - "rjct.timestamp.invalid" - - "rjct.id.invalid" - - "rjct.fa.invalid" - - "rjct.name.invalid" - - "rjct.mobile_number.invalid" - - "rjct.unknown.retry" - - "rjct.other.error" \ No newline at end of file diff --git a/src/mapper/schema/ResolveRequest.yaml b/src/mapper/schema/ResolveRequest.yaml deleted file mode 100644 index 426bead..0000000 --- a/src/mapper/schema/ResolveRequest.yaml +++ /dev/null @@ -1,40 +0,0 @@ -type: object -description: | - 1. If id is null then only verify and resolve fa is linked to store of value account. Verification is done by entity issuing fa. - 2. If id is not null then verify and resolve fa is linked store of value account. Additionally verify fa and id are issued to the same individual. If both conditions pass then resolve status can be set to yes. -properties: - transaction_id: - $ref: ../../common/schema/TransactionId.yaml - resolve_request: - type: array - items: - type: object - properties: - reference_id: - $ref: "../../common/schema/ReferenceId.yaml" - timestamp: - $ref: ../../common/schema/DateTime.yaml - fa: - $ref: ../../extensions/cdpi/FinancialAddress.yaml - id: - $ref: "../../extensions/cdpi/PersonId.yaml" - name: - description: End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. - type: string - scope: - description: Resolve scope to return only yes_no or account provider or id details. Additional authorization based on caller to be enforced by the implementing system to return any sensitive data. - type: string - enum: - - "yes_no" - - "details" - default: "yes_no" - additional_info: - $ref: "../../common/schema/AttributeNameValueList.yaml" - locale: - $ref: "../../common/schema/LanguageCode.yaml" - required: - - reference_id - - timestamp -required: - - transaction_id - - resolve_request \ No newline at end of file diff --git a/src/mapper/schema/ResolveResponse.yaml b/src/mapper/schema/ResolveResponse.yaml deleted file mode 100644 index 820bdc1..0000000 --- a/src/mapper/schema/ResolveResponse.yaml +++ /dev/null @@ -1,41 +0,0 @@ -type: object -description: 'Resolve financial address to store of value account info response' -properties: - transaction_id: - $ref: ../../common/schema/TransactionId.yaml - correlation_id: - $ref: ../../common/schema/CorrelationId.yaml - resolve_response: - type: array - items: - type: object - properties: - reference_id: - $ref: "../../common/schema/ReferenceId.yaml" - timestamp: - $ref: ../../common/schema/DateTime.yaml - fa: - $ref: ../../extensions/cdpi/FinancialAddress.yaml - id: - $ref: ../../extensions/cdpi/PersonId.yaml - account_provider_info: - $ref: AccountProviderInfo.yaml - status: - $ref: "../../common/schema/RequestStatus.yaml" - status_reason_code: - $ref: "./ResolveStatusReasonCode.yaml" - status_reason_message: - description: "Status reascon code message. Helps actionanble messaging for systems/end users" - type: string - maxLength: 999 - additional_info: - $ref: "../../common/schema/AttributeNameValueList.yaml" - locale: - $ref: "../../common/schema/LanguageCode.yaml" - required: - - reference_id - - timestamp - - status -required: - - transaction_id - - resolve_response \ No newline at end of file diff --git a/src/mapper/schema/ResolveStatusReasonCode.yaml b/src/mapper/schema/ResolveStatusReasonCode.yaml deleted file mode 100644 index b9e4eeb..0000000 --- a/src/mapper/schema/ResolveStatusReasonCode.yaml +++ /dev/null @@ -1,16 +0,0 @@ -type: string -description: FA Mapper Resolve status reason codes -enum: - - "rjct.reference_id.invalid" - - "rjct.reference_id.duplicate" - - "rjct.timestamp.invalid" - - "rjct.id.invalid" - - "rjct.fa.invalid" - - "rjct.resolve_type.not_supported" - - "succ.fa.active" - - "succ.fa.inactive" - - "succ.fa.not_found" - - "succ.fa.not_linked_to_id" - - "succ.id.active" - - "succ.id.inactive" - - "succ.id.not_found" \ No newline at end of file diff --git a/src/mapper/schema/UnlinkRequest.yaml b/src/mapper/schema/UnlinkRequest.yaml deleted file mode 100644 index cf5e5d7..0000000 --- a/src/mapper/schema/UnlinkRequest.yaml +++ /dev/null @@ -1,29 +0,0 @@ -type: object -description: ID to Store of value account unlinking request. Unlink request removes entry against requested id/fa pair. -properties: - transaction_id: - $ref: ../../common/schema/TransactionId.yaml - unlink_request: - type: array - items: - type: object - properties: - reference_id: - $ref: "../../common/schema/ReferenceId.yaml" - timestamp: - $ref: ../../common/schema/DateTime.yaml - id: - $ref: ../../extensions/cdpi/PersonId.yaml - fa: - $ref: ../../extensions/cdpi/FinancialAddress.yaml - additional_info: - $ref: ../../common/schema/AttributeNameValueList.yaml - locale: - $ref: "../../common/schema/LanguageCode.yaml" - required: - - reference_id - - timestamp - - id -required: - - transaction_id - - unlink_request \ No newline at end of file diff --git a/src/mapper/schema/UnlinkStatusReasonCode.yaml b/src/mapper/schema/UnlinkStatusReasonCode.yaml deleted file mode 100644 index a86383f..0000000 --- a/src/mapper/schema/UnlinkStatusReasonCode.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: string -description: FA Mapper Unlink status reason codes -enum: - - "rjct.reference_id.invalid" - - "rjct.reference_id.duplicate" - - "rjct.timestamp.invalid" - - "rjct.beneficiary_name.invalid" \ No newline at end of file diff --git a/src/mapper/schema/UpdateRequest.yaml b/src/mapper/schema/UpdateRequest.yaml deleted file mode 100644 index 9d2558b..0000000 --- a/src/mapper/schema/UpdateRequest.yaml +++ /dev/null @@ -1,36 +0,0 @@ -type: object -description: 'ID to Store of value account update request. ID can only unlinked.' -properties: - transaction_id: - $ref: ../../common/schema/TransactionId.yaml - update_request: - type: array - items: - type: object - properties: - reference_id: - $ref: "../../common/schema/ReferenceId.yaml" - timestamp: - $ref: ../../common/schema/DateTime.yaml - id: - $ref: ../../extensions/cdpi/PersonId.yaml - fa: - $ref: ../../extensions/cdpi/FinancialAddress.yaml - name: - description: End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. - type: string - phone_number: - description: number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. - type: string - additional_info: - $ref: "../../common/schema/AttributeNameValueList.yaml" - locale: - $ref: "../../common/schema/LanguageCode.yaml" - required: - - reference_id - - timestamp - - id - - fa -required: - - transaction_id - - update_request \ No newline at end of file diff --git a/src/mapper/schema/UpdateStatusReasonCode.yaml b/src/mapper/schema/UpdateStatusReasonCode.yaml deleted file mode 100644 index f8ba485..0000000 --- a/src/mapper/schema/UpdateStatusReasonCode.yaml +++ /dev/null @@ -1,7 +0,0 @@ -type: string -description: FA Mapper Update status reason codes -enum: - - "rjct.reference_id.invalid" - - "rjct.reference_id.duplicate" - - "rjct.timestamp.invalid" - - "rjct.beneficiary_name.invalid" \ No newline at end of file diff --git a/src/registry/.DS_Store b/src/registry/.DS_Store index d68716b..ba05b28 100644 Binary files a/src/registry/.DS_Store and b/src/registry/.DS_Store differ diff --git a/src/registry/crvs/ExpTemplate.yaml b/src/registry/crvs/ExpTemplate.yaml new file mode 100644 index 0000000..2947669 --- /dev/null +++ b/src/registry/crvs/ExpTemplate.yaml @@ -0,0 +1,35 @@ +type: object +description: Identifier type and value object +properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "expression", "idtype-value" + example: "ns:org:QueryType:graphql" + + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: > + GeBirthRecordById { + person(UIN: "1") { + BRN + name + gender + birthDate + birthPlace + parents + } + } \ No newline at end of file diff --git a/src/registry/crvs/NotifyEventRequest.yaml b/src/registry/crvs/NotifyEventRequest.yaml new file mode 100644 index 0000000..4f846b5 --- /dev/null +++ b/src/registry/crvs/NotifyEventRequest.yaml @@ -0,0 +1,42 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + $ref: RegistryRecord.yaml + required: + - reg_record_type + - reg_records + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - data +required: + - transaction_id + - notify_event \ No newline at end of file diff --git a/src/registry/crvs/RegistryEventType.yaml b/src/registry/crvs/RegistryEventType.yaml new file mode 100644 index 0000000..618279d --- /dev/null +++ b/src/registry/crvs/RegistryEventType.yaml @@ -0,0 +1,10 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" +example: "spdci-common:RegistryEventType:LiveBirth" \ No newline at end of file diff --git a/src/registry/crvs/RegistryQueries.yaml b/src/registry/crvs/RegistryQueries.yaml new file mode 100644 index 0000000..90b3736 --- /dev/null +++ b/src/registry/crvs/RegistryQueries.yaml @@ -0,0 +1,10 @@ +description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 +anyOf: + - $ref: ../crvs/ExpTemplate.yaml + - $ref: ../../common/schema/IdentifierTypeValue.yaml + - $ref: ../../common/schema/ExpPredicateWithConditionList.yaml \ No newline at end of file diff --git a/src/registry/crvs/RegistryRecord.yaml b/src/registry/crvs/RegistryRecord.yaml new file mode 100644 index 0000000..87fe7b4 --- /dev/null +++ b/src/registry/crvs/RegistryRecord.yaml @@ -0,0 +1,8 @@ +type: object +description: | + The "person" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/crvs/v1/data/CRVSPerson.jsonld
+ @type: "Person"
+ @container: "@set"
+example: + $ref: "../../extensions/crvs/Person.yaml" \ No newline at end of file diff --git a/src/registry/crvs/RegistryRecordType.yaml b/src/registry/crvs/RegistryRecordType.yaml new file mode 100644 index 0000000..409bd7e --- /dev/null +++ b/src/registry/crvs/RegistryRecordType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Person" +example: "spdci-extensions-dci:Person" \ No newline at end of file diff --git a/src/registry/crvs/RegistryType.yaml b/src/registry/crvs/RegistryType.yaml new file mode 100644 index 0000000..ab39965 --- /dev/null +++ b/src/registry/crvs/RegistryType.yaml @@ -0,0 +1,10 @@ +type: string +description: | + @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Civil" +example: "ns:org:RegistryType:Civil" diff --git a/src/registry/crvs/SearchRequest.yaml b/src/registry/crvs/SearchRequest.yaml new file mode 100644 index 0000000..932d230 --- /dev/null +++ b/src/registry/crvs/SearchRequest.yaml @@ -0,0 +1,53 @@ +type: object +description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditional expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + search_request: + type: array + description: | + 1. Batch requests enable multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: "../../common/schema/DateTime.yaml" + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + query_type: + $ref: ../../common/schema/QueryType.yaml + query: + $ref: RegistryQueries.yaml + sort: + $ref: ../../common/schema/SearchSortList.yaml + pagination: + $ref: ../../common/schema/PaginationRequest.yaml + consent: + $ref: ../../common/schema/Consent.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - query_type + - query + locale: + $ref: ../../common/schema/LanguageCode.yaml + required: + - reference_id + - timestamp + - search_criteria +required: + - transaction_id + - search_request \ No newline at end of file diff --git a/src/registry/crvs/SearchResponse.yaml b/src/registry/crvs/SearchResponse.yaml new file mode 100644 index 0000000..387a56d --- /dev/null +++ b/src/registry/crvs/SearchResponse.yaml @@ -0,0 +1,61 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionanble messaging for systems/end users" + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + description: | + The "Entity" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/crvs/v1/data/CRVSPerson.jsonld
+ @type: "Person"
+ @container: "@set"
+ type: array + items: + $ref: "../../extensions/dci/Person.yaml" + + required: + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response + \ No newline at end of file diff --git a/src/disburse/disburse_core_api_v1.0.0.yaml b/src/registry/crvs_api_v1.0.0.yaml similarity index 53% rename from src/disburse/disburse_core_api_v1.0.0.yaml rename to src/registry/crvs_api_v1.0.0.yaml index 10a9fb4..0a66d3a 100644 --- a/src/disburse/disburse_core_api_v1.0.0.yaml +++ b/src/registry/crvs_api_v1.0.0.yaml @@ -1,17 +1,40 @@ openapi: 3.0.3 info: - title: Interoperability APIs - G2P Disbursements - description: | - 1. Category: [G2P Disbursements](https://g2pconnect.cdpi.dev/protocol/interfaces/social-program-management/disbursement) - 2. Feature: Enable G2P Disbursements with reconciliation - 3. Specification Level: **Draft** + title: Interoperability APIs - CRVS version: 1.0.0 + x-logo: + url: './dci-logo.png' + backgroundColor: '#FFFFFF' + altText: 'Digital Convergence Initiative' + description: |- + The CRVS interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between CRVS registry and SP system. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link: + - [CRVS - V1.0 ](https://standards.spdci.org/standards/v/crvs-v1.0-1/) + + Code directory links: + - [Vital event types](https://schema.spdci.org/extensions/crvs/v1/code/VitalEventTypeEnum) + + Data Objects: + - [Person](https://schema.spdci.org/extensions/crvs/v1/data/crvsPerson.jsonld) + + Each request is build up of three parts + - signature + - header + - message contact: - name: G2P Connect - email: info@cdpi.dev + name: DCI Social Protection + email: info@spdci.org license: - name: CDPI CC BY-SA 4.0 - url: https://github.com/G2P-Connect/specs/blob/draft/LICENSE.md + name: DCI Social Protection License + url: https://api.spdci.org/LICENSE.md + servers: - url: "https://sandbox.spdci.org/namespace/v1.0.0" description: Sandbox Server @@ -24,18 +47,6 @@ tags: description: Schemas - name: Status Codes description: Status Codes - - name: DisburseRequest - x-displayName: DisburseRequest - description: | - - - name: DisburseResponse - x-displayName: DisburseResponse - description: | - - - name: DisburseStatusReasonCode - x-displayName: DisburseStatusReasonCode - description: | - - name: SearchRequest x-displayName: SearchRequest description: | @@ -43,11 +54,39 @@ tags: - name: SearchResponse x-displayName: SearchResponse description: | - + - name: SearchStatusReasonCode x-displayName: SearchStatusReasonCode description: | - + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + - name: TxnStatusRequest x-displayName: TxnStatusRequest description: | @@ -60,7 +99,6 @@ tags: x-displayName: EncryptedMessage description: | - x-tagGroups: - name: API Definitions tags: @@ -68,23 +106,27 @@ x-tagGroups: - Sync - name: Schema Objects tags: - - DisburseRequest - - DisburseResponse - SearchRequest - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse - TxnStatusRequest - TxnStatusResponse - EncryptedMessage - name: Status Codes tags: - - DisburseStatusReasonCode - SearchStatusReasonCode + - SubscribeStatusReasonCode + - UnSubscribeStatusReasonCode paths: - /disburse: + /registry/search: post: - summary: "/disburse" - description: Initiate payment through disbursement instructions - operationId: post_dsbt_disburse + summary: "/registry/search" + description: Search person(s) in registry using identifier or custom attributes + operationId: post_reg_search tags: - Async requestBody: @@ -103,11 +145,13 @@ paths: - properties: action: enum: - - disburse + - search message: - anyOf: - - $ref: "#/components/schemas/DisburseRequest" - - $ref: "#/components/schemas/EncryptedMessage" + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: "#/components/schemas/SearchRequest" + - $ref: "#/components/schemas/EncryptedMessage" required: - header - message @@ -118,7 +162,7 @@ paths: - properties: action: enum: - - disburse + - search responses: default: $ref: "#/components/responses/Response" @@ -130,13 +174,12 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /on-disburse: + /registry/on-search: post: - summary: "/on-disburse" - description: Disburse response through callback - operationId: post_dsbt_on-disburse + summary: "/registry/on-search" + description: Search results through callback + operationId: post_reg_on-search tags: - Async requestBody: @@ -155,11 +198,12 @@ paths: - properties: action: enum: - - on-disburse + - on-search message: - anyOf: - - $ref: "#/components/schemas/DisburseResponse" - - $ref: "#/components/schemas/EncryptedMessage" + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' required: - header multipart/form-data: @@ -169,25 +213,25 @@ paths: - properties: action: enum: - - on-disburse + - on-search responses: - default: - $ref: "#/components/responses/Response" - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /disburse/search: + + /registry/subscribe: post: - summary: "/disbruse/search" - description: "Search disbursement by searchable attributes" - operationId: post_dsbt_search + summary: "/registry/subscribe" + description: Subscribe to a life event with registry + operationId: post_reg_subscribe tags: - Async requestBody: @@ -206,11 +250,13 @@ paths: - properties: action: enum: - - search + - subscribe message: - anyOf: - - $ref: "#/components/schemas/SearchRequest" - - $ref: "#/components/schemas/EncryptedMessage" + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: "#/components/schemas/SubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" required: - header - message @@ -221,25 +267,77 @@ paths: - properties: action: enum: - - search + - subscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-subscribe: + post: + summary: "/registry/on-subscribe" + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: "#/components/schemas/SubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-subscribe responses: - default: - $ref: "#/components/responses/Response" - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /disburse/on-search: + /registry/notify: post: - summary: "/disburse/on-search" - description: "Disbrusement search results through callback" - operationId: post_dsbt_on-search + summary: "/registry/notify" + description: Registry to notify a life event to subscrbiers + operationId: post_reg_notify tags: - Async requestBody: @@ -258,11 +356,12 @@ paths: - properties: action: enum: - - on-search + - notify message: - anyOf: - - $ref: "#/components/schemas/SearchResponse" - - $ref: "#/components/schemas/EncryptedMessage" + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' required: - header multipart/form-data: @@ -272,25 +371,24 @@ paths: - properties: action: enum: - - on-search' + - notify responses: - default: - $ref: "#/components/responses/Response" - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /disburse/txn/status: + /registry/unsubscribe: post: - summary: "/disburse/txn/status" - description: Status check of previous disbursement transanctions using transaction_id and/or reference_id(s) - operationId: post_dsbt_txnstatus + summary: "/registry/unsubscribe" + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe tags: - Async requestBody: @@ -309,13 +407,13 @@ paths: - properties: action: enum: - - on-disburse - - on-search + - unsubscribe message: type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list oneOf: - - $ref: '#/components/schemas/TxnStatusRequest' - - $ref: '#/components/schemas/EncryptedMessage' + - $ref: "#/components/schemas/UnSubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" required: - header - message @@ -326,26 +424,24 @@ paths: - properties: action: enum: - - on-disburse - - on-search + - unsubscribe responses: - default: - $ref: "#/components/responses/Response" - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /disburse/txn/on-status: + /registry/on-unsubscribe: post: - summary: "/disburse/txn/on-status" - description: Status check response through callback - operationId: post_dsbt_on-txnstatus + summary: "/registry/on-unsubscribe" + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe tags: - Async requestBody: @@ -360,18 +456,19 @@ paths: $ref: "#/components/schemas/MsgSignature" header: allOf: - - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - $ref: "#/components/schemas/MsgHeader_V1.0.0" - properties: action: enum: - - on-disburse - - on-search + - on-unsubscribe message: - anyOf: - - $ref: "#/components/schemas/TxnStatusResponse" - - $ref: "#/components/schemas/EncryptedMessage" + type: object + oneOf: + - $ref: "#/components/schemas/UnSubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" required: - header + - message multipart/form-data: schema: allOf: @@ -379,28 +476,26 @@ paths: - properties: action: enum: - - on-disburse - - on-search + - on-unsubscribe responses: - default: - $ref: "#/components/responses/Response" - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /disburse/sync/disburse: + /registry/txn/status: post: - summary: "/disburse/sync/disburse" - description: Initiate payment through disbursement instructions through sync call - operationId: post_dsbt_sync_disbuse + summary: "/registry/txn/status" + description: Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s) + operationId: post_reg_txnstatus tags: - - Sync + - Async requestBody: description: "" required: true @@ -417,40 +512,26 @@ paths: - properties: action: enum: - - search + - txn-status message: type: object - description: The search data using which registry search to be performed - anyOf: - - $ref: '#/components/schemas/DisburseRequest' + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' - $ref: '#/components/schemas/EncryptedMessage' required: - header - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-status responses: default: - description: Disburse response - content: - application/json: - schema: - type: object - properties: - signature: - $ref: "#/components/schemas/MsgSignature" - header: - allOf: - - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" - - properties: - action: - enum: - - on-search - message: - type: object - oneOf: - - $ref: '#/components/schemas/DisburseResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header + $ref: "#/components/responses/Response" '401': $ref: "#/components/responses/HttpErrorResponse" '403': @@ -460,13 +541,62 @@ paths: security: - Authorization: [ ] deprecated: false - /disburse/sync/search: - post: - summary: "/disburse/sync/search" - description: | - 1. Fetch disbursement processing status though sync call - 2. Disbursement processing systems may chose to implement rate limiting at transaction_id level to avoid request flooding - operationId: post_dsbt_sync_search + /registry/txn/on-status: + post: + summary: "/registry/txn/on-status" + description: Response to async status check of previous civil registrt transanctions using callback + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-on-status + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/sync/search: + post: + summary: "/registry/sync/search" + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_sync_search tags: - Sync requestBody: @@ -489,7 +619,7 @@ paths: message: type: object description: The search data using which registry search to be performed - anyOf: + oneOf: - $ref: '#/components/schemas/SearchRequest' - $ref: '#/components/schemas/EncryptedMessage' required: @@ -528,11 +658,11 @@ paths: security: - Authorization: [ ] deprecated: false - /disburse/sync/txn/status: + /registry/sync/txn/status: post: - summary: "/disburse/sync/txn/status" - description: Sync status check of disburse Async APIs - operationId: post_dsbt_sync_txnstatus + summary: "/registry/sync/txn/status" + description: Sync status check of registry Async APIs + operationId: post_reg_sync_txnstatus tags: - Sync requestBody: @@ -551,8 +681,7 @@ paths: - properties: action: enum: - - search - - subscribe + - txn-status message: type: object oneOf: @@ -577,8 +706,7 @@ paths: - properties: action: enum: - - on-search - - notify + - txn-on-status message: type: object oneOf: @@ -595,100 +723,52 @@ paths: security: - Authorization: [ ] deprecated: false - components: schemas: - ###### src/extensions/cdpi schema objects - cdpi_PersonId: - $ref: ../extensions/cdpi/PersonId.yaml - cdpi_FinancialAddress: - $ref: ../extensions/cdpi/FinancialAddress.yaml - - ###### src/extensions/dci schema objects - ###### src/extensions/fhir schema objects - ###### src/extensions/google schema objects - ###### src/extensions/mosip schema objects - ###### src/extensions/nid schema objects - ###### src/extensions/openid schema objects - ###### src/registry/schema/civil schema objects - ###### src/registry/schema/core schema objects - - ###### src/disburse/schema objects - DisburseRequest: - $ref: schema/DisburseRequest.yaml - DisburseResponse: - $ref: schema/DisburseResponse.yaml - DisburseStatusReasonCode: - $ref: schema/DisburseStatusReasonCode.yaml + NotifyEventRequest: + $ref: crvs/NotifyEventRequest.yaml SearchRequest: - $ref: schema/SearchRequest.yaml + $ref: crvs/SearchRequest.yaml SearchResponse: - $ref: schema/SearchResponse.yaml + $ref: crvs/SearchResponse.yaml SearchStatusReasonCode: $ref: schema/SearchStatusReasonCode.yaml + SubscribeRequest: + $ref: schema/SubscribeRequest.yaml + SubscribeResponse: + $ref: schema/SubscribeResponse.yaml + SubscribeStatusReasonCode: + $ref: schema/SubscribeStatusReasonCode.yaml TxnStatusRequest: $ref: schema/TxnStatusRequest.yaml TxnStatusResponse: $ref: schema/TxnStatusResponse.yaml - + UnSubscribeRequest: + $ref: schema/UnSubscribeRequest.yaml + UnSubscribeResponse: + $ref: schema/UnSubscribeResponse.yaml + UnSubscribeStatusReasonCode: + $ref: schema/UnSubscribeStatusReasonCode.yaml + ###### Common schema objects - Ack: - $ref: ../common/schema/Ack.yaml - AdditionalInfo: - $ref: ../common/schema/AdditionalInfo.yaml - Amount: - $ref: ../common/schema/Amount.yaml - AttributeNameValue: - $ref: ../common/schema/AttributeNameValue.yaml - AttributeNameValueList: - $ref: ../common/schema/AttributeNameValueList.yaml - AttributeValue: - $ref: ../common/schema/AttributeValue.yaml - CurrencyCode: - $ref: ../common/schema/CurrencyCode.yaml - DateTime: - $ref: ../common/schema/DateTime.yaml EncryptedMessage: $ref: ../common/schema/EncryptedMessage.yaml Error: $ref: ../common/schema/Error.yaml FileInfo: $ref: ../common/schema/FileInfo.yaml - LanguageCode: - $ref: ../common/schema/LanguageCode.yaml - Meta: - $ref: ../common/schema/Meta.yaml MsgCallbackHeader_V1.0.0: $ref: ../common/schema/MsgCallbackHeader_V1.0.0.yaml MsgHeader_V1.0.0: $ref: ../common/schema/MsgHeader_V1.0.0.yaml - MsgHeaderStatusReasonCode: - $ref: ../common/schema/MsgHeaderStatusReasonCode.yaml MsgSignature: $ref: ../common/schema/MsgSignature.yaml - Pagination: - $ref: ../common/schema/Pagination.yaml - PaginationRequest: - $ref: ../common/schema/PaginationRequest.yaml - Purpose: - $ref: ../common/schema/Purpose.yaml - ReferenceId: - $ref: ../common/schema/ReferenceId.yaml - ReferenceIdList: - $ref: ../common/schema/ReferenceIdList.yaml - RequestStatus: - $ref: ../common/schema/RequestStatus.yaml - SearchSort: - $ref: ../common/schema/SearchSort.yaml - SearchSortList: - $ref: ../common/schema/SearchSortList.yaml - TransactionId: - $ref: ../common/schema/TransactionId.yaml + responses: - HttpErrorResponse: - $ref: ../common/response/HttpErrorResponse.yaml Response: - $ref: ../common/response/Response.yaml + $ref: ../common/response/Response.yaml + HttpErrorResponse: + $ref: ../common/response/HttpErrorResponse.yaml securitySchemes: Authorization: $ref: ../common/security/Authorization.yaml diff --git a/src/registry/dr/DisabledRequest.yaml b/src/registry/dr/DisabledRequest.yaml new file mode 100644 index 0000000..f92c2c5 --- /dev/null +++ b/src/registry/dr/DisabledRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Verifies is registered member is disabled +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + disabled_criteria: + $ref: ../../extensions/dr/DisabledCriteria.yaml +required: + - transaction_id + - disabled_criteria \ No newline at end of file diff --git a/src/registry/dr/DisabledResponse.yaml b/src/registry/dr/DisabledResponse.yaml new file mode 100644 index 0000000..ec6a2f5 --- /dev/null +++ b/src/registry/dr/DisabledResponse.yaml @@ -0,0 +1,36 @@ +type: object + +description: Response to verify disability status request. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + disabled_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + disabled_status: + description: "Indicates whether the individual is disabled ('yes') or not ('no')." + type: string + enum: ["yes", "no"] + required: + - reference_id + - timestamp + - status + - disabled_status +required: + - transaction_id + - correlation_id + - disabled_response diff --git a/src/registry/dr/ExpTemplate.yaml b/src/registry/dr/ExpTemplate.yaml new file mode 100644 index 0000000..45548e0 --- /dev/null +++ b/src/registry/dr/ExpTemplate.yaml @@ -0,0 +1,35 @@ +type: object +description: Identifier type and value object +properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "idtype-value", "expression" + example: "ns:org:QueryType:expression" + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + collection: "DPRerson" + query: + $and: [ + { + disability_status: { $eq: "Approved" } + }, + { + location: { $eq: "central_region" } + } + ] + \ No newline at end of file diff --git a/src/registry/dr/GetDisabilityInfoResponse.yaml b/src/registry/dr/GetDisabilityInfoResponse.yaml new file mode 100644 index 0000000..5c55e7e --- /dev/null +++ b/src/registry/dr/GetDisabilityInfoResponse.yaml @@ -0,0 +1,55 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_records: + description: | + The "Disabled" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dr/v1/DRPerson.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + $ref: "../../extensions/dr/DisabilityInfo.yaml" + required: + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response \ No newline at end of file diff --git a/src/registry/dr/GetDisabilitySupportRequest.yaml b/src/registry/dr/GetDisabilitySupportRequest.yaml new file mode 100644 index 0000000..62c0287 --- /dev/null +++ b/src/registry/dr/GetDisabilitySupportRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: gets all disabilities information about a member +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + disabled_criteria: + $ref: ../../extensions/dr/DisabledCriteria.yaml +required: + - transaction_id + - disabled_criteria \ No newline at end of file diff --git a/src/registry/dr/GetDisabilitySupportResponse.yaml b/src/registry/dr/GetDisabilitySupportResponse.yaml new file mode 100644 index 0000000..048d54e --- /dev/null +++ b/src/registry/dr/GetDisabilitySupportResponse.yaml @@ -0,0 +1,55 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_records: + description: | + The "Disabled" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dr/v1/DisabilitySupport.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + $ref: "../../extensions/dr/DisabilitySupport.yaml" + required: + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response \ No newline at end of file diff --git a/src/registry/dr/MsgCallbackHeader_V1.0.0.yaml b/src/registry/dr/MsgCallbackHeader_V1.0.0.yaml new file mode 100644 index 0000000..7c77623 --- /dev/null +++ b/src/registry/dr/MsgCallbackHeader_V1.0.0.yaml @@ -0,0 +1,56 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "789" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../../common/schema/MsgHeaderStatusReasonCode.yaml" + status_reason_message: + description: "Status reascon code message, if any, Helps actionable messaging for system/end users" + type: string + maxLength: 999 + total_count: + description: "Total no of requests present in the message request" + type: integer + example: 21800 + completed_count: + description: "No of requests in complteed state. Complete includes success and error requests due to funcational errors" + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: 'dr.example.org' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: 'spmis.example.org' + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - status \ No newline at end of file diff --git a/src/registry/dr/MsgHeader_V1.0.0.yaml b/src/registry/dr/MsgHeader_V1.0.0.yaml new file mode 100644 index 0000000..9746198 --- /dev/null +++ b/src/registry/dr/MsgHeader_V1.0.0.yaml @@ -0,0 +1,53 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "123" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property. + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'spmis.example.org' + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: "https://spmis.example.org/consumer-namespace/callback/on-search" + receiver_id: + description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions. + type: string + example: 'dr.example.org' + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - sender_id + - total_count \ No newline at end of file diff --git a/src/registry/dr/NotifyEventRequest.yaml b/src/registry/dr/NotifyEventRequest.yaml new file mode 100644 index 0000000..f0f2f81 --- /dev/null +++ b/src/registry/dr/NotifyEventRequest.yaml @@ -0,0 +1,42 @@ +type: object +description: Registry to notify a event to subscribers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + $ref: RegistryRecord.yaml + required: + - reg_record_type + - reg_records + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - data +required: + - transaction_id + - notify_event \ No newline at end of file diff --git a/src/registry/dr/RegistryEventType.yaml b/src/registry/dr/RegistryEventType.yaml new file mode 100644 index 0000000..40efd73 --- /dev/null +++ b/src/registry/dr/RegistryEventType.yaml @@ -0,0 +1,8 @@ +type: string +description: | + The SP-System receives data from Disability registry, usually the DR sends registration and updates events to SP-System + + 1 : Register +enum: + - "register" +example: "register" \ No newline at end of file diff --git a/src/registry/dr/RegistryQueries.yaml b/src/registry/dr/RegistryQueries.yaml new file mode 100644 index 0000000..a08bc7b --- /dev/null +++ b/src/registry/dr/RegistryQueries.yaml @@ -0,0 +1,7 @@ +description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. +anyOf: + - $ref: ../dr/ExpTemplate.yaml + - $ref: ../../common/schema/IdentifierTypeValue.yaml + - $ref: ../../common/schema/ExpPredicateWithConditionList.yaml \ No newline at end of file diff --git a/src/registry/dr/RegistryRecord.yaml b/src/registry/dr/RegistryRecord.yaml new file mode 100644 index 0000000..7892197 --- /dev/null +++ b/src/registry/dr/RegistryRecord.yaml @@ -0,0 +1,8 @@ +type: object +description: | + The "group" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dr/v1/DRPerson.jsonld
+ @type: "DisabledPerson"
+ @container: "@set"
+example: + $ref: "../../extensions/dr/DisabledPerson.yaml" \ No newline at end of file diff --git a/src/registry/dr/RegistryRecordType.yaml b/src/registry/dr/RegistryRecordType.yaml new file mode 100644 index 0000000..05c1e59 --- /dev/null +++ b/src/registry/dr/RegistryRecordType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:DisabledPerson" +example: "spdci-extensions-dci:DisabledPerson" \ No newline at end of file diff --git a/src/registry/dr/RegistryType.yaml b/src/registry/dr/RegistryType.yaml new file mode 100644 index 0000000..a6046d3 --- /dev/null +++ b/src/registry/dr/RegistryType.yaml @@ -0,0 +1,10 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:DR" +example: "ns:org:RegistryType:DR" diff --git a/src/registry/dr/SearchRequest.yaml b/src/registry/dr/SearchRequest.yaml new file mode 100644 index 0000000..ca36d90 --- /dev/null +++ b/src/registry/dr/SearchRequest.yaml @@ -0,0 +1,53 @@ +type: object +description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditioanl expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + search_request: + type: array + description: | + 1. Batch requests enabel multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: "../../common/schema/DateTime.yaml" + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + query_type: + $ref: ../../common/schema/QueryType.yaml + query: + $ref: ../dr/RegistryQueries.yaml + sort: + $ref: ../../common/schema/SearchSortList.yaml + pagination: + $ref: ../../common/schema/PaginationRequest.yaml + consent: + $ref: ../../common/schema/Consent.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - query_type + - query + locale: + $ref: ../../common/schema/LanguageCode.yaml + required: + - reference_id + - timestamp + - search_criteria +required: + - transaction_id + - search_request \ No newline at end of file diff --git a/src/registry/dr/SearchResponse.yaml b/src/registry/dr/SearchResponse.yaml new file mode 100644 index 0000000..dfc3080 --- /dev/null +++ b/src/registry/dr/SearchResponse.yaml @@ -0,0 +1,54 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + $ref: RegistryRecord.yaml + required: + - reg_record_type + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response + \ No newline at end of file diff --git a/src/registry/dr/SubscribeRequest.yaml b/src/registry/dr/SubscribeRequest.yaml new file mode 100644 index 0000000..792164b --- /dev/null +++ b/src/registry/dr/SubscribeRequest.yaml @@ -0,0 +1,48 @@ +type: object +description: Subscribe to a life event with CRVS +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: ../../common/schema/ReferenceId.yaml + timestamp: + $ref: ../../common/schema/DateTime.yaml + subscribe_criteria: + type: object + description: Criteria defining the subscription + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + frequency: + $ref: ../../common/schema/EventFrequency.yaml + filter_type: + $ref: ../../common/schema/QueryType.yaml + filter: + $ref: RegistryQueries.yaml + notify_record_type: + $ref: RegistryRecordType.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - subscribe_criteria +required: + - transaction_id + - subscribe_request diff --git a/src/mapper/schema/UpdateResponse.yaml b/src/registry/dr/SubscribeResponse.yaml similarity index 58% rename from src/mapper/schema/UpdateResponse.yaml rename to src/registry/dr/SubscribeResponse.yaml index 9c88903..a1fba60 100644 --- a/src/mapper/schema/UpdateResponse.yaml +++ b/src/registry/dr/SubscribeResponse.yaml @@ -1,38 +1,41 @@ type: object -description: 'ID to Store of value account update response' +description: Response to subscribe request. properties: transaction_id: $ref: ../../common/schema/TransactionId.yaml correlation_id: $ref: ../../common/schema/CorrelationId.yaml - update_response: + subscribe_response: type: array - items: + items: type: object - properties: + properties: reference_id: $ref: "../../common/schema/ReferenceId.yaml" timestamp: $ref: ../../common/schema/DateTime.yaml - id: - $ref: ../../extensions/cdpi/PersonId.yaml status: $ref: "../../common/schema/RequestStatus.yaml" status_reason_code: - $ref: UpdateStatusReasonCode.yaml + $ref: "../schema/SubscribeStatusReasonCode.yaml" status_reason_message: - description: "Status reascon code message, if any, Helps actionanble messaging for systems/end users" + description: "Status reason code message. Helps actionable messaging for systems/end users" type: string maxLength: 999 - additional_info: - $ref: "../../common/schema/AttributeNameValueList.yaml" + subscriptions: + type: array + items: + $ref: SubscriptionInfo.yaml + pagination: + $ref: "../../common/schema/Pagination.yaml" locale: $ref: "../../common/schema/LanguageCode.yaml" required: - reference_id - timestamp - - fa - status -required: +required: - transaction_id - - update_response \ No newline at end of file + - correlation_id + - subscribe_response + \ No newline at end of file diff --git a/src/registry/dr/SubscriptionInfo.yaml b/src/registry/dr/SubscriptionInfo.yaml new file mode 100644 index 0000000..79df3a2 --- /dev/null +++ b/src/registry/dr/SubscriptionInfo.yaml @@ -0,0 +1,29 @@ +type: object +properties: + version: + type: string + default: 1.0.0 + code: + $ref: ../schema/SubscriptionCode.yaml + status: + $ref: ../schema/SubscriptionStatus.yaml + timestamp: + $ref: ../../common/schema/DateTime.yaml + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + frequency: + $ref: ../../common/schema/EventFrequency.yaml + filter_type: + $ref: ../../common/schema/QueryType.yaml + filter: + $ref: RegistryQueries.yaml + notify_record_type: + $ref: RegistryRecordType.yaml + locale: + $ref: "../../common/schema/LanguageCode.yaml" +required: + - code + - status + - timestamp \ No newline at end of file diff --git a/src/mapper/mapper_core_api_v1.0.0.yaml b/src/registry/dr_api_v1.0.0.yaml similarity index 57% rename from src/mapper/mapper_core_api_v1.0.0.yaml rename to src/registry/dr_api_v1.0.0.yaml index 1813a12..644e222 100644 --- a/src/mapper/mapper_core_api_v1.0.0.yaml +++ b/src/registry/dr_api_v1.0.0.yaml @@ -1,19 +1,66 @@ -openapi: 3.0.0 +openapi: 3.0.3 info: - title: Interoperability APIs - Financial Address Mapper Mgmt - description: | - 1. Category: Financial [Address Mapper](https://g2pconnect.cdpi.dev/protocol/interfaces/beneficiary-management/mapper-architecture) - 2. Feature: Manage financial address mapper registry - 3. Specification Level: **Draft** + title: Interoperability APIs - Disability registries version: 1.0.0 + x-logo: + url: './dci-logo.png' + backgroundColor: '#FFFFFF' + altText: 'Digital Convergence Initiative' + description: |- + The Disability Registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between Disability registry and SP system. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search disabled people based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link: + - [DR - V1.0 ](https://standards.spdci.org/standards/wip-disability-registry) + + Code directory links: + - [Impairment Type](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.01-impairmenttype-functional-limitationtype) + - [Impairment Level](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.02-impairmentlevel-functional-limitationslevel) + - [Human Assistance Type](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.03-humanassistancetype) + - [Support Frequency](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.04-supportfrequency) + - [Support Status](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.05-supportstatusenum) + - [Assistive Technology](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.06-assistivetechnologyenum) + - [Disability Status](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.07-disabilityonset) + - [Impairment Cause](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.08-impairmentcause) + - [Transport Requirement](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.9-transportrequirement) + - [Housing Type](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.10-housingtype) + - [Medical Care](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.11-medicalcareenum) + - [Housing Support](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.12-housingsupportenum) + - [Animal Assistance](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.13-animalassitanceenum) + - [Disability Status](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.14-disabilitystatus) + - [Disability Status Level](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/code-directory/cd.dr.15-disabilitystatuslevel) + + Data Objects: + - [PWDPerson](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.01-pwdperson) + - [Disability Details](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.02-disabilitydetails) + - [Disability Support](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.03-disabilitysupport) + - [Human Assistance](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.04-humanassistance) + - [Assistive Technology](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.05-assistivetechnology) + - [Medical Care](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.06-medicalcare) + - [Housing Support](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.07-housingsupport) + - [Animal Assistance](https://standards.spdci.org/standards/wip-disability-registry/disability-registry-and-sp-systems-interface/1.-crvs/data/data-objects/do.dr.08-animalassistance) + - [Member](https://standards.spdci.org/standards/v/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.03-member) + + + + Each request is build up of three parts + - signature + - header + - message contact: - name: G2P Connect - email: info@g2pconnect.global + name: DCI Social Protection + email: info@spdci.org license: - name: CDPI CC BY-SA 4.0e - url: 'https://github.com/G2P-Connect/specs/blob/main/LICENSE' + name: DCI Social Protection License + url: https://api.spdci.org/LICENSE.md + servers: - - url: "https://sandbox.dpg.org/namespace/v1.0.0" + - url: "https://sandbox.spdci.org/namespace/v1.0.0" description: Sandbox Server tags: - name: Async @@ -24,54 +71,42 @@ tags: description: Schemas - name: Status Codes description: Status Codes - - name: LinkRequest - x-displayName: LinkRequest - description: | - - - name: LinkResponse - x-displayName: LinkResponse - description: | - - - name: LinkStatusReasonCode - x-displayName: LinkStatusReasonCode + - name: SearchRequest + x-displayName: SearchRequest description: | - - - name: ResolveRequest - x-displayName: ResolveRequest + + - name: SearchResponse + x-displayName: SearchResponse description: | - - - name: ResolveResponse - x-displayName: ResolveResponse + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode description: | - - - name: ResolveStatusReasonCode - x-displayName: ResolveStatusReasonCode + + - name: SubscribeRequest + x-displayName: SubscribeRequest description: | - - - name: UpdateRequest - x-displayName: UpdateRequest + + - name: SubscribeResponse + x-displayName: SubscribeResponse description: | - - - name: UpdateResponse - x-displayName: UpdateResponse + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode description: | - - - name: UpdateStatusReasonCode - x-displayName: UpdateStatusReasonCode + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest description: | - - - name: UnlinkRequest - x-displayName: UnlinkRequest + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse description: | - - - name: UnlinkResponse - x-displayName: UnlinkResponse + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode description: | - - - name: UnlinkStatusReasonCode - x-displayName: UnlinkStatusReasonCode - description: | - + - name: TxnStatusRequest x-displayName: TxnStatusRequest description: | @@ -91,30 +126,26 @@ x-tagGroups: - Sync - name: Schema Objects tags: - - LinkRequest - - LinkResponse - - ResolveRequest - - ResolveResponse - - UpdateRequest - - UpdateResponse - - UnlinkRequest - - UnlinkResponse - - TxnStatusRequest - - TxnStatusResponse + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - UnSubscribeRequest + - UnSubscribeResponse + - EncryptedMessage - name: Status Codes tags: - - LinkStatusReasonCode - - ResolveStatusReasonCode - - UpdateStatusReasonCode - - UnlinkStatusReasonCode + - SearchStatusReasonCode + - SubscribeStatusReasonCode + - UnSubscribeStatusReasonCode paths: - /mapper/link: + /registry/search: post: - summary: "/mapper/link" - description: Linking ID to Financial Address in the mapper registry - operationId: post_mapper_link - tags: - - Async + summary: "/registry/search" + description: Search members(s) in registry using identifier or custom attributes + operationId: post_reg_search + tags: + - Async requestBody: description: "" required: true @@ -131,12 +162,12 @@ paths: - properties: action: enum: - - link + - search message: type: object description: The search data using which registry search to be performed oneOf: - - $ref: "#/components/schemas/LinkRequest" + - $ref: "#/components/schemas/SearchRequest" - $ref: "#/components/schemas/EncryptedMessage" required: - header @@ -148,7 +179,7 @@ paths: - properties: action: enum: - - link + - search responses: default: $ref: "#/components/responses/Response" @@ -160,13 +191,13 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/on-link: + + /registry/on-search: post: - summary: "/mapper/on-link" - description: Linking response throuhg callback - operationId: post_mapper_on-link + summary: "/registry/on-search" + description: Search results through callback + operationId: post_reg_on-search tags: - Async requestBody: @@ -185,11 +216,11 @@ paths: - properties: action: enum: - - on-link + - on-search message: type: object oneOf: - - $ref: '#/components/schemas/LinkResponse' + - $ref: '#/components/schemas/SearchResponse' - $ref: '#/components/schemas/EncryptedMessage' required: - header @@ -200,7 +231,7 @@ paths: - properties: action: enum: - - on-link + - on-search responses: default: $ref: "#/components/responses/Response" @@ -212,13 +243,13 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/update: + + /registry/subscribe: post: - summary: "/mapper/update" - description: Updating fa details against an id in mapper registry - operationId: put_g2p_mapper_update + summary: "/registry/subscribe" + description: Subscribe to a life event with registry + operationId: post_reg_subscribe tags: - Async requestBody: @@ -237,13 +268,12 @@ paths: - properties: action: enum: - - update - + - subscribe message: type: object - description: The search data using which registry search to be performed + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber oneOf: - - $ref: "#/components/schemas/UpdateRequest" + - $ref: "#/components/schemas/SubscribeRequest" - $ref: "#/components/schemas/EncryptedMessage" required: - header @@ -255,7 +285,7 @@ paths: - properties: action: enum: - - update + - subscribe responses: default: $ref: "#/components/responses/Response" @@ -267,65 +297,13 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/on-update: + + /registry/on-subscribe: post: - summary: "/mapper/on-update" - description: Update response through callback - operationId: put_mapper_on-update - tags: - - Async - requestBody: - description: "" - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: "#/components/schemas/MsgSignature" - header: - allOf: - - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" - - properties: - action: - enum: - - on-update - message: - type: object - oneOf: - - $ref: '#/components/schemas/UpdateResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - multipart/form-data: - schema: - allOf: - - $ref: "#/components/schemas/FileInfo" - - properties: - action: - enum: - - on-update - responses: - default: - $ref: "#/components/responses/Response" - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" - security: - - Authorization: [ ] - # - Signature: [ ] - deprecated: false - /mapper/unlink: - post: - summary: "/mapper/unlink" - description: "Unlinking id from mapper registry" - operationId: post_mapper_unlink + summary: "/registry/on-subscribe" + description: Subscribe results through callback + operationId: post_reg_on-subscribe tags: - Async requestBody: @@ -344,12 +322,13 @@ paths: - properties: action: enum: - - unlink + - on-subscribe message: type: object + description: Subscription information oneOf: - - $ref: '#/components/schemas/UnlinkRequest' - - $ref: '#/components/schemas/EncryptedMessage' + - $ref: "#/components/schemas/SubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" required: - header - message @@ -360,7 +339,7 @@ paths: - properties: action: enum: - - unlink + - on-subscribe responses: default: $ref: "#/components/responses/Response" @@ -372,13 +351,12 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/on-unlink: + /registry/notify: post: - summary: "/mapper/on-unlink" - description: "Unlinking response through callback end point" - operationId: post_mapper_on-unlink + summary: "/registry/notify" + description: Registry to notify a life event to subscrbiers + operationId: post_reg_notify tags: - Async requestBody: @@ -397,11 +375,11 @@ paths: - properties: action: enum: - - on-unlink + - notify message: type: object oneOf: - - $ref: '#/components/schemas/UnlinkResponse' + - $ref: '#/components/schemas/NotifyEventRequest' - $ref: '#/components/schemas/EncryptedMessage' required: - header @@ -412,7 +390,7 @@ paths: - properties: action: enum: - - on-unlink + - notify responses: default: $ref: "#/components/responses/Response" @@ -424,13 +402,13 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/resolve: + + /registry/unsubscribe: post: - summary: "/mapper/resolve" - description: "Resolve fa / beneficiary id to a store of value" - operationId: post_mapper_resolve + summary: "/registry/unsubscribe" + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe tags: - Async requestBody: @@ -449,12 +427,13 @@ paths: - properties: action: enum: - - resolve + - unsubscribe message: type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list oneOf: - - $ref: '#/components/schemas/ResolveRequest' - - $ref: '#/components/schemas/EncryptedMessage' + - $ref: "#/components/schemas/UnSubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" required: - header - message @@ -465,7 +444,7 @@ paths: - properties: action: enum: - - resolve + - unsubscribe responses: default: $ref: "#/components/responses/Response" @@ -477,13 +456,12 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/on-resolve: + /registry/on-unsubscribe: post: - summary: "/mapper/on-resolve" - description: "Resolve response through callback end point" - operationId: post_mapper_on-resolve + summary: "/registry/on-unsubscribe" + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe tags: - Async requestBody: @@ -498,18 +476,19 @@ paths: $ref: "#/components/schemas/MsgSignature" header: allOf: - - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - $ref: "#/components/schemas/MsgHeader_V1.0.0" - properties: action: enum: - - on-resolve + - on-unsubscribe message: type: object oneOf: - - $ref: '#/components/schemas/ResolveResponse' - - $ref: '#/components/schemas/EncryptedMessage' + - $ref: "#/components/schemas/UnSubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" required: - header + - message multipart/form-data: schema: allOf: @@ -517,7 +496,7 @@ paths: - properties: action: enum: - - on-resolve + - on-unsubscribe responses: default: $ref: "#/components/responses/Response" @@ -529,14 +508,15 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/txn/status: + + + /registry/txn/status: post: - summary: "/mapper/txn/status" - description: | - Perform async status check of previous mapper transanctions using transaction_id and/or reference_id(s) - operationId: post_mapper_txnstatus + summary: "/registry/txn/status" + description: |- + The /registry/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus tags: - Async requestBody: @@ -583,13 +563,13 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/txn/on-status: + /registry/txn/on-status: post: - summary: "/mapper/txn/on-status" - description: "Response to async status check of previous mapper transanctions using callback" - operationId: post_mapper_on-txnstatus + summary: "/registry/txn/on-status" + description: |- + The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus tags: - Async requestBody: @@ -635,13 +615,13 @@ paths: $ref: "#/components/responses/HttpErrorResponse" security: - Authorization: [ ] - # - Signature: [ ] deprecated: false - /mapper/sync/link: + + /registry/sync/search: post: - summary: "/mapper/sync/link" - description: Linking ID to Financial Address in the mapper registry - operationId: post_reg_sync_link + summary: "/registry/sync/search" + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_sync_search tags: - Sync requestBody: @@ -660,19 +640,19 @@ paths: - properties: action: enum: - - link + - search message: type: object - description: The link data to map id to fa - anyOf: - - $ref: '#/components/schemas/LinkRequest' + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' - $ref: '#/components/schemas/EncryptedMessage' required: - header - message responses: default: - description: Linking response throuhg callback + description: "Registry search response" content: application/json: schema: @@ -690,7 +670,7 @@ paths: message: type: object oneOf: - - $ref: '#/components/schemas/LinkResponse' + - $ref: '#/components/schemas/SearchResponse' - $ref: '#/components/schemas/EncryptedMessage' required: - header @@ -703,11 +683,13 @@ paths: security: - Authorization: [ ] deprecated: false - /mapper/sync/update: + + /registry/sync/get-disability-support: post: - summary: "/mapper/sync/update" - description: Update ID or Financial Address in the mapper registry - operationId: post_reg_sync_update + summary: "/registry/sync/get-disability-support" + description: |- + check if member is registered as disabled + operationId: post_reg_get_disability_support tags: - Sync requestBody: @@ -726,19 +708,27 @@ paths: - properties: action: enum: - - link + - search message: type: object - description: The link data to map id to fa - anyOf: - - $ref: '#/components/schemas/UpdateRequest' - - $ref: '#/components/schemas/EncryptedMessage' + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/GetDisabilitySupportRequest' + - $ref: "#/components/schemas/EncryptedMessage" required: - header - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search responses: default: - description: Linking response throuhg callback + description: "support response" content: application/json: schema: @@ -756,7 +746,7 @@ paths: message: type: object oneOf: - - $ref: '#/components/schemas/UpdateResponse' + - $ref: '#/components/schemas/GetDisabilitySupportResponse' - $ref: '#/components/schemas/EncryptedMessage' required: - header @@ -766,14 +756,14 @@ paths: $ref: "#/components/responses/HttpErrorResponse" '500': $ref: "#/components/responses/HttpErrorResponse" - security: - - Authorization: [ ] deprecated: false - /mapper/sync/unlink: + + /registry/sync/get-disability-details: post: - summary: "/mapper/sync/unlink" - description: Unlink ID to Financial Address in the mapper registry - operationId: post_reg_sync_unlink + summary: "/registry/sync/get-disability-details" + description: |- + check if member is registered as disabled + operationId: post_reg_get_disability_details tags: - Sync requestBody: @@ -792,19 +782,27 @@ paths: - properties: action: enum: - - link + - search message: type: object - description: Request message to unlink id from fa - anyOf: - - $ref: '#/components/schemas/UnlinkRequest' - - $ref: '#/components/schemas/EncryptedMessage' + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/GetDisabilitySupportRequest' + - $ref: "#/components/schemas/EncryptedMessage" required: - header - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search responses: default: - description: Unlink response throuhg callback + description: "support response" content: application/json: schema: @@ -822,7 +820,7 @@ paths: message: type: object oneOf: - - $ref: '#/components/schemas/UnlinkResponse' + - $ref: '#/components/schemas/GetDisabilityInfoResponse' - $ref: '#/components/schemas/EncryptedMessage' required: - header @@ -832,14 +830,14 @@ paths: $ref: "#/components/responses/HttpErrorResponse" '500': $ref: "#/components/responses/HttpErrorResponse" - security: - - Authorization: [ ] deprecated: false - /mapper/sync/resolve: + + /registry/sync/disabled: post: - summary: "/mapper/sync/resolve" - description: Resolve ID to a Financial Address in the mapper registry - operationId: post_reg_sync_resolve + summary: "/registry/sync/get-disability-status" + description: |- + check if member is registered as disabled + operationId: post_reg_disabled tags: - Sync requestBody: @@ -858,19 +856,27 @@ paths: - properties: action: enum: - - link + - search message: type: object - description: Request message to resolve id to a fa - anyOf: - - $ref: '#/components/schemas/ResolveRequest' - - $ref: '#/components/schemas/EncryptedMessage' + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/DisabledRequest' + - $ref: "#/components/schemas/EncryptedMessage" required: - header - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search responses: default: - description: Resolve response through callback + description: "support response" content: application/json: schema: @@ -888,7 +894,7 @@ paths: message: type: object oneOf: - - $ref: '#/components/schemas/ResolveResponse' + - $ref: "#/components/schemas/DisabledResponse" - $ref: '#/components/schemas/EncryptedMessage' required: - header @@ -898,217 +904,74 @@ paths: $ref: "#/components/responses/HttpErrorResponse" '500': $ref: "#/components/responses/HttpErrorResponse" - security: - - Authorization: [ ] - deprecated: false - /registry/sync/txn/status: - post: - summary: "/registry/sync/txn/status" - description: Perform sync status check of previous civil registry transanctions using transaction_id and/or reference_id(s) - operationId: post_reg_sync_txnstatus - tags: - - Sync - requestBody: - description: "" - required: true - content: - application/json: - schema: - type: object - properties: - signature: - $ref: "#/components/schemas/MsgSignature" - header: - allOf: - - $ref: "#/components/schemas/MsgHeader_V1.0.0" - - properties: - action: - enum: - - txn-status - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusRequest' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - - message - responses: - default: - description: "Transaction status check response" - content: - application/json: - schema: - type: object - properties: - signature: - $ref: "#/components/schemas/MsgSignature" - header: - allOf: - - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" - - properties: - action: - enum: - - txn-on-status - message: - type: object - oneOf: - - $ref: '#/components/schemas/TxnStatusResponse' - - $ref: '#/components/schemas/EncryptedMessage' - required: - - header - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" - security: - - Authorization: [ ] deprecated: false + components: schemas: - ###### src/extensions/cdpi schema objects - cdpi_PersonId: - $ref: ../extensions/cdpi/PersonId.yaml - cdpi_FinancialAddress: - $ref: ../extensions/cdpi/FinancialAddress.yaml - cdpi_FinancialAddressList: - $ref: ../extensions/cdpi/FinancialAddressList.yaml - - ###### src/extensions/dci schema objects - ###### src/extensions/fhir schema objects - - ###### src/extensions/google schema objects - GooglePlusCode: - $ref: ../extensions/google/GooglePlusCode.yaml - ###### src/extensions/mosip schema objects - ###### src/extensions/nid schema objects - ###### src/extensions/openid schema objects - openid_Address: - $ref: ../extensions/openid/Address.yaml - openid_PersonRecord: - $ref: ../extensions/openid/PersonRecord.yaml - openid_PersonDocDetails: - $ref: ../extensions/openid/PersonDocDetails.yaml - - ###### src/registry/schema/core schema objects - AccountProviderInfo: - $ref: schema/AccountProviderInfo.yaml - LinkRequest: - $ref: schema/LinkRequest.yaml - LinkResponse: - $ref: schema/LinkResponse.yaml - LinkStatusReasonCode: - $ref: schema/LinkStatusReasonCode.yaml - ResolveRequest: - $ref: schema/ResolveRequest.yaml - ResolveResponse: - $ref: schema/ResolveResponse.yaml - ResolveStatusReasonCode: - $ref: schema/ResolveStatusReasonCode.yaml + ###### src/registry/schema objects + NotifyEventRequest: + $ref: dr/NotifyEventRequest.yaml + SearchRequest: + $ref: dr/SearchRequest.yaml + SearchResponse: + $ref: dr/SearchResponse.yaml + SearchStatusReasonCode: + $ref: schema/SearchStatusReasonCode.yaml + SubscribeRequest: + $ref: dr/SubscribeRequest.yaml + SubscribeResponse: + $ref: dr/SubscribeResponse.yaml + SubscribeStatusReasonCode: + $ref: schema/SubscribeStatusReasonCode.yaml + SubscriptionStatus: + $ref: schema/SubscriptionStatus.yaml + UnSubscribeRequest: + $ref: schema/UnSubscribeRequest.yaml + UnSubscribeResponse: + $ref: schema/UnSubscribeResponse.yaml + UnSubscribeStatusReasonCode: + $ref: schema/UnSubscribeStatusReasonCode.yaml + GetDisabilitySupportRequest: + $ref: dr/GetDisabilitySupportRequest.yaml + GetDisabilitySupportResponse: + $ref: dr/GetDisabilitySupportResponse.yaml + GetDisabilityInfoResponse: + $ref: dr/GetDisabilityInfoResponse.yaml + DisabledRequest: + $ref: dr/DisabledRequest.yaml + DisabledResponse: + $ref: dr/DisabledResponse.yaml TxnStatusRequest: $ref: schema/TxnStatusRequest.yaml TxnStatusResponse: - $ref: schema/TxnStatusResponse.yaml - UnlinkRequest: - $ref: schema/UnlinkRequest.yaml - UnlinkResponse: - $ref: schema/UnlinkResponse.yaml - UnlinkStatusReasonCode: - $ref: schema/UnlinkStatusReasonCode.yaml - UpdateRequest: - $ref: schema/UpdateRequest.yaml - UpdateResponse: - $ref: schema/UpdateResponse.yaml - UpdateStatusReasonCode: - $ref: schema/UpdateStatusReasonCode.yaml - - + $ref: schema/TxnStatusResponse.yaml + ###### Common schema objects - Ack: - $ref: ../common/schema/Ack.yaml - AdditionalInfo: - $ref: ../common/schema/AdditionalInfo.yaml - AttributeNameValue: - $ref: ../common/schema/AttributeNameValue.yaml - AttributeNameValueList: - $ref: ../common/schema/AttributeNameValueList.yaml - AttributeValue: - $ref: ../common/schema/AttributeValue.yaml - Consent: - $ref: ../common/schema/Consent.yaml - DateTime: - $ref: ../common/schema/DateTime.yaml EncryptedMessage: $ref: ../common/schema/EncryptedMessage.yaml Error: $ref: ../common/schema/Error.yaml - ExpCondition: - $ref: ../common/schema/ExpCondition.yaml - ExpOperator: - $ref: ../common/schema/ExpOperator.yaml - ExpPredicate: - $ref: ../common/schema/ExpPredicate.yaml - ExpPredicateList: - $ref: ../common/schema/ExpPredicateList.yaml - ExpPredicateWithCondition: - $ref: ../common/schema/ExpPredicateWithCondition.yaml - ExpPredicateWithConditionList: - $ref: ../common/schema/ExpPredicateWithConditionList.yaml ExpTemplate: - $ref: ../common/schema/ExpTemplate.yaml + $ref: dr/ExpTemplate.yaml FileInfo: $ref: ../common/schema/FileInfo.yaml - LanguageCode: - $ref: ../common/schema/LanguageCode.yaml - LatLong: - $ref: ../common/schema/LatLong.yaml - Meta: - $ref: ../common/schema/Meta.yaml MsgCallbackHeader_V1.0.0: - $ref: ../common/schema/MsgCallbackHeader_V1.0.0.yaml + $ref: dr/MsgCallbackHeader_V1.0.0.yaml MsgHeader_V1.0.0: - $ref: ../common/schema/MsgHeader_V1.0.0.yaml + $ref: dr/MsgHeader_V1.0.0.yaml MsgHeaderStatusReasonCode: $ref: ../common/schema/MsgHeaderStatusReasonCode.yaml MsgSignature: $ref: ../common/schema/MsgSignature.yaml - Pagination: - $ref: ../common/schema/Pagination.yaml - PaginationRequest: - $ref: ../common/schema/PaginationRequest.yaml - ReferenceId: - $ref: ../common/schema/ReferenceId.yaml - ReferenceIdList: - $ref: ../common/schema/ReferenceIdList.yaml - RequestStatus: - $ref: ../common/schema/RequestStatus.yaml - SearchSort: - $ref: ../common/schema/SearchSort.yaml - SearchSortList: - $ref: ../common/schema/SearchSortList.yaml - TransactionId: - $ref: ../common/schema/TransactionId.yaml - parameters: - accept-language: - $ref: ../common/parameter/accept-language.yaml - timestamp: - $ref: ../common/parameter/timestamp.yaml - transaction_id: - $ref: ../common/parameter/transaction_id.yaml - summary_only: - $ref: ../common/parameter/summary_only.yaml - beneficiary_id: - $ref: ../common/parameter/beneficiary_id.yaml + responses: HttpErrorResponse: $ref: ../common/response/HttpErrorResponse.yaml Response: - $ref: ../common/response/Response.yaml + $ref: ../common/response/Response.yaml securitySchemes: Authorization: - $ref: ../common/security/Authorization.yaml \ No newline at end of file + $ref: ../common/security/Authorization.yaml diff --git a/src/registry/ess/EnrolledRequest.yaml b/src/registry/ess/EnrolledRequest.yaml new file mode 100644 index 0000000..5ffd13e --- /dev/null +++ b/src/registry/ess/EnrolledRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Registry to notify a event to subscribers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + enrolled_criteria: + $ref: ../../extensions/ess/EnrolledCriteria.yaml +required: + - transaction_id + - enrolled_criteria \ No newline at end of file diff --git a/src/registry/ess/EnrolledResponse.yaml b/src/registry/ess/EnrolledResponse.yaml new file mode 100644 index 0000000..e53bcd7 --- /dev/null +++ b/src/registry/ess/EnrolledResponse.yaml @@ -0,0 +1,42 @@ +type: object + +description: Response to verify enrollment status request. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + enrolled_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + enrolled_status: + description: "Indicates the status of the beneficiary registered in a program." + type: string + enum: + - Active + - Deceased + - Suspended + - Inactive + - Reinstated + - Awaiting Renewal + required: + - reference_id + - timestamp + - status + - enrolled_status +required: + - transaction_id + - correlation_id + - enrolled_response diff --git a/src/registry/ess/ExpTemplate.yaml b/src/registry/ess/ExpTemplate.yaml new file mode 100644 index 0000000..1eda105 --- /dev/null +++ b/src/registry/ess/ExpTemplate.yaml @@ -0,0 +1,38 @@ +type: object +description: Identifier type and value object +properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "idtype-value", "expression" + example: "ns:org:QueryType:expression" + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + collection: "Group" + query: + $and: [ + { + poverty_score: { $lt: 5 } + }, + { + location: { $eq: "central_region" } + }, + { + group_size: { $lt: 5 } + } + ] + \ No newline at end of file diff --git a/src/registry/ess/MsgCallbackHeader_V1.0.0.yaml b/src/registry/ess/MsgCallbackHeader_V1.0.0.yaml new file mode 100644 index 0000000..1a5e4ab --- /dev/null +++ b/src/registry/ess/MsgCallbackHeader_V1.0.0.yaml @@ -0,0 +1,56 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to reliable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integrity, ie Signature intact. + type: string + example: "789" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../../common/schema/MsgHeaderStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message, if any, Helps actionable messaging for system/end users" + type: string + maxLength: 999 + total_count: + description: "Total no of requests present in the message request" + type: integer + example: 21800 + completed_count: + description: "No of requests in completed state. Complete includes success and error requests due to functional errors" + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'ess.example.org' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: 'spmis.example.org' + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - status \ No newline at end of file diff --git a/src/registry/ess/MsgHeader_V1.0.0.yaml b/src/registry/ess/MsgHeader_V1.0.0.yaml new file mode 100644 index 0000000..0e6f5b6 --- /dev/null +++ b/src/registry/ess/MsgHeader_V1.0.0.yaml @@ -0,0 +1,53 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "123" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property. + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'spmis.example.org' + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: "https://spmis.example.org/consumer-namespace/callback/on-search" + receiver_id: + description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions. + type: string + example: 'ess.example.org' + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - sender_id + - total_count \ No newline at end of file diff --git a/src/registry/ess/MsgSyncHeader_V1.0.0.yaml b/src/registry/ess/MsgSyncHeader_V1.0.0.yaml new file mode 100644 index 0000000..1aa81d8 --- /dev/null +++ b/src/registry/ess/MsgSyncHeader_V1.0.0.yaml @@ -0,0 +1,45 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "123" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property. + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'spmis.example.org' + receiver_id: + description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions. + type: string + example: 'ess.example.org' + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - sender_id + - total_count \ No newline at end of file diff --git a/src/registry/ess/NotifyEventRequest.yaml b/src/registry/ess/NotifyEventRequest.yaml new file mode 100644 index 0000000..4f846b5 --- /dev/null +++ b/src/registry/ess/NotifyEventRequest.yaml @@ -0,0 +1,42 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + $ref: RegistryRecord.yaml + required: + - reg_record_type + - reg_records + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - data +required: + - transaction_id + - notify_event \ No newline at end of file diff --git a/src/registry/ess/QueryType.yaml b/src/registry/ess/QueryType.yaml new file mode 100644 index 0000000..0b53640 --- /dev/null +++ b/src/registry/ess/QueryType.yaml @@ -0,0 +1,6 @@ +type: string +description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values +enum: ["idtype-value", "expression", "predicate" ] +example: "expression" \ No newline at end of file diff --git a/src/registry/ess/ReceiptRequest.yaml b/src/registry/ess/ReceiptRequest.yaml new file mode 100644 index 0000000..a64e28d --- /dev/null +++ b/src/registry/ess/ReceiptRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + receipt_information: + $ref: ../../extensions/ess/ReceiptInformation.yaml +required: + - transaction_id + - receipt_information \ No newline at end of file diff --git a/src/registry/ess/ReceiptResponse.yaml b/src/registry/ess/ReceiptResponse.yaml new file mode 100644 index 0000000..2d4069a --- /dev/null +++ b/src/registry/ess/ReceiptResponse.yaml @@ -0,0 +1,10 @@ +type: object +description: Event notification information +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + receipt_information: + $ref: ../../extensions/ess/ReceiptInformation.yaml +required: + - transaction_id + - receipt_information \ No newline at end of file diff --git a/src/registry/ess/RegistryEventType.yaml b/src/registry/ess/RegistryEventType.yaml new file mode 100644 index 0000000..849202c --- /dev/null +++ b/src/registry/ess/RegistryEventType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + The ESS receive data from SP system and vice versa, it has to differenciate of details based on event type, Usually SP system sends referrals and enrollment status change events to ESS + + 1 : enrolment
+ 2 : enrolment_status_change
+ +enum: + - "enrolment" + - "enrolment_status_change" +example: "enrolment" \ No newline at end of file diff --git a/src/registry/ess/RegistryQueries.yaml b/src/registry/ess/RegistryQueries.yaml new file mode 100644 index 0000000..5d71842 --- /dev/null +++ b/src/registry/ess/RegistryQueries.yaml @@ -0,0 +1,10 @@ +description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditions. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 +anyOf: + - $ref: ../ess/ExpTemplate.yaml + - $ref: ../../common/schema/IdentifierTypeValue.yaml + - $ref: ../../common/schema/ExpPredicateWithConditionList.yaml \ No newline at end of file diff --git a/src/registry/ess/RegistryRecord.yaml b/src/registry/ess/RegistryRecord.yaml new file mode 100644 index 0000000..3e6aade --- /dev/null +++ b/src/registry/ess/RegistryRecord.yaml @@ -0,0 +1,8 @@ +type: object +description: | + The "Member" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ibr/v1/Member.jsonld
+ @type: "Member"
+ @container: "@set"
+example: + $ref: "../../extensions/ess/Member.yaml" \ No newline at end of file diff --git a/src/registry/ess/RegistryRecordType.yaml b/src/registry/ess/RegistryRecordType.yaml new file mode 100644 index 0000000..9f769d8 --- /dev/null +++ b/src/registry/ess/RegistryRecordType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + @context: https://schema.spdci.org/extensions/ess/v1/Member.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "Member" +example: "Member" \ No newline at end of file diff --git a/src/registry/ess/RegistryType.yaml b/src/registry/ess/RegistryType.yaml new file mode 100644 index 0000000..1206b0a --- /dev/null +++ b/src/registry/ess/RegistryType.yaml @@ -0,0 +1,10 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/RegistryType.jsonld
+ @type: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:ESS" +example: "ns:org:RegistryType:ESS" diff --git a/src/registry/ess/SearchRequest.yaml b/src/registry/ess/SearchRequest.yaml new file mode 100644 index 0000000..9fe941d --- /dev/null +++ b/src/registry/ess/SearchRequest.yaml @@ -0,0 +1,53 @@ +type: object +description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditional expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + search_request: + type: array + description: | + 1. Batch requests enable multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: "../../common/schema/DateTime.yaml" + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + query_type: + $ref: QueryType.yaml + query: + $ref: RegistryQueries.yaml + sort: + $ref: ../../common/schema/SearchSortList.yaml + pagination: + $ref: ../../common/schema/PaginationRequest.yaml + consent: + $ref: ../../common/schema/Consent.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - query_type + - query + locale: + $ref: ../../common/schema/LanguageCode.yaml + required: + - reference_id + - timestamp + - search_criteria +required: + - transaction_id + - search_request \ No newline at end of file diff --git a/src/registry/ess/SearchResponse.yaml b/src/registry/ess/SearchResponse.yaml new file mode 100644 index 0000000..0bc055b --- /dev/null +++ b/src/registry/ess/SearchResponse.yaml @@ -0,0 +1,60 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + description: | + The "Member" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ess/v1/Member.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + $ref: "../../extensions/ess/Member.yaml" + required: + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response + \ No newline at end of file diff --git a/src/registry/ess/SubscribeRequest.yaml b/src/registry/ess/SubscribeRequest.yaml new file mode 100644 index 0000000..e644b4a --- /dev/null +++ b/src/registry/ess/SubscribeRequest.yaml @@ -0,0 +1,47 @@ +type: object +description: Subscribe to a life event with crvs +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: ../../common/schema/ReferenceId.yaml + timestamp: + $ref: ../../common/schema/DateTime.yaml + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + frequency: + $ref: ../../common/schema/EventFrequency.yaml + filter_type: + $ref: ../../common/schema/QueryType.yaml + filter: + $ref: ../schema/RegistryQueries.yaml + notify_record_type: + $ref: RegistryRecordType.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - subscribe_criteria +required: + - transaction_id + - subscribe_request \ No newline at end of file diff --git a/src/mapper/schema/LinkResponse.yaml b/src/registry/ess/SubscribeResponse.yaml similarity index 60% rename from src/mapper/schema/LinkResponse.yaml rename to src/registry/ess/SubscribeResponse.yaml index 73c2be4..657bb90 100644 --- a/src/mapper/schema/LinkResponse.yaml +++ b/src/registry/ess/SubscribeResponse.yaml @@ -1,31 +1,31 @@ type: object -description: 'Beneficiary ID to Store of value account linking response' +description: Response to subscribe request. properties: transaction_id: $ref: ../../common/schema/TransactionId.yaml correlation_id: $ref: ../../common/schema/CorrelationId.yaml - link_response: + subscribe_response: type: array - items: + items: type: object - properties: + properties: reference_id: $ref: "../../common/schema/ReferenceId.yaml" timestamp: $ref: ../../common/schema/DateTime.yaml - fa: - $ref: ../../extensions/cdpi/FinancialAddress.yaml status: $ref: "../../common/schema/RequestStatus.yaml" status_reason_code: - $ref: "./LinkStatusReasonCode.yaml" + $ref: "../schema/SubscribeStatusReasonCode.yaml" status_reason_message: - description: "Status reascon code message. Helps actionanble messaging for systems/end users" + description: "Status reason code message. Helps actionanble messaging for systems/end users" type: string maxLength: 999 - additional_info: - $ref: "../../common/schema/AttributeNameValueList.yaml" + subscriptions: + type: array + items: + $ref: SubscriptionInfo.yaml locale: $ref: "../../common/schema/LanguageCode.yaml" required: @@ -34,4 +34,6 @@ properties: - status required: - transaction_id - - link_response \ No newline at end of file + - correlation_id + - subscribe_response + \ No newline at end of file diff --git a/src/registry/ess/SubscriptionInfo.yaml b/src/registry/ess/SubscriptionInfo.yaml new file mode 100644 index 0000000..79df3a2 --- /dev/null +++ b/src/registry/ess/SubscriptionInfo.yaml @@ -0,0 +1,29 @@ +type: object +properties: + version: + type: string + default: 1.0.0 + code: + $ref: ../schema/SubscriptionCode.yaml + status: + $ref: ../schema/SubscriptionStatus.yaml + timestamp: + $ref: ../../common/schema/DateTime.yaml + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + frequency: + $ref: ../../common/schema/EventFrequency.yaml + filter_type: + $ref: ../../common/schema/QueryType.yaml + filter: + $ref: RegistryQueries.yaml + notify_record_type: + $ref: RegistryRecordType.yaml + locale: + $ref: "../../common/schema/LanguageCode.yaml" +required: + - code + - status + - timestamp \ No newline at end of file diff --git a/src/disburse/schema/TxnStatusRequest.yaml b/src/registry/ess/TxnStatusRequest.yaml similarity index 93% rename from src/disburse/schema/TxnStatusRequest.yaml rename to src/registry/ess/TxnStatusRequest.yaml index 2e5e9c2..3b23b39 100644 --- a/src/disburse/schema/TxnStatusRequest.yaml +++ b/src/registry/ess/TxnStatusRequest.yaml @@ -11,7 +11,7 @@ properties: txn_type: type: string description: txn type to fetch status - enum: ["disburse", "search"] + enum: ["search","subscribe","receipt"] attribute_type: type: string enum: @@ -19,7 +19,7 @@ properties: - "reference_id_list" - "correlation_id" attribute_value: - oneOf: + anyOf: - $ref: ../../common/schema/TransactionId.yaml - $ref: ../../common/schema/ReferenceIdList.yaml - $ref: ../../common/schema/CorrelationId.yaml diff --git a/src/disburse/schema/TxnStatusResponse.yaml b/src/registry/ess/TxnStatusResponse.yaml similarity index 73% rename from src/disburse/schema/TxnStatusResponse.yaml rename to src/registry/ess/TxnStatusResponse.yaml index 86798e8..24a04cd 100644 --- a/src/disburse/schema/TxnStatusResponse.yaml +++ b/src/registry/ess/TxnStatusResponse.yaml @@ -11,13 +11,11 @@ properties: txn_type: type: string description: txn type to fetch status - enum: ["on-disburse", "on-search"] + enum: ["search","subscribe","receipt","enrolled"] txn_status: - oneOf: - - $ref: DisburseResponse.yaml - - $ref: SearchRequest.yaml - example: - $ref: DisburseResponse.yaml + anyOf: + - $ref: SearchResponse.yaml + - $ref: ReceiptRequest.yaml required: - txn_type - txn_status diff --git a/src/registry/ess_api_v1.0.0.yaml b/src/registry/ess_api_v1.0.0.yaml new file mode 100644 index 0000000..53be865 --- /dev/null +++ b/src/registry/ess_api_v1.0.0.yaml @@ -0,0 +1,915 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Employment Support System + version: 1.0.0 + x-logo: + url: './dci-logo.png' + backgroundColor: '#FFFFFF' + altText: 'Digital Convergence Initiative' + description: |- + The ESS(Employment Support System) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between ESS and SP-System. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 3. checkEnrolment : the check-enrolled API is a special type of search to return the enrolment status , can be executed from SP to ESS or vice versa + + Gitbook reference link[WIP]: + - [ESS - V1.0 ]() + + Code directory links: + - [Employment Type]() + - [Enrollment Status]() + - [Umemployment Reason]() + + Data Objects: + - [Employment Info]() + - [Group]() + - [Member]() + + + Each request is build up of three parts + - signature + - header + - message + + Information about each part is given below + + **Signature:** + - The signature is used to verify the integrity of the message. + - The signature is a hash of the message and is encrypted using the private key of the sender. + - The receiver can verify the signature using the public key of the sender. + + **Header:** + - The header contains information about various message header, refer to the header schema for more details. + + **Message:** + + - The message contains the actual payload of the message. + - Refer example section to get sample data and also read Gitbook for details data objects + - The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" + + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: https://api.spdci.org/LICENSE.md + +servers: + - url: "https://sandbox.spdci.org/namespace/v1.0.0" + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EnrolledRequest + x-displayName: EnrolledRequest + description: | + + - name: EnrolledResponse + x-displayName: EnrolledResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - EnrolledRequest + - EnrolledResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode +paths: + /registry/search: + post: + summary: "/registry/search" + description: |- + The async search api will accept request and will send response to on-search endpoint. The ESS or SP-System will implement /registry/search endpoint and the SP-System or ESS shall implement /registry/on-search to receive data from the sender. + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The ESS or SP-System will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be searched in registry, this can be any of explained in RegistryQueries.yaml + + operationId: post_reg_search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: "#/components/schemas/SearchRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-search: + post: + summary: "/registry/on-search" + description: |- + The /registry/on-search end point to be implemented by SP-System to receive search results from ESS or the ESS to receive search results from SP-System. + The Sender system will send data in format explained in SearchResponse.yaml. The reg_records will contains data that can be either a Person, Member or Group depending the collection type. + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-search + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/subscribe: + post: + summary: "/registry/subscribe" + description: Subscribe to a change event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contain query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: "#/components/schemas/SubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - subscribe + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-subscribe: + post: + summary: "/registry/on-subscribe" + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: "#/components/schemas/SubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-subscribe + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/notify: + post: + summary: "/registry/notify" + description: Registry to notify an event to subscribers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - notify + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/unsubscribe: + post: + summary: "/registry/unsubscribe" + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: "#/components/schemas/UnSubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - unsubscribe + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-unsubscribe: + post: + summary: "/registry/on-unsubscribe" + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: "#/components/schemas/UnSubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-unsubscribe + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + + /registry/txn/status: + post: + summary: "/registry/txn/status" + description: |- + The /registry/txn/status will be implemented by ESS or SP-System. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-status + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/txn/on-status: + post: + summary: "/registry/txn/on-status" + description: |- + The /registry/txn/on-status will be implemented by receiver system. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-on-status + responses: + '200': + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/sync/search: + post: + summary: "/registry/sync/search" + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The ESS or SP-System will validate the request and will send response directly. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgSyncHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '200': + description: "Registry search response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/sync/check-enrollment: + post: + summary: "/registry/sync/check-enrollment" + description: |- + check status of a person if remain enrolled + operationId: post_reg_check_enrollment + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgSyncHeader_V1.0.0" + - properties: + action: + enum: + - enrollementstatus + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/EnrolledRequest' + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - enrollementstatus + responses: + '200': + description: "Transaction status check response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/EnrolledResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + deprecated: false + + /registry/sync/txn/status: + post: + summary: "/registry/sync/txn/status" + description: |- + The /registry/sync/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '200': + description: "Transaction status check response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + deprecated: false + + +components: + schemas: + NotifyEventRequest: + $ref: ess/NotifyEventRequest.yaml + SearchRequest: + $ref: ess/SearchRequest.yaml + SearchResponse: + $ref: ess/SearchResponse.yaml + SearchStatusReasonCode: + $ref: schema/SearchStatusReasonCode.yaml + SubscribeRequest: + $ref: ess/SubscribeRequest.yaml + SubscribeResponse: + $ref: ess/SubscribeResponse.yaml + SubscribeStatusReasonCode: + $ref: schema/SubscribeStatusReasonCode.yaml + SubscriptionCode: + $ref: schema/SubscriptionCode.yaml + SubscriptionCodeList: + $ref: schema/SubscriptionCodeList.yaml + SubscriptionInfo: + $ref: schema/SubscriptionInfo.yaml + SubscriptionStatus: + $ref: schema/SubscriptionStatus.yaml + UnSubscribeRequest: + $ref: schema/UnSubscribeRequest.yaml + UnSubscribeResponse: + $ref: schema/UnSubscribeResponse.yaml + UnSubscribeStatusReasonCode: + $ref: schema/UnSubscribeStatusReasonCode.yaml + TxnStatusRequest: + $ref: ess/TxnStatusRequest.yaml + TxnStatusResponse: + $ref: ess/TxnStatusResponse.yaml + EnrolledRequest: + $ref: ess/EnrolledRequest.yaml + EnrolledResponse: + $ref: ess/EnrolledResponse.yaml + EncryptedMessage: + $ref: ../common/schema/EncryptedMessage.yaml + Error: + $ref: ../common/schema/Error.yaml + FileInfo: + $ref: ../common/schema/FileInfo.yaml + MsgCallbackHeader_V1.0.0: + $ref: ess/MsgCallbackHeader_V1.0.0.yaml + MsgHeader_V1.0.0: + $ref: ess/MsgHeader_V1.0.0.yaml + MsgSyncHeader_V1.0.0: + $ref: ess/MsgSyncHeader_V1.0.0.yaml + MsgHeaderStatusReasonCode: + $ref: ../common/schema/MsgHeaderStatusReasonCode.yaml + MsgSignature: + $ref: ../common/schema/MsgSignature.yaml + + responses: + HttpErrorResponse: + $ref: ../common/response/HttpErrorResponse.yaml + Response: + $ref: ../common/response/Response.yaml + securitySchemes: + Authorization: + $ref: ../common/security/Authorization.yaml \ No newline at end of file diff --git a/src/registry/fr/ExpTemplate.yaml b/src/registry/fr/ExpTemplate.yaml new file mode 100644 index 0000000..329487e --- /dev/null +++ b/src/registry/fr/ExpTemplate.yaml @@ -0,0 +1,34 @@ +type: object +description: Identifier type and value object +properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "expression", "predicate", "idtype-value" , "graphql" + example: "ns:org:QueryType:expression" + value: + type: object + description: | + @context: https://schema.spdci.org/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + query: + $and: [ + { + farm_info.location.geo.latitude: { $eq: 9.560 } + }, + { + farm_info.location.geo.longitude: { $eq: 100.0245 } + }, + ] + \ No newline at end of file diff --git a/src/registry/fr/MsgCallbackHeader_V1.0.0.yaml b/src/registry/fr/MsgCallbackHeader_V1.0.0.yaml new file mode 100644 index 0000000..5723b6e --- /dev/null +++ b/src/registry/fr/MsgCallbackHeader_V1.0.0.yaml @@ -0,0 +1,56 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "789" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../../common/schema/MsgHeaderStatusReasonCode.yaml" + status_reason_message: + description: "Status reascon code message, if any, Helps actionable messaging for system/end users" + type: string + maxLength: 999 + total_count: + description: "Total no of requests present in the message request" + type: integer + example: 21800 + completed_count: + description: "No of requests in completed state. Complete includes success and error requests due to funcational errors" + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: 'fr.example.org' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: 'spmis.example.org' + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - status \ No newline at end of file diff --git a/src/registry/fr/MsgHeader_V1.0.0.yaml b/src/registry/fr/MsgHeader_V1.0.0.yaml new file mode 100644 index 0000000..de08ba3 --- /dev/null +++ b/src/registry/fr/MsgHeader_V1.0.0.yaml @@ -0,0 +1,53 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "123" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property. + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'spmis.example.org' + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: "https://spmis.example.org/consumer-namespace/callback/on-search" + receiver_id: + description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions. + type: string + example: 'farmer.example.org' + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - sender_id + - total_count \ No newline at end of file diff --git a/src/registry/fr/NotifyEventRequest.yaml b/src/registry/fr/NotifyEventRequest.yaml new file mode 100644 index 0000000..4f846b5 --- /dev/null +++ b/src/registry/fr/NotifyEventRequest.yaml @@ -0,0 +1,42 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + $ref: RegistryRecord.yaml + required: + - reg_record_type + - reg_records + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - data +required: + - transaction_id + - notify_event \ No newline at end of file diff --git a/src/registry/fr/RegistryEventType.yaml b/src/registry/fr/RegistryEventType.yaml new file mode 100644 index 0000000..7deeb77 --- /dev/null +++ b/src/registry/fr/RegistryEventType.yaml @@ -0,0 +1,8 @@ +type: string +description: | + The SP-System receives data from FR, usually the FR sends registration and updates events to SP-System + + 1 : Register +enum: + - "register" +example: "register" \ No newline at end of file diff --git a/src/registry/fr/RegistryQueries.yaml b/src/registry/fr/RegistryQueries.yaml new file mode 100644 index 0000000..ef3fa94 --- /dev/null +++ b/src/registry/fr/RegistryQueries.yaml @@ -0,0 +1,7 @@ +description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. +anyOf: + - $ref: ../fr/ExpTemplate.yaml + - $ref: ../../common/schema/IdentifierTypeValue.yaml + - $ref: ../../common/schema/ExpPredicateWithConditionList.yaml \ No newline at end of file diff --git a/src/registry/fr/RegistryRecord.yaml b/src/registry/fr/RegistryRecord.yaml new file mode 100644 index 0000000..c19f624 --- /dev/null +++ b/src/registry/fr/RegistryRecord.yaml @@ -0,0 +1,8 @@ +type: object +description: | + The "group" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/fr/v1/FRPerson.jsonld
+ @type: "FRPerson"
+ @container: "@set"
+example: + $ref: "../../extensions/fr/FRPerson.yaml" \ No newline at end of file diff --git a/src/registry/fr/RegistryRecordType.yaml b/src/registry/fr/RegistryRecordType.yaml new file mode 100644 index 0000000..47dd5df --- /dev/null +++ b/src/registry/fr/RegistryRecordType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Farmer" +example: "spdci-extensions-dci:Farmer" \ No newline at end of file diff --git a/src/registry/fr/RegistryType.yaml b/src/registry/fr/RegistryType.yaml new file mode 100644 index 0000000..3d0ef99 --- /dev/null +++ b/src/registry/fr/RegistryType.yaml @@ -0,0 +1,10 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/RegistryType.jsonld
+ @type: "@context"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:FR" +example: "ns:org:RegistryType:FR" diff --git a/src/registry/fr/SearchRequest.yaml b/src/registry/fr/SearchRequest.yaml new file mode 100644 index 0000000..3d0ffe2 --- /dev/null +++ b/src/registry/fr/SearchRequest.yaml @@ -0,0 +1,53 @@ +type: object +description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditioanl expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + search_request: + type: array + description: | + 1. Batch requests enabel multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: "../../common/schema/DateTime.yaml" + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + query_type: + $ref: ../../common/schema/QueryType.yaml + query: + $ref: RegistryQueries.yaml + sort: + $ref: ../../common/schema/SearchSortList.yaml + pagination: + $ref: ../../common/schema/PaginationRequest.yaml + consent: + $ref: ../../common/schema/Consent.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - query_type + - query + locale: + $ref: ../../common/schema/LanguageCode.yaml + required: + - reference_id + - timestamp + - search_criteria +required: + - transaction_id + - search_request \ No newline at end of file diff --git a/src/registry/fr/SearchResponse.yaml b/src/registry/fr/SearchResponse.yaml new file mode 100644 index 0000000..b434da9 --- /dev/null +++ b/src/registry/fr/SearchResponse.yaml @@ -0,0 +1,61 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + type: array + description: | + The "Entity" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/fr/v1/FRPerson.jsonld
+ @type: "FRPerson"
+ @container: "@set"
+ items: + $ref: "../../extensions/fr/FRPerson.yaml" + required: + - reg_record_type + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response + \ No newline at end of file diff --git a/src/registry/fr_api_v1.0.0.yaml b/src/registry/fr_api_v1.0.0.yaml new file mode 100644 index 0000000..25bf346 --- /dev/null +++ b/src/registry/fr_api_v1.0.0.yaml @@ -0,0 +1,814 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Farmer registries + version: 1.0.0 + x-logo: + url: './dci-logo.png' + backgroundColor: '#FFFFFF' + altText: 'Digital Convergence Initiative' + description: |- + The Farmer registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between Farmer registry and SP system. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in farmer registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link: + - [FR - V1.0 ](https://standards.spdci.org/standards/wip-farmers-registry) + + Code directory links: + - [CropTypeEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.01-croptypeenum) + - [CropEndUse](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.02-cropsenduse) + - [LandTenureEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.03-landtenureenum) + - [MeasurementUnitEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.04-measurementunitenum) + - [FarmTypeEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.05-farmtypeenum) + - [MachineriesEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.06-machineriesenum) + - [AnimalsEnum](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.07-animalsenum) + - [AquaCulture](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.08-aquaculture) + - [AgriSupportActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.09-agrisupportactivities) + - [AquaSupportActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.10-aquasupportactivities) + - [FertiliserType](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.11-fertilisertype) + - [livestockSystem](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.12-livestocksystem) + - [EquipmentSource](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.13-equipmentsource) + - [IrrigationWater](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.14-irrigationwater) + - [CropActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.15-cropactivities) + - [ForestActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/code-directory/cd.fr.16-forestactivities) + + Data Objects: + - [Farmer](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.01-farmer) + - [FarmInfo](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.02-farminfo) + - [FarmingActivities](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.03-farmingactivities) + - [CropDetails](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.04-cropdetails) + - [LiveStockDetails](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.05-livestockdetails) + - [Machinery](https://standards.spdci.org/standards/wip-farmers-registry/farmers-registry-and-sp-system-interface/1.-crvs/data/data-objects/do.fr.06-machinery) + - [Group](https://standards.spdci.org/standards/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.02-group) + - [Member](https://standards.spdci.org/standards/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.03-member) + + + Each request is build up of three parts + - signature + - header + - message + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: https://api.spdci.org/LICENSE.md + +servers: + - url: "https://sandbox.spdci.org/namespace/v1.0.0" + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode + - SubscribeStatusReasonCode + - UnSubscribeStatusReasonCode +paths: + /registry/search: + post: + summary: "/registry/search" + description: Search person(s) in registry using identifier or custom attributes + operationId: post_reg_search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: "#/components/schemas/SearchRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-search: + post: + summary: "/registry/on-search" + description: Search results through callback + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-search + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/notify: + post: + summary: "/registry/notify" + description: Registry to notify an event to subscribers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - notify + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/subscribe: + post: + summary: "/registry/subscribe" + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: "#/components/schemas/SubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - subscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-subscribe: + post: + summary: "/registry/on-subscribe" + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: "#/components/schemas/SubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-subscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/unsubscribe: + post: + summary: "/registry/unsubscribe" + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: "#/components/schemas/UnSubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - unsubscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-unsubscribe: + post: + summary: "/registry/on-unsubscribe" + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: "#/components/schemas/UnSubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-unsubscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/txn/status: + post: + summary: "/registry/txn/status" + description: |- + The /registry/txn/status will be implemented by FR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-status + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/txn/on-status: + post: + summary: "/registry/txn/on-status" + description: |- + The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-on-status + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/sync/search: + post: + summary: "/registry/sync/search" + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The IBR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + default: + description: "Registry search response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/sync/txn/status: + post: + summary: "/registry/sync/txn/status" + description: |- + The /registry/sync/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + default: + description: "Transaction status check response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + deprecated: false + + +components: + schemas: + NotifyEventRequest: + $ref: fr/NotifyEventRequest.yaml + SearchRequest: + $ref: fr/SearchRequest.yaml + SearchResponse: + $ref: fr/SearchResponse.yaml + SearchStatusReasonCode: + $ref: schema/SearchStatusReasonCode.yaml + SubscribeRequest: + $ref: schema/SubscribeRequest.yaml + SubscribeResponse: + $ref: schema/SubscribeResponse.yaml + SubscribeStatusReasonCode: + $ref: schema/SubscribeStatusReasonCode.yaml + SubscriptionStatus: + $ref: schema/SubscriptionStatus.yaml + UnSubscribeRequest: + $ref: schema/UnSubscribeRequest.yaml + UnSubscribeResponse: + $ref: schema/UnSubscribeResponse.yaml + UnSubscribeStatusReasonCode: + $ref: schema/UnSubscribeStatusReasonCode.yaml + TxnStatusRequest: + $ref: schema/TxnStatusRequest.yaml + TxnStatusResponse: + $ref: schema/TxnStatusResponse.yaml + + ###### Common schema objects + + + EncryptedMessage: + $ref: ../common/schema/EncryptedMessage.yaml + Error: + $ref: ../common/schema/Error.yaml + FileInfo: + $ref: ../common/schema/FileInfo.yaml + MsgCallbackHeader_V1.0.0: + $ref: fr/MsgCallbackHeader_V1.0.0.yaml + MsgHeader_V1.0.0: + $ref: fr/MsgHeader_V1.0.0.yaml + MsgSignature: + $ref: ../common/schema/MsgSignature.yaml + responses: + HttpErrorResponse: + $ref: ../common/response/HttpErrorResponse.yaml + Response: + $ref: ../common/response/Response.yaml + securitySchemes: + Authorization: + $ref: ../common/security/Authorization.yaml diff --git a/src/registry/ibr/EnrolledRequest.yaml b/src/registry/ibr/EnrolledRequest.yaml new file mode 100644 index 0000000..92ac9d1 --- /dev/null +++ b/src/registry/ibr/EnrolledRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Registry to notify a event to subscribers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + enrolled_criteria: + $ref: ../../extensions/ibr/EnrolledCriteria.yaml +required: + - transaction_id + - enrolled_criteria \ No newline at end of file diff --git a/src/registry/ibr/EnrolledResponse.yaml b/src/registry/ibr/EnrolledResponse.yaml new file mode 100644 index 0000000..1de0d69 --- /dev/null +++ b/src/registry/ibr/EnrolledResponse.yaml @@ -0,0 +1,36 @@ +type: object + +description: Response to verify enrollment status request. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + enrolled_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + enrolled_status: + description: "Indicates whether the individual is registered as beneficiary ('yes') or not ('no')." + type: string + enum: ["yes", "no"] + required: + - reference_id + - timestamp + - status + - enrolled_status +required: + - transaction_id + - correlation_id + - enrolled_response diff --git a/src/registry/ibr/EnrollmentUpdatesRequest.yaml b/src/registry/ibr/EnrollmentUpdatesRequest.yaml new file mode 100644 index 0000000..959b867 --- /dev/null +++ b/src/registry/ibr/EnrollmentUpdatesRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + enrolled_updates: + $ref: ../../extensions/ibr/ReceiptInformation.yaml +required: + - transaction_id + - enrolled_updates \ No newline at end of file diff --git a/src/disburse/schema/SearchResponse.yaml b/src/registry/ibr/EnrollmentUpdatesResponse.yaml similarity index 58% rename from src/disburse/schema/SearchResponse.yaml rename to src/registry/ibr/EnrollmentUpdatesResponse.yaml index db8aec5..9ad5269 100644 --- a/src/disburse/schema/SearchResponse.yaml +++ b/src/registry/ibr/EnrollmentUpdatesResponse.yaml @@ -1,32 +1,32 @@ + type: object -description: Search response + +description: Response to subscribe request. properties: transaction_id: - $ref: "../../common/schema/TransactionId.yaml" - disbursements_status: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + enrolled_response: type: array items: type: object - description: Search response record - properties: + properties: reference_id: $ref: "../../common/schema/ReferenceId.yaml" timestamp: - $ref: "../../common/schema/DateTime.yaml" + $ref: ../../common/schema/DateTime.yaml status: $ref: "../../common/schema/RequestStatus.yaml" - status_reason_code: - $ref: "./SearchStatusReasonCode.yaml" status_reason_message: description: "Status reason code message. Helps actionanble messaging for systems/end users" type: string maxLength: 999 - locale: - $ref: "../../common/schema/LanguageCode.yaml" required: - reference_id - timestamp - status required: - transaction_id - - disbursements_status \ No newline at end of file + - correlation_id + - enrolled_response \ No newline at end of file diff --git a/src/registry/ibr/MsgCallbackHeader_V1.0.0.yaml b/src/registry/ibr/MsgCallbackHeader_V1.0.0.yaml new file mode 100644 index 0000000..6e95a6d --- /dev/null +++ b/src/registry/ibr/MsgCallbackHeader_V1.0.0.yaml @@ -0,0 +1,56 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "789" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../../common/schema/MsgHeaderStatusReasonCode.yaml" + status_reason_message: + description: "Status reascon code message, if any, Helps actionable messaging for system/end users" + type: string + maxLength: 999 + total_count: + description: "Total no of requests present in the message request" + type: integer + example: 21800 + completed_count: + description: "No of requests in complteed state. Complete includes success and error requests due to funcational errors" + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: 'ibr.example.org' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: 'spmis.example.org' + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - status \ No newline at end of file diff --git a/src/registry/ibr/MsgHeader_V1.0.0.yaml b/src/registry/ibr/MsgHeader_V1.0.0.yaml new file mode 100644 index 0000000..a661431 --- /dev/null +++ b/src/registry/ibr/MsgHeader_V1.0.0.yaml @@ -0,0 +1,53 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "123" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property. + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'spmis.example.org' + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: "https://spmis.example.org/consumer-namespace/callback/on-search" + receiver_id: + description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions. + type: string + example: 'ibr.example.org' + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - sender_id + - total_count \ No newline at end of file diff --git a/src/registry/ibr/NotifyEventRequest.yaml b/src/registry/ibr/NotifyEventRequest.yaml new file mode 100644 index 0000000..4f846b5 --- /dev/null +++ b/src/registry/ibr/NotifyEventRequest.yaml @@ -0,0 +1,42 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + $ref: RegistryRecord.yaml + required: + - reg_record_type + - reg_records + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - data +required: + - transaction_id + - notify_event \ No newline at end of file diff --git a/src/registry/ibr/ReceiptRequest.yaml b/src/registry/ibr/ReceiptRequest.yaml new file mode 100644 index 0000000..e7ac585 --- /dev/null +++ b/src/registry/ibr/ReceiptRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + receipt_information: + $ref: ../../extensions/ibr/ReceiptInformation.yaml +required: + - transaction_id + - receipt_information \ No newline at end of file diff --git a/src/registry/ibr/ReceiptResponse.yaml b/src/registry/ibr/ReceiptResponse.yaml new file mode 100644 index 0000000..3cacf7f --- /dev/null +++ b/src/registry/ibr/ReceiptResponse.yaml @@ -0,0 +1,10 @@ +type: object +description: Event notification information +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + receipt_information: + $ref: ../../extensions/ibr/ReceiptInformation.yaml +required: + - transaction_id + - receipt_information \ No newline at end of file diff --git a/src/registry/ibr/RegistryEventType.yaml b/src/registry/ibr/RegistryEventType.yaml new file mode 100644 index 0000000..93b1847 --- /dev/null +++ b/src/registry/ibr/RegistryEventType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + The IBR receive data from SP system , it has to differenciate of details based on event type, Usually SP system sends enrollement and enrollement status change events to IBR + + 1 : enrollement
+ 2 : enrollement_status_change
+ 3 : Deregister
+enum: + - "enrollement" + - "enrollement_status_change" +example: "spdci-common:RegistryEventType:enrollement" \ No newline at end of file diff --git a/src/registry/ibr/RegistryQueries.yaml b/src/registry/ibr/RegistryQueries.yaml new file mode 100644 index 0000000..20159f0 --- /dev/null +++ b/src/registry/ibr/RegistryQueries.yaml @@ -0,0 +1,10 @@ +description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 +anyOf: + - $ref: ../social/ExpTemplate.yaml + - $ref: ../../common/schema/IdentifierTypeValue.yaml + - $ref: ../../common/schema/ExpPredicateWithConditionList.yaml \ No newline at end of file diff --git a/src/registry/ibr/RegistryRecord.yaml b/src/registry/ibr/RegistryRecord.yaml new file mode 100644 index 0000000..7f036c9 --- /dev/null +++ b/src/registry/ibr/RegistryRecord.yaml @@ -0,0 +1,8 @@ +type: object +description: | + The "Member" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ibr/v1/Member.jsonld
+ @type: "Member"
+ @container: "@set"
+example: + $ref: "../../extensions/ibr/Member.yaml" \ No newline at end of file diff --git a/src/registry/ibr/RegistryRecordType.yaml b/src/registry/ibr/RegistryRecordType.yaml new file mode 100644 index 0000000..3396286 --- /dev/null +++ b/src/registry/ibr/RegistryRecordType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + @context: https://schema.spdci.org/extensions/ibr/v1/Member.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "Member" +example: "Member" \ No newline at end of file diff --git a/src/registry/ibr/RegistryType.yaml b/src/registry/ibr/RegistryType.yaml new file mode 100644 index 0000000..a6251c5 --- /dev/null +++ b/src/registry/ibr/RegistryType.yaml @@ -0,0 +1,10 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/RegistryType.jsonld
+ @type: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:IBR" +example: "ns:org:RegistryType:IBR" diff --git a/src/registry/ibr/SearchRequest.yaml b/src/registry/ibr/SearchRequest.yaml new file mode 100644 index 0000000..2ab7959 --- /dev/null +++ b/src/registry/ibr/SearchRequest.yaml @@ -0,0 +1,53 @@ +type: object +description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditional expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + search_request: + type: array + description: | + 1. Batch requests enable multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: "../../common/schema/DateTime.yaml" + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + query_type: + $ref: ../social/QueryType.yaml + query: + $ref: ../ibr/RegistryQueries.yaml + sort: + $ref: ../../common/schema/SearchSortList.yaml + pagination: + $ref: ../../common/schema/PaginationRequest.yaml + consent: + $ref: ../../common/schema/Consent.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - query_type + - query + locale: + $ref: ../../common/schema/LanguageCode.yaml + required: + - reference_id + - timestamp + - search_criteria +required: + - transaction_id + - search_request \ No newline at end of file diff --git a/src/registry/ibr/SearchResponse.yaml b/src/registry/ibr/SearchResponse.yaml new file mode 100644 index 0000000..22c2494 --- /dev/null +++ b/src/registry/ibr/SearchResponse.yaml @@ -0,0 +1,60 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionable messaging for systems/end users" + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + description: | + The "Beneficiary" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/ibr/v1/Beneficiary.jsonld
+ @type: "@context"
+ @container: "@set"
+ type: array + items: + $ref: "../../extensions/ibr/Beneficiary.yaml" + required: + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response + \ No newline at end of file diff --git a/src/registry/ibr/SubscribeRequest.yaml b/src/registry/ibr/SubscribeRequest.yaml new file mode 100644 index 0000000..e644b4a --- /dev/null +++ b/src/registry/ibr/SubscribeRequest.yaml @@ -0,0 +1,47 @@ +type: object +description: Subscribe to a life event with crvs +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: ../../common/schema/ReferenceId.yaml + timestamp: + $ref: ../../common/schema/DateTime.yaml + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + frequency: + $ref: ../../common/schema/EventFrequency.yaml + filter_type: + $ref: ../../common/schema/QueryType.yaml + filter: + $ref: ../schema/RegistryQueries.yaml + notify_record_type: + $ref: RegistryRecordType.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - subscribe_criteria +required: + - transaction_id + - subscribe_request \ No newline at end of file diff --git a/src/mapper/schema/UnlinkResponse.yaml b/src/registry/ibr/SubscribeResponse.yaml similarity index 60% rename from src/mapper/schema/UnlinkResponse.yaml rename to src/registry/ibr/SubscribeResponse.yaml index 8057a47..657bb90 100644 --- a/src/mapper/schema/UnlinkResponse.yaml +++ b/src/registry/ibr/SubscribeResponse.yaml @@ -1,15 +1,15 @@ type: object -description: ID to Store of value account unlinking response +description: Response to subscribe request. properties: transaction_id: $ref: ../../common/schema/TransactionId.yaml correlation_id: $ref: ../../common/schema/CorrelationId.yaml - unlink_response: + subscribe_response: type: array - items: + items: type: object - properties: + properties: reference_id: $ref: "../../common/schema/ReferenceId.yaml" timestamp: @@ -17,21 +17,23 @@ properties: status: $ref: "../../common/schema/RequestStatus.yaml" status_reason_code: - $ref: "./UnlinkStatusReasonCode.yaml" + $ref: "../schema/SubscribeStatusReasonCode.yaml" status_reason_message: - description: "Status reascon code message, if any, Helps actionanble messaging for systems/end users" + description: "Status reason code message. Helps actionanble messaging for systems/end users" type: string maxLength: 999 - id: - $ref: ../../extensions/cdpi/PersonId.yaml - additional_info: - $ref: ../../common/schema/AttributeNameValueList.yaml + subscriptions: + type: array + items: + $ref: SubscriptionInfo.yaml locale: $ref: "../../common/schema/LanguageCode.yaml" required: - reference_id - timestamp - status -required: +required: - transaction_id - - unlink_response \ No newline at end of file + - correlation_id + - subscribe_response + \ No newline at end of file diff --git a/src/registry/ibr/SubscriptionInfo.yaml b/src/registry/ibr/SubscriptionInfo.yaml new file mode 100644 index 0000000..5f35c7a --- /dev/null +++ b/src/registry/ibr/SubscriptionInfo.yaml @@ -0,0 +1,29 @@ +type: object +properties: + version: + type: string + default: 1.0.0 + code: + $ref: ../schema/SubscriptionCode.yaml + status: + $ref: ../schema/SubscriptionStatus.yaml + timestamp: + $ref: ../../common/schema/DateTime.yaml + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + frequency: + $ref: ../../common/schema/EventFrequency.yaml + filter_type: + $ref: ../../common/schema/QueryType.yaml + filter: + $ref: ../schema/RegistryQueries.yaml + notify_record_type: + $ref: RegistryRecordType.yaml + locale: + $ref: "../../common/schema/LanguageCode.yaml" +required: + - code + - status + - timestamp \ No newline at end of file diff --git a/src/mapper/schema/TxnStatusRequest.yaml b/src/registry/ibr/TxnStatusRequest.yaml similarity index 93% rename from src/mapper/schema/TxnStatusRequest.yaml rename to src/registry/ibr/TxnStatusRequest.yaml index c7461a0..3b23b39 100644 --- a/src/mapper/schema/TxnStatusRequest.yaml +++ b/src/registry/ibr/TxnStatusRequest.yaml @@ -11,7 +11,7 @@ properties: txn_type: type: string description: txn type to fetch status - enum: ["link", "resolve", "update", "unlink"] + enum: ["search","subscribe","receipt"] attribute_type: type: string enum: @@ -19,7 +19,7 @@ properties: - "reference_id_list" - "correlation_id" attribute_value: - oneOf: + anyOf: - $ref: ../../common/schema/TransactionId.yaml - $ref: ../../common/schema/ReferenceIdList.yaml - $ref: ../../common/schema/CorrelationId.yaml diff --git a/src/mapper/schema/TxnStatusResponse.yaml b/src/registry/ibr/TxnStatusResponse.yaml similarity index 64% rename from src/mapper/schema/TxnStatusResponse.yaml rename to src/registry/ibr/TxnStatusResponse.yaml index af14255..3fa18bc 100644 --- a/src/mapper/schema/TxnStatusResponse.yaml +++ b/src/registry/ibr/TxnStatusResponse.yaml @@ -11,15 +11,11 @@ properties: txn_type: type: string description: txn type to fetch status - enum: ["on-link", "on-resolve", "on-update", "on-unlink"] + enum: ["search","subscribe","receipt"] txn_status: - oneOf: - - $ref: LinkResponse.yaml - - $ref: ResolveResponse.yaml - - $ref: UpdateResponse.yaml - - $ref: UnlinkResponse.yaml - example: - $ref: LinkResponse.yaml + anyOf: + - $ref: SearchResponse.yaml + - $ref: ReceiptRequest.yaml required: - txn_type - txn_status diff --git a/src/registry/ibr_api_v1.0.0.yaml b/src/registry/ibr_api_v1.0.0.yaml new file mode 100644 index 0000000..8aed87a --- /dev/null +++ b/src/registry/ibr_api_v1.0.0.yaml @@ -0,0 +1,972 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Integrated Beneficiary Registry + version: 1.0.0 + x-logo: + url: './dci-logo.png' + backgroundColor: '#FFFFFF' + altText: 'Digital Convergence Initiative' + description: |- + The IBR(Integrated Beneficiary Registry) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between IBR registry and SP-System. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Enrollment updates: The enrollment updates API send details of beneficiaries enrolled in programs from SP-System + 3. Enrolled : the enrolled API is a special type of search to return the programs a beneficiary is enrolled in + + Gitbook reference link[WIP]: + - [Integrated Beneficiary Registry - V1.0 ](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0) + + Code directory links: + - [Assistance Unit](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.01-assistance_unit) + - [Enrollment Status](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.02-enrolment_status) + - [Benefit Type](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.03-benefit_type) + - [Institution Type](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.04-institution_type) + - [Legal Status](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.05-legal_status) + - [Social Protection Functions](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.06-social_protection_functions) + - [Contribution Type](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.07-contribution_type) + - [Programme Type](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/code-directory/cd.ibr.08-programme_type) + + Data Objects: + - [Beneficiary](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/data-objects/do.ibr.01-beneficiary) + - [Programme](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/data-objects/do.ibr.02-programme) + - [Benefit](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/data-objects/do.ibr.03-benefit) + - [Benefit Frequency](https://standards.spdci.org/standards/v/wip-integrated-beneficiary-registry-v1.0.0/ibr/1.-crvs/data/data-objects/do.ibr.o4-benefit-frequency) + - [Group](https://standards.spdci.org/standards/v/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.02-group) + - [Member](https://standards.spdci.org/standards/v/wip-social-registry-v1.0.0/social-registry/1.-crvs/data/data-objects/do.sr.03-member) + + + Each request is build up of three parts + - signature + - header + - message + + Information about each part is given below + + **Signature:** + - The signature is used to verify the integrity of the message. + - The signature is a hash of the message and is encrypted using the private key of the sender. + - The receiver can verify the signature using the public key of the sender. + + **Header:** + - The header contains information about various message header, refer to the header schema for more details. + + **Message:** + + - The message contains the actual payload of the message. + - Refer example section to get sample data and also read Gitbook for details data objects + - The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" + + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: https://api.spdci.org/LICENSE.md + +servers: + - url: "https://sandbox.spdci.org/namespace/v1.0.0" + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EnrollmentUpdatesRequest + x-displayName: EnrollmentUpdatesRequest + description: | + + - name: EnrollmentUpdatesResponse + x-displayName: EnrollmentUpdatesResponse + description: | + + - name: EnrolledRequest + x-displayName: EnrolledRequest + description: | + + - name: EnrolledResponse + x-displayName: EnrolledResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - EnrollmentUpdatesRequest + - EnrollmentUpdatesResponse + - EnrolledRequest + - EnrolledResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode +paths: + /registry/search: + post: + summary: "/registry/search" + description: |- + The async search api will accept request and will send response to on-search endpoint. The IBR will implement /registry/search endpoint and the SP-System shall implement /registry/on-search to receive data from IBR. + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The IBR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + + operationId: post_reg_search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: "#/components/schemas/SearchRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-search: + post: + summary: "/registry/on-search" + description: |- + The /registry/on-search end point tobe implemented by SP-System to receive search results from IBR. + The IBR will send data in format explained in SearchResponse.yaml. The reg_records will containe data that in explained in ibr/v1/Person.jsonld. + Refer example json at github [link](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/1.-crvs/data/data-objects/person#example) + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-search + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/subscribe: + post: + summary: "/registry/subscribe" + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: "#/components/schemas/SubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - subscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-subscribe: + post: + summary: "/registry/on-subscribe" + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: "#/components/schemas/SubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-subscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/notify: + post: + summary: "/registry/notify" + description: Registry to notify an event to subscribers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - notify + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/unsubscribe: + post: + summary: "/registry/unsubscribe" + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: "#/components/schemas/UnSubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - unsubscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-unsubscribe: + post: + summary: "/registry/on-unsubscribe" + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: "#/components/schemas/UnSubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-unsubscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + + /registry/txn/status: + post: + summary: "/registry/txn/status" + description: |- + The /registry/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-status + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/txn/on-status: + post: + summary: "/registry/txn/on-status" + description: |- + The /registry/txn/on-status will be implemented by SP-System. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-on-status + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/sync/search: + post: + summary: "/registry/sync/search" + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The IBR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + default: + description: "Registry search response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/sync/enrollment/updates: + post: + summary: "/registry/sync/enrollment/updates" + description: |- + The /registry/enrollments/updates endpoint will be implemented by IBR to receive details of beneficiaries enrolled in programs from SP-System. + The receipt_type and beneficiaries will be required to make request. + Three receipt types are supported as of now, they are + 1) Enrolled beneficiaries + 2) Updated beneficiaries details + The beneficiaries will contain list of beneficiaries information for which enrollments updated to be generated. + operationId: post_reg_enrollments_updates + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/EnrollmentUpdatesRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - notify + responses: + default: + $ref: "#/components/schemas/EnrollmentUpdatesResponse" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/sync/enrolled: + post: + summary: "/registry/sync/enrolled" + description: |- + search programmes person is enrolled in + operationId: post_reg_enrolled + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/EnrolledRequest' + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search + responses: + default: + $ref: "#/components/schemas/EnrolledResponse" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + deprecated: false + /registry/sync/txn/status: + post: + summary: "/registry/sync/txn/status" + description: |- + The /registry/sync/txn/status will be implemented by IBR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + default: + description: "Transaction status check response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + deprecated: false + + +components: + schemas: + NotifyEventRequest: + $ref: ibr/NotifyEventRequest.yaml + EnrollmentUpdatesRequest: + $ref: ibr/EnrollmentUpdatesRequest.yaml + EnrollmentUpdatesResponse: + $ref: ibr/EnrollmentUpdatesResponse.yaml + SearchRequest: + $ref: ibr/SearchRequest.yaml + SearchResponse: + $ref: ibr/SearchResponse.yaml + SearchStatusReasonCode: + $ref: schema/SearchStatusReasonCode.yaml + SubscribeRequest: + $ref: schema/SubscribeRequest.yaml + SubscribeResponse: + $ref: schema/SubscribeResponse.yaml + SubscribeStatusReasonCode: + $ref: schema/SubscribeStatusReasonCode.yaml + SubscriptionCode: + $ref: schema/SubscriptionCode.yaml + SubscriptionCodeList: + $ref: schema/SubscriptionCodeList.yaml + SubscriptionInfo: + $ref: schema/SubscriptionInfo.yaml + SubscriptionStatus: + $ref: schema/SubscriptionStatus.yaml + UnSubscribeRequest: + $ref: schema/UnSubscribeRequest.yaml + UnSubscribeResponse: + $ref: schema/UnSubscribeResponse.yaml + UnSubscribeStatusReasonCode: + $ref: schema/UnSubscribeStatusReasonCode.yaml + TxnStatusRequest: + $ref: ibr/TxnStatusRequest.yaml + TxnStatusResponse: + $ref: ibr/TxnStatusResponse.yaml + EnrolledRequest: + $ref: ibr/EnrolledRequest.yaml + EnrolledResponse: + $ref: ibr/EnrolledResponse.yaml + EncryptedMessage: + $ref: ../common/schema/EncryptedMessage.yaml + Error: + $ref: ../common/schema/Error.yaml + FileInfo: + $ref: ../common/schema/FileInfo.yaml + MsgCallbackHeader_V1.0.0: + $ref: ibr/MsgCallbackHeader_V1.0.0.yaml + MsgHeader_V1.0.0: + $ref: ibr/MsgHeader_V1.0.0.yaml + MsgHeaderStatusReasonCode: + $ref: ../common/schema/MsgHeaderStatusReasonCode.yaml + MsgSignature: + $ref: ../common/schema/MsgSignature.yaml + + responses: + HttpErrorResponse: + $ref: ../common/response/HttpErrorResponse.yaml + Response: + $ref: ../common/response/Response.yaml + securitySchemas: + Authorization: + $ref: ../common/security/Authorization.yaml \ No newline at end of file diff --git a/src/registry/registry_core_api_v1.0.0.yaml b/src/registry/registry_core_api_v1.0.0.yaml index 80e333f..935dba4 100644 --- a/src/registry/registry_core_api_v1.0.0.yaml +++ b/src/registry/registry_core_api_v1.0.0.yaml @@ -1,17 +1,70 @@ openapi: 3.0.3 info: - title: Interoperability APIs - Federated Registry Data Access - description: | - 1. Category: Civil & Other Federated [Registries](https://g2pconnect.cdpi.dev/protocol/interfaces/registries) - 2. Feature: Enables Data & Verifiable Credential Access - 2. Specification Level: **Draft** + title: Interoperability APIs - CORE version: 1.0.0 + x-logo: + url: './dci-logo.png' + backgroundColor: '#FFFFFF' + altText: 'Digital Convergence Initiative' + description: |- + The DCI Core interoperability APIs describes different APIs. They are generalized APIs to perform interoperable operations between a registry and SP System. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in the registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link : + - [Core DCI- V1.0.0 ](https://standards.spdci.org/standards) + + Code directory links: + - [Identifiers](https://schema.spdci.org/core/v1/code/IdentifierTypeEnum.jsonld) + - [Marital Status](https://schema.spdci.org/core/v1/code/MaritalStatusEnum.jsonld) + - [Sex](https://schema.spdci.org/core/v1/code/SexCategoryEnum.jsonld) + - [Relationship Type](https://schema.spdci.org/v1/code/RelationshipTypeEnum.jsonld) + - [Disability Type](https://schema.spdci.org/v1/code/DisabilityTypeEnum.jsonld) + - [Functional Limitation Type](https://schema.spdci.org/core/v1/code/FunctionalLimitationType.jsonld) + - [Functional Severity](https://schema.spdci.org/core/v1/code/FunctionalSeverityEnum.jsonld) + - [Education Level](https://schema.spdci.org/core/v1/code/EducationCode.jsonld) + - [Employment Status](https://schema.spdci.org/core/v1/code/EmploymentStatusEnum.jsonld) + - [Income Level](https://schema.spdci.org/core/v1/code/IncomeLevelEnum.jsonld) + - [Occupation](https://schema.spdci.org/core/v1/code/OccupationEnum.jsonld) + + Data Objects: + - [Person](https://schema.spdci.org/core/v1/data/Person.jsonld) + - [Group](https://schema.spdci.org/core/v1/data/Group.jsonld) + - [Member](https://schema.spdci.org/core/v1/data/Member.jsonld) + - [RelatedPerson](https://schema.spdci.org/core/v1/data/RelatedPerson.jsonld) + - [DisabilityInfo](https://schema.spdci.org/core/v1/data/DisabilityInfo.jsonld) + + Each request is build up of three parts + - signature + - header + - message + + Information about each part is given below + + **Signature:** + - The signature is used to verify the integrity of the message. + - The signature is a hash of the message and is encrypted using the private key of the sender. + - The receiver can verify the signature using the public key of the sender. + + **Header:** + - The header contains information about various message header, refer to the header schema for more details. + + **Message:** + + - The message contains the actual payload of the message. + - Refere example section to get sample data and also read Gitbook for details data objects + - The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" version: 1.0.0 contact: - name: G2P Connect - email: info@cdpi.dev + name: DCI Social Protection + email: info@spdci.org license: - name: CDPI CC BY-SA 4.0 - url: https://github.com/G2P-Connect/specs/blob/draft/LICENSE.md + name: DCI Social Protection License + url: https://api.spdci.org/LICENSE.md + servers: - url: "https://sandbox.spdci.org/namespace/v1.0.0" description: Sandbox Server @@ -35,7 +88,7 @@ tags: - name: SearchStatusReasonCode x-displayName: SearchStatusReasonCode description: | - + - name: SubscribeRequest x-displayName: SubscribeRequest description: | @@ -47,11 +100,11 @@ tags: - name: SubscribeStatusReasonCode x-displayName: SubscribeStatusReasonCode description: | - + - name: NotifyEventRequest x-displayName: NotifyEventRequest description: | - + - name: UnSubscribeRequest x-displayName: UnSubscribeRequest description: | @@ -63,7 +116,7 @@ tags: - name: UnSubscribeStatusReasonCode x-displayName: UnSubscribeStatusReasonCode description: | - + - name: TxnStatusRequest x-displayName: TxnStatusRequest description: | @@ -76,6 +129,7 @@ tags: x-displayName: EncryptedMessage description: | + x-tagGroups: - name: API Definitions tags: @@ -96,13 +150,18 @@ x-tagGroups: - name: Status Codes tags: - SearchStatusReasonCode - - SubscribeStatusReasonCode - - UnSubscribeStatusReasonCode paths: /registry/search: post: summary: "/registry/search" - description: Search person(s) in registry using identifier or custome attributes + description: |- + The async search api will accept request and will send response to on-search endpoint. The SR will implement /registry/search endpoint and the SPMIS shall implement /registry/on-search to receive data from SR. + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The SR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + operationId: post_reg_search tags: - Async @@ -155,8 +214,10 @@ paths: /registry/on-search: post: summary: "/registry/on-search" - description: Search results through callback - operationId: post_reg_on-search + description: |- + The /registry/on-search end point to be implemented by SPMIS to receive search results from registry. + The registry will send data in format explained in SearchResponse.yaml. The reg_records will contains data + that in explained in [Person](https://schema.spdci.org/core/v1/data/Person.jsonld), [Member](https://schema.spdci.org/core/v1/data/Member.jsonld) , [Group](https://schema.spdci.org/core/v1/data/Group.jsonld). tags: - Async requestBody: @@ -257,6 +318,7 @@ paths: security: - Authorization: [ ] deprecated: false + /registry/on-subscribe: post: summary: "/registry/on-subscribe" @@ -351,7 +413,7 @@ paths: - notify responses: default: - $ref: "#/components/responses/HttpErrorResponse" + $ref: "#/components/responses/Response" '401': $ref: "#/components/responses/HttpErrorResponse" '403': @@ -361,6 +423,7 @@ paths: security: - Authorization: [ ] deprecated: false + /registry/unsubscribe: post: summary: "/registry/unsubscribe" @@ -466,116 +529,13 @@ paths: security: - Authorization: [ ] deprecated: false -# /registry/subscriptions: -# post: -# summary: "/registry/subscriptions" -# description: To retrieve list of all subscription -# operationId: post_reg_subscriptions -# tags: -# - Async -# requestBody: -# description: "" -# required: true -# content: -# application/json: -# schema: -# type: object -# properties: -# signature: -# $ref: "#/components/schemas/MsgSignature" -# header: -# allOf: -# - $ref: "#/components/schemas/MsgHeader_V1.0.0" -# - properties: -# action: -# enum: -# - subscriptions -# message: -# type: object -# description: To perform search based on registry type or event type -# oneOf: -# - $ref: "#/components/schemas/SubscriptionListRequest" -# - $ref: "#/components/schemas/EncryptedMessage" -# required: -# - header -# - message -# multipart/form-data: -# schema: -# allOf: -# - $ref: "#/components/schemas/FileInfo" -# - properties: -# action: -# enum: -# - subscriptions -# responses: -# default: -# $ref: "#/components/responses/Response" -# '401': -# $ref: "#/components/responses/HttpErrorResponse" -# '403': -# $ref: "#/components/responses/HttpErrorResponse" -# '500': -# $ref: "#/components/responses/HttpErrorResponse" -# security: -# - Authorization: [ ] -# deprecated: false -# /registry/on-subscriptions: -# post: -# summary: "/registry/on-subscriptions" -# description: To retrive list of subscriptions -# operationId: post_reg_on-subscriptions -# tags: -# - Async -# requestBody: -# description: "" -# required: true -# content: -# application/json: -# schema: -# type: object -# properties: -# signature: -# $ref: "#/components/schemas/MsgSignature" -# header: -# allOf: -# - $ref: "#/components/schemas/MsgHeader_V1.0.0" -# - properties: -# action: -# enum: -# - on-subscriptions -# message: -# type: object -# description: The resposne to subscriber with list of subscriptions -# oneOf: -# - $ref: "#/components/schemas/SubscriptionListResponse" -# - $ref: "#/components/schemas/EncryptedMessage" -# required: -# - header -# - message -# multipart/form-data: -# schema: -# allOf: -# - $ref: "#/components/schemas/FileInfo" -# - properties: -# action: -# enum: -# - on-subscriptions -# responses: -# default: -# $ref: "#/components/responses/Response" -# '401': -# $ref: "#/components/responses/HttpErrorResponse" -# '403': -# $ref: "#/components/responses/HttpErrorResponse" -# '500': -# $ref: "#/components/responses/HttpErrorResponse" -# security: -# - Authorization: [ ] -# deprecated: false + + /registry/txn/status: post: summary: "/registry/txn/status" - description: Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s) + description: |- + The /registry/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s). operationId: post_reg_txnstatus tags: - Async @@ -627,7 +587,8 @@ paths: /registry/txn/on-status: post: summary: "/registry/txn/on-status" - description: Response to async status check of previous civil registrt transanctions using callback + description: |- + The /registry/txn/on-status will be implemented by SPMIS. The response with information about request and in some case it may contain data as well. operationId: post_reg_on-txnstatus tags: - Async @@ -675,10 +636,19 @@ paths: security: - Authorization: [ ] deprecated: false + /registry/sync/search: post: summary: "/registry/sync/search" - description: Search person(s) in registry using identifier or custome attributes + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The SR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + + operationId: post_reg_sync_search tags: - Sync @@ -741,213 +711,11 @@ paths: security: - Authorization: [ ] deprecated: false -# /registry/sync/subscribe: -# post: -# summary: " /registry/sync/subscribe" -# description: Subscribe to a life event with registry -# operationId: post_reg_sync_subscribe -# tags: -# - Sync -# requestBody: -# description: "" -# required: true -# content: -# application/json: -# schema: -# type: object -# properties: -# signature: -# $ref: "#/components/schemas/MsgSignature" -# header: -# allOf: -# - $ref: "#/components/schemas/MsgHeader_V1.0.0" -# - properties: -# action: -# enum: -# - subscribe -# message: -# type: object -# description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber -# oneOf: -# - $ref: "#/components/schemas/SubscribeRequest" -# - $ref: "#/components/schemas/EncryptedMessage" -# required: -# - header -# - message -# multipart/form-data: -# schema: -# allOf: -# - $ref: "#/components/schemas/FileInfo" -# - properties: -# action: -# enum: -# - subscribe -# responses: -# default: -# description: "Subscription response" -# content: -# application/json: -# schema: -# type: object -# properties: -# signature: -# $ref: "#/components/schemas/MsgSignature" -# header: -# allOf: -# - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" -# message: -# type: object -# oneOf: -# - $ref: '#/components/schemas/SubscribeResponse' -# - $ref: '#/components/schemas/EncryptedMessage' -# required: -# - header -# '401': -# $ref: "#/components/responses/HttpErrorResponse" -# '403': -# $ref: "#/components/responses/HttpErrorResponse" -# '500': -# $ref: "#/components/responses/HttpErrorResponse" -# security: -# - Authorization: [ ] -# deprecated: false -# /registry/sync/subscriptions: -# post: -# summary: "/registry/sync/subscriptions" -# description: To retrive list of subscriptions -# operationId: post_reg_sync_subscriptions -# tags: -# - Sync -# requestBody: -# description: "" -# required: true -# content: -# application/json: -# schema: -# type: object -# properties: -# signature: -# $ref: "#/components/schemas/MsgSignature" -# header: -# allOf: -# - $ref: "#/components/schemas/MsgHeader_V1.0.0" -# - properties: -# action: -# enum: -# - fetch_subscriptions -# message: -# type: object -# description: To perform search based on registry type or event type -# oneOf: -# - $ref: "#/components/schemas/FetchSubscriptionsRequest" -# - $ref: "#/components/schemas/EncryptedMessage" -# required: -# - header -# - message -# responses: -# default: -# description: "Subscription list response" -# content: -# application/json: -# schema: -# type: object -# properties: -# signature: -# $ref: "#/components/schemas/MsgSignature" -# header: -# allOf: -# - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" -# message: -# type: object -# oneOf: -# - $ref: '#/components/schemas/FetchSubscriptionsResponse' -# - $ref: '#/components/schemas/EncryptedMessage' -# required: -# - header -# '401': -# $ref: "#/components/responses/HttpErrorResponse" -# '403': -# $ref: "#/components/responses/HttpErrorResponse" -# '500': -# $ref: "#/components/responses/HttpErrorResponse" -# security: -# - Authorization: [ ] -# deprecated: false -# /registry/sync/unsubscribe: -# post: -# summary: "/registry/sync/unsubscribe" -# description: Unsubscribe to a life event with registry -# operationId: post_reg_sync_unsubscribe -# tags: -# - Sync -# requestBody: -# description: "" -# required: true -# content: -# application/json: -# schema: -# type: object -# properties: -# signature: -# $ref: "#/components/schemas/MsgSignature" -# header: -# allOf: -# - $ref: "#/components/schemas/MsgHeader_V1.0.0" -# - properties: -# action: -# enum: -# - unsubscribe -# message: -# type: object -# description: The unsubscribe request that contain subscription ids which to be removed from subscription list -# oneOf: -# - $ref: "#/components/schemas/UnSubscribeRequest" -# - $ref: "#/components/schemas/EncryptedMessage" -# required: -# - header -# - message -# multipart/form-data: -# schema: -# allOf: -# - $ref: "#/components/schemas/FileInfo" -# - properties: -# action: -# enum: -# - unsubscribe -# responses: -# default: -# description: "Unsubscribe response" -# content: -# application/json: -# schema: -# type: object -# properties: -# signature: -# $ref: "#/components/schemas/MsgSignature" -# header: -# allOf: -# - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" -# message: -# type: object -# oneOf: -# - $ref: '#/components/schemas/UnSubscribeResponse' -# - $ref: '#/components/schemas/EncryptedMessage' -# required: -# - header -# - message -# '401': -# $ref: "#/components/responses/HttpErrorResponse" -# '403': -# $ref: "#/components/responses/HttpErrorResponse" -# '500': -# $ref: "#/components/responses/HttpErrorResponse" -# security: -# - Authorization: [ ] -# deprecated: false /registry/sync/txn/status: post: summary: "/registry/sync/txn/status" - description: Sync status check of registry Async APIs + description: |- + The /registry/sync/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s). operationId: post_reg_sync_txnstatus tags: - Sync @@ -1009,99 +777,11 @@ paths: security: - Authorization: [ ] deprecated: false -components: - schemas: - ###### src/extensions/cdpi schema objects - cdpi_PersonId: - $ref: ../extensions/cdpi/PersonId.yaml - ###### src/extensions/dci schema objects - dci_CRVSPerson: - $ref: ../extensions/dci/CRVSPerson.yaml - dci_IdentifierType: - $ref: ../extensions/dci/IdentifierType.yaml - dci_IdentifierTypeValue: - $ref: ../extensions/dci/IdentifierTypeValue.yaml - dci_MaritalStatus: - $ref: ../extensions/dci/MaritalStatus.yaml - dci_Name: - $ref: ../extensions/dci/Name.yaml - dci_PersonRecord: - $ref: ../extensions/dci/PersonRecord.yaml - dci_RecordType: - $ref: ../extensions/dci/RecordType.yaml - dci_Sex: - $ref: ../extensions/dci/Sex.yaml - dci_VitalEvents: - $ref: ../extensions/dci/VitalEvents.yaml - - ###### src/extensions/fhir schema objects - - ###### src/extensions/google schema objects - GooglePlusCode: - $ref: ../extensions/google/GooglePlusCode.yaml - - ###### src/extensions/mosip schema objects - mosip_EventType: - $ref: ../extensions/mosip/EventType.yaml - mosip_LangaugeValue: - $ref: ../extensions/mosip/LangaugeValue.yaml - mosip_LanguageValueList: - $ref: ../extensions/mosip/LanguageValueList.yaml - mosip_MOSIPVerifiableCredential: - $ref: ../extensions/mosip/MOSIPVerifiableCredential.yaml - mosip_RecordType: - $ref: ../extensions/mosip/RecordType.yaml - mosip_RegistrationRecord: - $ref: ../extensions/mosip/RegistrationRecord.yaml - - ###### src/extensions/nid schema objects - nid_DeceasedRecord: - $ref: ../extensions/nid/DeceasedRecord.yaml - nid_Document: - $ref: ../extensions/nid/Document.yaml - nid_EKycDetails: - $ref: ../extensions/nid/EKycDetails.yaml - nid_RecordType: - $ref: ../extensions/nid/RecordType.yaml - nid_ResidentAddress: - $ref: ../extensions/nid/ResidentAddress.yaml - nid_ResidentLocalAddress: - $ref: ../extensions/nid/ResidentLocalAddress.yaml - nid_ResidentLocalName: - $ref: ../extensions/nid/ResidentLocalName.yaml - nid_ResidentNationality: - $ref: ../extensions/nid/ResidentNationality.yaml - nid_ResidentPhoto: - $ref: ../extensions/nid/ResidentPhoto.yaml - nid_ResidentRecord: - $ref: ../extensions/nid/ResidentRecord.yaml - - ###### src/extensions/openid schema objects - openid_Address: - $ref: ../extensions/openid/Address.yaml - openid_PersonRecord: - $ref: ../extensions/openid/PersonRecord.yaml - openid_PersonDocDetails: - $ref: ../extensions/openid/PersonDocDetails.yaml - - ###### src/registry/schema objects - RegistryQueries: - $ref: schema/RegistryQueries.yaml - # FetchSubscriptionsRequest: - # $ref: schema/FetchSubscriptionsRequest.yaml - # FetchSubscriptionsResponse: - # $ref: schema/FetchSubscriptionsResponse.yaml +components: + schemas: NotifyEventRequest: $ref: schema/NotifyEventRequest.yaml - RegistryEventType: - $ref: schema/RegistryEventType.yaml - RegistryRecord: - $ref: schema/RegistryRecord.yaml - RegistryRecordType: - $ref: schema/RegistryRecordType.yaml - RegistryType: - $ref: schema/RegistryType.yaml SearchRequest: $ref: schema/SearchRequest.yaml SearchResponse: @@ -1122,92 +802,30 @@ components: $ref: schema/SubscriptionInfo.yaml SubscriptionStatus: $ref: schema/SubscriptionStatus.yaml - TxnStatusRequest: - $ref: schema/TxnStatusRequest.yaml - TxnStatusResponse: - $ref: schema/TxnStatusResponse.yaml UnSubscribeRequest: $ref: schema/UnSubscribeRequest.yaml UnSubscribeResponse: $ref: schema/UnSubscribeResponse.yaml UnSubscribeStatusReasonCode: - $ref: schema/UnSubscribeStatusReasonCode.yaml - - ###### Common schema objects - Ack: - $ref: ../common/schema/Ack.yaml - AdditionalInfo: - $ref: ../common/schema/AdditionalInfo.yaml - AttributeNameValue: - $ref: ../common/schema/AttributeNameValue.yaml - AttributeNameValueList: - $ref: ../common/schema/AttributeNameValueList.yaml - AttributeValue: - $ref: ../common/schema/AttributeValue.yaml - Authorize: - $ref: ../common/schema/Authorize.yaml - Consent: - $ref: ../common/schema/Consent.yaml - DateTime: - $ref: ../common/schema/DateTime.yaml + $ref: schema/UnSubscribeStatusReasonCode.yaml + TxnStatusRequest: + $ref: schema/TxnStatusRequest.yaml + TxnStatusResponse: + $ref: schema/TxnStatusResponse.yaml EncryptedMessage: $ref: ../common/schema/EncryptedMessage.yaml Error: $ref: ../common/schema/Error.yaml - EventFrequency: - $ref: ../common/schema/EventFrequency.yaml - ExpCondition: - $ref: ../common/schema/ExpCondition.yaml - ExpOperator: - $ref: ../common/schema/ExpOperator.yaml - ExpPredicate: - $ref: ../common/schema/ExpPredicate.yaml - ExpPredicateList: - $ref: ../common/schema/ExpPredicateList.yaml - ExpPredicateWithCondition: - $ref: ../common/schema/ExpPredicateWithCondition.yaml - ExpPredicateWithConditionList: - $ref: ../common/schema/ExpPredicateWithConditionList.yaml - ExpTemplate: - $ref: ../common/schema/ExpTemplate.yaml FileInfo: $ref: ../common/schema/FileInfo.yaml - IdentifierType: - $ref: ../common/schema/IdentifierType.yaml - IdentifierTypeValue: - $ref: ../common/schema/IdentifierTypeValue.yaml - LanguageCode: - $ref: ../common/schema/LanguageCode.yaml - LatLong: - $ref: ../common/schema/LatLong.yaml - Meta: - $ref: ../common/schema/Meta.yaml MsgCallbackHeader_V1.0.0: - $ref: ../common/schema/MsgCallbackHeader_V1.0.0.yaml + $ref: schema/MsgCallbackHeader_V1.0.0.yaml MsgHeader_V1.0.0: - $ref: ../common/schema/MsgHeader_V1.0.0.yaml + $ref: schema/MsgHeader_V1.0.0.yaml MsgHeaderStatusReasonCode: $ref: ../common/schema/MsgHeaderStatusReasonCode.yaml MsgSignature: $ref: ../common/schema/MsgSignature.yaml - Pagination: - $ref: ../common/schema/Pagination.yaml - PaginationRequest: - $ref: ../common/schema/PaginationRequest.yaml - QueryType: - $ref: ../common/schema/QueryType.yaml - ReferenceId: - $ref: ../common/schema/ReferenceId.yaml - ReferenceIdList: - $ref: ../common/schema/ReferenceIdList.yaml - RequestStatus: - $ref: ../common/schema/RequestStatus.yaml - SearchSort: - $ref: ../common/schema/SearchSort.yaml - SearchSortList: - $ref: ../common/schema/SearchSortList.yaml - TransactionId: - $ref: ../common/schema/TransactionId.yaml responses: HttpErrorResponse: diff --git a/src/registry/schema/MsgCallbackHeader_V1.0.0.yaml b/src/registry/schema/MsgCallbackHeader_V1.0.0.yaml new file mode 100644 index 0000000..66aa8ad --- /dev/null +++ b/src/registry/schema/MsgCallbackHeader_V1.0.0.yaml @@ -0,0 +1,56 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to reliable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To relay the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "789" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../../common/schema/MsgHeaderStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message, if any, Helps actionable messaging for system/end users" + type: string + maxLength: 999 + total_count: + description: "Total no of requests present in the message request" + type: integer + example: 21800 + completed_count: + description: "No of requests in completed state. Complete includes success and error requests due to functional errors" + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'registry.example.org' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions.' + type: string + example: 'spmis.example.org' + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - status \ No newline at end of file diff --git a/src/registry/schema/MsgHeader_V1.0.0.yaml b/src/registry/schema/MsgHeader_V1.0.0.yaml new file mode 100644 index 0000000..b93da2b --- /dev/null +++ b/src/registry/schema/MsgHeader_V1.0.0.yaml @@ -0,0 +1,53 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "123" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property. + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'spmis.example.org' + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: "https://spmis.example.org/consumer-namespace/callback/on-search" + receiver_id: + description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions. + type: string + example: 'registry.example.org' + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - sender_id + - total_count \ No newline at end of file diff --git a/src/registry/schema/RegistryEventType.yaml b/src/registry/schema/RegistryEventType.yaml index 20d2f5b..618279d 100644 --- a/src/registry/schema/RegistryEventType.yaml +++ b/src/registry/schema/RegistryEventType.yaml @@ -1,10 +1,10 @@ type: string description: | - @context: "https://example.org/schema/RegistryEventType"
+ @context: https://schema.spdci.org/common/v1/api-schemas/RegistryEventTypeEnum.jsonld
@type: "VitalEvent"
**Notes:** 1. Registry event type values defined as per implementation context. 2. Usually a list of **enum** values of all possible queryable identifiers. - 3. example: "ns:org:RegistryEventType:LiveBirth" -example: "ns:org:RegistryEventType:LiveBirth" \ No newline at end of file + 3. example: "spdci-common:RegistryEventType:LiveBirth" +example: "spdci-common:RegistryEventType:LiveBirth" \ No newline at end of file diff --git a/src/registry/schema/RegistryQueries.yaml b/src/registry/schema/RegistryQueries.yaml index 29683d3..cd8ec44 100644 --- a/src/registry/schema/RegistryQueries.yaml +++ b/src/registry/schema/RegistryQueries.yaml @@ -4,8 +4,7 @@ description: | 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
- search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 - - search all farmers with land area less than 2 acers in district code 504 -oneOf: +anyOf: - $ref: ../../common/schema/ExpTemplate.yaml - $ref: ../../common/schema/IdentifierTypeValue.yaml - $ref: ../../common/schema/ExpPredicateWithConditionList.yaml \ No newline at end of file diff --git a/src/registry/schema/RegistryRecord.yaml b/src/registry/schema/RegistryRecord.yaml index 783780b..55c5f96 100644 --- a/src/registry/schema/RegistryRecord.yaml +++ b/src/registry/schema/RegistryRecord.yaml @@ -1,11 +1,8 @@ type: object description: | - @context: "https://example.org/schema/RecordType"
- @type: "CRVSPerson"
- @container: "@set"
- - **Notes:** - 1. Record type values defined as per implementation context. - 2. Usually a list of **enum** values of all possible queryable identifiers. + The "person" object contains fields expected in response of search + @context: https://schema.spdci.org/core/v1/data/Member.jsonld
+ @type: "Person"
+ @container: "@set"
example: - $ref: "../../extensions/dci/CRVSPerson.yaml" \ No newline at end of file + $ref: "../../extensions/dci/Member.yaml" \ No newline at end of file diff --git a/src/registry/schema/RegistryRecordType.yaml b/src/registry/schema/RegistryRecordType.yaml index ed2cb17..48dbf68 100644 --- a/src/registry/schema/RegistryRecordType.yaml +++ b/src/registry/schema/RegistryRecordType.yaml @@ -1,11 +1,11 @@ type: string description: | - @context: "https://example.org/schema/RegistryRecordType"
+ @context: https://schema.spdci.org/common/v1/api-schemas/RegistryRecordType.jsonld
@type: "RegistryRecordType"
**Notes:** 1. Registry record type values defined as per implementation context. 2. Usually a list of **enum** values of all possible queryable result sets 3. Referenced in search_request and notify events - 4. example: "ns:dci:RegistryRecordType:CRVSPerson" -example: "ns:dci:RegistryRecordType:CRVSPerson" \ No newline at end of file + 4. example: "spdci-extensions-dci:Member" +example: "spdci-extensions-dci:Member" \ No newline at end of file diff --git a/src/registry/schema/RegistryType.yaml b/src/registry/schema/RegistryType.yaml index 4325d24..cd6b5b7 100644 --- a/src/registry/schema/RegistryType.yaml +++ b/src/registry/schema/RegistryType.yaml @@ -1,10 +1,10 @@ type: string description: | - @context: "https://example.org/schema/RegistryType"
- @type: "RegistryType"
+ @context:https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "@context"
**Notes:** 1. Registry type values defined as per implementation context. 2. Usually a list of **enum** values of all possible queryable functional registries - 3. example: "ns:org:RegistryType:Civil" -example: "ns:org:RegistryType:Civil" \ No newline at end of file + 3. example: "ns:org:RegistryType:Social" +example: "ns:org:RegistryType:Social" diff --git a/src/registry/schema/SearchRequest.yaml b/src/registry/schema/SearchRequest.yaml index 61a9d6a..b9aa618 100644 --- a/src/registry/schema/SearchRequest.yaml +++ b/src/registry/schema/SearchRequest.yaml @@ -25,8 +25,8 @@ properties: default: 1.0.0 reg_type: $ref: RegistryType.yaml - reg_event_type: - $ref: RegistryEventType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml query_type: $ref: ../../common/schema/QueryType.yaml query: diff --git a/src/registry/schema/SearchResponse.yaml b/src/registry/schema/SearchResponse.yaml index ae0d9c8..685f664 100644 --- a/src/registry/schema/SearchResponse.yaml +++ b/src/registry/schema/SearchResponse.yaml @@ -32,10 +32,8 @@ properties: default: 1.0.0 reg_type: $ref: RegistryType.yaml - reg_event_type: - $ref: RegistryEventType.yaml reg_record_type: - $ref: RegistryRecordType.yaml + $ref: RegistryRecordType.yaml reg_records: $ref: RegistryRecord.yaml required: diff --git a/src/registry/schema/SubscribeResponse.yaml b/src/registry/schema/SubscribeResponse.yaml index 03a224f..306675f 100644 --- a/src/registry/schema/SubscribeResponse.yaml +++ b/src/registry/schema/SubscribeResponse.yaml @@ -19,7 +19,7 @@ properties: status_reason_code: $ref: "./SubscribeStatusReasonCode.yaml" status_reason_message: - description: "Status reason code message. Helps actionanble messaging for systems/end users" + description: "Status reason code message. Helps actionable messaging for systems/end users" type: string maxLength: 999 subscriptions: diff --git a/src/registry/schema/SubscriptionInfo.yaml b/src/registry/schema/SubscriptionInfo.yaml index c89b84d..3f83461 100644 --- a/src/registry/schema/SubscriptionInfo.yaml +++ b/src/registry/schema/SubscriptionInfo.yaml @@ -3,31 +3,38 @@ properties: version: type: string default: 1.0.0 + code: $ref: SubscriptionCode.yaml + status: $ref: SubscriptionStatus.yaml - timestamp: + + timestamp: $ref: ../../common/schema/DateTime.yaml + reg_type: $ref: RegistryType.yaml + reg_event_type: $ref: RegistryEventType.yaml + frequency: $ref: ../../common/schema/EventFrequency.yaml + filter_type: $ref: ../../common/schema/QueryType.yaml + filter: $ref: RegistryQueries.yaml + notify_record_type: $ref: RegistryRecordType.yaml - required: - - reg_event_type - - filter - - notify_record_type + locale: - $ref: "../../common/schema/LanguageCode.yaml" + $ref: ../../common/schema/LanguageCode.yaml + required: - - subscription_code - - timestamp - - subscribe_criteria \ No newline at end of file + - code + - status + - timestamp \ No newline at end of file diff --git a/src/registry/schema/TxnStatusRequest.yaml b/src/registry/schema/TxnStatusRequest.yaml index f8b5a3b..4d135a4 100644 --- a/src/registry/schema/TxnStatusRequest.yaml +++ b/src/registry/schema/TxnStatusRequest.yaml @@ -20,7 +20,7 @@ properties: - "correlation_id" - "subscription_code_list" attribute_value: - oneOf: + anyOf: - $ref: ../../common/schema/TransactionId.yaml - $ref: ../../common/schema/ReferenceIdList.yaml - $ref: ../../common/schema/CorrelationId.yaml diff --git a/src/registry/schema/TxnStatusResponse.yaml b/src/registry/schema/TxnStatusResponse.yaml index d99186a..f22036e 100644 --- a/src/registry/schema/TxnStatusResponse.yaml +++ b/src/registry/schema/TxnStatusResponse.yaml @@ -11,17 +11,12 @@ properties: txn_type: type: string description: txn type to fetch status - enum: ["on-search", "on-subscribe", "on-unsubscribe"] + enum: ["search", "subscribe", "unsubscribe"] txn_status: - oneOf: + anyOf: - $ref: SearchResponse.yaml - $ref: SubscribeResponse.yaml - $ref: UnSubscribeResponse.yaml - example: - $ref: SearchResponse.yaml - required: - - txn_type - - txn_status required: - transaction_id - correlation_id diff --git a/src/registry/schema/UnSubscribeRequest.yaml b/src/registry/schema/UnSubscribeRequest.yaml index bf84243..77d3402 100644 --- a/src/registry/schema/UnSubscribeRequest.yaml +++ b/src/registry/schema/UnSubscribeRequest.yaml @@ -3,7 +3,7 @@ description: Un-Subscribe to registred subscriptions properties: transaction_id: $ref: ../../common/schema/TransactionId.yaml - timesstamp: + timestamp: $ref: ../../common/schema/DateTime.yaml subscription_codes: type: array @@ -12,4 +12,4 @@ properties: required: - transaction_id - timestamp - - sunscription_codes \ No newline at end of file + - subscription_codes \ No newline at end of file diff --git a/src/registry/schema/UnSubscribeResponse.yaml b/src/registry/schema/UnSubscribeResponse.yaml index 811654d..68f2298 100644 --- a/src/registry/schema/UnSubscribeResponse.yaml +++ b/src/registry/schema/UnSubscribeResponse.yaml @@ -5,7 +5,7 @@ properties: $ref: ../../common/schema/TransactionId.yaml correlation_id: $ref: ../../common/schema/CorrelationId.yaml - timesatmp: + timestamp: $ref: ../../common/schema/DateTime.yaml status: $ref: "../../common/schema/RequestStatus.yaml" diff --git a/src/registry/social/ExpTemplate.yaml b/src/registry/social/ExpTemplate.yaml new file mode 100644 index 0000000..1eda105 --- /dev/null +++ b/src/registry/social/ExpTemplate.yaml @@ -0,0 +1,38 @@ +type: object +description: Identifier type and value object +properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryTypeEnum.jsonld
+ @type: "QueryType"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "graphql", "idtype-value", "expression" + example: "ns:org:QueryType:expression" + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/api-schemas/QueryExpression.jsonld
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: + collection: "Group" + query: + $and: [ + { + poverty_score: { $lt: 5 } + }, + { + location: { $eq: "central_region" } + }, + { + group_size: { $lt: 5 } + } + ] + \ No newline at end of file diff --git a/src/registry/social/MsgCallbackHeader_V1.0.0.yaml b/src/registry/social/MsgCallbackHeader_V1.0.0.yaml new file mode 100644 index 0000000..7ab838c --- /dev/null +++ b/src/registry/social/MsgCallbackHeader_V1.0.0.yaml @@ -0,0 +1,56 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "789" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: SPDCI Connect specific action. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + type: string + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../../common/schema/MsgHeaderStatusReasonCode.yaml" + status_reason_message: + description: "Status reascon code message, if any, Helps actionable messaging for system/end users" + type: string + maxLength: 999 + total_count: + description: "Total no of requests present in the message request" + type: integer + example: 21800 + completed_count: + description: "No of requests in completed state. Complete includes success and error requests due to functional errors" + type: integer + example: 50 + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verfication, etc., + type: string + example: 'social.example.org' + receiver_id: + description: 'receiver id registered with the calling system. Used for authorization, encryption, digital sign verfication, etc., functions.' + type: string + example: 'spmis.example.org' + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - status \ No newline at end of file diff --git a/src/registry/social/MsgHeader_V1.0.0.yaml b/src/registry/social/MsgHeader_V1.0.0.yaml new file mode 100644 index 0000000..c063b7c --- /dev/null +++ b/src/registry/social/MsgHeader_V1.0.0.yaml @@ -0,0 +1,53 @@ +type: object +description: 'Message header' +properties: + version: + description: "Messaging protocol specification version being used" + type: string + default: 1.0.0 + message_id: + description: | + 1. Unique message id to communicate between sender and receiver systems to realiable deliver the message over any transport layer i.e https, pub/sub, sftp etc., + 2. The scope of message_id end with successful ack of the message by the receiver. + 3. To realy the message between hops, underlying relying parties may consider to store and forward the message with integirty, ie Signature intact. + type: string + example: "123" + message_ts: + $ref: ../../common/schema/DateTime.yaml + action: + description: spdci Connect specific action. Usually verb from the URI. Helps in sync, async, store/fwd processing. Helps to identify payload type in message property. + type: string + sender_id: + description: | + 1. sender_id registered with the receiving system or gateway. + 2. Used for authorization, encryption, digital sign verification, etc., + type: string + example: 'spmis.example.org' + sender_uri: + description: | + 1. sender url to accept callbacks. Applicable only for async communications and if response ack_status is ACK. + 2. Default uri is assumed to be configured on the gateway as part of sender/receiver onboarding. + 3. For SFTP based communications, this shall be set to server/folder details. + type: string + format: uri + example: "https://spmis.example.org/consumer-namespace/callback/on-search" + receiver_id: + description: receiver id registered with the calling system. Used for authorization, encryption, digital sign verification, etc., functions. + type: string + example: 'social.example.org' + total_count: + description: Total no of requests present in the message request + type: integer + example: 21800 + is_msg_encrypted: + description: Is message encrypted? + type: boolean + default: false + meta: + $ref: ../../common/schema/Meta.yaml +required: + - message_id + - message_ts + - action + - sender_id + - total_count \ No newline at end of file diff --git a/src/registry/social/NotifyEventRequest.yaml b/src/registry/social/NotifyEventRequest.yaml new file mode 100644 index 0000000..4f846b5 --- /dev/null +++ b/src/registry/social/NotifyEventRequest.yaml @@ -0,0 +1,42 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + $ref: RegistryRecord.yaml + required: + - reg_record_type + - reg_records + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - data +required: + - transaction_id + - notify_event \ No newline at end of file diff --git a/src/registry/social/QueryType.yaml b/src/registry/social/QueryType.yaml new file mode 100644 index 0000000..0b53640 --- /dev/null +++ b/src/registry/social/QueryType.yaml @@ -0,0 +1,6 @@ +type: string +description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values +enum: ["idtype-value", "expression", "predicate" ] +example: "expression" \ No newline at end of file diff --git a/src/registry/social/ReceiptRequest.yaml b/src/registry/social/ReceiptRequest.yaml new file mode 100644 index 0000000..209ad6a --- /dev/null +++ b/src/registry/social/ReceiptRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Registry to notify a event to subscrbiers +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + receipt_information: + $ref: ../../extensions/social/ReceiptInformation.yaml +required: + - transaction_id + - receipt_information \ No newline at end of file diff --git a/src/registry/social/ReceiptResponse.yaml b/src/registry/social/ReceiptResponse.yaml new file mode 100644 index 0000000..fdd59a3 --- /dev/null +++ b/src/registry/social/ReceiptResponse.yaml @@ -0,0 +1,10 @@ +type: object +description: Event notification information +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + receipt_information: + $ref: ../../extensions/social/ReceiptInformation.yaml +required: + - transaction_id + - receipt_information \ No newline at end of file diff --git a/src/registry/social/RegistryEventType.yaml b/src/registry/social/RegistryEventType.yaml new file mode 100644 index 0000000..f4c8e45 --- /dev/null +++ b/src/registry/social/RegistryEventType.yaml @@ -0,0 +1,9 @@ +type: string +description: | + The SP-System receives data from SR, usually the SR sends registration and updates events to SP-System + + 1 : Register + 2 : spdci:common:RegistryEventType:NewHouseHoldMember +enum: + - "REGISTER" + - "NewHouseHoldMember" \ No newline at end of file diff --git a/src/registry/social/RegistryQueries.yaml b/src/registry/social/RegistryQueries.yaml new file mode 100644 index 0000000..20159f0 --- /dev/null +++ b/src/registry/social/RegistryQueries.yaml @@ -0,0 +1,10 @@ +description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 +anyOf: + - $ref: ../social/ExpTemplate.yaml + - $ref: ../../common/schema/IdentifierTypeValue.yaml + - $ref: ../../common/schema/ExpPredicateWithConditionList.yaml \ No newline at end of file diff --git a/src/registry/social/RegistryRecord.yaml b/src/registry/social/RegistryRecord.yaml new file mode 100644 index 0000000..228d180 --- /dev/null +++ b/src/registry/social/RegistryRecord.yaml @@ -0,0 +1,8 @@ +type: object +description: | + The "Group" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/social/v1/Group.jsonld
+ @type: "Group"
+ @container: "@set"
+example: + $ref: "../../extensions/social/Group.yaml" \ No newline at end of file diff --git a/src/registry/social/RegistryRecordType.yaml b/src/registry/social/RegistryRecordType.yaml new file mode 100644 index 0000000..4dba564 --- /dev/null +++ b/src/registry/social/RegistryRecordType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + @context: https://schema.spdci.org/extensions/social/v1/SRPerson.jsonld
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "SRPerson" +example: "SRPerson" \ No newline at end of file diff --git a/src/registry/social/RegistryType.yaml b/src/registry/social/RegistryType.yaml new file mode 100644 index 0000000..a9d7dff --- /dev/null +++ b/src/registry/social/RegistryType.yaml @@ -0,0 +1,10 @@ +type: string +description: | + @context: https://schema.spdci.org/common/v1/api-schemas/RegistryType.jsonld
+ @type: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Social" +example: "ns:org:RegistryType:Social" diff --git a/src/registry/social/SearchRequest.yaml b/src/registry/social/SearchRequest.yaml new file mode 100644 index 0000000..78d10a6 --- /dev/null +++ b/src/registry/social/SearchRequest.yaml @@ -0,0 +1,55 @@ +type: object +description: | + 1. Functional registry specific extension to search. + 2. Additional checks using conditional expressions is possible. + 3. Allows Country/Registry specific implementation extensions using key/value pairs. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + search_request: + type: array + description: | + 1. Batch requests enable multiple individual requests with respective consent/authorize codes + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: "../../common/schema/DateTime.yaml" + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + query_type: + $ref: ./QueryType.yaml + response_entity: + $ref: ../../common/schema/ResponseEntity.yaml + query: + $ref: ../social/RegistryQueries.yaml + sort: + $ref: ../../common/schema/SearchSortList.yaml + pagination: + $ref: ../../common/schema/PaginationRequest.yaml + consent: + $ref: ../../common/schema/Consent.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - query_type + - query + locale: + $ref: ../../common/schema/LanguageCode.yaml + required: + - reference_id + - timestamp + - search_criteria +required: + - transaction_id + - search_request \ No newline at end of file diff --git a/src/registry/social/SearchResponse.yaml b/src/registry/social/SearchResponse.yaml new file mode 100644 index 0000000..b90747c --- /dev/null +++ b/src/registry/social/SearchResponse.yaml @@ -0,0 +1,61 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionanble messaging for systems/end users" + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_record_type: + $ref: RegistryRecordType.yaml + reg_records: + description: | + The "Entity" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/social/v1/Group.jsonld
+ @type: "Group"
+ @container: "@set"
+ type: array + items: + $ref: "../../extensions/social/Group.yaml" + + required: + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response + \ No newline at end of file diff --git a/src/registry/social/SubscribeRequest.yaml b/src/registry/social/SubscribeRequest.yaml new file mode 100644 index 0000000..3831b6c --- /dev/null +++ b/src/registry/social/SubscribeRequest.yaml @@ -0,0 +1,51 @@ +type: object +description: Subscribe to a life event with crvs +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: ../../common/schema/ReferenceId.yaml + timestamp: + $ref: ../../common/schema/DateTime.yaml + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: RegistryType.yaml + reg_event_type: + $ref: RegistryEventType.yaml + frequency: + $ref: ../../common/schema/EventFrequency.yaml + filter_type: + $ref: ../../common/schema/QueryType.yaml + filter: + $ref: ../schema/RegistryQueries.yaml + notify_record_type: + $ref: RegistryRecordType.yaml + response_entity: + $ref: ../../common/schema/ResponseEntity.yaml + response_fields: + $ref: ../../common/schema/ResponseFields.yaml + authorize: + $ref: ../../common/schema/Authorize.yaml + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - subscribe_criteria +required: + - transaction_id + - subscribe_request \ No newline at end of file diff --git a/src/registry/social/SubscribeResponse.yaml b/src/registry/social/SubscribeResponse.yaml new file mode 100644 index 0000000..20038f7 --- /dev/null +++ b/src/registry/social/SubscribeResponse.yaml @@ -0,0 +1,41 @@ +type: object +description: Response to subscribe request. +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SubscribeStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps actionanble messaging for systems/end users" + type: string + maxLength: 999 + subscriptions: + type: array + items: + $ref: ../schema/SubscriptionInfo.yaml + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - subscribe_response + \ No newline at end of file diff --git a/src/registry/social/TxnStatusRequest.yaml b/src/registry/social/TxnStatusRequest.yaml new file mode 100644 index 0000000..3b23b39 --- /dev/null +++ b/src/registry/social/TxnStatusRequest.yaml @@ -0,0 +1,35 @@ +type: object +description: Request to fetch txn status on various service requests +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + txnstatus_request: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + txn_type: + type: string + description: txn type to fetch status + enum: ["search","subscribe","receipt"] + attribute_type: + type: string + enum: + - "transaction_id" + - "reference_id_list" + - "correlation_id" + attribute_value: + anyOf: + - $ref: ../../common/schema/TransactionId.yaml + - $ref: ../../common/schema/ReferenceIdList.yaml + - $ref: ../../common/schema/CorrelationId.yaml + locale: + $ref: ../../common/schema/LanguageCode.yaml + required: + - reference_id + - txn_type + - attribute_type + - attribute_value +required: + - transaction_id + - txnstatus_request \ No newline at end of file diff --git a/src/registry/social/TxnStatusResponse.yaml b/src/registry/social/TxnStatusResponse.yaml new file mode 100644 index 0000000..502a284 --- /dev/null +++ b/src/registry/social/TxnStatusResponse.yaml @@ -0,0 +1,28 @@ +type: object +description: txn status info on various service requests +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + txnstatus_response: + type: object + description: | + Contains the type of transaction and its corresponding status. + txn_type is required to indicate which transaction status is being returned. + properties: + txn_type: + type: string + description: txn type to fetch status + enum: ["search", "subscribe", "receipt"] + txn_status: + anyOf: + - $ref: SearchResponse.yaml + - $ref: ReceiptRequest.yaml + required: + - txn_type + - txn_status +required: + - transaction_id + - correlation_id + - txnstatus_response diff --git a/src/registry/social_api_v1.0.0.yaml b/src/registry/social_api_v1.0.0.yaml new file mode 100644 index 0000000..e83c28c --- /dev/null +++ b/src/registry/social_api_v1.0.0.yaml @@ -0,0 +1,863 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Social Registry + version: 1.0.0 + x-logo: + url: './dci-logo.png' + backgroundColor: '#FFFFFF' + altText: 'Digital Convergence Initiative' + description: |- + The Social Registry interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between social registry and SPMIS. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. Event subscription: The Event subscription APIs describe APIs useful to subscribe / unsubscribe events. When any event happens in crvs registry it sends event details on notify end point + 3. Request status check: The request status checking APIs implement to check status of request sent in any above APIs + + Gitbook reference link : + - [Social Registry - V1.0 ](https://standards.spdci.org/standards/wip-social-registry-v1.0.0) + + Code directory links: + - [Identifiers](https://schema.spdci.org/core/v1/code/IdentifierTypeEnum.jsonld) + - [Marital Status](https://schema.spdci.org/core/v1/code/MaritalStatusEnum.jsonld) + - [Sex](https://schema.spdci.org/core/v1/code/SexCategoryEnum.jsonld) + - [Relationship Type](https://schema.spdci.org/v1/code/RelationshipTypeEnum.jsonld) + - [Disability Type](https://schema.spdci.org/v1/code/DisabilityTypeEnum.jsonld) + - [Functional Limitation Type](https://schema.spdci.org/core/v1/code/FunctionalLimitationType.jsonld) + - [Functional Severity](https://schema.spdci.org/core/v1/code/FunctionalSeverityEnum.jsonld) + - [Education Level](https://schema.spdci.org/core/v1/code/EducationCode.jsonld) + - [Employment Status](https://schema.spdci.org/core/v1/code/EmploymentStatusEnum.jsonld) + - [Income Level](https://schema.spdci.org/core/v1/code/IncomeLevelEnum.jsonld) + - [Occupation](https://schema.spdci.org/core/v1/code/OccupationEnum.jsonld) + + Data Objects: + - [Person](https://schema.spdci.org/extensions/social/v1/data/Person.jsonld) + - [Group](https://schema.spdci.org/extensions/social/v1/data/Group.jsonld) + - [Member](https://schema.spdci.org/extensions/social/v1/data/Member.jsonld) + - [RelatedPerson](https://schema.spdci.org/core/v1/data/RelatedPerson.jsonld) + - [DisabilityInfo](https://schema.spdci.org/core/v1/data/DisabilityInfo.jsonld) + + Each request is build up of three parts + - signature + - header + - message + + Information about each part is given below + + **Signature:** + - The signature is used to verify the integrity of the message. + - The signature is a hash of the message and is encrypted using the private key of the sender. + - The receiver can verify the signature using the public key of the sender. + + **Header:** + - The header contains information about various message header, refer to the header schema for more details. + + **Message:** + + - The message contains the actual payload of the message. + - Refere example section to get sample data and also read Gitbook for details data objects + - The receiver can decrypt the message using the private key of the "err.receiver_id.invalid" version: 1.0.0 + contact: + name: DCI Social Protection + email: info@spdci.org + license: + name: DCI Social Protection License + url: https://api.spdci.org/LICENSE.md + +servers: + - url: "https://sandbox.spdci.org/namespace/v1.0.0" + description: Sandbox Server +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode +paths: + /registry/search: + post: + summary: "/registry/search" + description: |- + The async search api will accept request and will send response to on-search endpoint. The SR will implement /registry/search endpoint and the SPMIS shall implement /registry/on-search to receive data from SR. + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The SR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + + operationId: post_reg_search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: "#/components/schemas/SearchRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: "#/components/responses/Response" + security: + - Authorization: [ ] + deprecated: false + /registry/on-search: + post: + summary: "/registry/on-search" + description: |- + The /registry/on-search end point tobe implemented by SPMIS to receive search results from SR. + The SR will send data in format explained in SearchResponse.yaml. The reg_records will containe data that in explained in social/v1/Person.jsonld. + Refer example json at gitbook [link](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/1.-crvs/data/data-objects/person#example). + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-search + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: "#/components/responses/Response" + security: + - Authorization: [ ] + deprecated: false + + /registry/subscribe: + post: + summary: "/registry/subscribe" + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: "#/components/schemas/SubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - subscribe + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: "#/components/responses/Response" + security: + - Authorization: [ ] + deprecated: false + + /registry/on-subscribe: + post: + summary: "/registry/on-subscribe" + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: "#/components/schemas/SubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-subscribe + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: "#/components/responses/Response" + security: + - Authorization: [ ] + deprecated: false + /registry/notify: + post: + summary: "/registry/notify" + description: Registry to notify an event to subscribers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - notify + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: "#/components/responses/Response" + security: + - Authorization: [ ] + deprecated: false + + /registry/unsubscribe: + post: + summary: "/registry/unsubscribe" + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: "#/components/schemas/UnSubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - unsubscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-unsubscribe: + post: + summary: "/registry/on-unsubscribe" + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: "#/components/schemas/UnSubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-unsubscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + + /registry/txn/status: + post: + summary: "/registry/txn/status" + description: |- + The /registry/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-status + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + security: + - Authorization: [ ] + deprecated: false + /registry/txn/on-status: + post: + summary: "/registry/txn/on-status" + description: |- + The /registry/txn/on-status will be implemented by SPMIS. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-on-status + responses: + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Successful response + $ref: "#/components/responses/Response" + security: + - Authorization: [ ] + deprecated: false + + /registry/sync/search: + post: + summary: "/registry/sync/search" + description: |- + The sync search api will accept request and will send response immediately + The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The SR will validate the request and will send response to on-search endpoint. + Information for each field is given below. + - reg_event_type: The event type for which search to be performed, this can be any of event type explained in RegistryEventType.yaml + - query_type: The query type on which registry to determene type of search process, this can be any of query type explained in QueryType.yaml + - query: The query will indicate payload of data which to be seached in registry, this can be any of explained in RegistryQueries.yaml + + + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + default: + description: "Registry search response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [ ] + deprecated: false + /registry/sync/txn/status: + post: + summary: "/registry/sync/txn/status" + description: |- + The /registry/sync/txn/status will be implemented by SR. This will check status of reach request using transaction_id and/or reference_id(s). + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + default: + description: "Transaction status check response" + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + '401': + description: Unauthorized access + $ref: '#/components/responses/HttpErrorResponse' + '403': + description: Forbidden access + $ref: '#/components/responses/HttpErrorResponse' + '500': + description: Internal server error + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [ ] + deprecated: false + +components: + schemas: + NotifyEventRequest: + $ref: social/NotifyEventRequest.yaml + SearchRequest: + $ref: social/SearchRequest.yaml + SearchResponse: + $ref: social/SearchResponse.yaml + SearchStatusReasonCode: + $ref: schema/SearchStatusReasonCode.yaml + SubscribeRequest: + $ref: schema/SubscribeRequest.yaml + SubscribeResponse: + $ref: schema/SubscribeResponse.yaml + SubscribeStatusReasonCode: + $ref: schema/SubscribeStatusReasonCode.yaml + UnSubscribeRequest: + $ref: schema/UnSubscribeRequest.yaml + UnSubscribeResponse: + $ref: schema/UnSubscribeResponse.yaml + UnSubscribeStatusReasonCode: + $ref: schema/UnSubscribeStatusReasonCode.yaml + TxnStatusRequest: + $ref: ibr/TxnStatusRequest.yaml + TxnStatusResponse: + $ref: ibr/TxnStatusResponse.yaml + EncryptedMessage: + $ref: ../common/schema/EncryptedMessage.yaml + Error: + $ref: ../common/schema/Error.yaml + FileInfo: + $ref: ../common/schema/FileInfo.yaml + MsgCallbackHeader_V1.0.0: + $ref: social/MsgCallbackHeader_V1.0.0.yaml + MsgHeader_V1.0.0: + $ref: social/MsgHeader_V1.0.0.yaml + MsgHeaderStatusReasonCode: + $ref: ../common/schema/MsgHeaderStatusReasonCode.yaml + MsgSignature: + $ref: ../common/schema/MsgSignature.yaml + + responses: + HttpErrorResponse: + $ref: ../common/response/HttpErrorResponse.yaml + Response: + $ref: ../common/response/Response.yaml + securitySchemes: + Authorization: + $ref: ../common/security/Authorization.yaml