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..caee686 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/release/index.html) ## 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) 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/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/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 - 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/ibr_api_v1.0.0.html b/release/html/ibr_api_v1.0.0.html new file mode 100644 index 0000000..501343e --- /dev/null +++ b/release/html/ibr_api_v1.0.0.html @@ -0,0 +1,869 @@ + + + + + + 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-MIS. +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-MIS 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/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-MIS. 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-MIS 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": 123456789,
  • "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
    +
  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",
  • "search_response": [
    ]
}

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": 123456789,
  • "receipt_information": {
    }
}

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
    +
  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",
  • "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": 123456789,
  • "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
    +
  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",
  • "search_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": 123456789,
  • "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
    +
  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"
}

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..80e407d 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 - Foundational/Functional registries - -

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 - Foundational/Functional registries (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
-

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:

    + +

    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 (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 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": 123456789,
  • "search_request": [
    ]
}

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 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
  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": 123456789,
  • "correlation_id": "9876543210",
  • "search_response": [
    ]
}

SubscribeRequest

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 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": 123456789,
  • "subscribe_request": [
    ]
}

SubscribeResponse

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 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
  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": 123456789,
  • "correlation_id": "9876543210",
  • "subscribe_response": [
    ]
}

NotifyEventRequest

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 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": 123456789,
  • "notify_event": [
    ]
}

UnSubscribeRequest

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 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)
    +
timesstamp
string <date-time> (DateTime)
  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
Array of strings (SubscriptionCode) [ items <= 99 characters ]
{
  • "transaction_id": 123456789,
  • "timesstamp": "",
  • "subscription_codes": [
    ]
}

UnSubscribeResponse

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 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
  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)
    +
timesatmp
string <date-time> (DateTime)
  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 (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
  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": 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 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
  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": 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"
+ + + + + +

Interoperability APIs - Social Registry

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:

+ +

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/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 enabel multiple individual requests with respective consent/authorize codes
  2. +
+
{
  • "transaction_id": 123456789,
  • "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
    +
  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",
  • "search_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": 123456789,
  • "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
    +
  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"
}

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..63a3209 --- /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-MIS 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/ibr/processflow1req.json b/release/sample-jsons/assets/example_files/ibr/processflow1req.json new file mode 100644 index 0000000..e59aa11 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/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/ibr/processflow1res.json b/release/sample-jsons/assets/example_files/ibr/processflow1res.json new file mode 100644 index 0000000..b16352f --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow1res.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/processflow2req.json b/release/sample-jsons/assets/example_files/ibr/processflow2req.json new file mode 100644 index 0000000..0fef064 --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/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/ibr/processflow2res.json b/release/sample-jsons/assets/example_files/ibr/processflow2res.json new file mode 100644 index 0000000..b16352f --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow2res.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/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..b16352f --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/processflow3ares.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/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..b9ed95f --- /dev/null +++ b/release/sample-jsons/assets/example_files/ibr/usecaselist.json @@ -0,0 +1,18 @@ +[ + { + "processflow_id" : "processflow1", + "processflow_name": "Process Flow 1 : Enrolment in Cash Transfer Scheme For Persons with Severe Disability" + }, + { + "processflow_id" : "processflow2", + "processflow_name": "Process Flow 2 : Providing and Publishing Beneficiaries who Received Benefits" + }, + { + "processflow_id" : "processflow3a", + "processflow_name": "Process Flow 3 : Providing and Publishing Beneficiaries who Exited the Program" + }, + { + "processflow_id" : "processflow4", + "processflow_name": "Process Flow 4 : Batch Eligibility and Enrolment in Proactive Cash Transfer Scheme for Education" + } +] \ 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..df6167d --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-1req.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": "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": "poverty_score", + "operator": "lt", + "attribute_value": 5 + } + }], + "sort": [{ + "attribute_name": "UIN", + "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..dd94dea --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-1res.json @@ -0,0 +1,347 @@ +{ + "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": "123456789", + "correlation_id": "9876543210", + "search_response": [ + { + "data": { + "version": "1.0.0", + "reg_records": [ + { + "id": 1, + "@id": "Person", + "@type": "Person", + "spdci:identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951631" + } + ], + "spdci:sex": "male", + "spdci:name": [ + { + "@id": "Name", + "@type": "Name", + "spdci:surname": "Smith", + "spdci:given_name": "Alice", + "spdci:second_name": "", + "spdci:maiden_name": "", + "spdci:prefix": "Ms.", + "spdci:suffix": "Sr." + } + ], + "spdci:birth_date": "1990-01-01", + "spdci:marital_status": "S", + "spdci:is_disabled": "No", + "spdci:disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + "spdci:employment_status": "Employed", + "spdci:is_deceased": "No", + "spdci:address": [ + { + "@id": "Address", + "@type": "Address", + "spdci:address_line1": "123 Main St", + "spdci:address_line2": "Apt 456", + "spdci:locality": "Cityville", + "spdci:sub_region_code": "SV", + "spdci:region_code": "A123", + "spdci:postal_code": "12345", + "spdci:country_code": "US", + "spdci:geo_location": { + "@id": "GeoLocation", + "@type": "GeoLocation", + "spdci:plus_code": { + "spdci:global_code": "8FW4V900+", + "spdci:geometry": { + "@id": "Geometry", + "@type": "GeoLocation", + "spdci:bounds": { + "@id": "Bounds", + "@type": "geometry", + "spdci:northeast": { + "@id": "location", + "@type": "GeoCoordinate", + "spdci:latitude": 37.7749, + "spdci:longitude": -122.4194 + }, + "spdci:southwest": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 40.7128, + "spdci:longitude": -74.006 + } + }, + "spdci:location": { + "@id": "location", + "@type": "GeoCoordinate", + "spdci:latitude": 37.7749, + "spdci:longitude": -122.4194 + } + } + } + } + } + ], + "spdci:household_identifier": "Household1", + "spdci:household_status": "Head", + "spdci:household_size": 5, + "spdci:poverty_score": 2, + "spdci:parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951631" + }, + "spdci:parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "MRN", + "spdci:identifier_value": "747951632" + }, + "spdci:registration_date": "2024-01-24", + "spdci:last_updated": "2024-01-24" + }, + { + "id": 2, + "@id": "Person", + "@type": "Person", + "spdci:identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "MRN", + "spdci:identifier_value": "747951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + } + ], + "spdci:sex": "female", + "spdci:name": [ + { + "@id": "Name", + "@type": "Name", + "spdci:surname": "Doe", + "spdci:given_name": "John", + "spdci:second_name": "Middle", + "spdci:maiden_name": "Maiden", + "spdci:prefix": "Mr.", + "spdci:suffix": "Jr." + } + ], + "spdci:birth_date": "1985-05-15", + "spdci:marital_status": "M", + "spdci:is_disabled": "Yes", + "spdci:disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951631" + }, + "spdci:employment_status": "Unemployed", + "spdci:is_deceased": "No", + "spdci:address": [ + { + "@id": "Address", + "@type": "Address", + "spdci:address_line1": "456 Oak St", + "spdci:address_line2": "Suite 789", + "spdci:locality": "Townsville", + "spdci:sub_region_code": "TN", + "spdci:region_code": "B456", + "spdci:postal_code": "67890", + "spdci:country_code": "US", + "spdci:geo_location": { + "@id": "GeoLocation", + "@type": "GeoLocation", + "spdci:plus_code": { + "spdci:global_code": "ABC12345", + "spdci:geometry": { + "@id": "Geometry", + "@type": "GeoLocation", + "spdci:bounds": { + "@id": "Bounds", + "@type": "geometry", + "spdci:northeast": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 40.7128, + "spdci:longitude": -74.006 + }, + "spdci:southwest": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 34.0522, + "spdci:longitude": -118.2437 + } + }, + "spdci:location": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 40.7128, + "spdci:longitude": -74.006 + } + } + } + } + } + ], + "spdci:household_identifier": "Household2", + "spdci:household_status": "Spouse", + "spdci:household_size": 5, + "spdci:poverty_score": 3, + "spdci:parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "MRN", + "spdci:identifier_value": "747951632" + }, + "spdci:parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951532" + }, + "spdci:registration_date": "2024-01-23", + "spdci:last_updated": "2024-01-23" + }, + { + "id": 3, + "@id": "Person", + "@type": "Person", + "spdci:identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951532" + } + ], + "spdci:sex": "male", + "spdci:name": [ + { + "@id": "Name", + "@type": "Name", + "spdci:surname": "Johnson", + "spdci:given_name": "Robert", + "spdci:second_name": "James", + "spdci:maiden_name": "", + "spdci:prefix": "Dr.", + "spdci:suffix": "PhD" + } + ], + "spdci:birth_date": "1978-08-20", + "spdci:marital_status": "D", + "spdci:is_disabled": "No", + "spdci:employment_status": "Employed", + "spdci:is_deceased": "No", + "spdci:address": [ + { + "@id": "Address", + "@type": "Address", + "spdci:address_line1": "789 Pine St", + "spdci:address_line2": "Unit 101", + "spdci:locality": "Villagetown", + "spdci:sub_region_code": "VT", + "spdci:region_code": "C789", + "spdci:postal_code": "23456", + "spdci:country_code": "US", + "spdci:geo_location": { + "@id": "GeoLocation", + "@type": "GeoLocation", + "spdci:plus_code": { + "spdci:global_code": "XYZ98765", + "spdci:geometry": { + "@id": "Geometry", + "@type": "GeoLocation", + "spdci:bounds": { + "@id": "Bounds", + "@type": "geometry", + "spdci:northeast": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 34.0522, + "spdci:longitude": -118.2437 + }, + "spdci:southwest": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 41.8781, + "spdci:longitude": -87.6298 + } + }, + "spdci:location": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 34.0522, + "spdci:longitude": -118.2437 + } + } + } + } + } + ], + "spdci:household_identifier": "Household3", + "spdci:household_status": "S", + "spdci:household_size": 5, + "spdci:poverty_score": 4, + "spdci:parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + "spdci:parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + "spdci:registration_date": "2024-01-22", + "spdci:last_updated": "2024-01-22" + } + ] + }, + "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..677b077 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-2req.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", + "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": "household_size", + "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/processflow1-2res.json b/release/sample-jsons/assets/example_files/social/processflow1-2res.json new file mode 100644 index 0000000..89b2d43 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow1-2res.json @@ -0,0 +1,485 @@ +{ + "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": "123456789", + "correlation_id": "9876543210", + "search_response": [ + { + "data": { + "version": "1.0.0", + "reg_records": [ + { + "id": 1, + "@id": "Person", + "@type": "Person", + "spdci:identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951631" + } + ], + "spdci:sex": "male", + "spdci:name": [ + { + "@id": "Name", + "@type": "Name", + "spdci:surname": "Smith", + "spdci:given_name": "Alice", + "spdci:second_name": "", + "spdci:maiden_name": "", + "spdci:prefix": "Ms.", + "spdci:suffix": "Sr." + } + ], + "spdci:birth_date": "1990-01-01", + "spdci:marital_status": "S", + "spdci:is_disabled": "No", + "spdci:disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + "spdci:employment_status": "Employed", + "spdci:is_deceased": "No", + "spdci:address": [ + { + "@id": "Address", + "@type": "Address", + "spdci:address_line1": "123 Main St", + "spdci:address_line2": "Apt 456", + "spdci:locality": "Cityville", + "spdci:sub_region_code": "SV", + "spdci:region_code": "A123", + "spdci:postal_code": "12345", + "spdci:country_code": "US", + "spdci:geo_location": { + "@id": "GeoLocation", + "@type": "GeoLocation", + "spdci:plus_code": { + "spdci:global_code": "8FW4V900+", + "spdci:geometry": { + "@id": "Geometry", + "@type": "GeoLocation", + "spdci:bounds": { + "@id": "Bounds", + "@type": "geometry", + "spdci:northeast": { + "@id": "location", + "@type": "GeoCoordinate", + "spdci:latitude": 37.7749, + "spdci:longitude": -122.4194 + }, + "spdci:southwest": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 40.7128, + "spdci:longitude": -74.006 + } + }, + "spdci:location": { + "@id": "location", + "@type": "GeoCoordinate", + "spdci:latitude": 37.7749, + "spdci:longitude": -122.4194 + } + } + } + } + } + ], + "spdci:household_identifier": "Household1", + "spdci:household_status": "Head", + "spdci:household_size": 5, + "spdci:poverty_score": 2, + "spdci:parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951631" + }, + "spdci:parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "MRN", + "spdci:identifier_value": "747951632" + }, + "spdci:registration_date": "2024-01-24", + "spdci:last_updated": "2024-01-24" + }, + { + "id": 2, + "@id": "Person", + "@type": "Person", + "spdci:identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "MRN", + "spdci:identifier_value": "747951632" + }, + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + } + ], + "spdci:sex": "female", + "spdci:name": [ + { + "@id": "Name", + "@type": "Name", + "spdci:surname": "Doe", + "spdci:given_name": "John", + "spdci:second_name": "Middle", + "spdci:maiden_name": "Maiden", + "spdci:prefix": "Mr.", + "spdci:suffix": "Jr." + } + ], + "spdci:birth_date": "1985-05-15", + "spdci:marital_status": "M", + "spdci:is_disabled": "Yes", + "spdci:disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951631" + }, + "spdci:employment_status": "Unemployed", + "spdci:is_deceased": "No", + "spdci:address": [ + { + "@id": "Address", + "@type": "Address", + "spdci:address_line1": "456 Oak St", + "spdci:address_line2": "Suite 789", + "spdci:locality": "Townsville", + "spdci:sub_region_code": "TN", + "spdci:region_code": "B456", + "spdci:postal_code": "67890", + "spdci:country_code": "US", + "spdci:geo_location": { + "@id": "GeoLocation", + "@type": "GeoLocation", + "spdci:plus_code": { + "spdci:global_code": "ABC12345", + "spdci:geometry": { + "@id": "Geometry", + "@type": "GeoLocation", + "spdci:bounds": { + "@id": "Bounds", + "@type": "geometry", + "spdci:northeast": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 40.7128, + "spdci:longitude": -74.006 + }, + "spdci:southwest": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 34.0522, + "spdci:longitude": -118.2437 + } + }, + "spdci:location": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 40.7128, + "spdci:longitude": -74.006 + } + } + } + } + } + ], + "spdci:household_identifier": "Household2", + "spdci:household_status": "Spouse", + "spdci:household_size": 5, + "spdci:poverty_score": 3, + "spdci:parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "MRN", + "spdci:identifier_value": "747951632" + }, + "spdci:parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951532" + }, + "spdci:registration_date": "2024-01-23", + "spdci:last_updated": "2024-01-23" + }, + { + "id": 3, + "@id": "Person", + "@type": "Person", + "spdci:identifier": [ + { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951532" + } + ], + "spdci:sex": "male", + "spdci:name": [ + { + "@id": "Name", + "@type": "Name", + "spdci:surname": "Johnson", + "spdci:given_name": "Robert", + "spdci:second_name": "James", + "spdci:maiden_name": "", + "spdci:prefix": "Dr.", + "spdci:suffix": "PhD" + } + ], + "spdci:birth_date": "1978-08-20", + "spdci:marital_status": "D", + "spdci:is_disabled": "No", + "spdci:employment_status": "Employed", + "spdci:is_deceased": "No", + "spdci:address": [ + { + "@id": "Address", + "@type": "Address", + "spdci:address_line1": "789 Pine St", + "spdci:address_line2": "Unit 101", + "spdci:locality": "Villagetown", + "spdci:sub_region_code": "VT", + "spdci:region_code": "C789", + "spdci:postal_code": "23456", + "spdci:country_code": "US", + "spdci:geo_location": { + "@id": "GeoLocation", + "@type": "GeoLocation", + "spdci:plus_code": { + "spdci:global_code": "XYZ98765", + "spdci:geometry": { + "@id": "Geometry", + "@type": "GeoLocation", + "spdci:bounds": { + "@id": "Bounds", + "@type": "geometry", + "spdci:northeast": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 34.0522, + "spdci:longitude": -118.2437 + }, + "spdci:southwest": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 41.8781, + "spdci:longitude": -87.6298 + } + }, + "spdci:location": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 34.0522, + "spdci:longitude": -118.2437 + } + } + } + } + } + ], + "spdci:household_identifier": "Household3", + "spdci:household_status": "S", + "spdci:household_size": 5, + "spdci:poverty_score": 4, + "spdci:parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + "spdci:parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + "spdci:registration_date": "2024-01-22", + "spdci:last_updated": "2024-01-22" + }, + { + "id": 4, + "@id": "Person", + "@type": "Person", + "spdci:identifier": [], + "spdci:sex": "female", + "spdci:name": [ + { + "@id": "Name", + "@type": "Name", + "spdci:surname": "Lee", + "spdci:given_name": "David", + "spdci:second_name": "", + "spdci:maiden_name": "", + "spdci:prefix": "Mr.", + "spdci:suffix": "" + } + ], + "spdci:birth_date": "1995-12-10", + "spdci:marital_status": "S", + "spdci:is_disabled": "Yes", + "spdci:disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951532" + }, + "spdci:employment_status": "Unemployed", + "spdci:is_deceased": "No", + "spdci:address": [ + { + "@id": "Address", + "@type": "Address", + "spdci:address_line1": "101 Elm St", + "spdci:address_line2": "Room 202", + "spdci:locality": "Hamletsville", + "spdci:sub_region_code": "HM", + "spdci:region_code": "D101", + "spdci:postal_code": "34567", + "spdci:country_code": "US", + "spdci:geo_location": { + "@id": "GeoLocation", + "@type": "GeoLocation", + "spdci:plus_code": { + "spdci:global_code": "123ABC78", + "spdci:geometry": { + "@id": "Geometry", + "@type": "GeoLocation", + "spdci:bounds": { + "@id": "Bounds", + "@type": "geometry", + "spdci:northeast": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 41.8781, + "spdci:longitude": -87.6298 + }, + "spdci:southwest": { + "@id": "location", + "@type": "GeoCoordinate", + "spdci:latitude": 37.7749, + "spdci:longitude": -122.4194 + } + }, + "spdci:location": { + "@id": "southwest", + "@type": "GeoCoordinate", + "spdci:latitude": 41.8781, + "spdci:longitude": -87.6298 + } + } + } + } + } + ], + "spdci:household_identifier": "Household4", + "spdci:household_status": "Head", + "spdci:household_size": 5, + "spdci:poverty_score": 5, + "spdci:parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951631" + }, + "spdci:parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "MRN", + "spdci:identifier_value": "747951632" + }, + "spdci:registration_date": "2024-01-21", + "spdci:last_updated": "2024-01-21" + }, + { + "id": 5, + "@id": "Person", + "@type": "Person", + "spdci:identifier": [], + "spdci:sex": "male", + "spdci:name": [ + { + "@id": "Name", + "@type": "Name", + "spdci:surname": "Brown", + "spdci:given_name": "Emily", + "spdci:second_name": "", + "spdci:maiden_name": "", + "spdci:prefix": "Mrs.", + "spdci:suffix": "" + } + ], + "spdci:birth_date": "1980-03-25", + "spdci:marital_status": "M", + "spdci:is_disabled": "No", + "spdci:disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "UIN", + "spdci:identifier_value": "847951632" + }, + "spdci:employment_status": "Employed", + "spdci:is_deceased": "Yes", + "spdci:death_date": "2023-05-10", + "spdci:address": [], + "spdci:household_identifier": "Household5", + "spdci:household_status": "Spouse", + "spdci:household_size": 5, + "spdci:poverty_score": 6, + "spdci:parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "spdci:identifier_type": "BRN", + "spdci:identifier_value": "847951631" + }, + "spdci:registration_date": "2024-01-20", + "spdci:last_updated": "2024-01-20" + } + ] + }, + "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..128287c --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/processflow2res.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://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": "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/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..128287c --- /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://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": "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..128287c --- /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://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": "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..fa40c64 --- /dev/null +++ b/release/sample-jsons/assets/example_files/social/usecaselist.json @@ -0,0 +1,22 @@ +[ + { + "processflow_id" : "processflow1-1", + "processflow_name": "Process Flow 1 : Unconditional Cash Transfer to Poor Households (Search by Poverty Score)" + }, + { + "processflow_id" : "processflow1-2", + "processflow_name": "Process Flow 1 : Unconditional Cash Transfer to Poor Households (Search by Household Size)" + }, + { + "processflow_id" : "processflow2", + "processflow_name": "Process Flow 2 : Financial Assistance to Poor Widows" + }, + { + "processflow_id" : "processflow3a", + "processflow_name": "Process Flow 3 : Conditional Cash Transfer for Education" + }, + { + "processflow_id" : "processflow4", + "processflow_name": "Process Flow 4 : Conditional Cash Transfer for Lactating Mothers" + } +] 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/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/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/ibr_api_v1.0.0.yaml b/release/yaml/ibr_api_v1.0.0.yaml new file mode 100644 index 0000000..e86ccc2 --- /dev/null +++ b/release/yaml/ibr_api_v1.0.0.yaml @@ -0,0 +1,1530 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Integrated Beneficiary Registry + 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-MIS. + 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-MIS 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://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/introduction) + + Code directory links: + - [Assistance Unit](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.01-assistance_unit) + - [Enrollment Status](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.02-enrolment_status) + - [Benefit Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.03-benefit_type) + - [Institution Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.04-institution_type) + - [Legal Status](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.05-legal_status) + - [Social Protection Functions](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.06-social_protection_functions) + - [Contribution Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.07-contribution_type) + - [Programme Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.08-programme_type) + + Data Objects: + - [Beneficiary](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/data-objects/do.ibr.01-beneficiary) + - [Programme](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/data-objects/do.ibr.02-programme) + - [Benefit](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/data-objects/do.ibr.03-benefit) + - [Benefit Frequency](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/data-objects/do.ibr.o4-benefit-frequency) + - [HouseHold](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.02-household) + - [Family](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.03-family) + - [Member](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.04-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" + 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: 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 + - 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-MIS 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-MIS 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/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-MIS. 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-MIS 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: + EnrollmentUpdatesRequest: + 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: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items' + required: + - transaction_id + - receipt_information + 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/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0/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: 0123456789 + 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_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 + 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 + - search all farmers with land area less than 2 acers in district code 504 + oneOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/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:NoSql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/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: HouseHold + query: + $and: + - poverty_score: + $lt: 5 + - location: + $eq: central_region + - household_size: + $lt: 5 + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/IdentifierTypeEnum.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. + - 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/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: + 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/oneOf/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/oneOf/2/items/properties/expression1' + required: + - expression1 + sort: + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/Attribute.jsonld
+ @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/Consent"
+ @type: "Consent" + example: + '@context': 'https://standards.spdci.org/schemas//Consent' + '@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/Authorize
+ @type: "Authorize" + example: + '@context': 'https://standards.spdci.org/schemas/Authorize' + '@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 + example: '9876543210' + 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/MsgCallbackHeader_V1.0.0/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 "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/Beneficairy.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/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 + 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: '12345678901234567890' + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscibe + - receipt + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + attribute_value: + oneOf: + - $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: en + 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 + - subscibe + - receipt + txn_status: + oneOf: + - $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/receipt_information' + required: + - transaction_id + - receipt_information + example: + $ref: '#/components/schemas/SearchResponse' + required: + - txn_type + - txn_status + required: + - transaction_id + - correlation_id + - txnstatus_response + EnrolledRequest: + type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + enrolled_criteria: + type: object + description: | + Enrolled query + properties: + query_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + description: '' + response_entity: + example: Beneficiary + type: string + description: | + Define the type of response to have when executing the search + enum: + - Household + - Family + - Member + query: + type: object + description: Query expression for the enrolled query + example: | + { + "$and": [ + { + "person_identifier": { "eq": "ABC451123" } + } + ] + } + required: + - transaction_id + - enrolled_criteria + EnrolledResponse: + 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/MsgCallbackHeader_V1.0.0/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 "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: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items' + 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 + 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: + 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/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: 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: '' + 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/{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: 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: + type: object + description: | + @context: https://schema.spdci.org/common/v1/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 + 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..32dbcfe 100644 --- a/release/yaml/registry_core_api_v1.0.0.yaml +++ b/release/yaml/registry_core_api_v1.0.0.yaml @@ -1,17 +1,39 @@ 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 - Foundational/Functional registries + 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: + - [Identifiers](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.01-identifier_type) + - [Marital Status](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.02-marital_status) + - [Sex](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.03-sex) + - [Vital event types](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.04-vital_event) + + Each request is build up of three parts + - signature + - header + - message 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 @@ -714,20 +736,20 @@ components: 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: + dci_Person: type: object description: | - @context: "https://example.org/schema/CRVSPerson"
+ @context: https://schema.spdci.org/CRVSPerson"
@type: "Consent" example: - '@context': 'https://example.org/schema/CRVSPerson' + '@context': 'https://standards.spdci.org/schemas/extensions/dci/v1/Person' '@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' + '@id': 'https://spdci.org/schemas/extensions/dci/v1/Person' '@type': 'rdfs:Class' '@context': name: @@ -1011,14 +1033,14 @@ components: 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: + issued_to: description: '' type: string - protectedAttributes: + protected_attributes: type: array items: type: string - credentialSubject: + credential_subject: description: MOSIP Verifiable Credential for Proof of identity type: object properties: @@ -1026,13 +1048,13 @@ components: $ref: '#/components/schemas/mosip_LanguageValueList' city: $ref: '#/components/schemas/mosip_LanguageValueList' - postalCode: + postal_code: type: string example: '14022' - fullName: + full_name: type: string example: Thirteen Mosip - dateOfBirth: + birthdate: type: string example: '2022' province: @@ -1040,14 +1062,14 @@ components: phone: type: string example: '9898989898' - addressLine1: + addressline1: $ref: '#/components/schemas/mosip_LanguageValueList' - addressLine2: + addressline2: $ref: '#/components/schemas/mosip_LanguageValueList' id: type: string example: '2835824850916304' - UIN: + uin: type: string example: '7346597054' region: @@ -1079,11 +1101,11 @@ components: 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: + registration_id: type: string packetId: type: string - additionalInfoReqId: + additional_info_reqId: type: string name: type: string @@ -1091,31 +1113,31 @@ components: type: string phone: type: string - registrationType: + registration_type: type: string - packetHashValue: + packet_hash_value: type: string - packetSize: + packet_size: type: integer - supervisorStatus: + supervisor_status: type: string - supervisorComment: + supervisor_comment: type: string - opentionalValues: + opentional_values: type: array items: type: string - langCode: + lang_code: type: string - createDateTime: + create_date_time: $ref: '#/components/schemas/DateTime' - updateDateTime: + update_date_time: $ref: '#/components/schemas/DateTime' - deletedDateTime: + deleted_date_time: $ref: '#/components/schemas/DateTime' - isActive: + is_active: type: boolean - isDeleted: + is_deleted: type: boolean nid_DeceasedRecord: type: object @@ -1196,13 +1218,13 @@ components: vtc: description: Village Town City Code type: string - vtc-name: + vtc_name: description: Village/Town/City Name type: string - sub-district-name: + sub_district_name: description: Sub District Name type: string - district-name: + district_name: description: District Name type: string state: @@ -1215,40 +1237,40 @@ components: type: object description: Resident Local Address properties: - local-careof: + local_careof: description: Care of information in local language type: string - local-building: + local_building: description: Building information in local language type: string - local-street: - description: Street information in local language + local_street: + description: Street information in local languages type: string - local-landmark: + local_landmark: description: Landmark information in local language type: string - local-locality: + local_locality: description: locality information in local language type: string pincode: description: pincode type: string - po-name-local: + po_name_local: description: Post office name in local type: string - local-vtc: + local_vtc: description: vtc information in local language type: string - local-subdistrict: + local_subdistrict: description: Sub district information in local language type: string - local-district: + local_district: description: district information in local language type: string - local-state: + local_state: description: State information in local language type: string - local-country: + local_country: description: Country information in local language type: string nid_ResidentLocalName: @@ -1550,12 +1572,18 @@ components: $ref: '#/components/schemas/RegistryType' reg_event_type: $ref: '#/components/schemas/RegistryEventType' - reg_record_type: - $ref: '#/components/schemas/RegistryRecordType' + response_entity: + type: enum + description: | + Define the type of response to have when executing the search + enum: + - Household + - Family + - Member reg_records: $ref: '#/components/schemas/RegistryRecord' required: - - reg_record_type + - response_entity - reg_records locale: $ref: '#/components/schemas/LanguageCode' @@ -1569,49 +1597,112 @@ components: RegistryEventType: type: string description: | - @context: "https://example.org/schema/RegistryEventType"
+ @context: https://schema.spdci.org/common/v1/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' + 3. example: "spdci-common:RegistryEventType:NewHouseHoldMember" + example: 'spdci-common:RegistryEventType:NewHouseHoldMember' 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. + The "Household" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dci/v1/Person.jsonld
+ @type: "Household"
+ @container: "@set"
example: - $ref: '#/components/schemas/dci_CRVSPerson' + type: object + description: | + 1. Attributes of a household 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/Household.jsonld
+ @type: "@context"
+ example: + '@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': Household + '@type': Household + household_identifier: HS02052024 + address: + geo_location: '' + poverty_score: '4.0' + poverty_score_type: '' + household_size: '1' + household_head_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: ' ' + member_list: + - household_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: self + related_person: {} + is_disabled: '0' + disability_info: ' ' + marital_status: Single + employment_status: employed + occupation: Caregiver + income_level: ' ' + language_code: Eng + education_level: Highschool + registration_date: 02.05.2024 + additional_attributes: [] + registration_date: 02.05.2024 + last_update: ' ' RegistryRecordType: type: string description: | - @context: "https://example.org/schema/RegistryRecordType"
+ @context: https://schema.spdci.org/common/v1/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' + 4. example: "spdci-extensions-dci:Person" + example: 'spdci-extensions-dci:Person' RegistryType: type: string description: | - @context: "https://example.org/schema/RegistryType"
- @type: "RegistryType"
+ @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:Civil" - example: 'ns:org:RegistryType:Civil' + 3. example: "ns:org:RegistryType:Social" + example: 'ns:org:RegistryType:Social' SearchRequest: type: object description: | @@ -2042,7 +2133,7 @@ components: name: type: string description: | - @context: "https://example.org/schema/Attribute"
+ @context: https://schema.spdci.org/common/v1/attribute.jsonld
@type: "Attribute"
**Notes:** @@ -2071,10 +2162,10 @@ components: Authorize: type: object description: | - @context: "https://example.org/schema/Authorize"
+ @context: https://schema.spdci.org/Authorize
@type: "Authorize" example: - '@context': 'https://example.org/schema/Authorize' + '@context': 'https://standards.spdci.org/schemas/Authorize' '@type': Authorize ts: $ref: '#/components/schemas/DateTime' @@ -2084,17 +2175,17 @@ components: 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 Consent: type: object description: | - @context: "https://example.org/schema/Consent"
+ @context: https://schema.spdci.org/Consent"
@type: "Consent" example: - '@context': 'https://example.org/schema/Consent' + '@context': 'https://standards.spdci.org/schemas//Consent' '@type': Consent ts: $ref: '#/components/schemas/DateTime' @@ -2104,7 +2195,7 @@ components: 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 @@ -2228,7 +2319,7 @@ components: attribute_name: type: string description: | - @context: "https://example.org/schema/QueryAttributes"
+ @context: https://schema.spdci.org/QueryAttributes"
@type: "QueryAttributes"
**Notes:** @@ -2275,24 +2366,33 @@ components: type: type: string description: | - @context: "https://example.org/schema/QueryType"
- @type: "Queryype"
+ @context: https://schema.spdci.org/common/v1/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' + example: 'ns:org:QueryType:NoSql' value: type: object description: | - @context: "https://example.org/schema/QueryExpression"
+ @context: https://schema.spdci.org/common/v1/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 } }' + expression: + collection: HouseHold + query: + $and: + - poverty_score: + $lt: 5 + - location: + $eq: central_region + - household_size: + $lt: 5 FileInfo: type: object description: File info. Used in file upload feature using HTTPS @@ -2315,7 +2415,7 @@ components: IdentifierType: type: string description: | - @context: "https://example.org/schema/IdType"
+ @context: https://schema.spdci.org/IdType"
@type: "IdType"
**Notes:** @@ -2330,7 +2430,7 @@ components: type: type: string description: | - @context: "https://example.org/schema/IdType"
+ @context: https://schema.spdci.org/common/v1/IdentifierTypeEnum.jsonld
@type: "IdType"
**Notes:** @@ -2360,7 +2460,7 @@ components: Meta: type: object description: | - @context: "https://example.org/schema/Meta"
+ @context: https://schema.spdci.org/common/v1/Meta.jsonld
@type: "@context"
**Notes:** @@ -2392,7 +2492,7 @@ components: 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 reascon code message, if any, Helps actionable messaging for system/end users' type: string maxLength: 999 total_count: @@ -2442,24 +2542,24 @@ components: 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.' + 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' 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 total_count: @@ -2493,7 +2593,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)' + 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)' Pagination: description: 'Pagination definition, count starts with 1' type: object @@ -2538,7 +2638,7 @@ components: - idtype-value - expression - predicate - example: idtype-value + example: expression ReferenceId: type: string description: Unique reference_id set by txn initiating system for each request in a batch @@ -2562,14 +2662,14 @@ components: attribute_name: type: string description: | - @context: "https://example.org/schema/Attribute"
+ @context: https://schema.spdci.org/common/v1/Attribute.jsonld
@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: @@ -2582,7 +2682,7 @@ components: 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 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 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..1295a95 --- /dev/null +++ b/release/yaml/social_api_v1.0.0.yaml @@ -0,0 +1,1854 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Social Registry + 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 : + - [Scoial Registry - V1.0 ](https://standards.spdci.org/standards/v/social-v1.0-1/social/1.-social) + + Code directory links: + - [Identifiers](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.01-identifier_type) + - [Marital Status](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.02-marital_status) + - [Sex](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.03-sex) + - [Relation Ship Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.07-relationship_type) + - [Ethnicity](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.08-ethnicity) + - [Nationality](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.09-nationality) + - [Disability Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.10-disability_type) + - [Functional Limitation Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.11-functional_limitation_type) + - [Functional Severity](https://app.gitbook.com/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.12-functional_severity) + - [Education Level](https://app.gitbook.com/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.17-education_level) + - [Employment Status](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/code-directory/cd.sr.02-employment_status) + - [Income Level](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/code-directory/cd.sr.03-income_level) + - [Occupation](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/code-directory/cd.sr.04-occupation) + Data Objects: + - Person + - HouseHold + - Family + - Member + - RelatedPerson + - DisabilityInfo + + 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: 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 + - 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': + $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 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': + $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': + $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 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': + $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 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': + $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 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': + $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: + ReceiptRequest: + 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: + receipt_type: + description: Receipt type 1) Enrollments 2) Updates + type: string + enum: + - enrollement + - enrollement_status_change + 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: + 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/Beneficairy.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: + - transaction_id + - receipt_information + ReceiptResponse: + type: object + description: Event notification information + 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) 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: '#/components/schemas/ReceiptRequest/properties/receipt_information/properties/receipt_type' + 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: + 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': + '@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': 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 + birth_date: '1995-09-21T11:20:00' + sex: female + marital_status: M + is_disabled: 2 + disability_identifier: + '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '753869421' + disability_type: '' + functional_limitation_type: d132 + functional_severity: '0' + nationality: 'ISO 3166-2:DZ' + employment_status: '1' + is_deceased: '2' + 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: '+66891234567' + email: sudarat.phumchai@example.com + household_identifier: '' + household_status: '1' + poverty_score: '2.5' + parent1_identifier: + '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '753869421' + parent2_identifier: + '@id': Identifier + '@type': Identifier + identifier_type: UIN + identifier_value: '852963741' + registration_date: '2022-09-21T11:20:00' + last_updated: '2022-09-21T11:20:00' + required: + - transaction_id + - receipt_information + 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: 0123456789 + 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_event_type: + type: string + description: | + The SR receive data from SP system , it has to differenciate of details based on event type, Usually SP system sends Registration , payment and deregister events to IBR + + 1 : Register
+ 4 : spdci:common:RegistryEventType:NewHouseHoldMember + enum: + - REGISTER + - NewHouseHoldMember + 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: + $ref: '#/components/schemas/NotifyEventRequest/properties/notify_event/items/properties/data/properties/response_entity' + 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 + - search all farmers with land area less than 2 acers in district code 504 + oneOf: + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/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:NoSql' + value: + type: object + description: | + @context: https://schema.spdci.org/common/v1/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: HouseHold + query: + $and: + - poverty_score: + $lt: 5 + - location: + $eq: central_region + - household_size: + $lt: 5 + - type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/IdentifierTypeEnum.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. + - 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/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: + 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/oneOf/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/oneOf/2/items/properties/expression1' + required: + - expression1 + sort: + type: array + items: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @context: https://schema.spdci.org/common/v1/Attribute.jsonld
+ @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/Consent"
+ @type: "Consent" + example: + '@context': 'https://standards.spdci.org/schemas//Consent' + '@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/Authorize
+ @type: "Authorize" + example: + '@context': 'https://standards.spdci.org/schemas/Authorize' + '@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 + example: '9876543210' + 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_records: + description: | + The "Entity" object contains fields expected in response of search + @context: https://spdci.github.io/schemas/extensions/social/v1/Household.jsonld
+ @type: "Household"
+ @container: "@set"
+ type: array + items: + type: object + description: | + 1. Attributes of a household 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/Household.jsonld
+ @type: "@context"
+ example: + '@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': Household + '@type': Household + household_identifier: HS02052024 + address: + geo_location: '' + poverty_score: '4.0' + poverty_score_type: '' + household_size: '1' + household_head_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: ' ' + member_list: + - household_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: self + related_person: {} + is_disabled: '0' + disability_info: ' ' + marital_status: Single + employment_status: employed + occupation: Caregiver + income_level: ' ' + language_code: Eng + education_level: Highschool + registration_date: 02.05.2024 + additional_attributes: [] + registration_date: 02.05.2024 + last_update: ' ' + 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/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_event_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/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' + response_entity: + $ref: '#/components/schemas/NotifyEventRequest/properties/notify_event/items/properties/data/properties/response_entity' + response_fields: + 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 + 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 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/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/NotifyEventRequest/properties/notify_event/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: + required: + - reg_event_type + - filter + - notify_record_type + type: string + description: | + @context: https://schema.spdci.org/common/v1/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' + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - subscription_code + - timestamp + - subscribe_criteria + 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: '12345678901234567890' + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscibe + - receipt + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + attribute_value: + oneOf: + - $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: en + 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 + - subscibe + - receipt + txn_status: + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse/properties/txnstatus_response/example' + - 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/ReceiptRequest/properties/receipt_information' + required: + - transaction_id + - receipt_information + example: + 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 "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: '#/components/schemas/ReceiptRequest/properties/receipt_information/properties/beneficiaries/items' + 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 + 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/SearchRequest/properties/transaction_id' + timesstamp: + $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 + - sunscription_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' + timesatmp: + $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 + 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: + 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:Social" + example: 'ns:org:RegistryType:Social' + reg_event_type: + type: string + description: | + @context: https://schema.spdci.org/common/v1/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:NewHouseHoldMember" + example: 'spdci-common:RegistryEventType:NewHouseHoldMember' + response_entity: + type: enum + description: | + Define the type of response to have when executing the search + enum: + - Household + - Family + - Member + reg_records: + type: object + description: | + The "Household" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dci/v1/Person.jsonld
+ @type: "Household"
+ @container: "@set"
+ example: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items' + required: + - response_entity + - reg_records + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + 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: + $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: 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: '' + 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/{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: 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: + type: object + description: | + @context: https://schema.spdci.org/common/v1/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 index 9dd8ff3..56eb69c 100644 --- a/src/authz/README.md +++ b/src/authz/README.md @@ -1,4 +1,4 @@ -## G2P Connect Authorization Specs +## SPDCI Connect Authorization Specs ### Wiki Pages 1. [Specifications](https://digital-convergence-initiative-d.gitbook.io/dci-standards-1/standards/1.-crvs) diff --git a/src/authz/authz_core_api_v1.0.0.yaml b/src/authz/authz_core_api_v1.0.0.yaml index a8624af..50c84c0 100644 --- a/src/authz/authz_core_api_v1.0.0.yaml +++ b/src/authz/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 @@ -26,7 +27,7 @@ paths: 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.
+ 5. Clients MUST set HTTP \"Authorization: Bearer \" in HTTP header to access any spdci 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: 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..07fabc7 100644 --- a/src/common/schema/AttributeNameValue.yaml +++ b/src/common/schema/AttributeNameValue.yaml @@ -4,7 +4,7 @@ properties: name: type: string description: | - @context: "https://example.org/schema/Attribute"
+ @context: https://schema.spdci.org/common/v1/attribute.jsonld
@type: "Attribute"
**Notes:** diff --git a/src/common/schema/Authorize.yaml b/src/common/schema/Authorize.yaml index 8178752..7a5fdcb 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/Authorize
@type: "Authorize" example: - "@context": "https://example.org/schema/Authorize" + "@context": "https://standards.spdci.org/schemas/Authorize" "@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..e454252 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/Consent"
@type: "Consent" example: - "@context": "https://example.org/schema/Consent" + "@context": "https://standards.spdci.org/schemas//Consent" "@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/ExpPredicate.yaml b/src/common/schema/ExpPredicate.yaml index cbc82a3..f260091 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/QueryAttributes"
@type: "QueryAttributes"
**Notes:** diff --git a/src/common/schema/ExpTemplate.yaml b/src/common/schema/ExpTemplate.yaml index 8c619c5..93733ec 100644 --- a/src/common/schema/ExpTemplate.yaml +++ b/src/common/schema/ExpTemplate.yaml @@ -4,31 +4,35 @@ properties: type: type: string description: | - @context: "https://example.org/schema/QueryType"
- @type: "Queryype"
+ @context: https://schema.spdci.org/common/v1/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" + example: "ns:org:QueryType:NoSql" value: type: object description: | - @context: "https://example.org/schema/QueryExpression"
+ @context: https://schema.spdci.org/common/v1/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: + collection: "HouseHold" + query: + $and: [ + { + poverty_score: { $lt: 5 } + }, + { + location: { $eq: "central_region" } + }, + { + household_size: { $lt: 5 } } - }" \ No newline at end of file + ] + \ 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..621eb30 --- /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/identifier_type.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..05fbeec 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/IdType"
@type: "IdType"
**Notes:** diff --git a/src/common/schema/IdentifierTypeValue.yaml b/src/common/schema/IdentifierTypeValue.yaml index cf2d6b8..1c4cfac 100644 --- a/src/common/schema/IdentifierTypeValue.yaml +++ b/src/common/schema/IdentifierTypeValue.yaml @@ -4,7 +4,7 @@ properties: type: type: string description: | - @context: "https://example.org/schema/IdType"
+ @context: https://schema.spdci.org/common/v1/IdentifierTypeEnum.jsonld
@type: "IdType"
**Notes:** diff --git a/src/common/schema/LanguageCode.yaml b/src/common/schema/LanguageCode.yaml index a2e043c..6ddb6de 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 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..08b5804 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/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..e661d6f 100644 --- a/src/common/schema/MsgHeader_V1.0.0.yaml +++ b/src/common/schema/MsgHeader_V1.0.0.yaml @@ -15,24 +15,24 @@ 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" 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' total_count: 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..0b53640 100644 --- a/src/common/schema/QueryType.yaml +++ b/src/common/schema/QueryType.yaml @@ -3,4 +3,4 @@ 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 +example: "expression" \ 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..e558466 --- /dev/null +++ b/src/common/schema/ResponseEntity.yaml @@ -0,0 +1,7 @@ +type: string +description: | + Define the type of response to have when executing the search +enum: +- "Household" +- "Family" +- "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..128e38f 100644 --- a/src/common/schema/SearchSort.yaml +++ b/src/common/schema/SearchSort.yaml @@ -4,14 +4,14 @@ properties: attribute_name: type: string description: | - @context: "https://example.org/schema/Attribute"
+ @context: https://schema.spdci.org/common/v1/Attribute.jsonld
@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..9b4a086 100644 --- a/src/common/schema/TransactionId.yaml +++ b/src/common/schema/TransactionId.yaml @@ -1,6 +1,6 @@ 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 diff --git a/src/disburse/schema/DisburseResponse.yaml b/src/disburse/schema/DisburseResponse.yaml index 0186e59..419fb62 100644 --- a/src/disburse/schema/DisburseResponse.yaml +++ b/src/disburse/schema/DisburseResponse.yaml @@ -8,7 +8,7 @@ properties: items: type: object description: | - 1. G2P Disbursement response i.e status of each disburemsent request for reconciliation by sender system + 1. SPDCI Disbursement response i.e status of each disburemsent request for reconciliation by sender system properties: reference_id: $ref: "../../common/schema/ReferenceId.yaml" diff --git a/src/extensions/dci/CRVSPerson.yaml b/src/extensions/dci/Person.yaml similarity index 91% rename from src/extensions/dci/CRVSPerson.yaml rename to src/extensions/dci/Person.yaml index a4ebf79..df27e5f 100644 --- a/src/extensions/dci/CRVSPerson.yaml +++ b/src/extensions/dci/Person.yaml @@ -1,16 +1,16 @@ type: object description: | - @context: "https://example.org/schema/CRVSPerson"
+ @context: https://schema.spdci.org/CRVSPerson"
@type: "Consent" example: - "@context": "https://example.org/schema/CRVSPerson" + "@context": "https://standards.spdci.org/schemas/extensions/dci/v1/Person" "@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" + "@id": "https://spdci.org/schemas/extensions/dci/v1/Person" "@type": "rdfs:Class" "@context": "name": diff --git a/src/extensions/ibr/Beneficiary.yaml b/src/extensions/ibr/Beneficiary.yaml new file mode 100644 index 0000000..9b03291 --- /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/Beneficairy.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..ee5feea --- /dev/null +++ b/src/extensions/ibr/EnrolledCriteria.yaml @@ -0,0 +1,21 @@ +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: | + { + "$and": [ + { + "person_identifier": { "eq": "ABC451123" } + } + ] + } \ 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/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/MOSIPVerifiableCredential.yaml b/src/extensions/mosip/MOSIPVerifiableCredential.yaml index 7367fb3..c953f66 100644 --- a/src/extensions/mosip/MOSIPVerifiableCredential.yaml +++ b/src/extensions/mosip/MOSIPVerifiableCredential.yaml @@ -1,14 +1,14 @@ 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: + issued_to: description: "" type: string - protectedAttributes: + protected_attributes: type: array items: type: string - credentialSubject: + credential_subject: description: "MOSIP Verifiable Credential for Proof of identity" type: object properties: @@ -16,13 +16,13 @@ properties: $ref: LanguageValueList.yaml city: $ref: LanguageValueList.yaml - postalCode: + postal_code: type: string example: "14022" - fullName: + full_name: type: string example: "Thirteen Mosip" - dateOfBirth: + birthdate: type: string example: "2022" province: @@ -30,14 +30,14 @@ properties: phone: type: string example: "9898989898" - addressLine1: + addressline1: $ref: LanguageValueList.yaml - addressLine2: + addressline2: $ref: LanguageValueList.yaml id: type: string example: "2835824850916304" - UIN: + uin: type: string example: "7346597054" region: diff --git a/src/extensions/mosip/RegistrationRecord.yaml b/src/extensions/mosip/RegistrationRecord.yaml index 014ca12..ede7531 100644 --- a/src/extensions/mosip/RegistrationRecord.yaml +++ b/src/extensions/mosip/RegistrationRecord.yaml @@ -1,11 +1,11 @@ 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: + registration_id: type: string packetId: type: string - additionalInfoReqId: + additional_info_reqId: type: string name: type: string @@ -13,29 +13,29 @@ properties: type: string phone: type: string - registrationType: + registration_type: type: string - packetHashValue: + packet_hash_value: type: string - packetSize: + packet_size: type: integer - supervisorStatus: + supervisor_status: type: string - supervisorComment: + supervisor_comment: type: string - opentionalValues: + opentional_values: type: array items: type: string - langCode: + lang_code: type: string - createDateTime: + create_date_time: $ref: ../../common/schema/DateTime.yaml - updateDateTime: + update_date_time: $ref: ../../common/schema/DateTime.yaml - deletedDateTime: + deleted_date_time: $ref: ../../common/schema/DateTime.yaml - isActive: + is_active: type: boolean - isDeleted: + is_deleted: type: boolean \ No newline at end of file diff --git a/src/extensions/nid/ResidentAddress.yaml b/src/extensions/nid/ResidentAddress.yaml index 62ef8ff..062cadd 100644 --- a/src/extensions/nid/ResidentAddress.yaml +++ b/src/extensions/nid/ResidentAddress.yaml @@ -22,13 +22,13 @@ properties: vtc: description: Village Town City Code type: string - vtc-name: + vtc_name: description: Village/Town/City Name type: string - sub-district-name: + sub_district_name: description: Sub District Name type: string - district-name: + district_name: description: District Name type: string state: diff --git a/src/extensions/nid/ResidentLocalAddress.yaml b/src/extensions/nid/ResidentLocalAddress.yaml index 7114354..3304f6e 100644 --- a/src/extensions/nid/ResidentLocalAddress.yaml +++ b/src/extensions/nid/ResidentLocalAddress.yaml @@ -1,39 +1,39 @@ type: object description: Resident Local Address properties: - local-careof: + local_careof: description: Care of information in local language type: string - local-building: + local_building: description: Building information in local language type: string - local-street: - description: Street information in local language + local_street: + description: Street information in local languages type: string - local-landmark: + local_landmark: description: Landmark information in local language type: string - local-locality: + local_locality: description: locality information in local language type: string pincode: description: pincode type: string - po-name-local: + po_name_local: description: Post office name in local type: string - local-vtc: + local_vtc: description: vtc information in local language type: string - local-subdistrict: + local_subdistrict: description: Sub district information in local language type: string - local-district: + local_district: description: district information in local language type: string - local-state: + local_state: description: State information in local language type: string - local-country: + local_country: description: Country information in local language type: string \ No newline at end of file diff --git a/src/extensions/social/Household.yaml b/src/extensions/social/Household.yaml new file mode 100644 index 0000000..c766702 --- /dev/null +++ b/src/extensions/social/Household.yaml @@ -0,0 +1,80 @@ +type: object +description: | + 1. Attributes of a household 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/Household.jsonld
+ @type: "@context"
+example: + { + "@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": "Household", + "@type": "Household", + "household_identifier": "HS02052024", + "address": { + "geo_location": "" + }, + "poverty_score": "4.0", + "poverty_score_type": "", + "household_size": "1", + "household_head_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": " " + } + }, + "member_list": [ + { + "household_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": "self", + "related_person":{}, + "is_disabled": "0", + "disability_info": " ", + "marital_status": "Single", + "employment_status": "employed", + "occupation": "Caregiver", + "income_level": " ", + "language_code": "Eng", + "education_level": "Highschool", + "registration_date": "02.05.2024", + } + },], + "additional_attributes": [], + "registration_date": "02.05.2024", + "last_update": " " +} \ No newline at end of file diff --git a/src/extensions/social/Person.yaml b/src/extensions/social/Person.yaml new file mode 100644 index 0000000..022a8d4 --- /dev/null +++ b/src/extensions/social/Person.yaml @@ -0,0 +1,114 @@ +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": { + "@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": "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" + }, + "birth_date": "1995-09-21T11:20:00", + "sex": "female", + "marital_status": "M", + "is_disabled": 2, + "disability_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "753869421" + }, + "disability_type": "", + "functional_limitation_type": "d132", + "functional_severity": "0", + "nationality": "ISO 3166-2:DZ", + "employment_status": "1", + "is_deceased": "2", + "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": "+66891234567", + "email": "sudarat.phumchai@example.com", + "household_identifier": "", + "household_status": "1", + "poverty_score": "2.5", + "parent1_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "753869421" + }, + "parent2_identifier": { + "@id": "Identifier", + "@type": "Identifier", + "identifier_type": "UIN", + "identifier_value": "852963741" + }, + "registration_date": "2022-09-21T11:20:00", + "last_updated": "2022-09-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/jwks/README.md b/src/jwks/README.md new file mode 100644 index 0000000..e8c78dc --- /dev/null +++ b/src/jwks/README.md @@ -0,0 +1,7 @@ +## SPDCI Connect JSON Web Token Set 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. diff --git a/src/jwks/jwks_core_api_v1.0.0.yaml b/src/jwks/jwks_core_api_v1.0.0.yaml new file mode 100644 index 0000000..8237535 --- /dev/null +++ b/src/jwks/jwks_core_api_v1.0.0.yaml @@ -0,0 +1,44 @@ +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: + $ref: schema/core/JWKSResponse.yaml + responses: + HttpErrorResponse: + $ref: "../common/response/HttpErrorResponse.yaml" + diff --git a/src/jwks/schema/core/JWK.yaml b/src/jwks/schema/core/JWK.yaml new file mode 100644 index 0000000..5371caa --- /dev/null +++ b/src/jwks/schema/core/JWK.yaml @@ -0,0 +1,24 @@ +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" diff --git a/src/jwks/schema/core/JWKSResponse.yaml b/src/jwks/schema/core/JWKSResponse.yaml new file mode 100644 index 0000000..edec76a --- /dev/null +++ b/src/jwks/schema/core/JWKSResponse.yaml @@ -0,0 +1,15 @@ +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/JWK" +required: + - keys +description: "JSON Web Key Set" +components: + schemas: + JWK: + $ref: ./JWK.yaml + diff --git a/src/locations/locations_core_api_v1.0.0.yaml b/src/locations/locations_core_api_v1.0.0.yaml new file mode 100644 index 0000000..03b797d --- /dev/null +++ b/src/locations/locations_core_api_v1.0.0.yaml @@ -0,0 +1,40 @@ +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: + $ref: schema/core/LocationHierarchy.yaml + "404": + $ref: "#/components/responses/HttpErrorResponse" + "500": + $ref: "#/components/responses/HttpErrorResponse" + deprecated: false +components: + responses: + HttpErrorResponse: + $ref: "../common/response/HttpErrorResponse.yaml" diff --git a/src/locations/schema/core/LocationHierarchy.yaml b/src/locations/schema/core/LocationHierarchy.yaml new file mode 100644 index 0000000..449e850 --- /dev/null +++ b/src/locations/schema/core/LocationHierarchy.yaml @@ -0,0 +1,19 @@ +description: LocationHierarchy +type: object +properties: + "@context": + $ref: "../../../common/schema/@context.yaml" + "@type": + type: string + const: LocationHierarchy + last_updated: + $ref: "../../../common/schema/DateTime.yaml" + example: "2023-10-17T11:26:02.512+00:00" + locations: + type: array + description: "An array of all Places in the system with names and parent id's" + items: + $ref: "./Place.yaml" +required: + - "@context" + - "@type" diff --git a/src/locations/schema/core/Place.yaml b/src/locations/schema/core/Place.yaml new file mode 100644 index 0000000..1eb1190 --- /dev/null +++ b/src/locations/schema/core/Place.yaml @@ -0,0 +1,26 @@ +description: Place +type: object +properties: + "@type": + type: string + const: "Place" + identifier: + type: array + items: + $ref: "./PropertyValue.yaml" + 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 diff --git a/src/locations/schema/core/PropertyValue.yaml b/src/locations/schema/core/PropertyValue.yaml new file mode 100644 index 0000000..08eebe1 --- /dev/null +++ b/src/locations/schema/core/PropertyValue.yaml @@ -0,0 +1,14 @@ +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" diff --git a/src/mapper/mapper_core_api_v1.0.0.yaml b/src/mapper/mapper_core_api_v1.0.0.yaml deleted file mode 100644 index 1813a12..0000000 --- a/src/mapper/mapper_core_api_v1.0.0.yaml +++ /dev/null @@ -1,1114 +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: - 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/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: - 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/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: - 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/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: - 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 - 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: - 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/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: - 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/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: - 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/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: - 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/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: - 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/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: - 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/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: - 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 - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" - 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: - 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 - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" - 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: - 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 - '401': - $ref: "#/components/responses/HttpErrorResponse" - '403': - $ref: "#/components/responses/HttpErrorResponse" - '500': - $ref: "#/components/responses/HttpErrorResponse" - 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: - 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 - '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: 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 - 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 - - - - ###### 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 - 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 - 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 - 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 - securitySchemes: - Authorization: - $ref: ../common/security/Authorization.yaml \ 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/registry/ibr/EnrolledRequest.yaml b/src/registry/ibr/EnrolledRequest.yaml new file mode 100644 index 0000000..ade7bf1 --- /dev/null +++ b/src/registry/ibr/EnrolledRequest.yaml @@ -0,0 +1,10 @@ +type: object +description: Registry to notify a event to subscrbiers +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..c46581a --- /dev/null +++ b/src/registry/ibr/EnrolledResponse.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 "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 diff --git a/src/registry/ibr/EnrollmentUpdatesRequest.yaml b/src/registry/ibr/EnrollmentUpdatesRequest.yaml new file mode 100644 index 0000000..e7ac585 --- /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 + receipt_information: + $ref: ../../extensions/ibr/ReceiptInformation.yaml +required: + - transaction_id + - receipt_information \ No newline at end of file diff --git a/src/registry/ibr/EnrollmentUpdatesResponse.yaml b/src/registry/ibr/EnrollmentUpdatesResponse.yaml new file mode 100644 index 0000000..9ad5269 --- /dev/null +++ b/src/registry/ibr/EnrollmentUpdatesResponse.yaml @@ -0,0 +1,32 @@ + +type: object + +description: Response to subscribe 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 actionanble messaging for systems/end users" + type: string + maxLength: 999 + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - enrolled_response \ 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..2d7abd7 --- /dev/null +++ b/src/registry/ibr/RegistryEventType.yaml @@ -0,0 +1,10 @@ +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" \ 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..c023218 --- /dev/null +++ b/src/registry/ibr/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/ibr/v1/Person.jsonld
+ @type: "Person"
+ @container: "@set"
+example: + $ref: "../../extensions/ibr/Person.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..cdb4516 --- /dev/null +++ b/src/registry/ibr/RegistryRecordType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + @context: https://schema.spdci.org/extensions/ibr/v1/Person.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: "Person" +example: "Person" \ 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..ca1c2e7 --- /dev/null +++ b/src/registry/ibr/SearchRequest.yaml @@ -0,0 +1,51 @@ +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_event_type: + $ref: ./RegistryEventType.yaml + query_type: + $ref: ../../common/schema/QueryType.yaml + query: + $ref: ../schema/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..b2abff3 --- /dev/null +++ b/src/registry/ibr/SearchResponse.yaml @@ -0,0 +1,56 @@ +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 "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/registry/ibr/SubscribeResponse.yaml b/src/registry/ibr/SubscribeResponse.yaml new file mode 100644 index 0000000..20038f7 --- /dev/null +++ b/src/registry/ibr/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/ibr/TxnStatusRequest.yaml b/src/registry/ibr/TxnStatusRequest.yaml new file mode 100644 index 0000000..dc5ad96 --- /dev/null +++ b/src/registry/ibr/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","subscibe","receipt"] + attribute_type: + type: string + enum: + - "transaction_id" + - "reference_id_list" + - "correlation_id" + attribute_value: + oneOf: + - $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/ibr/TxnStatusResponse.yaml b/src/registry/ibr/TxnStatusResponse.yaml new file mode 100644 index 0000000..7c8853e --- /dev/null +++ b/src/registry/ibr/TxnStatusResponse.yaml @@ -0,0 +1,27 @@ +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 + properties: + txn_type: + type: string + description: txn type to fetch status + enum: ["search","subscibe","receipt"] + txn_status: + oneOf: + - $ref: SearchResponse.yaml + - $ref: ReceiptRequest.yaml + example: + $ref: SearchResponse.yaml + required: + - txn_type + - txn_status +required: + - transaction_id + - correlation_id + - txnstatus_response \ No newline at end of file diff --git a/src/disburse/disburse_core_api_v1.0.0.yaml b/src/registry/ibr_api_v1.0.0.yaml similarity index 50% rename from src/disburse/disburse_core_api_v1.0.0.yaml rename to src/registry/ibr_api_v1.0.0.yaml index 10a9fb4..e5b08ed 100644 --- a/src/disburse/disburse_core_api_v1.0.0.yaml +++ b/src/registry/ibr_api_v1.0.0.yaml @@ -1,17 +1,71 @@ 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 - Integrated Beneficiary Registry + 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-MIS. + 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-MIS 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://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/introduction) + + Code directory links: + - [Assistance Unit](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.01-assistance_unit) + - [Enrollment Status](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.02-enrolment_status) + - [Benefit Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.03-benefit_type) + - [Institution Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.04-institution_type) + - [Legal Status](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.05-legal_status) + - [Social Protection Functions](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.06-social_protection_functions) + - [Contribution Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.07-contribution_type) + - [Programme Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/code-directory/cd.ibr.08-programme_type) + + Data Objects: + - [Beneficiary](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/data-objects/do.ibr.01-beneficiary) + - [Programme](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/data-objects/do.ibr.02-programme) + - [Benefit](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/data-objects/do.ibr.03-benefit) + - [Benefit Frequency](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/iRXYPSOF88AbSukDLMoT/ibr/1.-crvs/data/data-objects/do.ibr.o4-benefit-frequency) + - [HouseHold](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.02-household) + - [Family](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.03-family) + - [Member](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.04-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" + 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 @@ -24,18 +78,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 +85,11 @@ tags: - name: SearchResponse x-displayName: SearchResponse description: | - + - name: SearchStatusReasonCode x-displayName: SearchStatusReasonCode description: | - + - name: TxnStatusRequest x-displayName: TxnStatusRequest description: | @@ -56,6 +98,22 @@ tags: 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: | @@ -68,23 +126,31 @@ x-tagGroups: - Sync - name: Schema Objects tags: - - DisburseRequest - - DisburseResponse - SearchRequest - - SearchResponse + - SearchResponse + - EnrollmentUpdatesRequest + - EnrollmentUpdatesResponse + - EnrolledRequest + - EnrolledResponse - TxnStatusRequest - TxnStatusResponse - EncryptedMessage - name: Status Codes tags: - - DisburseStatusReasonCode - SearchStatusReasonCode paths: - /disburse: + /registry/search: post: - summary: "/disburse" - description: Initiate payment through disbursement instructions - operationId: post_dsbt_disburse + 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-MIS 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: @@ -103,11 +169,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 +186,7 @@ paths: - properties: action: enum: - - disburse + - search responses: default: $ref: "#/components/responses/Response" @@ -130,13 +198,15 @@ 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: |- + The /registry/on-search end point tobe implemented by SP-MIS 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: @@ -155,11 +225,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 +240,26 @@ 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/txn/status: post: - summary: "/disbruse/search" - description: "Search disbursement by searchable attributes" - operationId: post_dsbt_search + 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: @@ -206,11 +278,12 @@ paths: - properties: action: enum: - - search + - txn-status message: - anyOf: - - $ref: "#/components/schemas/SearchRequest" - - $ref: "#/components/schemas/EncryptedMessage" + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' required: - header - message @@ -221,25 +294,25 @@ paths: - properties: action: enum: - - search + - txn-status 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/txn/on-status: post: - summary: "/disburse/on-search" - description: "Disbrusement search results through callback" - operationId: post_dsbt_on-search + summary: "/registry/txn/on-status" + description: |- + The /registry/txn/on-status will be implemented by SP-MIS. The response with information about request and in some case it may contain data as well. + operationId: post_reg_on-txnstatus tags: - Async requestBody: @@ -258,11 +331,12 @@ paths: - properties: action: enum: - - on-search + - txn-on-status message: - anyOf: - - $ref: "#/components/schemas/SearchResponse" - - $ref: "#/components/schemas/EncryptedMessage" + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' required: - header multipart/form-data: @@ -272,27 +346,34 @@ paths: - properties: action: enum: - - on-search' + - txn-on-status 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/sync/search: 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/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: - - Async + - Sync requestBody: description: "" required: true @@ -309,45 +390,62 @@ paths: - properties: action: enum: - - on-disburse - - on-search + - search message: type: object + description: The search data using which registry search to be performed oneOf: - - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/SearchRequest' - $ref: '#/components/schemas/EncryptedMessage' required: - header - message - multipart/form-data: - schema: - allOf: - - $ref: "#/components/schemas/FileInfo" - - 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: + 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: [ ] - # - Signature: [ ] + - Authorization: [ ] deprecated: false - /disburse/txn/on-status: + /registry/sync/enrollment/updates: post: - summary: "/disburse/txn/on-status" - description: Status check response through callback - operationId: post_dsbt_on-txnstatus + 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-MIS 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: - - Async + - Sync requestBody: description: "" required: true @@ -364,12 +462,12 @@ paths: - properties: action: enum: - - on-disburse - - on-search + - notify message: - anyOf: - - $ref: "#/components/schemas/TxnStatusResponse" - - $ref: "#/components/schemas/EncryptedMessage" + type: object + oneOf: + - $ref: '#/components/schemas/EnrollmentUpdatesRequest' + - $ref: '#/components/schemas/EncryptedMessage' required: - header multipart/form-data: @@ -379,78 +477,10 @@ 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" - security: - - Authorization: [ ] - # - Signature: [ ] - 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 + - notify 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/schemas/EnrollmentUpdatesResponse" '401': $ref: "#/components/responses/HttpErrorResponse" '403': @@ -460,13 +490,12 @@ 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/sync/enrolled: + post: + summary: "/registry/sync/enrolled" + description: |- + search programmes person is enrolled in + operationId: post_reg_enrolled tags: - Sync requestBody: @@ -489,50 +518,36 @@ paths: message: type: object description: The search data using which registry search to be performed - anyOf: - - $ref: '#/components/schemas/SearchRequest' - - $ref: '#/components/schemas/EncryptedMessage' + 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: - 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 + $ref: "#/components/schemas/EnrolledResponse" '401': $ref: "#/components/responses/HttpErrorResponse" '403': $ref: "#/components/responses/HttpErrorResponse" '500': $ref: "#/components/responses/HttpErrorResponse" - 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: |- + 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: @@ -551,8 +566,7 @@ paths: - properties: action: enum: - - search - - subscribe + - txn-status message: type: object oneOf: @@ -577,8 +591,7 @@ paths: - properties: action: enum: - - on-search - - notify + - txn-on-status message: type: object oneOf: @@ -592,72 +605,35 @@ paths: $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 - - ###### 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 + schemas: + EnrollmentUpdatesRequest: + $ref: ibr/EnrollmentUpdatesRequest.yaml + EnrollmentUpdatesResponse: + $ref: ibr/EnrollmentUpdatesResponse.yaml SearchRequest: - $ref: schema/SearchRequest.yaml + $ref: ibr/SearchRequest.yaml SearchResponse: - $ref: schema/SearchResponse.yaml + $ref: ibr/SearchResponse.yaml SearchStatusReasonCode: $ref: schema/SearchStatusReasonCode.yaml TxnStatusRequest: - $ref: schema/TxnStatusRequest.yaml + $ref: ibr/TxnStatusRequest.yaml TxnStatusResponse: - $ref: schema/TxnStatusResponse.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 + $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 - 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: @@ -666,29 +642,12 @@ components: $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 - securitySchemes: + securitySchemas: Authorization: $ref: ../common/security/Authorization.yaml diff --git a/src/registry/registry_core_api_v1.0.0.yaml b/src/registry/registry_core_api_v1.0.0.yaml index 80e333f..329d9b5 100644 --- a/src/registry/registry_core_api_v1.0.0.yaml +++ b/src/registry/registry_core_api_v1.0.0.yaml @@ -1,17 +1,40 @@ 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 - Foundational/Functional registries + 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: + - [Identifiers](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.01-identifier_type) + - [Marital Status](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.02-marital_status) + - [Sex](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.03-sex) + - [Vital event types](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.04-vital_event) + + Each request is build up of three parts + - signature + - header + - message 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 @@ -466,112 +489,6 @@ 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" @@ -741,209 +658,6 @@ 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" @@ -1016,8 +730,8 @@ components: $ref: ../extensions/cdpi/PersonId.yaml ###### src/extensions/dci schema objects - dci_CRVSPerson: - $ref: ../extensions/dci/CRVSPerson.yaml + dci_Person: + $ref: ../extensions/dci/Person.yaml dci_IdentifierType: $ref: ../extensions/dci/IdentifierType.yaml dci_IdentifierTypeValue: diff --git a/src/registry/schema/NotifyEventRequest.yaml b/src/registry/schema/NotifyEventRequest.yaml index 4f846b5..1980ce4 100644 --- a/src/registry/schema/NotifyEventRequest.yaml +++ b/src/registry/schema/NotifyEventRequest.yaml @@ -23,13 +23,13 @@ properties: reg_type: $ref: RegistryType.yaml reg_event_type: - $ref: RegistryEventType.yaml - reg_record_type: - $ref: RegistryRecordType.yaml + $ref: RegistryEventType.yaml + response_entity: + $ref: ../../common/schema/ResponseEntity.yaml reg_records: $ref: RegistryRecord.yaml required: - - reg_record_type + - response_entity - reg_records locale: $ref: "../../common/schema/LanguageCode.yaml" diff --git a/src/registry/schema/RegistryEventType.yaml b/src/registry/schema/RegistryEventType.yaml index 20d2f5b..b8720a6 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/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:NewHouseHoldMember" +example: "spdci-common:RegistryEventType:NewHouseHoldMember" \ No newline at end of file diff --git a/src/registry/schema/RegistryRecord.yaml b/src/registry/schema/RegistryRecord.yaml index 783780b..2d1a2d5 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 "Household" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/dci/v1/Person.jsonld
+ @type: "Household"
+ @container: "@set"
example: - $ref: "../../extensions/dci/CRVSPerson.yaml" \ No newline at end of file + $ref: "../../extensions/social/Household.yaml" \ No newline at end of file diff --git a/src/registry/schema/RegistryRecordType.yaml b/src/registry/schema/RegistryRecordType.yaml index ed2cb17..e4423fd 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/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:Person" +example: "spdci-extensions-dci:Person" \ No newline at end of file diff --git a/src/registry/schema/RegistryType.yaml b/src/registry/schema/RegistryType.yaml index 4325d24..6571e2b 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/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/social/ReceiptRequest.yaml b/src/registry/social/ReceiptRequest.yaml new file mode 100644 index 0000000..e7ac585 --- /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/ibr/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..c20c2d2 --- /dev/null +++ b/src/registry/social/RegistryEventType.yaml @@ -0,0 +1,9 @@ +type: string +description: | + The SR receive data from SP system , it has to differenciate of details based on event type, Usually SP system sends Registration , payment and deregister events to IBR + + 1 : Register
+ 4 : spdci:common:RegistryEventType:NewHouseHoldMember +enum: + - "REGISTER" + - "NewHouseHoldMember" \ 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..089b233 --- /dev/null +++ b/src/registry/social/RegistryRecord.yaml @@ -0,0 +1,8 @@ +type: object +description: | + The "Household" object contains fields expected in response of search + @context: https://schema.spdci.org/extensions/social/v1/Household.jsonld
+ @type: "Household"
+ @container: "@set"
+example: + $ref: "../../extensions/social/Household.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..9c10b9b --- /dev/null +++ b/src/registry/social/RegistryRecordType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + @context: https://schema.spdci.org/extensions/social/v1/Person.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: "Person" +example: "Person" \ 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..d76cd63 --- /dev/null +++ b/src/registry/social/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: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..f0d8ea6 --- /dev/null +++ b/src/registry/social/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_event_type: + $ref: ./RegistryEventType.yaml + query_type: + $ref: ../../common/schema/QueryType.yaml + response_entity: + $ref: ../../common/schema/ResponseEntity.yaml + query: + $ref: ../schema/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..77522b7 --- /dev/null +++ b/src/registry/social/SearchResponse.yaml @@ -0,0 +1,57 @@ +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_records: + description: | + The "Entity" object contains fields expected in response of search + @context: https://spdci.github.io/schemas/extensions/social/v1/Household.jsonld
+ @type: "Household"
+ @container: "@set"
+ type: array + items: + $ref: "../../extensions/social/Household.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..e27ebf2 --- /dev/null +++ b/src/registry/social/SubscribeRequest.yaml @@ -0,0 +1,49 @@ +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 + 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..dc5ad96 --- /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","subscibe","receipt"] + attribute_type: + type: string + enum: + - "transaction_id" + - "reference_id_list" + - "correlation_id" + attribute_value: + oneOf: + - $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..13a5d44 --- /dev/null +++ b/src/registry/social/TxnStatusResponse.yaml @@ -0,0 +1,27 @@ +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 + properties: + txn_type: + type: string + description: txn type to fetch status + enum: ["search","subscribe","receipt"] + txn_status: + oneOf: + - $ref: SearchResponse.yaml + - $ref: ReceiptRequest.yaml + example: + $ref: SearchResponse.yaml + required: + - txn_type + - txn_status +required: + - transaction_id + - correlation_id + - txnstatus_response \ No newline at end of file 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..1c7ac05 --- /dev/null +++ b/src/registry/social_api_v1.0.0.yaml @@ -0,0 +1,520 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Social Registry + 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://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/introduction) + + Code directory links: + - [Identifiers](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.01-identifier_type) + - [Marital Status](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.02-marital_status) + - [Sex](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.03-sex) + - [Relation Ship Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.07-relationship_type) + - [Ethnicity](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.08-ethnicity) + - [Nationality](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.09-nationality) + - [Disability Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.10-disability_type) + - [Functional Limitation Type](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.11-functional_limitation_type) + - [Functional Severity](https://app.gitbook.com/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.12-functional_severity) + - [Education Level](https://app.gitbook.com/s/F9fu0tIY1rJUsF03WdAv/standards-for-interoperability-interfaces/common-standards-for-interoperability-interfaces/data/code-directory/cd.com.17-education_level) + - [Employment Status](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/code-directory/cd.sr.02-employment_status) + - [Income Level](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/code-directory/cd.sr.03-income_level) + - [Occupation](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/code-directory/cd.sr.04-occupation) + + Data Objects: + - [Person](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.01-person) + - [HouseHold](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.02-household) + - [Family](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.03-family) + - [Member](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.04-member) + - [RelatedPerson](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.05-relatedperson) + - [DisabilityInfo](https://app.gitbook.com/o/0iSqNDBWH70sLmGExne0/s/bUVnrLEoih8bOGfpNjnB/social-registry/1.-crvs/data/data-objects/do.sr.06-disabilityinfo) + + 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: 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 + - 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: + 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 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: + 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: + 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 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: + 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 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': + $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 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': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + +components: + schemas: + SearchRequest: + $ref: social/SearchRequest.yaml + SearchResponse: + $ref: social/SearchResponse.yaml + SearchStatusReasonCode: + $ref: schema/SearchStatusReasonCode.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: ../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 + + responses: + HttpErrorResponse: + $ref: ../common/response/HttpErrorResponse.yaml + Response: + $ref: ../common/response/Response.yaml + securitySchemes: + Authorization: + $ref: ../common/security/Authorization.yaml