Download OpenAPI specification:Download
The ESS(Employment Support System) interoperability APIs describes different APIs some of them are usecase specific and other are generalized APIs to perform interoperable operations between ESS and SP-System. You can now help us improve the API whether it's by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in upcoming version.
Gitbook reference link[WIP]:
Code directory links:
Data Objects:
Each request is build up of three parts
Information about each part is given below
Signature:
Header:
Message:
The async search api will accept request and will send response to on-search endpoint. The ESS or SP-System will implement /registry/search endpoint and the SP-System or ESS shall implement /registry/on-search to receive data from the sender. The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The ESS or SP-System will validate the request and will send response to on-search endpoint. Information for each field is given below.
| signature | string (MsgSignature) Signature of {header}+{message} body verified using sender's signing public key |
required | object Message header |
required | SearchRequest (object) or EncryptedMessage (object) The search data using which registry search to be performed |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "123",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "search",
- "sender_id": "spmis.example.org",
- "receiver_id": "ess.example.org",
- "total_count": 21800,
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "search_request": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "search_criteria": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_record_type": "Member",
- "query_type": "expression",
- "query": {
- "type": "ns:org:QueryType:expression",
- "value": {
- "expression": {
- "collection": "Group",
- "query": {
- "$and": [
- {
- "poverty_score": {
- "$lt": 5
}
}, - {
- "location": {
- "$eq": "central_region"
}
}, - {
- "group_size": {
- "$lt": 5
}
}
]
}
}
}
}, - "sort": [
- {
- "attribute_name": "poverty_score",
- "sort_order": "asc"
}
], - "pagination": {
- "page_size": 2000,
- "page_number": 5
}, - "consent": {
- "@type": "Consent",
- "ts": {
- "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp"
}, - "purpose": {
- "text": {
- "type": "string"
}, - "code": {
- "type": "string",
- "description": "From a fixed set, documented at refUri"
}, - "ref_uri": {
- "type": "string",
- "format": "uri",
- "description": "Uri to provide more info on consent codes"
}
}
}, - "authorize": {
- "@type": "Authorize",
- "ts": {
- "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp"
}, - "purpose": {
- "text": {
- "type": "string"
}, - "code": {
- "type": "string",
- "description": "From a fixed set, documented at refUri"
}, - "ref_uri": {
- "type": "string",
- "format": "uri",
- "description": "Uri to provide more info on authorize codes"
}
}
}
}, - "locale": "eng"
}
]
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}The /registry/on-search end point to be implemented by SP-System to receive search results from ESS or the ESS to receive search results from SP-System. The Sender system will send data in format explained in SearchResponse.yaml. The reg_records will contains data that can be either a Person, Member or Group depending the collection type.
| signature | string (MsgSignature) Signature of {header}+{message} body verified using sender's signing public key |
required | object Message header |
SearchResponse (object) or EncryptedMessage (object) |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "789",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "on-search",
- "status": "rcvd",
- "status_reason_code": "rjct.version.invalid",
- "status_reason_message": "string",
- "total_count": 21800,
- "completed_count": 50,
- "sender_id": "ess.example.org",
- "receiver_id": "spmis.example.org",
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "search_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "data": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_record_type": "Member",
- "reg_records": [
- {
- "@context": {
}, - "@type": "spdci:member",
- "member_identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "UIN",
- "identifier_value": "42343545654"
}
], - "demographic_info": {
- "@type": "ESSPerson",
- "identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "NationalID",
- "identifier_value": "9876543210"
}
], - "name": {
- "@type": "Name",
- "surname": "Smith",
- "given_name": "Alice",
- "prefix": "Ms.",
- "suffix": ""
}, - "sex": "female",
- "birth_date": "1985-05-20"
}, - "related_person": [
- {
- "@type": "RelatedPerson",
- "relationship_type": "spouse",
- "related_member": {
- "@type": "Member",
- "member_identifier": "M123456789"
}
}, - {
- "@type": "RelatedPerson",
- "relationship_type": "child",
- "related_member": {
- "@type": "Member",
- "spdci:member_identifier": "M987654322"
}
}
], - "is_disabled": false,
- "marital_status": "married",
- "employment_status": "employed",
- "occupation": "teacher",
- "income_level": "middle",
- "language_code": [
- "en",
- "es"
], - "education_level": "bachelor",
- "additional_attributes": [
- {
- "extra_work": "volunteer"
}
], - "registration_date": "2022-01-10T08:00:00Z",
- "last_updated": "2023-06-15T10:00:00Z"
}
]
}, - "pagination": {
- "page_size": 2000,
- "page_number": 5,
- "total_count": 24250
}, - "locale": "eng"
}
]
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}Subscribe to a change event with registry
| signature | string (MsgSignature) Signature of {header}+{message} body verified using sender's signing public key |
required | object Message header |
required | SubscribeRequest (object) or EncryptedMessage (object) Subscription request which contain query with frequency and other info on which notification to be sent by registry to subscriber |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "123",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "subscribe",
- "sender_id": "spmis.example.org",
- "receiver_id": "ess.example.org",
- "total_count": 21800,
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "subscribe_request": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "subscribe_criteria": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_event_type": "enrolment",
- "frequency": {
- "start_time": "2022-12-04T17:20:07-04:00",
- "end_time": "2022-12-04T17:20:07-04:00",
- "frequency": "string"
}, - "filter_type": "expression",
- "filter": {
- "type": "ns:org:QueryType:graphql",
- "value": {
- "expression": "query GetMemberByIdentifier {\n member(\n identifier: {\n value: \"1\",\n type: \"uin\"\n }\n ) {\n member_identifier {\n value\n type\n }\n demographic_info {\n name\n gender\n age\n }\n }\n}\n"
}
}, - "notify_record_type": "Member",
- "authorize": {
- "@type": "Authorize",
- "ts": {
- "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp"
}, - "purpose": {
- "text": {
- "type": "string"
}, - "code": {
- "type": "string",
- "description": "From a fixed set, documented at refUri"
}, - "ref_uri": {
- "type": "string",
- "format": "uri",
- "description": "Uri to provide more info on authorize codes"
}
}
}
}, - "locale": "eng"
}
]
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}Subscribe results through callback
| 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 |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "123",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "on-subscribe",
- "sender_id": "spmis.example.org",
- "receiver_id": "ess.example.org",
- "total_count": 21800,
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "subscribe_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "subscriptions": [
- {
- "version": "1.0.0",
- "code": "string",
- "status": "subscribe",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_event_type": "enrolment",
- "frequency": {
- "start_time": "2022-12-04T17:20:07-04:00",
- "end_time": "2022-12-04T17:20:07-04:00",
- "frequency": "string"
}, - "filter_type": "expression",
- "filter": {
- "type": "ns:org:QueryType:expression",
- "value": {
- "expression": {
- "collection": "Group",
- "query": {
- "$and": [
- {
- "poverty_score": {
- "$lt": 5
}
}, - {
- "location": {
- "$eq": "central_region"
}
}, - {
- "group_size": {
- "$lt": 5
}
}
]
}
}
}
}, - "notify_record_type": "Member",
- "locale": "eng"
}
], - "locale": "eng"
}
]
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}Registry to notify an event to subscribers
| signature | string (MsgSignature) Signature of {header}+{message} body verified using sender's signing public key |
required | object Message header |
NotifyEventRequest (object) or EncryptedMessage (object) |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "789",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "notify",
- "status": "rcvd",
- "status_reason_code": "rjct.version.invalid",
- "status_reason_message": "string",
- "total_count": 21800,
- "completed_count": 50,
- "sender_id": "ess.example.org",
- "receiver_id": "spmis.example.org",
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "notify_event": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "data": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_event_type": "enrolment",
- "reg_record_type": "Member",
- "reg_records": {
- "type": "object",
- "description": "1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria.\n3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs.\n\n@context: https://schema.spdci.org/core/v1/data/Member.jsonld <br>\n@type: \"@context\" <br>\n",
- "example": {
- "@context": {
}, - "@type": "spdci:member",
- "member_identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "UIN",
- "identifier_value": "42343545654"
}
], - "demographic_info": {
- "@type": "ESSPerson",
- "identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "NationalID",
- "identifier_value": "9876543210"
}
], - "name": {
- "@type": "Name",
- "surname": "Smith",
- "given_name": "Alice",
- "prefix": "Ms.",
- "suffix": ""
}, - "sex": "female",
- "birth_date": "1985-05-20"
}, - "related_person": [
- {
- "@type": "RelatedPerson",
- "relationship_type": "spouse",
- "related_member": {
- "@type": "Member",
- "member_identifier": "M123456789"
}
}, - {
- "@type": "RelatedPerson",
- "relationship_type": "child",
- "related_member": {
- "@type": "Member",
- "spdci:member_identifier": "M987654322"
}
}
], - "is_disabled": false,
- "marital_status": "married",
- "employment_status": "employed",
- "occupation": "teacher",
- "income_level": "middle",
- "language_code": [
- "en",
- "es"
], - "education_level": "bachelor",
- "additional_attributes": [
- {
- "extra_work": "volunteer"
}
], - "registration_date": "2022-01-10T08:00:00Z",
- "last_updated": "2023-06-15T10:00:00Z"
}
}
}, - "locale": "eng"
}
]
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}Unsubscribe existing subscription(s) by subscription_code
| 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 |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "123",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "unsubscribe",
- "sender_id": "spmis.example.org",
- "receiver_id": "ess.example.org",
- "total_count": 21800,
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "subscription_codes": [
- "string"
]
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}Unsubscribe response as a callback
| 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) |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "123",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "on-unsubscribe",
- "sender_id": "spmis.example.org",
- "receiver_id": "ess.example.org",
- "total_count": 21800,
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "subscription_status": [
- {
- "code": "string",
- "status": "subscribe"
}
]
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}The /registry/txn/status will be implemented by ESS or SP-System. This will check status of reach request using transaction_id and/or reference_id(s).
| 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) |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "123",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "txn-status",
- "sender_id": "spmis.example.org",
- "receiver_id": "ess.example.org",
- "total_count": 21800,
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "txnstatus_request": {
- "reference_id": "SDFRTYUX",
- "txn_type": "search",
- "attribute_type": "transaction_id",
- "attribute_value": "XZFHYTY",
- "locale": "eng"
}
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}The /registry/txn/on-status will be implemented by receiver system. The response with information about request and in some case it may contain data as well.
| signature | string (MsgSignature) Signature of {header}+{message} body verified using sender's signing public key |
required | object Message header |
TxnStatusResponse (object) or EncryptedMessage (object) |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "789",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "txn-on-status",
- "status": "rcvd",
- "status_reason_code": "rjct.version.invalid",
- "status_reason_message": "string",
- "total_count": 21800,
- "completed_count": 50,
- "sender_id": "ess.example.org",
- "receiver_id": "spmis.example.org",
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "txnstatus_response": {
- "txn_type": "search",
- "txn_status": {
- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "search_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "data": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_record_type": "Member",
- "reg_records": [
- {
- "@context": {
}, - "@type": "spdci:member",
- "member_identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "UIN",
- "identifier_value": "42343545654"
}
], - "demographic_info": {
- "@type": "ESSPerson",
- "identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "NationalID",
- "identifier_value": "9876543210"
}
], - "name": {
- "@type": "Name",
- "surname": "Smith",
- "given_name": "Alice",
- "prefix": "Ms.",
- "suffix": ""
}, - "sex": "female",
- "birth_date": "1985-05-20"
}, - "related_person": [
- {
- "@type": "RelatedPerson",
- "relationship_type": "spouse",
- "related_member": {
- "@type": "Member",
- "member_identifier": "M123456789"
}
}, - {
- "@type": "RelatedPerson",
- "relationship_type": "child",
- "related_member": {
- "@type": "Member",
- "spdci:member_identifier": "M987654322"
}
}
], - "is_disabled": false,
- "marital_status": "married",
- "employment_status": "employed",
- "occupation": "teacher",
- "income_level": "middle",
- "language_code": [
- "en",
- "es"
], - "education_level": "bachelor",
- "additional_attributes": [
- {
- "extra_work": "volunteer"
}
], - "registration_date": "2022-01-10T08:00:00Z",
- "last_updated": "2023-06-15T10:00:00Z"
}
]
}, - "pagination": {
- "page_size": 2000,
- "page_number": 5,
- "total_count": 24250
}, - "locale": "eng"
}
]
}
}
}
}{- "message": {
- "ack_status": "ACK",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "error": {
- "code": "err.request.bad",
- "message": "string"
}, - "correlation_id": "ABC9876543210"
}
}The sync search api will accept request and will send response immediately The search request message consist of reg_event_type, query_type, query, sort, pagination, consent, authorize, locale. The ESS or SP-System will validate the request and will send response directly. Information for each field is given below.
| signature | string (MsgSignature) Signature of {header}+{message} body verified using sender's signing public key |
required | object Message header |
required | SearchRequest (object) or EncryptedMessage (object) The search data using which registry search to be performed |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "123",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "search",
- "sender_id": "spmis.example.org",
- "receiver_id": "ess.example.org",
- "total_count": 21800,
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "search_request": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "search_criteria": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_record_type": "Member",
- "query_type": "expression",
- "query": {
- "type": "ns:org:QueryType:expression",
- "value": {
- "expression": {
- "collection": "Group",
- "query": {
- "$and": [
- {
- "poverty_score": {
- "$lt": 5
}
}, - {
- "location": {
- "$eq": "central_region"
}
}, - {
- "group_size": {
- "$lt": 5
}
}
]
}
}
}
}, - "sort": [
- {
- "attribute_name": "poverty_score",
- "sort_order": "asc"
}
], - "pagination": {
- "page_size": 2000,
- "page_number": 5
}, - "consent": {
- "@type": "Consent",
- "ts": {
- "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp"
}, - "purpose": {
- "text": {
- "type": "string"
}, - "code": {
- "type": "string",
- "description": "From a fixed set, documented at refUri"
}, - "ref_uri": {
- "type": "string",
- "format": "uri",
- "description": "Uri to provide more info on consent codes"
}
}
}, - "authorize": {
- "@type": "Authorize",
- "ts": {
- "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp"
}, - "purpose": {
- "text": {
- "type": "string"
}, - "code": {
- "type": "string",
- "description": "From a fixed set, documented at refUri"
}, - "ref_uri": {
- "type": "string",
- "format": "uri",
- "description": "Uri to provide more info on authorize codes"
}
}
}
}, - "locale": "eng"
}
]
}
}{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "789",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "on-search",
- "status": "rcvd",
- "status_reason_code": "rjct.version.invalid",
- "status_reason_message": "string",
- "total_count": 21800,
- "completed_count": 50,
- "sender_id": "ess.example.org",
- "receiver_id": "spmis.example.org",
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "search_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "data": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_record_type": "Member",
- "reg_records": [
- {
- "@context": {
}, - "@type": "spdci:member",
- "member_identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "UIN",
- "identifier_value": "42343545654"
}
], - "demographic_info": {
- "@type": "ESSPerson",
- "identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "NationalID",
- "identifier_value": "9876543210"
}
], - "name": {
- "@type": "Name",
- "surname": "Smith",
- "given_name": "Alice",
- "prefix": "Ms.",
- "suffix": ""
}, - "sex": "female",
- "birth_date": "1985-05-20"
}, - "related_person": [
- {
- "@type": "RelatedPerson",
- "relationship_type": "spouse",
- "related_member": {
- "@type": "Member",
- "member_identifier": "M123456789"
}
}, - {
- "@type": "RelatedPerson",
- "relationship_type": "child",
- "related_member": {
- "@type": "Member",
- "spdci:member_identifier": "M987654322"
}
}
], - "is_disabled": false,
- "marital_status": "married",
- "employment_status": "employed",
- "occupation": "teacher",
- "income_level": "middle",
- "language_code": [
- "en",
- "es"
], - "education_level": "bachelor",
- "additional_attributes": [
- {
- "extra_work": "volunteer"
}
], - "registration_date": "2022-01-10T08:00:00Z",
- "last_updated": "2023-06-15T10:00:00Z"
}
]
}, - "pagination": {
- "page_size": 2000,
- "page_number": 5,
- "total_count": 24250
}, - "locale": "eng"
}
]
}
}check status of a person if remain enrolled
| signature | string (MsgSignature) Signature of {header}+{message} body verified using sender's signing public key |
required | object Message header |
required | EnrolledRequest (object) or EncryptedMessage (object) The search data using which registry search to be performed |
{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "123",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "enrollementstatus",
- "sender_id": "spmis.example.org",
- "receiver_id": "ess.example.org",
- "total_count": 21800,
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "enrolled_criteria": {
- "query_type": "expression",
- "response_entity": "Member",
- "query": {
- "person_identifier": {
- "eq": "ABC451123"
}
}
}
}
}{- "signature": "Signature: namespace=\"spdci\", kidId=\"{sender_id}|{unique_key_id}|{algorithm}\", algorithm=\"ed25519\", created=\"1606970629\", expires=\"1607030629\", headers=\"(created) (expires) digest\", signature=\"Base64(signing content)",
- "header": {
- "version": "1.0.0",
- "message_id": "789",
- "message_ts": "2022-12-04T17:20:07-04:00",
- "action": "txn-on-status",
- "status": "rcvd",
- "status_reason_code": "rjct.version.invalid",
- "status_reason_message": "string",
- "total_count": 21800,
- "completed_count": 50,
- "sender_id": "ess.example.org",
- "receiver_id": "spmis.example.org",
- "is_msg_encrypted": false,
- "meta": { }
}, - "message": {
- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "enrolled_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_message": "string",
- "enrolled_status": "Active"
}
]
}
}| transaction_id required | string <= 99 characters
|
required | Array of objects
|
{- "transaction_id": "XZFHYTY",
- "search_request": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "search_criteria": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_record_type": "Member",
- "query_type": "expression",
- "query": {
- "type": "ns:org:QueryType:expression",
- "value": {
- "expression": {
- "collection": "Group",
- "query": {
- "$and": [
- {
- "poverty_score": {
- "$lt": 5
}
}, - {
- "location": {
- "$eq": "central_region"
}
}, - {
- "group_size": {
- "$lt": 5
}
}
]
}
}
}
}, - "sort": [
- {
- "attribute_name": "poverty_score",
- "sort_order": "asc"
}
], - "pagination": {
- "page_size": 2000,
- "page_number": 5
}, - "consent": {
- "@type": "Consent",
- "ts": {
- "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp"
}, - "purpose": {
- "text": {
- "type": "string"
}, - "code": {
- "type": "string",
- "description": "From a fixed set, documented at refUri"
}, - "ref_uri": {
- "type": "string",
- "format": "uri",
- "description": "Uri to provide more info on consent codes"
}
}
}, - "authorize": {
- "@type": "Authorize",
- "ts": {
- "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp"
}, - "purpose": {
- "text": {
- "type": "string"
}, - "code": {
- "type": "string",
- "description": "From a fixed set, documented at refUri"
}, - "ref_uri": {
- "type": "string",
- "format": "uri",
- "description": "Uri to provide more info on authorize codes"
}
}
}
}, - "locale": "eng"
}
]
}| transaction_id required | string <= 99 characters
|
| correlation_id required | string <= 99 characters ^[a-zA-Z0-9-]+$
|
required | Array of objects |
{- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "search_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "data": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_record_type": "Member",
- "reg_records": [
- {
- "@context": {
}, - "@type": "spdci:member",
- "member_identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "UIN",
- "identifier_value": "42343545654"
}
], - "demographic_info": {
- "@type": "ESSPerson",
- "identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "NationalID",
- "identifier_value": "9876543210"
}
], - "name": {
- "@type": "Name",
- "surname": "Smith",
- "given_name": "Alice",
- "prefix": "Ms.",
- "suffix": ""
}, - "sex": "female",
- "birth_date": "1985-05-20"
}, - "related_person": [
- {
- "@type": "RelatedPerson",
- "relationship_type": "spouse",
- "related_member": {
- "@type": "Member",
- "member_identifier": "M123456789"
}
}, - {
- "@type": "RelatedPerson",
- "relationship_type": "child",
- "related_member": {
- "@type": "Member",
- "spdci:member_identifier": "M987654322"
}
}
], - "is_disabled": false,
- "marital_status": "married",
- "employment_status": "employed",
- "occupation": "teacher",
- "income_level": "middle",
- "language_code": [
- "en",
- "es"
], - "education_level": "bachelor",
- "additional_attributes": [
- {
- "extra_work": "volunteer"
}
], - "registration_date": "2022-01-10T08:00:00Z",
- "last_updated": "2023-06-15T10:00:00Z"
}
]
}, - "pagination": {
- "page_size": 2000,
- "page_number": 5,
- "total_count": 24250
}, - "locale": "eng"
}
]
}| transaction_id required | string <= 99 characters
|
required | Array of objects |
{- "transaction_id": "XZFHYTY",
- "subscribe_request": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "subscribe_criteria": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_event_type": "enrolment",
- "frequency": {
- "start_time": "2022-12-04T17:20:07-04:00",
- "end_time": "2022-12-04T17:20:07-04:00",
- "frequency": "string"
}, - "filter_type": "expression",
- "filter": {
- "type": "ns:org:QueryType:graphql",
- "value": {
- "expression": "query GetMemberByIdentifier {\n member(\n identifier: {\n value: \"1\",\n type: \"uin\"\n }\n ) {\n member_identifier {\n value\n type\n }\n demographic_info {\n name\n gender\n age\n }\n }\n}\n"
}
}, - "notify_record_type": "Member",
- "authorize": {
- "@type": "Authorize",
- "ts": {
- "$ref": "#/components/schemas/SubscriptionInfo/properties/timestamp"
}, - "purpose": {
- "text": {
- "type": "string"
}, - "code": {
- "type": "string",
- "description": "From a fixed set, documented at refUri"
}, - "ref_uri": {
- "type": "string",
- "format": "uri",
- "description": "Uri to provide more info on authorize codes"
}
}
}
}, - "locale": "eng"
}
]
}| transaction_id required | string <= 99 characters
|
| correlation_id required | string <= 99 characters ^[a-zA-Z0-9-]+$
|
required | Array of objects |
{- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "subscribe_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "subscriptions": [
- {
- "version": "1.0.0",
- "code": "string",
- "status": "subscribe",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_event_type": "enrolment",
- "frequency": {
- "start_time": "2022-12-04T17:20:07-04:00",
- "end_time": "2022-12-04T17:20:07-04:00",
- "frequency": "string"
}, - "filter_type": "expression",
- "filter": {
- "type": "ns:org:QueryType:expression",
- "value": {
- "expression": {
- "collection": "Group",
- "query": {
- "$and": [
- {
- "poverty_score": {
- "$lt": 5
}
}, - {
- "location": {
- "$eq": "central_region"
}
}, - {
- "group_size": {
- "$lt": 5
}
}
]
}
}
}
}, - "notify_record_type": "Member",
- "locale": "eng"
}
], - "locale": "eng"
}
]
}| transaction_id required | string <= 99 characters
|
required | Array of objects |
{- "transaction_id": "XZFHYTY",
- "notify_event": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "data": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_event_type": "enrolment",
- "reg_record_type": "Member",
- "reg_records": {
- "type": "object",
- "description": "1. Attributes of a person to create fetch records, create verifiable credentials or use in search criteria.\n3. Allows Country/Registry specific implementation extensions using Attribute Name/Value pairs.\n\n@context: https://schema.spdci.org/core/v1/data/Member.jsonld <br>\n@type: \"@context\" <br>\n",
- "example": {
- "@context": {
}, - "@type": "spdci:member",
- "member_identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "UIN",
- "identifier_value": "42343545654"
}
], - "demographic_info": {
- "@type": "ESSPerson",
- "identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "NationalID",
- "identifier_value": "9876543210"
}
], - "name": {
- "@type": "Name",
- "surname": "Smith",
- "given_name": "Alice",
- "prefix": "Ms.",
- "suffix": ""
}, - "sex": "female",
- "birth_date": "1985-05-20"
}, - "related_person": [
- {
- "@type": "RelatedPerson",
- "relationship_type": "spouse",
- "related_member": {
- "@type": "Member",
- "member_identifier": "M123456789"
}
}, - {
- "@type": "RelatedPerson",
- "relationship_type": "child",
- "related_member": {
- "@type": "Member",
- "spdci:member_identifier": "M987654322"
}
}
], - "is_disabled": false,
- "marital_status": "married",
- "employment_status": "employed",
- "occupation": "teacher",
- "income_level": "middle",
- "language_code": [
- "en",
- "es"
], - "education_level": "bachelor",
- "additional_attributes": [
- {
- "extra_work": "volunteer"
}
], - "registration_date": "2022-01-10T08:00:00Z",
- "last_updated": "2023-06-15T10:00:00Z"
}
}
}, - "locale": "eng"
}
]
}| transaction_id required | string <= 99 characters
|
| timestamp required | string <date-time>
|
| subscription_codes required | Array of strings (SubscriptionCode) [ items <= 99 characters ] |
{- "transaction_id": "XZFHYTY",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "subscription_codes": [
- "string"
]
}| transaction_id required | string <= 99 characters
|
| correlation_id required | string <= 99 characters ^[a-zA-Z0-9-]+$
|
| timestamp required | string <date-time>
|
| status required | string Enum: "rcvd" "pdng" "succ" "rjct" Request (e.g disburse, link, unlink, resolve, issue, search, verify, etc.,) status: |
| status_reason_code | string (UnSubscribeStatusReasonCode) Enum: "rjct.reference_id.invalid" "rjct.reference_id.duplicate" "rjct.timestamp.invalid" "rjct.subscription_code.invalid" "rjct.requester.invalid" "rjct.event.already_unsubscribed" Identity verification request status reason codes |
| status_reason_message | string <= 999 characters Status reason code message. Helps actionanble messaging for systems/end users |
Array of objects |
{- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "subscription_status": [
- {
- "code": "string",
- "status": "subscribe"
}
]
}| transaction_id required | string <= 99 characters
|
required | object Enrolled query |
{- "transaction_id": "XZFHYTY",
- "enrolled_criteria": {
- "query_type": "expression",
- "response_entity": "Member",
- "query": {
- "person_identifier": {
- "eq": "ABC451123"
}
}
}
}| transaction_id required | string <= 99 characters
|
| correlation_id required | string <= 99 characters ^[a-zA-Z0-9-]+$
|
required | Array of objects |
{- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "enrolled_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_message": "string",
- "enrolled_status": "Active"
}
]
}| transaction_id required | string <= 99 characters
|
required | object |
{- "transaction_id": "XZFHYTY",
- "txnstatus_request": {
- "reference_id": "SDFRTYUX",
- "txn_type": "search",
- "attribute_type": "transaction_id",
- "attribute_value": "XZFHYTY",
- "locale": "eng"
}
}| transaction_id required | string <= 99 characters
|
| correlation_id required | string <= 99 characters ^[a-zA-Z0-9-]+$
|
required | object |
{- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "txnstatus_response": {
- "txn_type": "search",
- "txn_status": {
- "transaction_id": "XZFHYTY",
- "correlation_id": "ABC9876543210",
- "search_response": [
- {
- "reference_id": "SDFRTYUX",
- "timestamp": "2022-12-04T17:20:07-04:00",
- "status": "rcvd",
- "status_reason_code": "rjct.reference_id.invalid",
- "status_reason_message": "string",
- "data": {
- "version": "1.0.0",
- "reg_type": "ns:org:RegistryType:ESS",
- "reg_record_type": "Member",
- "reg_records": [
- {
- "@context": {
}, - "@type": "spdci:member",
- "member_identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "UIN",
- "identifier_value": "42343545654"
}
], - "demographic_info": {
- "@type": "ESSPerson",
- "identifier": [
- {
- "@type": "Identifier",
- "identifier_type": "NationalID",
- "identifier_value": "9876543210"
}
], - "name": {
- "@type": "Name",
- "surname": "Smith",
- "given_name": "Alice",
- "prefix": "Ms.",
- "suffix": ""
}, - "sex": "female",
- "birth_date": "1985-05-20"
}, - "related_person": [
- {
- "@type": "RelatedPerson",
- "relationship_type": "spouse",
- "related_member": {
- "@type": "Member",
- "member_identifier": "M123456789"
}
}, - {
- "@type": "RelatedPerson",
- "relationship_type": "child",
- "related_member": {
- "@type": "Member",
- "spdci:member_identifier": "M987654322"
}
}
], - "is_disabled": false,
- "marital_status": "married",
- "employment_status": "employed",
- "occupation": "teacher",
- "income_level": "middle",
- "language_code": [
- "en",
- "es"
], - "education_level": "bachelor",
- "additional_attributes": [
- {
- "extra_work": "volunteer"
}
], - "registration_date": "2022-01-10T08:00:00Z",
- "last_updated": "2023-06-15T10:00:00Z"
}
]
}, - "pagination": {
- "page_size": 2000,
- "page_number": 5,
- "total_count": 24250
}, - "locale": "eng"
}
]
}
}
}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": {
- "alg": "string",
- "enc": "string",
- "kid": "string"
}, - "ciphertext": "string",
- "encrypted_key": "string",
- "tag": "string",
- "iv": "string"
}Identity verification request status reason codes
"rjct.reference_id.invalid"