From 4026660165245664f58c36dd694640522aa93dc2 Mon Sep 17 00:00:00 2001 From: vvujjini Date: Sat, 23 Sep 2023 17:02:19 +0530 Subject: [PATCH 01/57] remove references to disburse, mapper files. --- build/build_apis.cmd | 12 +- release/html/authz_core_api_v1.0.0.html | 17 +- release/html/disburse_core_api_v1.0.0.html | 567 ----- release/html/mapper_core_api_v1.0.0.html | 650 ------ release/html/registry_core_api_v1.0.0.html | 38 +- release/yaml/disburse_core_api_v1.0.0.yaml | 1336 ------------ release/yaml/mapper_core_api_v1.0.0.yaml | 2218 -------------------- 7 files changed, 22 insertions(+), 4816 deletions(-) delete mode 100644 release/html/disburse_core_api_v1.0.0.html delete mode 100644 release/html/mapper_core_api_v1.0.0.html delete mode 100644 release/yaml/disburse_core_api_v1.0.0.yaml delete mode 100644 release/yaml/mapper_core_api_v1.0.0.yaml diff --git a/build/build_apis.cmd b/build/build_apis.cmd index c6e82b0..ba149e7 100755 --- a/build/build_apis.cmd +++ b/build/build_apis.cmd @@ -1,13 +1,13 @@ -# 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. 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 +# 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 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 +# 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 diff --git a/release/html/authz_core_api_v1.0.0.html b/release/html/authz_core_api_v1.0.0.html index a56c553..26c1c12 100644 --- a/release/html/authz_core_api_v1.0.0.html +++ b/release/html/authz_core_api_v1.0.0.html @@ -242,6 +242,11 @@ .hqhiLz{border-radius:2px;word-break:break-word;background-color:rgba(51,51,51,0.05);color:rgba(51,51,51,0.9);padding:0 5px;border:1px solid rgba(51,51,51,0.1);font-family:Courier,monospace;}/*!sc*/ .sc-clIzBv + .sc-clIzBv{margin-left:0;}/*!sc*/ data-styled.g68[id="sc-clIzBv"]{content:"hqhiLz,"}/*!sc*/ +.gGaqcD{margin:1em 0;}/*!sc*/ +.gGaqcD a{-webkit-text-decoration:auto;text-decoration:auto;color:#32329f;}/*!sc*/ +.gGaqcD a:visited{color:#32329f;}/*!sc*/ +.gGaqcD a:hover{color:#6868cf;-webkit-text-decoration:auto;text-decoration:auto;}/*!sc*/ +data-styled.g72[id="sc-dvQaRk"]{content:"gGaqcD,"}/*!sc*/ .ciGjvL:after{content:' and ';font-weight:normal;}/*!sc*/ .ciGjvL:last-child:after{content:none;}/*!sc*/ .ciGjvL a{-webkit-text-decoration:auto;text-decoration:auto;color:#32329f;}/*!sc*/ @@ -276,10 +281,6 @@ data-styled.g96[id="sc-evcjhq"]{content:"jnWsnL,"}/*!sc*/ .clvmzv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-15px;}/*!sc*/ data-styled.g97[id="sc-fHeRUh"]{content:"clvmzv,"}/*!sc*/ -.gdaPXP{max-height:260px;max-width:260px;padding:2px;width:100%;display:block;}/*!sc*/ -data-styled.g98[id="sc-dtDOqo"]{content:"gdaPXP,"}/*!sc*/ -.hGkvTX{text-align:center;}/*!sc*/ -data-styled.g99[id="sc-dkYRCH"]{content:"hGkvTX,"}/*!sc*/ .eXEyiA{width:9ex;display:inline-block;height:13px;line-height:13px;background-color:#333;border-radius:3px;background-repeat:no-repeat;background-position:6px 4px;font-size:7px;font-family:Verdana,sans-serif;color:white;text-transform:uppercase;text-align:center;font-weight:bold;vertical-align:middle;margin-right:6px;margin-top:2px;}/*!sc*/ .eXEyiA.get{background-color:#2F8132;}/*!sc*/ .eXEyiA.post{background-color:#186FAF;}/*!sc*/ @@ -371,7 +372,7 @@ -

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.

+ " fill="currentColor">

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.

@@ -404,7 +405,7 @@

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
data
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

-
auth_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": {
    },
  • "data": "string",
  • "encrypted_key": "string",
  • "auth_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/mapper_core_api_v1.0.0.html b/release/html/mapper_core_api_v1.0.0.html deleted file mode 100644 index 23ffdc5..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 cb08d0a..5b8fa7d 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 & Credential Access + Interoperability APIs - Federated Registry Data Access - -

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
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
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 - 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. + " 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.

    @@ -450,10 +450,10 @@

    Code directory links:

    Each request is build up of three parts

      @@ -461,184 +461,184 @@
    • header
    • message
    -

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
    +

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
  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.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. 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 - 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 IETF RFC 7517 to share the encryption & signature verification public keys over HTTPS channel

+
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.

+

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ]
}
+ + + + 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..3d35b50 --- /dev/null +++ b/release/yaml/jwks_core_api_v1.0.0.yaml @@ -0,0 +1,117 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - JWKs + x-logo: + url: 'https://spdci.github.io/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 IETF RFC 7517 to share the encryption & signature verification public keys over HTTPS channel + operationId: get_jwks_json + parameters: + - $ref: '#/components/parameters/accept-language' + - $ref: '#/components/parameters/timestamp' + - $ref: '#/components/parameters/message_id_hdr' + responses: + '200': + description: JSON Web Key Set Response + content: + application/json: + schema: + $ref: '#/components/schemas/JSONWebKeySetResponse' + '404': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + deprecated: false +components: + schemas: + JSONWebKeySetResponse: + type: object + properties: + keys: + description: An array of public JWKs used for encryption & verification + type: array + items: + $ref: '#/components/schemas/JSONWebKey' + required: + - keys + description: JSON Web Key Set + JSONWebKey: + type: object + properties: + kty: + description: The cryptographic algorithm family used with the key + type: string + 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 + alg: + description: Identify the algorithm intented for use with the key + type: string + required: + - kty + - kid + - use + - alg + description: JSON Web Key Set + 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' + message_id_hdr: + in: header + name: message_id + description: 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. + schema: + type: string + example: '123456789020211216223812' + 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/src/jwks/README.md b/src/jwks/README.md new file mode 100644 index 0000000..2c57043 --- /dev/null +++ b/src/jwks/README.md @@ -0,0 +1,7 @@ +## G2P 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..278a025 --- /dev/null +++ b/src/jwks/jwks_core_api_v1.0.0.yaml @@ -0,0 +1,57 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - JWKs + x-logo: + url: 'https://spdci.github.io/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 IETF RFC 7517 to share the encryption & signature verification public keys over HTTPS channel" + operationId: get_jwks_json + parameters: + - $ref: "#/components/parameters/accept-language" + - $ref: "#/components/parameters/timestamp" + - $ref: "#/components/parameters/message_id_hdr" + responses: + '200': + description: "JSON Web Key Set Response" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONWebKeySetResponse" + '404': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + deprecated: false +components: + schemas: + JSONWebKeySetResponse: + $ref: schema/core/JWKSResponse.yaml + JSONWebKey: + $ref: schema/core/JWK.yaml + parameters: + accept-language: + $ref: "../common/parameter/accept-language.yaml" + timestamp: + $ref: "../common/parameter/timestamp.yaml" + message_id_hdr: + $ref: "../common/parameter/message_id_hdr.yaml" + responses: + HttpErrorResponse: + $ref: "../common/response/HttpErrorResponse.yaml" + diff --git a/src/jwks/schema/core/JWK.yaml b/src/jwks/schema/core/JWK.yaml new file mode 100644 index 0000000..e12490f --- /dev/null +++ b/src/jwks/schema/core/JWK.yaml @@ -0,0 +1,20 @@ +type: object +properties: + kty: + description: "The cryptographic algorithm family used with the key" + type: string + 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 + alg: + description: "Identify the algorithm intented for use with the key" + type: string +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..e6fc2da --- /dev/null +++ b/src/jwks/schema/core/JWKSResponse.yaml @@ -0,0 +1,10 @@ +type: object +properties: + keys: + description: "An array of public JWKs used for encryption & verification" + type: array + items: + $ref: './JWK.yaml' +required: + - keys +description: "JSON Web Key Set" From ed11c12350a16e0988e84c39df59ef2f0e33eef8 Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Mon, 9 Oct 2023 15:48:36 +0600 Subject: [PATCH 07/57] Cleanup the docs --- release/html/jwks_core_api_v1.0.0.html | 67 ++------------------ release/yaml/jwks_core_api_v1.0.0.yaml | 88 ++++++++++---------------- src/jwks/jwks_core_api_v1.0.0.yaml | 21 ++---- src/jwks/schema/core/JWK.yaml | 6 +- src/jwks/schema/core/JWKSResponse.yaml | 9 ++- 5 files changed, 55 insertions(+), 136 deletions(-) diff --git a/release/html/jwks_core_api_v1.0.0.html b/release/html/jwks_core_api_v1.0.0.html index c5995fa..67d0e77 100644 --- a/release/html/jwks_core_api_v1.0.0.html +++ b/release/html/jwks_core_api_v1.0.0.html @@ -39,8 +39,6 @@ data-styled.g10[id="sc-qZruQ"]{content:"lgNDAg,"}/*!sc*/ .yVWyK{color:#ffffff;}/*!sc*/ data-styled.g12[id="sc-kFCrIq"]{content:"yVWyK,"}/*!sc*/ -.fjLiXw{border-bottom:1px solid rgba(38, 50, 56, 0.3);margin:1em 0 1em 0;color:rgba(38, 50, 56, 0.5);font-weight:normal;text-transform:uppercase;font-size:0.929em;line-height:20px;}/*!sc*/ -data-styled.g13[id="sc-irLvoH"]{content:"fjLiXw,"}/*!sc*/ .sc-csKJRI{cursor:pointer;margin-left:-20px;padding:0;line-height:1;width:20px;display:inline-block;outline:0;}/*!sc*/ .cuXxNv:before{content:'';width:15px;height:15px;background-size:contain;background-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg==');opacity:0.5;visibility:hidden;display:inline-block;vertical-align:middle;}/*!sc*/ h1:hover>.cuXxNv::before,h2:hover>.cuXxNv::before,.cuXxNv:hover::before{visibility:visible;}/*!sc*/ @@ -52,44 +50,6 @@ .jaElDA{height:20px;width:20px;min-width:20px;vertical-align:middle;float:right;transition:transform 0.2s ease-out;transform:rotateZ(0);}/*!sc*/ .jaElDA polygon{fill:white;}/*!sc*/ data-styled.g15[id="sc-eTNxZ"]{content:"bIEwLo,gZejdY,jaElDA,"}/*!sc*/ -.crOOUt{border-left:1px solid #7c7cbb;box-sizing:border-box;position:relative;padding:10px 10px 10px 0;}/*!sc*/ -@media screen and (max-width: 50rem){.crOOUt{display:block;overflow:hidden;}}/*!sc*/ -tr:first-of-type>.crOOUt,tr.last>.crOOUt{border-left-width:0;background-position:top left;background-repeat:no-repeat;background-size:1px 100%;}/*!sc*/ -tr:first-of-type>.crOOUt{background-image:linear-gradient( - to bottom, - transparent 0%, - transparent 22px, - #7c7cbb 22px, - #7c7cbb 100% - );}/*!sc*/ -tr.last>.crOOUt{background-image:linear-gradient( - to bottom, - #7c7cbb 0%, - #7c7cbb 22px, - transparent 22px, - transparent 100% - );}/*!sc*/ -tr.last+tr>.crOOUt{border-left-color:transparent;}/*!sc*/ -tr.last:first-child>.crOOUt{background:none;border-left-color:transparent;}/*!sc*/ -data-styled.g18[id="sc-hABBGs"]{content:"crOOUt,"}/*!sc*/ -.lnjotK{vertical-align:top;line-height:20px;white-space:nowrap;font-size:13px;font-family:Courier,monospace;}/*!sc*/ -.lnjotK.deprecated{text-decoration:line-through;color:#707070;}/*!sc*/ -data-styled.g20[id="sc-fHekAb"]{content:"lnjotK,"}/*!sc*/ -.ccwNdx{border-bottom:1px solid #9fb4be;padding:10px 0;width:75%;box-sizing:border-box;}/*!sc*/ -tr.expanded .ccwNdx{border-bottom:none;}/*!sc*/ -@media screen and (max-width: 50rem){.ccwNdx{padding:0 20px;border-bottom:none;border-left:1px solid #7c7cbb;}tr.last>.ccwNdx{border-left:none;}}/*!sc*/ -data-styled.g21[id="sc-blmCWO"]{content:"ccwNdx,"}/*!sc*/ -.jalbFl{color:#7c7cbb;font-family:Courier,monospace;margin-right:10px;}/*!sc*/ -.jalbFl::before{content:'';display:inline-block;vertical-align:middle;width:10px;height:1px;background:#7c7cbb;}/*!sc*/ -.jalbFl::after{content:'';display:inline-block;vertical-align:middle;width:1px;background:#7c7cbb;height:7px;}/*!sc*/ -data-styled.g22[id="sc-ifysJV"]{content:"jalbFl,"}/*!sc*/ -.hLcXeN{border-collapse:separate;border-radius:3px;font-size:14px;border-spacing:0;width:100%;}/*!sc*/ -.hLcXeN >tr{vertical-align:middle;}/*!sc*/ -@media screen and (max-width: 50rem){.hLcXeN{display:block;}.hLcXeN >tr,.hLcXeN >tbody>tr{display:block;}}/*!sc*/ -@media screen and (max-width: 50rem) and (-ms-high-contrast:none){.hLcXeN td{float:left;width:100%;}}/*!sc*/ -.hLcXeN .sc-dJGLgI,.hLcXeN .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI,.hLcXeN .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI{margin:1em;margin-right:0;background:#fafafa;}/*!sc*/ -.hLcXeN .sc-dJGLgI .sc-dJGLgI,.hLcXeN .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI,.hLcXeN .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI .sc-dJGLgI{background:#ffffff;}/*!sc*/ -data-styled.g24[id="sc-hIPCWT"]{content:"hLcXeN,"}/*!sc*/ .iTBMaq >ul{list-style:none;padding:0;margin:0;margin:0 -5px;}/*!sc*/ .iTBMaq >ul >li{padding:5px 10px;display:inline-block;background-color:#11171a;border-bottom:1px solid rgba(0, 0, 0, 0.5);cursor:pointer;text-align:center;outline:none;color:#ccc;margin:0 5px 5px 5px;border:1px solid #07090b;border-radius:5px;min-width:60px;font-size:0.9em;font-weight:bold;}/*!sc*/ .iTBMaq >ul >li.react-tabs__tab--selected{color:#333333;background:#ffffff;}/*!sc*/ @@ -211,17 +171,6 @@ data-styled.g53[id="sc-cPtzEK"]{content:"kyLQMH,"}/*!sc*/ .hIWQYe{margin-top:15px;}/*!sc*/ data-styled.g56[id="sc-hVcFBF"]{content:"hIWQYe,"}/*!sc*/ -.fTSZlU{vertical-align:middle;font-size:13px;line-height:20px;}/*!sc*/ -data-styled.g58[id="sc-gUjWqj"]{content:"fTSZlU,"}/*!sc*/ -.jXiBHH{color:rgba(102,102,102,0.9);}/*!sc*/ -data-styled.g59[id="sc-kZOtbI"]{content:"jXiBHH,"}/*!sc*/ -.ewkIlk{color:#666;}/*!sc*/ -data-styled.g60[id="sc-iLXwHZ"]{content:"ewkIlk,"}/*!sc*/ -.dCqBFZ{color:#d41f1c;font-size:0.9em;font-weight:normal;margin-left:20px;line-height:1;}/*!sc*/ -data-styled.g62[id="sc-eKzuse"]{content:"dCqBFZ,"}/*!sc*/ -.gjkhKC{border-radius:2px;word-break:break-word;background-color:rgba(51,51,51,0.05);color:rgba(51,51,51,0.9);padding:0 5px;border:1px solid rgba(51,51,51,0.1);font-family:Courier,monospace;}/*!sc*/ -+{margin-left:0;}/*!sc*/ -data-styled.g66[id="sc-ldgNxm"]{content:"gjkhKC,"}/*!sc*/ .ildTjo{margin-top:0;margin-bottom:0.5em;}/*!sc*/ data-styled.g91[id="sc-eFyDJw"]{content:"ildTjo,"}/*!sc*/ .iYiFqZ{border:1px solid #32329f;color:#32329f;font-weight:normal;margin-left:0.5em;padding:4px 8px 4px;display:inline-block;text-decoration:none;cursor:pointer;}/*!sc*/ @@ -349,15 +298,9 @@ -104.0616 -231.873,-231.248 z " fill="currentColor">

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 IETF RFC 7517 to share the encryption & signature verification public keys over HTTPS channel

-
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.

-

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ]
}
+
https://sandbox.spdci.org/namespace/v1.0.0/.well-known/jwks.json

Response samples

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

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/yaml/jwks_core_api_v1.0.0.yaml b/release/yaml/jwks_core_api_v1.0.0.yaml deleted file mode 100644 index 35315b6..0000000 --- a/release/yaml/jwks_core_api_v1.0.0.yaml +++ /dev/null @@ -1,97 +0,0 @@ -openapi: 3.0.3 -info: - title: Interoperability APIs - JWKs - x-logo: - url: 'https://spdci.github.io/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 From a19f03e7169e035cfc0ea5a7c43842bc6c875e79 Mon Sep 17 00:00:00 2001 From: naftis Date: Tue, 17 Oct 2023 14:21:55 +0300 Subject: [PATCH 09/57] feat: well-known locations endpoint --- build/build_apis.cmd | 2 + release/html/locations_core_api_v1.0.0.html | 321 ++++++++++++++++++ release/yaml/locations_core_api_v1.0.0.yaml | 88 +++++ src/locations/locations_core_api_v1.0.0.yaml | 43 +++ .../schema/core/LocationsResponse.yaml | 8 + src/locations/schema/core/Place.yaml | 21 ++ 6 files changed, 483 insertions(+) create mode 100644 release/html/locations_core_api_v1.0.0.html create mode 100644 release/yaml/locations_core_api_v1.0.0.yaml create mode 100644 src/locations/locations_core_api_v1.0.0.yaml create mode 100644 src/locations/schema/core/LocationsResponse.yaml create mode 100644 src/locations/schema/core/Place.yaml diff --git a/build/build_apis.cmd b/build/build_apis.cmd index ba149e7..d9fd5a9 100755 --- a/build/build_apis.cmd +++ b/build/build_apis.cmd @@ -4,10 +4,12 @@ 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/locations/locations_core_api_v1.0.0.yaml -o ./release/yaml/locations_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 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/locations_core_api_v1.0.0.yaml -o ./release/html/locations_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 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..d60e4e8 --- /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
[
  • {
    }
]
+ + + + 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..4ae231c --- /dev/null +++ b/release/yaml/locations_core_api_v1.0.0.yaml @@ -0,0 +1,88 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Locations + x-logo: + url: 'https://spdci.github.io/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: '#/components/schemas/LocationsResponse' + '404': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + deprecated: false +components: + schemas: + LocationsResponse: + type: array + description: An array of all Places in the system with names and parent id's + items: + $ref: '#/components/schemas/LocationsResponse/components/schemas/Place' + components: + schemas: + Place: + description: Place + type: object + properties: + id: + type: string + description: The identifier of the place + example: 1 + name: + type: string + description: The human-readable name of the place + example: Karnataka + address: + type: string + description: 'Full mailing address, formatted for display or use on a mailing label. This field may contain multiple lines, separated by newlines.' + containedInPlace: + description: 'Identifier of the parent location, set it to null if it is the root location' + type: + - 'null' + - string + required: + - id + - name + - containedInPlace + 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/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..1757928 --- /dev/null +++ b/src/locations/locations_core_api_v1.0.0.yaml @@ -0,0 +1,43 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Locations + x-logo: + url: "https://spdci.github.io/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: "#/components/schemas/LocationsResponse" + "404": + $ref: "#/components/responses/HttpErrorResponse" + "500": + $ref: "#/components/responses/HttpErrorResponse" + deprecated: false +components: + schemas: + LocationsResponse: + $ref: schema/core/LocationsResponse.yaml + responses: + HttpErrorResponse: + $ref: "../common/response/HttpErrorResponse.yaml" diff --git a/src/locations/schema/core/LocationsResponse.yaml b/src/locations/schema/core/LocationsResponse.yaml new file mode 100644 index 0000000..3ff7684 --- /dev/null +++ b/src/locations/schema/core/LocationsResponse.yaml @@ -0,0 +1,8 @@ +type: array +description: "An array of all Places in the system with names and parent id's" +items: + $ref: "#/components/schemas/Place" +components: + schemas: + Place: + $ref: ./Place.yaml diff --git a/src/locations/schema/core/Place.yaml b/src/locations/schema/core/Place.yaml new file mode 100644 index 0000000..719ab5d --- /dev/null +++ b/src/locations/schema/core/Place.yaml @@ -0,0 +1,21 @@ +description: Place +type: object +properties: + id: + type: string + description: The identifier of the place + example: 1 + name: + type: string + description: The human-readable name of the place + example: Karnataka + address: + type: string + description: Full mailing address, formatted for display or use on a mailing label. This field may contain multiple lines, separated by newlines. + containedInPlace: + description: Identifier of the parent location, set it to null if it is the root location + type: ["null", string] +required: + - id + - name + - containedInPlace From dcff9674d1356888a28ccb6b5725c50fb1195c56 Mon Sep 17 00:00:00 2001 From: naftis Date: Tue, 17 Oct 2023 15:22:59 +0300 Subject: [PATCH 10/57] use schema.org and json-ld more strictly --- release/html/locations_core_api_v1.0.0.html | 4 +- release/yaml/locations_core_api_v1.0.0.yaml | 96 ++++++++++++------- src/common/schema/@context.yaml | 16 ++++ src/locations/locations_core_api_v1.0.0.yaml | 5 +- .../schema/core/LocationHierarchy.yaml | 19 ++++ .../schema/core/LocationsResponse.yaml | 8 -- src/locations/schema/core/Place.yaml | 12 ++- 7 files changed, 109 insertions(+), 51 deletions(-) create mode 100644 src/common/schema/@context.yaml create mode 100644 src/locations/schema/core/LocationHierarchy.yaml delete mode 100644 src/locations/schema/core/LocationsResponse.yaml diff --git a/release/html/locations_core_api_v1.0.0.html b/release/html/locations_core_api_v1.0.0.html index d60e4e8..ec9d124 100644 --- a/release/html/locations_core_api_v1.0.0.html +++ b/release/html/locations_core_api_v1.0.0.html @@ -308,9 +308,9 @@ " class="sc-iJCSeZ sc-cBornZ gJcGEt nfpVm sc-ciSkmu iZNUXd">

HTTP layer error details

Response samples

Content type
application/json
[
  • {
    }
]
+
https://sandbox.spdci.org/namespace/v1.0.0/.well-known/locations.json

Response samples

Content type
application/json
{
  • "@context": {},
  • "@type": "LocationHierarchy",
  • "lastUpdated": "2023-10-17T11:26:02.512+00:00",
  • "locations": [
    ]
}
+ + + + + +

Interoperability APIs - Integrated Beneficiary Registry (1.0.0)

Download OpenAPI specification:Download

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

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

+
    +
  1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query
  2. +
  3. 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[WIP]:

+ +

Code directory links[WIP]:

+ +

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:
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
    +
  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
    +
  1. Batch requests enabel multiple individual requests with respective consent/authorize codes
  2. +
+
{
  • "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 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": [
    ]
}

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 uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
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 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",
  • "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 uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
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 uniqueness is ensured by txn initiating system (i.e sender)
  6. +
+
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.
  2. +
+
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 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. +
+
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.
  2. +
+
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 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"
}

SearchStatusReasonCode

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

Identity verification request status reason codes

+
"rjct.reference_id.invalid"

SubscribeStatusReasonCode

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

Identity verification request status reason codes

+
"rjct.reference_id.invalid"

UnSubscribeStatusReasonCode

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

Identity verification request status reason codes

+
"rjct.reference_id.invalid"
+ + + + diff --git a/release/yaml/ibr_api_v1.0.0.yaml b/release/yaml/ibr_api_v1.0.0.yaml new file mode 100644 index 0000000..ca69cd1 --- /dev/null +++ b/release/yaml/ibr_api_v1.0.0.yaml @@ -0,0 +1,2845 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Integrated Beneficiary Registry + x-logo: + url: 'https://spdci.github.io/api-documentation/draft/dci-logo.png' + backgroundColor: '#FFFFFF' + altText: Digital Convergence Initiative + description: |- + The IBR(Integrated Beneficiary Registry) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between IBR registry and SP system. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. 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[WIP]: + - [Integrated Beneficiary Registry - V1.0 ](https://digital-convergence-initiative-d.gitbook.io) + + Code directory links[WIP]: + - [Identifiers](https://digital-convergence-initiative-d.gitbook.io/) + + Each request is build up of three parts + - signature + - header + - message + 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 +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode + - SubscribeStatusReasonCode + - UnSubscribeStatusReasonCode +paths: + /registry/search: + post: + summary: /registry/search + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-search: + post: + summary: /registry/on-search + description: Search results through callback + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/subscribe: + post: + summary: /registry/subscribe + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: '#/components/schemas/SubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-subscribe: + post: + summary: /registry/on-subscribe + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/notify: + post: + summary: /registry/notify + description: Registry to notify a life event to subscrbiers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/unsubscribe: + post: + summary: /registry/unsubscribe + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: '#/components/schemas/UnSubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-unsubscribe: + post: + summary: /registry/on-unsubscribe + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: '#/components/schemas/UnSubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/status: + post: + summary: /registry/txn/status + description: Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s) + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/on-status: + post: + summary: /registry/txn/on-status + description: Response to async status check of previous civil registrt transanctions using callback + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-on-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/sync/search: + post: + summary: /registry/sync/search + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Registry search response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false + /registry/sync/txn/status: + post: + summary: /registry/sync/txn/status + description: Sync status check of registry Async APIs + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Transaction status check response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false +components: + schemas: + cdpi_PersonId: + type: string + description: | + 1. Person id is case insensitve normative represenation as id-type:id@provider
+ 2. This will enumerate foundational and functioanl id's to easily resolvable addressess
+ 3. This property is intended to unambiguously refer to an object, such as a person, beneficiary, user, etc.,
+ 4. Few examples:
+ - id@identifier-type.id-provider e.g token:12345@nid, vid:543215@nid
+ - id@civil-registry.issuing-agency e.g id:12345@civil-reg, brn:12345@civil-reg, mrn:12345@civil-reg
+ - id@functional-identifier.issuing-agency e.g id:12345@voter-id, id:12345@driving-license, mobile:12345@farmer-reg
+ Note: id provider should be made configurable and solutions should adapt to the local jurisdiction and policies. + format: '^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+$' + example: 'vid:54321@nid' + dci_CRVSPerson: + type: object + description: | + @context: "https://example.org/schema/CRVSPerson"
+ @type: "Consent" + example: + '@context': 'https://example.org/schema/CRVSPerson' + '@type': CRVSPerson + '@vocab': 'https://spdci.org/' + schema: 'http://schema.org/' + rdfs: 'http://www.w3.org/2000/01/rdf-schema#' + xsd: 'http://www.w3.org/2001/XMLSchema#' + CRVSPerson: + '@id': 'https://spdci.org/CRVSPerson' + '@type': 'rdfs:Class' + '@context': + name: + '@id': 'schema:name' + '@type': 'xsd:string' + givenName: + '@id': 'schema:givenName' + '@type': 'xsd:string' + familyName: + '@id': 'schema:familyName' + '@type': 'xsd:string' + additionalName: + '@id': 'schema:additionalName' + '@type': 'xsd:string' + gender: + '@id': 'schema:gender' + '@type': 'xsd:string' + birthDate: + '@id': 'schema:birthDate' + '@type': 'xsd:date' + birthPlace: + '@id': 'schema:birthPlace' + '@type': 'schema:GeoCoordinates' + deathDate: + '@id': 'schema:deathDate' + '@type': 'xsd:date' + deathPlace: + '@id': 'schema:deathPlace' + '@type': 'schema:GeoCoordinates' + maritalStatus: + '@id': 'schema:maritalStatus' + '@type': 'xsd:string' + honorificPrefix: + '@id': 'schema:honorificPrefix' + '@type': 'xsd:string' + honorificSuffix: + '@id': 'schema:honorificSuffix' + '@type': 'xsd:string' + emails: + '@container': '@set' + '@id': 'schema:email' + '@type': 'xsd:string' + telephones: + '@container': '@set' + '@id': 'schema:telephone' + '@type': 'xsd:string' + address: + '@id': 'schema:address' + '@type': 'schema:GeoCoordinates' + marriageDate: + '@id': 'https://spdci.org/marriageDate' + '@type': 'xsd:date' + divorceDate: + '@id': 'https://spdci.org/divorceDate' + '@type': 'xsd:date' + parents: + '@id': 'schema:parents' + '@type': 'https://spdci.org/CRVSPerson' + '@id': 'https://spdci.org/CRVSPerson' + dci_IdentifierType: + type: string + description: | + An identifier type includes unique numbers legally assigned to individuals.
+ Reference: [Types of ID](https://id4d.worldbank.org/guide/types-id-systems) + + UIN : Unique Identification Number
+ BRN : Birth Registration Number or Birth Serial Number
+ MRN : Marriage Registration Number
+ DRN : Death Registration Number
+ enum: + - UIN + - BRN + - MRN + - DRN + dci_IdentifierTypeValue: + type: object + properties: + identifier_type: + $ref: '#/components/schemas/dci_IdentifierType' + identifier_value: + type: string + description: Value of the identifier + dci_MaritalStatus: + type: string + description: | + Marital status reference database: Standardized codes/values representing different marital status categories
+ Reference: [FHIR Marital Status](https://hl7.org/fhir/DSTU2/valueset-marital-status.html)
+ + Code : Values - Description
+ S : Never Married - No marriage contract has ever been entered
+ M : Married - A current marriage contract is active
+ W : Widow - The spouse has died
+ A : Annulled - Marriage contract has been declared null and to not have existed
+ D : Divorced - Marriage contract has been declared dissolved and inactive
+ L : Legally Separated - Legally Separated
+ U : Unmarried - The person is not presently married. The marital history is not known or stated.
+ enum: + - S + - M + - W + - A + - D + - L + - U + dci_Name: + type: object + description: | + The name data object represents a person's name with various components.
+ Reference: [FHIR XPN - extended person name](https://v2plus.hl7.org/2021Jan/data-type/XPN.html#XPN-1)
+ Note: Note: In some cultures, people can have multiple Surname(s), Given name(s), Second name(s), Suffix(s), or Prefix(s) to their name; all can be present in the respective attributes, being separated by separator character like space or /. + properties: + sur_name: + type: string + description: Surname(s) or last name(s) of the applicant + given_name: + type: string + description: Given name(s) or first name(s) of the applicant + second_name: + type: string + description: Second name(s) or middle name(s) of the applicant + suffix: + type: string + description: Suffix part of the applicant's name + prefix: + type: string + description: Prefix part of the applicant's name + dci_PersonRecord: + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. + properties: + identifier_type: + $ref: '#/components/schemas/dci_IdentifierType' + identifier: + type: string + description: Value of the identifier + name: + $ref: '#/components/schemas/dci_Name' + phone_number: + description: 'Applicant preferred phone number as in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I/en)' + type: string + phone_number_verified: + description: True if the End-User's phone number has been verified; otherwise false. + type: string + email: + description: 'Applicant preferred e-mail address as in [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322) [addr-spec](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) [specification](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1)' + type: string + email_verified: + description: 'Email address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.' + type: boolean + sex: + $ref: '#/components/schemas/dci_Sex' + birthdate: + description: 'Represents Date and time of the applicant''s birth as in [ISO 8601](https://www.iso.org/standard/40874.html)' + type: string + birthplace: + $ref: '#/components/schemas/openid_Address' + deathdate: + $ref: '#/components/schemas/DateTime' + deathplace: + $ref: '#/components/schemas/openid_Address' + address: + $ref: '#/components/schemas/openid_Address' + marital_status: + $ref: '#/components/schemas/dci_MaritalStatus' + marriagedate: + $ref: '#/components/schemas/DateTime' + divorcedate: + $ref: '#/components/schemas/DateTime' + parent1_identifier: + type: object + properties: + identifier_type: + $ref: '#/components/schemas/dci_IdentifierType' + identifier: + type: string + description: Value of the identifier + parent2_identifier: + type: object + properties: + identifier_type: + $ref: '#/components/schemas/dci_IdentifierType' + identifier: + type: string + description: Value of the identifier + dci_RecordType: + type: string + description: | + Predefined registry record to return in respone as object + enum: + - person + - other + dci_Sex: + type: string + description: | + Standardized codes/values representing diverse Sex categories. + Reference: [FHIR Administrative Gender](https://build.fhir.org/valueset-administrative-gender.html) + 1 : Male + 2 : Female + 3 : Others + 4 : Unknown + enum: + - male + - female + - other + - unknown + dci_VitalEvents: + type: string + description: | + Standardized codes/values represent vital events in an individual's life. + Reference: [Vital Events Statistics](https://mospi.gov.in/sites/default/files/publication_reports/vital_statistics_2010_0.pdf)
+ 1 : Live Birth
+ 2 : Death
+ 3 : Fetal death
+ 4 : Marriage
+ 5 : Divorce
+ 6 : Adoption
+ enum: + - live_birth + - death + - fetal_death + - marriage + - divorce + - adoption + GooglePlusCode: + type: object + description: 'Refer [Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) for more details' + properties: + global_code: + type: string + example: '' + geometry: + type: object + properties: + bounds: + type: object + properties: + northeast: + $ref: '#/components/schemas/LatLong' + southwest: + $ref: '#/components/schemas/LatLong' + location: + $ref: '#/components/schemas/LatLong' + mosip_EventType: + type: string + description: | + Standardized codes/values represent key events to [integrate](https://docs.mosip.io/1.2.0/integrations/mosip-opencrvs-integration#scope) with civil registries.

+ **Sample flow to explain birth registration between MOSIP and CRVS systems:** + 1. Step 1: MOSIP subscribes to BIRTH_REGISTERED event with CRVS for RegistrationRecord + 2. Step 2: CRVS subscribes to BIRTH_REGISTERED event with MOSIP for MOSIPVerifiableCredential + 3. Step 3: CRVS notifies RegistrationRecord data to MOSIP + 4. Step 4: MOSIP notifies MOSIPVerifiableCredential data to CRVS
+ + **Sample flow to explain data modification (push) flow from MOSIP to CRVS systems:** + 1. Step 1: CRVS subscribes to DATA_MODIFICATION event with MOSIP for MOSIPToken data + 2. Step 2: MOSIP notifies MOSIPToken data to CRVS
+ + **Note:** + 1. Data modifiation (pull) flow can be accomodated with sync/search or existing mosip's eKyc auth api. + 2. Death, Death Reversal fllows same pattern as described in for birth registration. + enum: + - BIRTH_REGISTERED + - DEATH_REGISTERED + - DEATH_REVERSAL + - DATA_MODIFICATION + mosip_LangaugeValue: + type: object + description: multi language value object + properties: + langugage: + type: string + example: eng + value: + type: string + example: value + mosip_LanguageValueList: + type: array + items: + $ref: '#/components/schemas/mosip_LangaugeValue' + mosip_MOSIPVerifiableCredential: + type: object + description: 'MOSIP Verifiable Credential for a [person](https://github.com/opencrvs/mosip-mediator/blob/master/samples/decrypted-sample-received-credentials.json)' + properties: + issuedTo: + description: '' + type: string + protectedAttributes: + type: array + items: + type: string + credentialSubject: + description: MOSIP Verifiable Credential for Proof of identity + type: object + properties: + gender: + $ref: '#/components/schemas/mosip_LanguageValueList' + city: + $ref: '#/components/schemas/mosip_LanguageValueList' + postalCode: + type: string + example: '14022' + fullName: + type: string + example: Thirteen Mosip + dateOfBirth: + type: string + example: '2022' + province: + $ref: '#/components/schemas/mosip_LanguageValueList' + phone: + type: string + example: '9898989898' + addressLine1: + $ref: '#/components/schemas/mosip_LanguageValueList' + addressLine2: + $ref: '#/components/schemas/mosip_LanguageValueList' + id: + type: string + example: '2835824850916304' + UIN: + type: string + example: '7346597054' + region: + $ref: '#/components/schemas/mosip_LanguageValueList' + email: + type: string + example: thirteen.mosip.123@mailinator.com + id: + type: string + example: 'http://mosip.io/credentials/e2039315-87b0-4012-942e-e0d7c879994b' + type: + type: array + items: + type: string + example: MOSIPVerifiableCredential + consent: + type: string + issuer: + type: string + example: 'https://mosip.io/issuers/' + mosip_RecordType: + type: string + description: | + Predefined registry record to return in respone as object + enum: + - RegistrationRecord + - MOSIPVerifiableCredential + mosip_RegistrationRecord: + type: object + description: 'Birth Registration record to sync with MOSIP. [Reference](https://github.com/mosip/mosip-opencrvs/blob/develop/mediator/src/main/java/io/mosip/opencrvs/dto/SyncDto.java)' + properties: + registrationId: + type: string + packetId: + type: string + additionalInfoReqId: + type: string + name: + type: string + email: + type: string + phone: + type: string + registrationType: + type: string + packetHashValue: + type: string + packetSize: + type: integer + supervisorStatus: + type: string + supervisorComment: + type: string + opentionalValues: + type: array + items: + type: string + langCode: + type: string + createDateTime: + $ref: '#/components/schemas/DateTime' + updateDateTime: + $ref: '#/components/schemas/DateTime' + deletedDateTime: + $ref: '#/components/schemas/DateTime' + isActive: + type: boolean + isDeleted: + type: boolean + nid_DeceasedRecord: + type: object + description: Deceased record obtainable from registries + properties: + reference_number: + description: 'unique reference number mantained in the registry for recording death record or ' + type: string + name: + description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' + type: string + gender: + description: 'End-User''s gender. Values defined by this specification are female, male, transgender.' + type: string + dob: + description: Date of Birth in DDMMYYYY format + type: string + dod: + description: Date of Death in DDMMYYYY format + type: string + reported_date: + description: Date in DDMMYYYY format to record on which the death incident reported + type: string + demo_check_status: + description: whether demo check has been undertaken or not + type: boolean + demo_check_date: + description: Date in DDMMYYYY format to capture the Demo Check Date + type: string + document: + $ref: '#/components/schemas/nid_Document' + nid_Document: + type: object + description: 'Supporting document of the Resident,Reference document collected for registering the deceased information,Document encoded as Base64 string' + properties: + document_name: + description: Name of the document + type: string + document: + description: Bases 64 encoded document + type: string + nid_EKycDetails: + type: object + description: 'eKYC details of the resident ,ekyc Details undertaken by the Resident' + properties: + ekyc_date: + description: Date on which eKYC has been done. A null value indicates that eKYC has not been undertaken + type: string + nid_RecordType: + type: string + description: | + Predefined registry record to return in respone as object + enum: + - resident_record + - deceased_record + nid_ResidentAddress: + type: object + description: Address of the Resident in English Language + properties: + care_of: + description: Care of information + type: string + building: + description: Building identity + type: string + street: + description: Street details + type: string + landmark: + description: Landmark details + type: string + pincode: + description: Pincode + type: string + po-name: + description: Post office name + type: string + vtc: + description: Village Town City Code + type: string + vtc-name: + description: Village/Town/City Name + type: string + sub-district-name: + description: Sub District Name + type: string + district-name: + description: District Name + type: string + state: + description: State Name + type: string + country: + description: Country Name + type: string + nid_ResidentLocalAddress: + type: object + description: Resident Local Address + properties: + local-careof: + description: Care of information in local language + type: string + local-building: + description: Building information in local language + type: string + local-street: + description: Street information in local language + type: string + local-landmark: + description: Landmark information in local language + type: string + local-locality: + description: locality information in local language + type: string + pincode: + description: pincode + type: string + po-name-local: + description: Post office name in local + type: string + local-vtc: + description: vtc information in local language + type: string + local-subdistrict: + description: Sub district information in local language + type: string + local-district: + description: district information in local language + type: string + local-state: + description: State information in local language + type: string + local-country: + description: Country information in local language + type: string + nid_ResidentLocalName: + type: object + description: Resident Local Name + properties: + language_code: + $ref: '#/components/schemas/LanguageCode' + local_name: + description: Local name of the Resident + type: string + nid_ResidentNationality: + type: object + description: 'Resident Nationality Information,Nationality information of the Resident' + properties: + nationality: + description: Nationality information of the Resident + type: string + passport_number: + description: Passport number of the Resident + type: string + passport_valid_upto: + description: Passport validity date in DDMMYYYY format + type: string + visa_number: + description: Visa number of the Resident + type: string + visa_vald_upto: + description: Visa validity details + type: string + oci_number: + description: OCI card deatils + type: string + oci_valid_upto: + description: OCI Validity date in DDMMYYYY format + type: string + nid_ResidentPhoto: + type: object + description: 'Resident Photo,Image encoded as Base64 string' + properties: + photo: + description: Photo encoded as Base64 string + type: string + nid_ResidentRecord: + type: object + description: Resident Information + properties: + name: + description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' + type: string + gender: + description: 'End-User''s gender. Values defined by this specification are female, male, transgender.' + type: string + dob: + description: Date of Birth in DDMMYYYY format + type: string + dob_type: + description: 'Date of Birth Type i.e Declared, Approximate, Verified' + type: string + phone: + description: 'Phone number of the resident. If the number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.' + type: string + email: + description: 'End-User''s preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.' + type: string + address: + $ref: '#/components/schemas/nid_ResidentAddress' + local_name: + $ref: '#/components/schemas/nid_ResidentLocalName' + local_address: + $ref: '#/components/schemas/nid_ResidentLocalAddress' + photo: + $ref: '#/components/schemas/nid_ResidentPhoto' + nationality: + $ref: '#/components/schemas/nid_ResidentNationality' + kyc_status: + $ref: '#/components/schemas/nid_EKycDetails' + document: + $ref: '#/components/schemas/nid_Document' + openid_Address: + title: Address + type: object + description: 'Address info as per OpenID specs' + properties: + address_line1: + description: 'Full mailing address, formatted for display or use on a mailing label. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").' + type: string + example: '' + address_line_2: + description: 'Full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair ("\r\n") or as a single line feed character ("\n").' + type: string + example: '' + locality: + description: City or locality component. + type: string + example: '' + sub_region_code: + description: District or sub-regional code + type: string + region_code: + description: 'State, province, prefecture, or region component.' + type: string + example: '' + postal_code: + description: Zip code or postal code component. + type: string + example: '' + country_code: + description: 'Country part of an address represented using an ISO 3-letter code [ISO3166-3], e.g., "USA" or "JPN". 2-letter ISO codes [ISO3166-1] e.g. ,e.g. US, JP' + type: string + example: '' + geo_location: + description: | + Refer [Plus Codes](https://github.com/google/open-location-code/wiki/Plus-codes-API) for more details + oneOf: + - $ref: '#/components/schemas/LatLong' + - $ref: '#/components/schemas/GooglePlusCode' + openid_PersonRecord: + type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 2. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. + 3. Person info as per OpenID [Claims](https://openid.net/specs/openid-connect-core-1_0.html#Claims) + 4. Person additional info based on OpenID [name-additional-claims](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html#name-additional-claims-about-end) + properties: + sub: + type: string + description: Subject - Identifier for the End-User at the Issuer. + name: + description: 'End-User''s full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User''s locale and preferences.' + type: string + given_name: + description: 'Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.' + type: string + family_name: + description: 'Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.' + type: string + middle_name: + description: 'Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.' + type: string + nickname: + description: 'Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.' + type: string + preferred_username: + description: 'Shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. The RP MUST NOT rely upon this value being unique, as discussed in' + type: string + profile: + description: URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. + type: string + picture: + description: 'URL of the End-User''s profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.' + type: string + website: + description: URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. + type: string + email: + description: 'End-User''s preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.' + type: string + email_verified: + description: 'address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.' + type: boolean + gender: + description: End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. + type: string + birthdate: + description: 'YYYY format is allowed. Note that depending on the underlying platform''s date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.' + type: string + place_of_birth: + description: End-User's place of birth. The value of this member is a JSON structure containing some or all of the following members + type: object + deathdate: + description: 'YYYY format is allowed. Note that depending on the underlying platform''s date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.' + type: string + place_of_death: + description: End-User's place of birth. The value of this member is a JSON structure containing some or all of the following members + type: object + phone_number: + description: 'number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.' + type: string + phone_number_verified: + description: 'True if the End-User''s phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.' + type: string + address: + $ref: '#/components/schemas/openid_Address' + zoneinfo: + description: 'String from zoneinfo [zoneinfo] time zone database representing the End-User''s time zone. For example, Europe/Paris or America/Los_Angeles.' + type: string + locale: + description: 'Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.' + type: string + nationalities: + description: 'End-User''s nationalities using ICAO 3-letter codes [ICAO-Doc9303], e.g., "USA" or "JPN". 2-letter ICAO codes MAY be used in some circumstances for compatibility reasons.' + type: array + items: + type: string + updated_at: + description: 'Time the End-User''s information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time' + type: number + birth_family_name: + description: 'End-User''s family name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the family name later in life for any reason. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.' + type: string + birth_given_name: + description: 'End-User''s given name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the given name later in life for any reason. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.' + type: string + birth_middle_name: + description: 'End-User''s middle name(s) when they were born, or at least from the time they were a child. This term can be used by a person who changes the middle name later in life for any reason. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.' + type: string + salutation: + description: 'End-User''s salutation, e.g., "Mr."' + type: string + title: + description: 'End-User''s title, e.g., "Dr."' + type: string + msisdn: + description: 'End-User''s mobile phone number formatted according to ITU-T recommendation [E.164], e.g., "1999550123"' + type: string + also_known_as: + description: 'Stage name, religious name or any other type of alias/pseudonym with which a person is known in a specific context besides its legal name. This must be part of the applicable legislation and thus the trust framework (e.g., be an attribute on the identity card).' + type: string + additional_attributes: + $ref: '#/components/schemas/AttributeNameValueList' + openid_PersonDocDetails: + type: object + description: | + 1. Person document detials as per OpenID [identity-assurance](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-13.html#name-evidence-element) + 2. JSON object representing the document used to perform the identity verification. + properties: + type: + description: 'String denoting the type of the document. The OP MAY use other than the predefined values in which case the RPs will either be unable to process the assertion, just store this value for audit purposes, or apply bespoken business logic to it.' + type: string + document_number: + description: 'String Representing an identifier/number that uniquely identifies a document that was issued to the End-User. This is used on one document and will change if it is reissued, e.g., a passport number, certificate number, etc. Note, number can be used as an alias for ''document_number'' for backward compatibility purposes but will be deprecated in future releases, implementers are recommended to use document_number.' + type: string + personal_number: + description: 'String representing an identifier that is assigned to the End-User and is not limited to being used in one document, for example a national identification number, personal identity number, citizen number, social security number, driver number, account number, customer number, licensee number, etc.' + type: string + serial_number: + description: String representing an identifier/number that identifies the document irrespective of any personalization information (this usually only applies to physical artifacts and is present before personalization). + type: string + date_of_issuance: + description: 'The date the document was issued as ISO 8601 [ISO8601] YYYY-MM-DD format.' + type: string + date_of_expiry: + description: 'The date the document will expire as ISO 8601 [ISO8601] YYYY-MM-DD format.' + type: string + issuer: + description: JSON object containing information about the issuer of this document. This object consists of the following properties + type: object + properties: + name: + description: Designation of the issuer of the document + type: string + address: + $ref: '#/components/schemas/openid_Address' + country_code: + description: 'String denoting the country or supranational organization that issued the document as ISO 3166/ICAO 3-letter codes [ICAO-Doc9303], e.g., "USA" or "JPN". 2-letter ICAO codes MAY be used in some circumstances for compatibility reasons.' + type: string + jurisdiction: + description: String containing the name of the region(s)/state(s)/province(s)/municipality(ies) that issuer has jurisdiction over (if this information is not common knowledge or derivable from the address). + type: string + required: + - type + RegistryQueries: + description: | + 1. Implementing systems can define schemas. + 2. Based on context, pre defined named queries can also help as part of ExpTemplate construct. + 3. ExpressionWithConditionList is simple generic search query construct to solve for majority of search conditons. few examples:
+ - search or subscribe to update events; e.g any updates in postal_code 12345 between 1/jan/2020 and 31/dec/2020 + - search or subscribe to birth, death events; e.g any new birth in postal_code 12345 after 1/jan/2023 + - search all farmers with land area less than 2 acers in district code 504 + oneOf: + - $ref: '#/components/schemas/ExpTemplate' + - $ref: '#/components/schemas/IdentifierTypeValue' + - $ref: '#/components/schemas/ExpPredicateWithConditionList' + NotifyEventRequest: + type: object + description: Registry to notify a event to subscrbiers + properties: + transaction_id: + $ref: '#/components/schemas/TransactionId' + notify_event: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/ReferenceId' + timestamp: + $ref: '#/components/schemas/DateTime' + data: + type: object + description: | + Registry data being notified as an outcome of event subscription with registry + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/RegistryType' + reg_event_type: + $ref: '#/components/schemas/RegistryEventType' + reg_record_type: + $ref: '#/components/schemas/RegistryRecordType' + reg_records: + $ref: '#/components/schemas/RegistryRecord' + required: + - reg_record_type + - reg_records + locale: + $ref: '#/components/schemas/LanguageCode' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + RegistryEventType: + type: string + description: | + @context: "https://example.org/schema/RegistryEventType"
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "ns:org:RegistryEventType:LiveBirth" + example: 'ns:org:RegistryEventType:LiveBirth' + RegistryRecord: + type: object + description: | + @context: "https://example.org/schema/RecordType"
+ @type: "CRVSPerson"
+ @container: "@set"
+ + **Notes:** + 1. Record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + example: + $ref: '#/components/schemas/dci_CRVSPerson' + RegistryRecordType: + type: string + description: | + @context: "https://example.org/schema/RegistryRecordType"
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "ns:dci:RegistryRecordType:CRVSPerson" + example: 'ns:dci:RegistryRecordType:CRVSPerson' + RegistryType: + type: string + description: | + @context: "https://example.org/schema/RegistryType"
+ @type: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Civil" + example: 'ns:org:RegistryType:Civil' + SearchRequest: + 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: '#/components/schemas/TransactionId' + 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/ReferenceId' + timestamp: + $ref: '#/components/schemas/DateTime' + search_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_event_type: + type: string + description: | + The type of grouping to which a beneficiary belongs. + + 1 : Register
+ 2 : Payment
+ 3 : Deregister
+ enum: + - REGISTER + - PAYMENT + - DEREGISTER + query_type: + $ref: '#/components/schemas/QueryType' + query: + $ref: '#/components/schemas/RegistryQueries' + sort: + $ref: '#/components/schemas/SearchSortList' + pagination: + $ref: '#/components/schemas/PaginationRequest' + consent: + $ref: '#/components/schemas/Consent' + authorize: + $ref: '#/components/schemas/Authorize' + required: + - query_type + - query + locale: + $ref: '#/components/schemas/LanguageCode' + 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/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' + search_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/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 "IBRPerson" object contains fields expected in response of search + type: array + items: + allOf: + - type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. + properties: + identifier_type: + 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
+ enum: + - UIN + identifier: + type: string + description: Value of the identifier + name: + $ref: '#/components/schemas/dci_Name' + sex: + $ref: '#/components/schemas/dci_Sex' + birthdate: + description: 'Represents Date and time of the applicant''s birth as in [ISO 8601](https://www.iso.org/standard/40874.html)' + type: string + address: + $ref: '#/components/schemas/openid_Address' + marital_status: + $ref: '#/components/schemas/dci_MaritalStatus' + poverty_score: + type: string + description: details of poverty score + disabled: + type: boolean + description: 'True is disabled, false if no disability' + household_identifier: + type: string + description: Value of the household identifier + programms: + type: array + items: + type: object + description: | + 1. + 2. + properties: + programme_name: + type: string + description: The programme name sent by sp system + programme_identifier: + type: string + description: Programme identifier + registration_date: + $ref: '#/components/schemas/DateTime' + enrolment_date: + $ref: '#/components/schemas/DateTime' + suspension_date: + $ref: '#/components/schemas/DateTime' + graduation_date: + $ref: '#/components/schemas/DateTime' + status: + type: string + description: | + The beneficiaries status with a specific program + + 1 : Active
+ 2 : Deceased
+ 3 : Graduated
+ 4 : Suspended
+ enum: + - '1' + - '2' + - '3' + - '4' + benefits: + type: array + items: + type: object + description: | + The Benefit object provide information about benifits + properties: + benefit_type: + 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 + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + benefit_date: + $ref: '#/components/schemas/DateTime' + benefit_value: + type: string + description: This can be any value like monetery value like currency value or any objects received + payments: + type: array + items: + type: object + description: | + The payment information contains details about payment related fields + properties: + payroll_date: + $ref: '#/components/schemas/DateTime' + payroll_amount: + type: string + description: Value of the identifier + payment_credit_date: + $ref: '#/components/schemas/DateTime' + payment_credit_amount: + description: null + type: string + payment_charges: + type: string + description: null + payment_status: + type: string + description: | + The status of a payment made to a beneficiary + + 1 : Succesful
+ 2 : Not succesful
+ enum: + - '1' + - '2' + required: + - reg_records + pagination: + $ref: '#/components/schemas/Pagination' + locale: + $ref: '#/components/schemas/LanguageCode' + 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/TransactionId' + subscribe_request: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/ReferenceId' + timestamp: + $ref: '#/components/schemas/DateTime' + subscribe_criteria: + type: object + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/RegistryType' + reg_event_type: + $ref: '#/components/schemas/RegistryEventType' + frequency: + $ref: '#/components/schemas/EventFrequency' + filter_type: + $ref: '#/components/schemas/QueryType' + filter: + $ref: '#/components/schemas/RegistryQueries' + notify_record_type: + $ref: '#/components/schemas/RegistryRecordType' + authorize: + $ref: '#/components/schemas/Authorize' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/LanguageCode' + 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/TransactionId' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_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/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscriptions: + type: array + items: + $ref: '#/components/schemas/SubscriptionInfo' + pagination: + $ref: '#/components/schemas/Pagination' + locale: + $ref: '#/components/schemas/LanguageCode' + required: + - reference_id + - timestamp + - status + required: + - transaction_id + - correlation_id + - subscribe_response + SubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.notify_types.invalid + - rjct.notify_details.invalid + - rjct.person_id.invalid + - rjct.event.already_subscribed + SubscriptionCode: + type: string + description: | + Unique code to identify the subscription request by the entity providing subscription service. + Helps to check status, unsubscribe etc., + maxLength: 99 + SubscriptionCodeList: + items: + $ref: '#/components/schemas/SubscriptionCode' + SubscriptionInfo: + type: object + properties: + version: + type: string + default: 1.0.0 + code: + $ref: '#/components/schemas/SubscriptionCode' + status: + $ref: '#/components/schemas/SubscriptionStatus' + timestamp: + $ref: '#/components/schemas/DateTime' + reg_type: + $ref: '#/components/schemas/RegistryType' + reg_event_type: + $ref: '#/components/schemas/RegistryEventType' + frequency: + $ref: '#/components/schemas/EventFrequency' + filter_type: + $ref: '#/components/schemas/QueryType' + filter: + $ref: '#/components/schemas/RegistryQueries' + notify_record_type: + $ref: '#/components/schemas/RegistryRecordType' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/LanguageCode' + required: + - subscription_code + - timestamp + - subscribe_criteria + SubscriptionStatus: + type: string + description: subscription status + enum: + - subscribe + - unsubscribe + TxnStatusRequest: + type: object + description: Request to fetch txn status on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/TransactionId' + txnstatus_request: + type: object + properties: + reference_id: + $ref: '#/components/schemas/ReferenceId' + txn_type: + type: string + description: txn type to fetch status + enum: + - search + - subscribe + - unsubscribe + attribute_type: + type: string + enum: + - transaction_id + - reference_id_list + - correlation_id + - subscription_code_list + attribute_value: + oneOf: + - $ref: '#/components/schemas/TransactionId' + - $ref: '#/components/schemas/ReferenceIdList' + - $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + - $ref: '#/components/schemas/SubscriptionCodeList' + locale: + $ref: '#/components/schemas/LanguageCode' + required: + - reference_id + - txn_type + - attribute_type + - attribute_value + required: + - transaction_id + - txnstatus_request + TxnStatusResponse: + type: object + description: txn status info on various service requests + properties: + transaction_id: + $ref: '#/components/schemas/TransactionId' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + txnstatus_response: + type: object + properties: + txn_type: + type: string + description: txn type to fetch status + enum: + - on-search + - on-subscribe + - on-unsubscribe + txn_status: + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse/properties/txnstatus_response/example' + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/UnSubscribeResponse' + 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/TransactionId' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + search_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/SearchStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + data: + type: object + description: | + Search result record as an outcome of search/subscribe action + properties: + version: + type: string + default: 1.0.0 + reg_type: + $ref: '#/components/schemas/RegistryType' + reg_event_type: + $ref: '#/components/schemas/RegistryEventType' + reg_record_type: + $ref: '#/components/schemas/RegistryRecordType' + reg_records: + $ref: '#/components/schemas/RegistryRecord' + required: + - reg_record_type + - reg_records + pagination: + $ref: '#/components/schemas/Pagination' + locale: + $ref: '#/components/schemas/LanguageCode' + 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/TransactionId' + timesstamp: + $ref: '#/components/schemas/DateTime' + subscription_codes: + type: array + items: + $ref: '#/components/schemas/SubscriptionCode' + required: + - transaction_id + - timestamp + - sunscription_codes + UnSubscribeResponse: + type: object + description: Un-Subscribe to a life event with crvs + properties: + transaction_id: + $ref: '#/components/schemas/TransactionId' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + timesatmp: + $ref: '#/components/schemas/DateTime' + status: + $ref: '#/components/schemas/RequestStatus' + status_reason_code: + $ref: '#/components/schemas/UnSubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps actionanble messaging for systems/end users + type: string + maxLength: 999 + subscription_status: + type: array + items: + type: object + properties: + code: + $ref: '#/components/schemas/SubscriptionCode' + status: + $ref: '#/components/schemas/SubscriptionStatus' + required: + - code + - status + required: + - transaction_id + - correlation_id + - timestamp + - status + UnSubscribeStatusReasonCode: + type: string + description: Identity verification request status reason codes + enum: + - rjct.reference_id.invalid + - rjct.reference_id.duplicate + - rjct.timestamp.invalid + - rjct.subscription_code.invalid + - rjct.requester.invalid + - rjct.event.already_unsubscribed + 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' + Authorize: + type: object + description: | + @context: "https://example.org/schema/Authorize"
+ @type: "Authorize" + example: + '@context': 'https://example.org/schema/Authorize' + '@type': Authorize + ts: + $ref: '#/components/schemas/DateTime' + purpose: + text: + type: string + code: + type: string + description: 'From a fixed set, documented at refUri' + refUri: + type: string + format: uri + description: Uri to provide more info on authorize codes + Consent: + 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 + EventFrequency: + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/DateTime' + end_time: + $ref: '#/components/schemas/DateTime' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency + ExpCondition: + type: string + description: Condition in an expression + enum: + - and + - or + - not + example: and + ExpOperator: + type: string + description: Operator in an expression + enum: + - gt + - lt + - eq + - ge + - le + - in + example: eq + ExpPredicate: + type: object + description: Expression + properties: + attribute_name: + type: string + description: | + @context: "https://example.org/schema/QueryAttributes"
+ @type: "QueryAttributes"
+ + **Notes:** + 1. Query attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + operator: + $ref: '#/components/schemas/ExpOperator' + attribute_value: + $ref: '#/components/schemas/AttributeValue' + required: + - attribute_name + - operator + - attribute_value + ExpPredicateList: + type: array + description: list of attributes with matching conditions + items: + $ref: '#/components/schemas/ExpPredicate' + ExpPredicateWithCondition: + type: object + properties: + seq_num: + description: Sequence number to help define precedence for evaluating a list of expression Predicates + type: number + example: 1 + expression1: + $ref: '#/components/schemas/ExpPredicate' + condition: + $ref: '#/components/schemas/ExpCondition' + expression2: + $ref: '#/components/schemas/ExpPredicate' + required: + - expression1 + ExpPredicateWithConditionList: + type: array + items: + $ref: '#/components/schemas/ExpPredicateWithCondition' + ExpTemplate: + type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: "https://example.org/schema/QueryType"
+ @type: "Queryype"
+ + **Notes:** + 1. Query types that helps decode query expressions + 2. Sample query type enums: "GraphQl", "Sql", "NoSql" + example: 'ns:org:QueryType:GraphQl' + value: + type: object + description: | + @context: "https://example.org/schema/QueryExpression"
+ @type: "QueryExpression"
+ + **Notes:** + 1. Query expression's syntax / format is determined based on query-type. + 2. Query expression as a template with placeholder to pass conditional search parameters + example: + expression: ' query GeBirthRecordById: { person: (UIN: "1") { BRN, name, gender, birthDate, birthPlace, parents } }' + FileInfo: + type: object + description: File info. Used in file upload feature using HTTPS + properties: + action: + description: G2P Connect specific actions. Usually verb from the URI should go here to help store and fwd kind of processing requirements. + 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 + IdentifierType: + type: string + description: | + @context: "https://example.org/schema/IdType"
+ @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + IdentifierTypeValue: + type: object + description: Identifier type and value object + properties: + type: + type: string + description: | + @context: "https://example.org/schema/IdType"
+ @type: "IdType"
+ + **Notes:** + 1. Identifier type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. e.g: UIN, MOBILE, BRN, MRN, DRN, etc., + example: UIN + value: + allOf: + - description: Identifier Value of the subject. + - $ref: '#/components/schemas/AttributeValue' + example: '12314567890' + LanguageCode: + type: string + description: indicates language code. G2P Connect supports country codes as per ISO 639.3 standard + pattern: '^[a-z]{3,3}$' + example: en + LatLong: + type: object + properties: + latitude: + type: string + example: 11°24'12.2"N + longitude: + type: string + example: 88°50'26.5"E + Meta: + type: object + description: | + @context: "https://example.org/schema/Meta"
+ @type: "@context"
+ + **Notes:** + 1. Additional meta info defined as per implementation context. + 2. Usually unencrypted list of name/value, tags, etc., to provide additional info to intermediary entities. + 3. The information SHOULD be privacy preserving + MsgCallbackHeader_V1.0.0: + type: object + description: Message header + properties: + version: + description: Messaing protocol specification version being used + 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 + QueryType: + type: string + description: | + 1. Query format allow multiple ways to search registry + 2. Templatized query expressions with placeholder for conditional values + enum: + - idtype-value + - expression + - predicate + example: idtype-value + ReferenceId: + type: string + description: Unique reference_id set by txn initiating system for each request in a batch + example: '12345678901234567890' + ReferenceIdList: + type: array + items: + $ref: '#/components/schemas/ReferenceId' + RequestStatus: + type: string + description: 'Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status:
1. rcvd: Received; Request received
2. pdng: Pending; Request initiated
3. succ: Success; Request successful
4. rjct: Rejected; Request rejected' + enum: + - rcvd + - pdng + - succ + - rjct + SearchSort: + description: Sorting definition + type: object + properties: + attribute_name: + type: string + description: | + @context: "https://example.org/schema/Attribute"
+ @type: "Attribute"
+ + **Notes:** + 1. Attribute names defined as per implementation context. + 2. Usually a list of **enum** values of all possible attribute names. + 3. e.g: UIN, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + sort_order: + type: string + enum: + - asc + - desc + SearchSortList: + type: array + items: + $ref: '#/components/schemas/SearchSort' + TransactionId: + description: | + 1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction. + 2. transaction_id should be samme across processing systems/service end points. + 2. transaction_id uniqueness is ensured by txn initiating system (i.e sender) + type: string + maxLength: 99 + example: 0123456789 + 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/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/extensions/ibr/Benefit.yaml b/src/extensions/ibr/Benefit.yaml new file mode 100644 index 0000000..163cb99 --- /dev/null +++ b/src/extensions/ibr/Benefit.yaml @@ -0,0 +1,11 @@ +type: object +description: | + The Benefit object provide information about benifits +properties: + benefit_type: + $ref: BenefitType.yaml + benefit_date: + $ref: ../../common/schema/DateTime.yaml + benefit_value: + type: string + description: This can be any value like monetery value like currency value or any objects received \ 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..b0496a9 --- /dev/null +++ b/src/extensions/ibr/BenefitType.yaml @@ -0,0 +1,16 @@ +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 +enum: + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" \ 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..15f9420 --- /dev/null +++ b/src/extensions/ibr/DisburshmentInfo.yaml @@ -0,0 +1,19 @@ +type: object +description: | + The payment information contains details about payment related fields +properties: + payroll_date: + $ref: ../../common/schema/DateTime.yaml + payroll_amount: + type: string + description: Value of the identifier + payment_credit_date: + $ref: ../../common/schema/DateTime.yaml + payment_credit_amount: + description: + type: string + payment_charges: + type: string + description: + payment_status: + $ref: PaymentStatus.yaml diff --git a/src/extensions/ibr/EnrollmentStatus.yaml b/src/extensions/ibr/EnrollmentStatus.yaml new file mode 100644 index 0000000..05fb5ca --- /dev/null +++ b/src/extensions/ibr/EnrollmentStatus.yaml @@ -0,0 +1,13 @@ +type: string +description: | + The beneficiaries status with a specific program + + 1 : Active
+ 2 : Deceased
+ 3 : Graduated
+ 4 : Suspended
+enum: + - "1" + - "2" + - "3" + - "4" \ 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..bb4db76 --- /dev/null +++ b/src/extensions/ibr/GroupType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + The type of grouping to which a beneficiary belongs. + + 1 : Household
+ 2 : Family
+ 3 : Group
+enum: + - "1" + - "2" + - "3" \ No newline at end of file diff --git a/src/extensions/ibr/Households.yaml b/src/extensions/ibr/Households.yaml new file mode 100644 index 0000000..e69de29 diff --git a/src/extensions/ibr/IdentifierType.yaml b/src/extensions/ibr/IdentifierType.yaml new file mode 100644 index 0000000..f365e53 --- /dev/null +++ b/src/extensions/ibr/IdentifierType.yaml @@ -0,0 +1,7 @@ +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
+enum: + - "UIN" \ No newline at end of file diff --git a/src/extensions/ibr/PaymentStatus.yaml b/src/extensions/ibr/PaymentStatus.yaml new file mode 100644 index 0000000..29800e8 --- /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
+enum: + - "1" + - "2" \ 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..8f25589 --- /dev/null +++ b/src/extensions/ibr/Person.yaml @@ -0,0 +1,46 @@ +type: object +description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. +properties: + identifier_type: + $ref: IdentifierType.yaml + identifier: + type: string + description: Value of the identifier + name: + $ref: ../dci/Name.yaml + sex: + $ref: ../dci/Sex.yaml + birthdate: + description: Represents Date and time of the applicant's birth as in [ISO 8601](https://www.iso.org/standard/40874.html) + type: string + address: + $ref: ../openid/Address.yaml + marital_status: + $ref: ../dci/MaritalStatus.yaml + poverty_score: + type: string + description: details of poverty score + disabled: + type: boolean + description: True is disabled, false if no disability + household_identifier: + type: string + description: Value of the household identifier + programms: + type: array + description: "TO_DO" + items: + $ref: Programme.yaml + benefits: + type: array + description: "TO_DO" + items: + $ref: Benefit.yaml + payments: + type: array + description: "TO_DO" + items: + $ref: DisburshmentInfo.yaml + \ No newline at end of file diff --git a/src/extensions/ibr/Programme.yaml b/src/extensions/ibr/Programme.yaml new file mode 100644 index 0000000..5be94cc --- /dev/null +++ b/src/extensions/ibr/Programme.yaml @@ -0,0 +1,21 @@ +type: object +description: | + 1. + 2. +properties: + programme_name: + type: string + description: The programme name sent by sp system + programme_identifier: + type: string + description: Programme identifier + registration_date: + $ref: ../../common/schema/DateTime.yaml + enrolment_date: + $ref: ../../common/schema/DateTime.yaml + suspension_date: + $ref: ../../common/schema/DateTime.yaml + graduation_date: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: EnrollmentStatus.yaml \ 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..3f1adc5 --- /dev/null +++ b/src/registry/ibr/RegistryEventType.yaml @@ -0,0 +1,11 @@ +type: string +description: | + The type of grouping to which a beneficiary belongs. + + 1 : Register
+ 2 : Payment
+ 3 : Deregister
+enum: + - "REGISTER" + - "PAYMENT" + - "DEREGISTER" \ No newline at end of file diff --git a/src/registry/ibr/SearchRequest.yaml b/src/registry/ibr/SearchRequest.yaml new file mode 100644 index 0000000..d02b7ee --- /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 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 + 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..adf79ce --- /dev/null +++ b/src/registry/ibr/SearchResponse.yaml @@ -0,0 +1,54 @@ +type: object +description: Response to search request. Multiple repsonses for each page can be pushed to the caller as an implementation! +properties: + transaction_id: + $ref: ../../common/schema/TransactionId.yaml + correlation_id: + $ref: ../../common/schema/CorrelationId.yaml + search_response: + type: array + items: + type: object + properties: + reference_id: + $ref: "../../common/schema/ReferenceId.yaml" + timestamp: + $ref: ../../common/schema/DateTime.yaml + status: + $ref: "../../common/schema/RequestStatus.yaml" + status_reason_code: + $ref: "../schema/SearchStatusReasonCode.yaml" + status_reason_message: + description: "Status reason code message. Helps 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 "IBRPerson" object contains fields expected in response of search + type: array + items: + allOf: + - $ref: ../../extensions/ibr/Person.yaml + required: + - reg_records + pagination: + $ref: "../../common/schema/Pagination.yaml" + locale: + $ref: "../../common/schema/LanguageCode.yaml" + required: + - reference_id + - timestamp + - status +required: + - transaction_id + - correlation_id + - search_response + \ No newline at end of file diff --git a/src/registry/ibr_api_v1.0.0.yaml b/src/registry/ibr_api_v1.0.0.yaml new file mode 100644 index 0000000..01ffc84 --- /dev/null +++ b/src/registry/ibr_api_v1.0.0.yaml @@ -0,0 +1,931 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Integrated Beneficiary Registry + x-logo: + url: 'https://spdci.github.io/api-documentation/draft/dci-logo.png' + backgroundColor: '#FFFFFF' + altText: 'Digital Convergence Initiative' + description: |- + The IBR(Integrated Beneficiary Registry) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between IBR registry and SP system. + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in upcoming version. + + 1. Search: The Search API provides functionality to search based on demographic, identifiers and custom query + 2. 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[WIP]: + - [Integrated Beneficiary Registry - V1.0 ](https://digital-convergence-initiative-d.gitbook.io) + + Code directory links[WIP]: + - [Identifiers](https://digital-convergence-initiative-d.gitbook.io/) + + Each request is build up of three parts + - signature + - header + - message + 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 +tags: + - name: Async + description: Async endpoints + - name: Sync + description: Sync endpoints + - name: Schemas + description: Schemas + - name: Status Codes + description: Status Codes + - name: SearchRequest + x-displayName: SearchRequest + description: | + + - name: SearchResponse + x-displayName: SearchResponse + description: | + + - name: SearchStatusReasonCode + x-displayName: SearchStatusReasonCode + description: | + + - name: SubscribeRequest + x-displayName: SubscribeRequest + description: | + + - name: SubscribeResponse + x-displayName: SubscribeResponse + description: | + + - name: SubscribeStatusReasonCode + x-displayName: SubscribeStatusReasonCode + description: | + + - name: NotifyEventRequest + x-displayName: NotifyEventRequest + description: | + + - name: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: TxnStatusRequest + x-displayName: TxnStatusRequest + description: | + + - name: TxnStatusResponse + x-displayName: TxnStatusResponse + description: | + + - name: EncryptedMessage + x-displayName: EncryptedMessage + description: | + +x-tagGroups: + - name: API Definitions + tags: + - Async + - Sync + - name: Schema Objects + tags: + - SearchRequest + - SearchResponse + - SubscribeRequest + - SubscribeResponse + - NotifyEventRequest + - UnSubscribeRequest + - UnSubscribeResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode + - SubscribeStatusReasonCode + - UnSubscribeStatusReasonCode +paths: + /registry/search: + post: + summary: "/registry/search" + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: "#/components/schemas/SearchRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - search + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-search: + post: + summary: "/registry/on-search" + description: Search results through callback + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-search + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/subscribe: + post: + summary: "/registry/subscribe" + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - subscribe + message: + type: object + description: Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber + oneOf: + - $ref: "#/components/schemas/SubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - subscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-subscribe: + post: + summary: "/registry/on-subscribe" + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: "#/components/schemas/SubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-subscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/notify: + post: + summary: "/registry/notify" + description: Registry to notify a life event to subscrbiers + operationId: post_reg_notify + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - notify + responses: + default: + $ref: "#/components/responses/HttpErrorResponse" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/unsubscribe: + post: + summary: "/registry/unsubscribe" + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: "#/components/schemas/UnSubscribeRequest" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - unsubscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/on-unsubscribe: + post: + summary: "/registry/on-unsubscribe" + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: "#/components/schemas/UnSubscribeResponse" + - $ref: "#/components/schemas/EncryptedMessage" + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - on-unsubscribe + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + + /registry/txn/status: + post: + summary: "/registry/txn/status" + description: Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s) + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-status + responses: + 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: Response to async status check of previous civil registrt transanctions using callback + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgCallbackHeader_V1.0.0" + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: "#/components/schemas/FileInfo" + - properties: + action: + enum: + - txn-on-status + responses: + default: + $ref: "#/components/responses/Response" + '401': + $ref: "#/components/responses/HttpErrorResponse" + '403': + $ref: "#/components/responses/HttpErrorResponse" + '500': + $ref: "#/components/responses/HttpErrorResponse" + security: + - Authorization: [ ] + deprecated: false + /registry/sync/search: + post: + summary: "/registry/sync/search" + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + 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: Sync status check of registry Async APIs + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: "" + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: "#/components/schemas/MsgSignature" + header: + allOf: + - $ref: "#/components/schemas/MsgHeader_V1.0.0" + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + 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 + + ###### src/extensions/dci schema objects + dci_CRVSPerson: + $ref: ../extensions/dci/CRVSPerson.yaml + dci_IdentifierType: + $ref: ../extensions/dci/IdentifierType.yaml + dci_IdentifierTypeValue: + $ref: ../extensions/dci/IdentifierTypeValue.yaml + dci_MaritalStatus: + $ref: ../extensions/dci/MaritalStatus.yaml + dci_Name: + $ref: ../extensions/dci/Name.yaml + dci_PersonRecord: + $ref: ../extensions/dci/PersonRecord.yaml + dci_RecordType: + $ref: ../extensions/dci/RecordType.yaml + dci_Sex: + $ref: ../extensions/dci/Sex.yaml + dci_VitalEvents: + $ref: ../extensions/dci/VitalEvents.yaml + + ###### src/extensions/fhir schema objects + + ###### src/extensions/google schema objects + GooglePlusCode: + $ref: ../extensions/google/GooglePlusCode.yaml + + ###### src/extensions/mosip schema objects + mosip_EventType: + $ref: ../extensions/mosip/EventType.yaml + mosip_LangaugeValue: + $ref: ../extensions/mosip/LangaugeValue.yaml + mosip_LanguageValueList: + $ref: ../extensions/mosip/LanguageValueList.yaml + mosip_MOSIPVerifiableCredential: + $ref: ../extensions/mosip/MOSIPVerifiableCredential.yaml + mosip_RecordType: + $ref: ../extensions/mosip/RecordType.yaml + mosip_RegistrationRecord: + $ref: ../extensions/mosip/RegistrationRecord.yaml + + ###### src/extensions/nid schema objects + nid_DeceasedRecord: + $ref: ../extensions/nid/DeceasedRecord.yaml + nid_Document: + $ref: ../extensions/nid/Document.yaml + nid_EKycDetails: + $ref: ../extensions/nid/EKycDetails.yaml + nid_RecordType: + $ref: ../extensions/nid/RecordType.yaml + nid_ResidentAddress: + $ref: ../extensions/nid/ResidentAddress.yaml + nid_ResidentLocalAddress: + $ref: ../extensions/nid/ResidentLocalAddress.yaml + nid_ResidentLocalName: + $ref: ../extensions/nid/ResidentLocalName.yaml + nid_ResidentNationality: + $ref: ../extensions/nid/ResidentNationality.yaml + nid_ResidentPhoto: + $ref: ../extensions/nid/ResidentPhoto.yaml + nid_ResidentRecord: + $ref: ../extensions/nid/ResidentRecord.yaml + + ###### src/extensions/openid schema objects + openid_Address: + $ref: ../extensions/openid/Address.yaml + openid_PersonRecord: + $ref: ../extensions/openid/PersonRecord.yaml + openid_PersonDocDetails: + $ref: ../extensions/openid/PersonDocDetails.yaml + + ###### src/registry/schema objects + RegistryQueries: + $ref: schema/RegistryQueries.yaml + # FetchSubscriptionsRequest: + # $ref: schema/FetchSubscriptionsRequest.yaml + # FetchSubscriptionsResponse: + # $ref: schema/FetchSubscriptionsResponse.yaml + NotifyEventRequest: + $ref: schema/NotifyEventRequest.yaml + RegistryEventType: + $ref: schema/RegistryEventType.yaml + RegistryRecord: + $ref: schema/RegistryRecord.yaml + RegistryRecordType: + $ref: schema/RegistryRecordType.yaml + RegistryType: + $ref: schema/RegistryType.yaml + SearchRequest: + $ref: ibr/SearchRequest.yaml + SearchResponse: + $ref: ibr/SearchResponse.yaml + SearchStatusReasonCode: + $ref: schema/SearchStatusReasonCode.yaml + SubscribeRequest: + $ref: schema/SubscribeRequest.yaml + SubscribeResponse: + $ref: schema/SubscribeResponse.yaml + SubscribeStatusReasonCode: + $ref: schema/SubscribeStatusReasonCode.yaml + SubscriptionCode: + $ref: schema/SubscriptionCode.yaml + SubscriptionCodeList: + $ref: schema/SubscriptionCodeList.yaml + SubscriptionInfo: + $ref: schema/SubscriptionInfo.yaml + SubscriptionStatus: + $ref: schema/SubscriptionStatus.yaml + TxnStatusRequest: + $ref: schema/TxnStatusRequest.yaml + TxnStatusResponse: + $ref: schema/TxnStatusResponse.yaml + UnSubscribeRequest: + $ref: schema/UnSubscribeRequest.yaml + UnSubscribeResponse: + $ref: schema/UnSubscribeResponse.yaml + UnSubscribeStatusReasonCode: + $ref: schema/UnSubscribeStatusReasonCode.yaml + + ###### Common schema objects + Ack: + $ref: ../common/schema/Ack.yaml + AdditionalInfo: + $ref: ../common/schema/AdditionalInfo.yaml + AttributeNameValue: + $ref: ../common/schema/AttributeNameValue.yaml + AttributeNameValueList: + $ref: ../common/schema/AttributeNameValueList.yaml + AttributeValue: + $ref: ../common/schema/AttributeValue.yaml + Authorize: + $ref: ../common/schema/Authorize.yaml + Consent: + $ref: ../common/schema/Consent.yaml + DateTime: + $ref: ../common/schema/DateTime.yaml + EncryptedMessage: + $ref: ../common/schema/EncryptedMessage.yaml + Error: + $ref: ../common/schema/Error.yaml + EventFrequency: + $ref: ../common/schema/EventFrequency.yaml + ExpCondition: + $ref: ../common/schema/ExpCondition.yaml + ExpOperator: + $ref: ../common/schema/ExpOperator.yaml + ExpPredicate: + $ref: ../common/schema/ExpPredicate.yaml + ExpPredicateList: + $ref: ../common/schema/ExpPredicateList.yaml + ExpPredicateWithCondition: + $ref: ../common/schema/ExpPredicateWithCondition.yaml + ExpPredicateWithConditionList: + $ref: ../common/schema/ExpPredicateWithConditionList.yaml + ExpTemplate: + $ref: ../common/schema/ExpTemplate.yaml + FileInfo: + $ref: ../common/schema/FileInfo.yaml + IdentifierType: + $ref: ../common/schema/IdentifierType.yaml + IdentifierTypeValue: + $ref: ../common/schema/IdentifierTypeValue.yaml + LanguageCode: + $ref: ../common/schema/LanguageCode.yaml + LatLong: + $ref: ../common/schema/LatLong.yaml + Meta: + $ref: ../common/schema/Meta.yaml + MsgCallbackHeader_V1.0.0: + $ref: ../common/schema/MsgCallbackHeader_V1.0.0.yaml + 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 + QueryType: + $ref: ../common/schema/QueryType.yaml + ReferenceId: + $ref: ../common/schema/ReferenceId.yaml + ReferenceIdList: + $ref: ../common/schema/ReferenceIdList.yaml + RequestStatus: + $ref: ../common/schema/RequestStatus.yaml + SearchSort: + $ref: ../common/schema/SearchSort.yaml + SearchSortList: + $ref: ../common/schema/SearchSortList.yaml + TransactionId: + $ref: ../common/schema/TransactionId.yaml + + responses: + HttpErrorResponse: + $ref: ../common/response/HttpErrorResponse.yaml + Response: + $ref: ../common/response/Response.yaml + securitySchemes: + Authorization: + $ref: ../common/security/Authorization.yaml From 74a81a29546ae97dd5e0de9d53af28bd226009ed Mon Sep 17 00:00:00 2001 From: ahi-dev-dc Date: Tue, 14 Nov 2023 14:44:50 +0530 Subject: [PATCH 14/57] JSON LD changes --- build/build_apis.cmd | 9 ++- release/html/ibr_api_v1.0.0.html | 24 +++--- release/html/registry_core_api_v1.0.0.html | 24 +++--- release/yaml/ibr_api_v1.0.0.yaml | 79 ++++++++++--------- release/yaml/registry_core_api_v1.0.0.yaml | 71 ++++++++--------- src/common/schema/AttributeNameValue.yaml | 2 +- src/common/schema/Authorize.yaml | 4 +- src/common/schema/Consent.yaml | 4 +- src/common/schema/ExpPredicate.yaml | 2 +- src/common/schema/ExpTemplate.yaml | 4 +- src/common/schema/IdentifierType.yaml | 2 +- src/common/schema/IdentifierTypeValue.yaml | 2 +- src/common/schema/LatLong.yaml | 21 +++-- src/common/schema/Meta.yaml | 2 +- src/common/schema/SearchSort.yaml | 2 +- .../dci/{CRVSPerson.yaml => Person.yaml} | 6 +- src/registry/ibr/SearchResponse.yaml | 5 +- src/registry/ibr_api_v1.0.0.yaml | 2 +- src/registry/registry_core_api_v1.0.0.yaml | 4 +- src/registry/schema/RegistryEventType.yaml | 6 +- src/registry/schema/RegistryRecord.yaml | 13 ++- src/registry/schema/RegistryRecordType.yaml | 6 +- src/registry/schema/RegistryType.yaml | 2 +- 23 files changed, 151 insertions(+), 145 deletions(-) rename src/extensions/dci/{CRVSPerson.yaml => Person.yaml} (90%) diff --git a/build/build_apis.cmd b/build/build_apis.cmd index f353f64..689363a 100755 --- a/build/build_apis.cmd +++ b/build/build_apis.cmd @@ -6,10 +6,14 @@ 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 redocly build-docs ./release/yaml/authz_core_api_v1.0.0.yaml -o ./release/html/authz_core_api_v1.0.0.html -# build registry core APIs +# 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 +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 + + # 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 @@ -18,9 +22,6 @@ redocly build-docs ./release/yaml/locations_core_api_v1.0.0.yaml -o ./release/ht 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 -# IBR registry build steps -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/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 diff --git a/release/html/ibr_api_v1.0.0.html b/release/html/ibr_api_v1.0.0.html index 81c5a4c..287c5a4 100644 --- a/release/html/ibr_api_v1.0.0.html +++ b/release/html/ibr_api_v1.0.0.html @@ -468,7 +468,7 @@

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/subscribe

Subscribe to a life event with registry

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/on-search

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/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

@@ -485,7 +485,7 @@

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

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/subscribe

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

@@ -494,7 +494,7 @@

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

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/on-subscribe

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

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/notify

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

@@ -545,7 +545,7 @@

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

Sync status check of registry Async APIs

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/sync/search

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

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

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. transaction_id should be samme across processing systems/service end points.
  3. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  4. @@ -570,12 +570,12 @@
  5. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  6. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  4. @@ -584,12 +584,12 @@
  5. correlation_id acknowledged by end txn processing system (i.e receiver) to co-relate all related requests in the context of a business transaction.
  6. 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. transaction_id should be samme across processing systems/service end points.
  3. 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. transaction_id should be samme across processing systems/service end points.
  3. transaction_id uniqueness is ensured by txn initiating system (i.e sender)
  4. @@ -635,7 +635,7 @@
"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 - 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 index 014e4d7..6e64ede 100644 --- a/release/html/locations_core_api_v1.0.0.html +++ b/release/html/locations_core_api_v1.0.0.html @@ -12,273 +12,297 @@ margin: 0; } - -

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",
  • "lastUpdated": "2023-10-17T11:26:02.512+00:00",
  • "locations": [
    ]
}
+ " fill="currentColor">

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": [
    ]
}
+ + + + + +

Interoperability APIs - Integrated Beneficiary Registry (1.0.0)

Download OpenAPI specification:Download

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

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

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

Gitbook reference link :

+ +

Code directory links :

+ +

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:
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, The Social registry supports benefit_disbusrement,programme_exited events as of now

+

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/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/on-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

+
ReceiptResponse (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/receipts

Registry receive receipts from SP system

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

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

+
required
object

Message header

+
ReceiptRequest (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/sync/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/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 <= 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
    +
  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 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
Array of objects
{
  • "transaction_id": 123456789,
  • "correlation_id": "9876543210",
  • "search_response": [
    ]
}

ReceiptRequest

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

Receipt information contains receipt type and list of beneficiaries

+
    +
  1. Register - It indi
  2. +
  3. Deregister - If receipt is for a programme exit then programm information with suspended date to be recorded
  4. +
+
{
  • "transaction_id": 123456789,
  • "receipt_information": {
    }
}

ReceiptResponse

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

Receipt information contains receipt type and list of beneficiaries

+
    +
  1. Register - It indi
  2. +
  3. Deregister - If receipt is for a programme exit then programm information with suspended date to be recorded
  4. +
+
{
  • "transaction_id": 123456789,
  • "receipt_information": {
    }
}

TxnStatusRequest

transaction_id
required
string <= 99 characters
    +
  1. transaction_id set by txn initiating system (i.e sender) to co-relate all related requests in the context of a business transaction.
  2. +
  3. transaction_id should be samme across processing systems/service end points.
  4. +
  5. transaction_id 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 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"
}

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/yaml/social_api_v1.0.0.yaml b/release/yaml/social_api_v1.0.0.yaml new file mode 100644 index 0000000..8fa2c76 --- /dev/null +++ b/release/yaml/social_api_v1.0.0.yaml @@ -0,0 +1,2176 @@ +openapi: 3.0.3 +info: + title: Interoperability APIs - Integrated Beneficiary Registry + x-logo: + url: 'https://standards.spdci.org/api-documentation/draft/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 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 : + - [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/v/social-v1.0-1/social/social-registry-with-sp-mis-standards/data/code-directory) + + Each request is build up of three parts + - signature + - header + - message + 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 +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: UnSubscribeRequest + x-displayName: UnSubscribeRequest + description: | + + - name: UnSubscribeResponse + x-displayName: UnSubscribeResponse + description: | + + - name: UnSubscribeStatusReasonCode + x-displayName: UnSubscribeStatusReasonCode + description: | + + - name: ReceiptRequest + x-displayName: ReceiptRequest + description: | + + - name: ReceiptResponse + x-displayName: ReceiptResponse + 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 + - ReceiptRequest + - ReceiptResponse + - TxnStatusRequest + - TxnStatusResponse + - EncryptedMessage + - name: Status Codes + tags: + - SearchStatusReasonCode +paths: + /registry/search: + post: + summary: /registry/search + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-search: + post: + summary: /registry/on-search + description: Search results through callback + operationId: post_reg_on-search + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-search + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/subscribe: + post: + summary: /registry/subscribe + description: Subscribe to a life event with registry + operationId: post_reg_subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - subscribe + message: + type: object + description: 'Subscription request which contaion query with frequency and other info on which notification to be sent by registry to subscriber, The Social registry supports benefit_disbusrement,programme_exited events as of now' + oneOf: + - $ref: '#/components/schemas/SubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-subscribe: + post: + summary: /registry/on-subscribe + description: Subscribe results through callback + operationId: post_reg_on-subscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-subscribe + message: + type: object + description: Subscription information + oneOf: + - $ref: '#/components/schemas/SubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-subscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/unsubscribe: + post: + summary: /registry/unsubscribe + description: Unsubscribe existing subscription(s) by subscription_code + operationId: post_reg_unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - unsubscribe + message: + type: object + description: The unsubscribe request that contain subscription ids which to be removed from subscription list + oneOf: + - $ref: '#/components/schemas/UnSubscribeRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-unsubscribe: + post: + summary: /registry/on-unsubscribe + description: Unsubscribe response as a callback + operationId: post_reg_on-unsubscribe + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - on-unsubscribe + message: + type: object + oneOf: + - $ref: '#/components/schemas/UnSubscribeResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - on-unsubscribe + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/on-notify: + post: + summary: /registry/on-notify + description: Registry to notify a life event to subscrbiers + operationId: post_reg_on_notify + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - notify + message: + type: object + oneOf: + - $ref: '#/components/schemas/ReceiptResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/status: + post: + summary: /registry/txn/status + description: Perform async status check of previous civil registry transanctions using transaction_id and/or reference_id(s) + operationId: post_reg_txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/txn/on-status: + post: + summary: /registry/txn/on-status + description: Response to async status check of previous civil registrt transanctions using callback + operationId: post_reg_on-txnstatus + tags: + - Async + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - txn-on-status + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/sync/search: + post: + summary: /registry/sync/search + description: Search person(s) in registry using identifier or custome attributes + operationId: post_reg_sync_search + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - search + message: + type: object + description: The search data using which registry search to be performed + oneOf: + - $ref: '#/components/schemas/SearchRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Registry search response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - on-search + message: + type: object + oneOf: + - $ref: '#/components/schemas/SearchResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false + /registry/receipts: + post: + summary: /registry/receipts + description: Registry receive receipts from SP system + operationId: post_reg_receipts + 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/ReceiptRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/Response' + security: + - Authorization: [] + deprecated: false + /registry/sync/notify: + post: + summary: /registry/sync/notify + description: Registry to notify a life event to subscrbiers + operationId: post_reg_sync_notify + 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/NotifyEventRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + multipart/form-data: + schema: + allOf: + - $ref: '#/components/schemas/FileInfo' + - properties: + action: + enum: + - notify + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + $ref: '#/components/responses/HttpErrorResponse' + security: + - Authorization: [] + deprecated: false + /registry/sync/txn/status: + post: + summary: /registry/sync/txn/status + description: Sync status check of registry Async APIs + operationId: post_reg_sync_txnstatus + tags: + - Sync + requestBody: + description: '' + required: true + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgHeader_V1.0.0' + - properties: + action: + enum: + - txn-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusRequest' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + - message + responses: + '401': + $ref: '#/components/responses/HttpErrorResponse' + '403': + $ref: '#/components/responses/HttpErrorResponse' + '500': + $ref: '#/components/responses/HttpErrorResponse' + default: + description: Transaction status check response + content: + application/json: + schema: + type: object + properties: + signature: + $ref: '#/components/schemas/MsgSignature' + header: + allOf: + - $ref: '#/components/schemas/MsgCallbackHeader_V1.0.0' + - properties: + action: + enum: + - txn-on-status + message: + type: object + oneOf: + - $ref: '#/components/schemas/TxnStatusResponse' + - $ref: '#/components/schemas/EncryptedMessage' + required: + - header + security: + - Authorization: [] + deprecated: false +components: + schemas: + 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) Register - It indi + 2) Deregister - If receipt is for a programme exit then programm information with suspended date to be recorded + properties: + receipt_type: + description: Receipt type 1) Register 2) Payment 3) Deregister + type: string + enum: + - REGISTER + - PAYMENT + - DEREGISTER + beneficiaries: + type: array + items: + $ref: '#/components/schemas/SearchResponse/properties/search_response/items/properties/data/properties/reg_records/items/allOf/0' + required: + - transaction_id + - receipt_information + ReceiptResponse: + type: object + description: Event notification information + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + receipt_information: + $ref: '#/components/schemas/ReceiptRequest/properties/receipt_information' + 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 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 + 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 IBR 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
+ 2 : Payment
+ 3 : Deregister
+ enum: + - REGISTER + - PAYMENT + - DEREGISTER + 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: idtype-value + 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/QueryType.jsonld"
+ @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://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 } }' + - 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. + - 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, YOB, DOB, age, mobile, area-code, pin-code, etc., + example: YOB + 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 "Person" object contains fields expected in response of search + type: array + items: + allOf: + - type: object + description: | + 1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria. + 3. Allowes Country/Registry specific implementation extensions using Attribute Name/Value pairs. + properties: + identifier: + description: Information of identifier of the person + type: object + properties: + identifier_type: + 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
+ enum: + - UIN + identifier_value: + type: string + description: Value of the identifier + name: + type: object + description: | + The name data object represents a person's name with various components.
+ Reference: [FHIR XPN - extended person name](https://v2plus.hl7.org/2021Jan/data-type/XPN.html#XPN-1)
+ Note: Note: In some cultures, people can have multiple Surname(s), Given name(s), Second name(s), Suffix(s), or Prefix(s) to their name; all can be present in the respective attributes, being separated by separator character like space or /. + properties: + sur_name: + type: string + description: Surname(s) or last name(s) of the applicant + given_name: + type: string + description: Given name(s) or first name(s) of the applicant + second_name: + type: string + description: Second name(s) or middle name(s) of the applicant + suffix: + type: string + description: Suffix part of the applicant's name + prefix: + type: string + description: Prefix part of the applicant's name + sex: + type: string + description: | + Standardized codes/values representing diverse Sex categories. + Reference: [FHIR Administrative Gender](https://build.fhir.org/valueset-administrative-gender.html) + 1 : Male + 2 : Female + 3 : Others + 4 : Unknown + enum: + - male + - female + - other + - unknown + birthdate: + description: 'Represents Date and time of the applicant''s birth as in [ISO 8601](https://www.iso.org/standard/40874.html)' + type: string + 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: + - type: object + properties: + latitude: + type: string + example: 11°24'12.2"N + longitude: + type: string + example: 88°50'26.5"E + - 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: '#/paths/~1registry~1receipts/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/receipt_information/properties/beneficiaries/items/properties/address/properties/geo_location/oneOf/0' + southwest: + $ref: '#/paths/~1registry~1receipts/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/receipt_information/properties/beneficiaries/items/properties/address/properties/geo_location/oneOf/0' + location: + $ref: '#/paths/~1registry~1receipts/post/requestBody/content/application~1json/schema/properties/message/oneOf/0/properties/receipt_information/properties/beneficiaries/items/properties/address/properties/geo_location/oneOf/0' + marital_status: + type: string + description: | + Marital status reference database: Standardized codes/values representing different marital status categories
+ Reference: [FHIR Marital Status](https://hl7.org/fhir/DSTU2/valueset-marital-status.html)
+ + Code : Values - Description
+ S : Never Married - No marriage contract has ever been entered
+ M : Married - A current marriage contract is active
+ W : Widow - The spouse has died
+ A : Annulled - Marriage contract has been declared null and to not have existed
+ D : Divorced - Marriage contract has been declared dissolved and inactive
+ L : Legally Separated - Legally Separated
+ U : Unmarried - The person is not presently married. The marital history is not known or stated.
+ enum: + - S + - M + - W + - A + - D + - L + - U + poverty_score: + type: string + description: details of poverty score + disabled: + type: boolean + description: 'True is disabled, false if no disability' + household_identifier: + type: string + description: Value of the household identifier + programms: + type: array + description: Details of the programmes the person is enrolled in + items: + type: object + description: | + 1. + 2. + properties: + programme_name: + type: string + description: The programme name sent by sp system + programme_identifier: + type: string + description: Programme identifier + registration_date: + description: The date when the beneficiary was registered into the programme + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + enrolment_date: + description: The date when the beneficiary was enrolled into the programme + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + suspension_date: + description: The date when the beneficiary was suspended from the programme + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + graduation_date: + description: The date when the beneficiary graduated + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + type: string + description: | + The beneficiaries status with a specific program + + 1 : Active
+ 2 : Deceased
+ 3 : Graduated
+ 4 : Suspended
+ enum: + - '1' + - '2' + - '3' + - '4' + benefits: + type: array + description: Benefits received by the person + items: + type: object + description: | + The Benefit object provide information about benefits + properties: + benefit_type: + 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 + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + benefit_date: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + benefit_value: + type: string + description: This can be any value like monetery value like currency value or any objects received + payments: + type: array + description: Payment information + items: + type: object + description: | + The payment information contains details about payment related fields + properties: + payroll_date: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + payroll_amount: + type: string + description: Value of the identifier + payment_credit_date: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + payment_credit_amount: + description: null + type: string + payment_charges: + type: string + description: null + payment_status: + type: string + description: | + The status of a payment made to a beneficiary + + 1 : Succesful
+ 2 : Not succesful
+ enum: + - '1' + - '2' + 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: + $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: + type: object + description: | + 1. Frequency at which subscribed services should be notified. + 2. start_time, end_time represent data range where the notification frequency is applicable + properties: + start_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + end_time: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + frequency: + type: string + description: | + Frequency at which notification is required. This will be in the form of cron expression. + Example - "0 0 0 5,15 * ? *" + which says At 00:00:00am, on the 5th and 15th day, every month + required: + - start_time + - end_time + - frequency + filter_type: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query_type' + filter: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/query' + notify_record_type: + $ref: '#/components/schemas/NotifyEventRequest/properties/notify_event/items/properties/data/properties/reg_record_type' + authorize: + $ref: '#/components/schemas/SearchRequest/properties/search_request/items/properties/search_criteria/properties/authorize' + required: + - reg_event_type + - filter + - notify_record_type + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - subscribe_criteria + required: + - transaction_id + - subscribe_request + SubscribeResponse: + type: object + description: Response to subscribe request. + properties: + transaction_id: + $ref: '#/components/schemas/SearchRequest/properties/transaction_id' + correlation_id: + $ref: '#/components/schemas/SearchResponse/properties/correlation_id' + subscribe_response: + type: array + items: + type: object + properties: + reference_id: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/reference_id' + timestamp: + $ref: '#/components/schemas/MsgHeader_V1.0.0/properties/message_ts' + status: + $ref: '#/components/schemas/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/SubscribeStatusReasonCode' + status_reason_message: + description: Status reason code message. Helps 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: + $ref: '#/components/schemas/NotifyEventRequest/properties/notify_event/items/properties/data/properties/reg_record_type' + required: + - reg_event_type + - filter + - notify_record_type + 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. G2P 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' + - $ref: '#/components/schemas/ReceiptRequest' + example: + $ref: '#/components/schemas/SearchResponse' + required: + - txn_type + - txn_status + required: + - transaction_id + - correlation_id + - txnstatus_response + UnSubscribeRequest: + type: object + description: Un-Subscribe to registred subscriptions + properties: + transaction_id: + $ref: '#/components/schemas/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: "RegistryType"
+ + **Notes:** + 1. Registry type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable functional registries + 3. example: "ns:org:RegistryType:Civil" + example: 'ns:org:RegistryType:Civil' + reg_event_type: + type: string + description: | + @context: "https://schema.spdci.org/common/v1/RegistryEventType"
+ @type: "VitalEvent"
+ + **Notes:** + 1. Registry event type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable identifiers. + 3. example: "spdci-common:RegistryEventType:LiveBirth" + example: 'spdci-common:RegistryEventType:LiveBirth' + reg_record_type: + type: string + description: | + @context: "https://schema.spdci.org/extensions/dci/v1/"
+ @type: "RegistryRecordType"
+ + **Notes:** + 1. Registry record type values defined as per implementation context. + 2. Usually a list of **enum** values of all possible queryable result sets + 3. Referenced in search_request and notify events + 4. example: "spdci-extensions-dci:Person" + example: 'spdci-extensions-dci:Person' + reg_records: + type: object + description: | + The "Person" object contains fields expected in response of search + @context: "https://schema.spdci.org/extensions/dci/v1/Person"
+ @type: "Person"
+ @container: "@set"
+ example: + type: object + description: | + @context: "https://schema.spdci.org/CRVSPerson"
+ @type: "Consent" + example: + '@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/schemas/extensions/dci/v1/Person' + '@type': 'rdfs:Class' + '@context': + name: + '@id': 'schema:name' + '@type': 'xsd:string' + givenName: + '@id': 'schema:givenName' + '@type': 'xsd:string' + familyName: + '@id': 'schema:familyName' + '@type': 'xsd:string' + additionalName: + '@id': 'schema:additionalName' + '@type': 'xsd:string' + gender: + '@id': 'schema:gender' + '@type': 'xsd:string' + birthDate: + '@id': 'schema:birthDate' + '@type': 'xsd:date' + birthPlace: + '@id': 'schema:birthPlace' + '@type': 'schema:GeoCoordinates' + deathDate: + '@id': 'schema:deathDate' + '@type': 'xsd:date' + deathPlace: + '@id': 'schema:deathPlace' + '@type': 'schema:GeoCoordinates' + maritalStatus: + '@id': 'schema:maritalStatus' + '@type': 'xsd:string' + honorificPrefix: + '@id': 'schema:honorificPrefix' + '@type': 'xsd:string' + honorificSuffix: + '@id': 'schema:honorificSuffix' + '@type': 'xsd:string' + emails: + '@container': '@set' + '@id': 'schema:email' + '@type': 'xsd:string' + telephones: + '@container': '@set' + '@id': 'schema:telephone' + '@type': 'xsd:string' + address: + '@id': 'schema:address' + '@type': 'schema:GeoCoordinates' + marriageDate: + '@id': 'https://spdci.org/marriageDate' + '@type': 'xsd:date' + divorceDate: + '@id': 'https://spdci.org/divorceDate' + '@type': 'xsd:date' + parents: + '@id': 'schema:parents' + '@type': 'https://spdci.org/CRVSPerson' + '@id': 'https://spdci.org/CRVSPerson' + required: + - reg_record_type + - reg_records + locale: + $ref: '#/components/schemas/TxnStatusRequest/properties/txnstatus_request/properties/locale' + required: + - reference_id + - timestamp + - data + required: + - transaction_id + - notify_event + 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 + 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: 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/UnSubscribeResponse/properties/status' + status_reason_code: + $ref: '#/components/schemas/MsgHeaderStatusReasonCode' + status_reason_message: + description: 'Status reascon code message, if any, Helps actionanble messaging for system/end users' + 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: '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: + type: object + description: | + @context: "https://schema.spdci.org/common/v1/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 + 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)' + 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. From 4b619086e9a656310b96a902d6013174b7791987 Mon Sep 17 00:00:00 2001 From: Dhananjay Date: Tue, 5 Dec 2023 19:39:30 +0530 Subject: [PATCH 26/57] Commited registry changes --- release/html/ibr_api_v1.0.0.html | 87 ++- release/html/registry_core_api_v1.0.0.html | 14 +- release/html/social_api_v1.0.0.html | 89 ++- release/yaml/ibr_api_v1.0.0.yaml | 106 ++- release/yaml/registry_core_api_v1.0.0.yaml | 12 +- release/yaml/social_api_v1.0.0.yaml | 710 ++++++++++++++------- src/extensions/social/DisabilityInfo.yaml | 16 + src/extensions/social/Person.yaml | 99 ++- src/registry/ibr/SearchResponse.yaml | 6 +- src/registry/ibr_api_v1.0.0.yaml | 106 ++- src/registry/registry_core_api_v1.0.0.yaml | 12 +- src/registry/social/SearchResponse.yaml | 8 +- src/registry/social_api_v1.0.0.yaml | 110 +++- 13 files changed, 993 insertions(+), 382 deletions(-) create mode 100644 src/extensions/social/DisabilityInfo.yaml diff --git a/release/html/ibr_api_v1.0.0.html b/release/html/ibr_api_v1.0.0.html index 96e3acb..7b777c4 100644 --- a/release/html/ibr_api_v1.0.0.html +++ b/release/html/ibr_api_v1.0.0.html @@ -271,6 +271,8 @@ .bJDmxm{border-radius:2px;background-color:rgba(104,104,207,0.05);color:rgba(50,50,159,0.9);margin:0 5px;padding:0 5px;border:1px solid rgba(50,50,159,0.1);}/*!sc*/ .sc-jnOGJG + .sc-jnOGJG{margin-left:0;}/*!sc*/ data-styled.g70[id="sc-jnOGJG"]{content:"bJDmxm,"}/*!sc*/ +.fHuNRF{margin:0 5px;vertical-align:text-top;}/*!sc*/ +data-styled.g76[id="sc-gFVvzn"]{content:"fHuNRF,"}/*!sc*/ .dwcOCN{background:#11171a;}/*!sc*/ .dwcOCN > div,.dwcOCN > pre{padding:20px;margin:0;}/*!sc*/ .dwcOCN > div > pre{padding:0;}/*!sc*/ @@ -416,7 +418,7 @@ -

Interoperability APIs - Integrated Beneficiary Registry (1.0.0)

Download OpenAPI specification:Download

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

The IBR(Integrated Beneficiary Registry) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between IBR registry and SP system. + " fill="currentColor">

Interoperability APIs - Integrated Beneficiary Registry (1.0.0)

Download OpenAPI specification:Download

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

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

    @@ -444,11 +446,14 @@

Gitbook reference link[WIP]:

-

Code directory links[WIP]:

+

Code directory links:

Each request is build up of three parts

    @@ -509,7 +514,15 @@

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-notify

Registry to notify a life event to subscrbiers

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/on-unsubscribe

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/on-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

ReceiptResponse (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)

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/on-notify

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

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/txn/status

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

+
https://sandbox.spdci.org/namespace/v1.0.0/registry/txn/on-status

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