> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/products/registry/registry/developer-zone/api-documentation/partner-api.md).

# Partner API

APIs available for the Registry Partner ecosystem

## POST /partner/ingest\_data

> Ingest Data

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"paths":{"/partner/ingest_data":{"post":{"tags":["/partner"],"summary":"Ingest Data","operationId":"ingest_data_partner_ingest_data_post","parameters":[{"name":"data_model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestDataResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}},"description":"Internal Server Error"}}}}},"components":{"schemas":{"IngestDataResponse":{"properties":{"response_header":{"$ref":"#/components/schemas/G2PResponseHeader"},"response_body":{"anyOf":[{"$ref":"#/components/schemas/IngestDataResponseBody"},{"type":"null"}]}},"type":"object","required":["response_header"],"title":"IngestDataResponse"},"G2PResponseHeader":{"properties":{"request_id":{"type":"string","title":"Request Id"},"response_status":{"$ref":"#/components/schemas/G2PResponseStatus"},"response_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Error Code"},"response_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Error Message"},"response_timestamp":{"type":"string","format":"date-time","title":"Response Timestamp"}},"type":"object","required":["request_id","response_status","response_timestamp"],"title":"G2PResponseHeader"},"G2PResponseStatus":{"type":"string","enum":["ERROR","SUCCESS"],"title":"G2PResponseStatus"},"IngestDataResponseBody":{"properties":{"pagination_response":{"anyOf":[{"$ref":"#/components/schemas/G2PPaginationResponse"},{"type":"null"}]},"response_payload":{"anyOf":[{"$ref":"#/components/schemas/IngestDataPayload"},{"type":"null"}]}},"type":"object","title":"IngestDataResponseBody"},"G2PPaginationResponse":{"properties":{"number_of_items":{"type":"integer","minimum":0,"title":"Number Of Items"},"number_of_pages":{"type":"integer","minimum":0,"title":"Number Of Pages"}},"type":"object","required":["number_of_items","number_of_pages"],"title":"G2PPaginationResponse"},"IngestDataPayload":{"properties":{"correlation_id":{"type":"string","title":"Correlation Id"}},"type":"object","required":["correlation_id"],"title":"IngestDataPayload"},"ErrorListResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/ErrorResponse"},"type":"array","title":"Errors"}},"type":"object","required":["errors"],"title":"ErrorListResponse"},"ErrorResponse":{"properties":{"code":{"type":"string","title":"Code","default":""},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"ErrorResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## POST /dci/registry/sync/search

> Search

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"paths":{"/dci/registry/sync/search":{"post":{"tags":["/dci/registry"],"summary":"Search","operationId":"search_dci_registry_sync_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DciSearchRequestEnvelope"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DciSearchResponseEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}}}}}}},"components":{"schemas":{"DciSearchRequestEnvelope":{"properties":{"signature":{"type":"string","title":"Signature"},"header":{"$ref":"#/components/schemas/DciRequestHeader"},"message":{"$ref":"#/components/schemas/DciSearchRequest"}},"additionalProperties":true,"type":"object","required":["signature","header","message"],"title":"DciSearchRequestEnvelope"},"DciRequestHeader":{"properties":{"version":{"type":"string","title":"Version"},"message_id":{"type":"string","title":"Message Id"},"message_ts":{"type":"string","title":"Message Ts"},"action":{"type":"string","title":"Action"},"sender_id":{"type":"string","title":"Sender Id"},"sender_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Uri"},"receiver_id":{"type":"string","title":"Receiver Id"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"is_msg_encrypted":{"type":"boolean","title":"Is Msg Encrypted","default":false},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["version","message_id","message_ts","action","sender_id","receiver_id"],"title":"DciRequestHeader"},"DciSearchRequest":{"properties":{"transaction_id":{"type":"string","maxLength":99,"title":"Transaction Id"},"search_request":{"items":{"$ref":"#/components/schemas/DciSearchRequestItem"},"type":"array","title":"Search Request"}},"type":"object","required":["transaction_id","search_request"],"title":"DciSearchRequest"},"DciSearchRequestItem":{"properties":{"reference_id":{"type":"string","maxLength":99,"title":"Reference Id"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"search_criteria":{"$ref":"#/components/schemas/DciSearchCriteria"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale","default":"eng"}},"type":"object","required":["reference_id","search_criteria"],"title":"DciSearchRequestItem"},"DciSearchCriteria":{"properties":{"version":{"type":"string","title":"Version","default":"1.0.0"},"reg_type":{"type":"string","title":"Reg Type"},"reg_record_type":{"type":"string","title":"Reg Record Type"},"query_type":{"type":"string","title":"Query Type"},"query":{"$ref":"#/components/schemas/DciQuery"},"sort":{"anyOf":[{"items":{"$ref":"#/components/schemas/DciSortItem"},"type":"array"},{"type":"null"}],"title":"Sort"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciPagination"},{"type":"null"}]},"consent":{"anyOf":[{"$ref":"#/components/schemas/DciConsent"},{"type":"null"}]},"authorize":{"anyOf":[{"$ref":"#/components/schemas/DciAuthorize"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["reg_type","reg_record_type","query_type","query"],"title":"DciSearchCriteria"},"DciQuery":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"}},"type":"object","required":["type","value"],"title":"DciQuery"},"DciSortItem":{"properties":{"attribute_name":{"type":"string","title":"Attribute Name"},"sort_order":{"type":"string","enum":["asc","desc"],"title":"Sort Order"}},"type":"object","required":["attribute_name","sort_order"],"title":"DciSortItem"},"DciPagination":{"properties":{"page_size":{"type":"integer","minimum":1,"title":"Page Size"},"page_number":{"type":"integer","minimum":1,"title":"Page Number"}},"type":"object","required":["page_size","page_number"],"title":"DciPagination"},"DciConsent":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciConsent"},"DciPurpose":{"properties":{"text":{"anyOf":[{},{"type":"null"}],"title":"Text"},"code":{"anyOf":[{},{"type":"null"}],"title":"Code"},"ref_uri":{"anyOf":[{},{"type":"null"}],"title":"Ref Uri"}},"additionalProperties":true,"type":"object","title":"DciPurpose"},"DciAuthorize":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciAuthorize"},"DciSearchResponseEnvelope":{"properties":{"signature":{"type":"string","title":"Signature","description":"Signature of {header}+{message}"},"header":{"$ref":"#/components/schemas/DciResponseHeader"},"message":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResponse"},{"$ref":"#/components/schemas/DciEncryptedMessage"}],"title":"Message"}},"additionalProperties":true,"type":"object","required":["signature","header","message"],"title":"DciSearchResponseEnvelope","description":"Envelope for POST /registry/on-search\n\n{\n  \"signature\": \"...\",\n  \"header\": { ... },\n  \"message\": { ...SearchResponse... } | { ...EncryptedMessage... }\n}"},"DciResponseHeader":{"properties":{"version":{"type":"string","title":"Version","default":"1.0.0"},"message_id":{"type":"string","title":"Message Id"},"message_ts":{"type":"string","title":"Message Ts"},"action":{"type":"string","title":"Action"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"status_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Code"},"status_reason_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Message"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"completed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed Count"},"sender_id":{"type":"string","title":"Sender Id"},"receiver_id":{"type":"string","title":"Receiver Id"},"sender_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Uri"},"is_msg_encrypted":{"type":"boolean","title":"Is Msg Encrypted","default":false},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"additionalProperties":true,"type":"object","required":["message_id","message_ts","action","sender_id","receiver_id"],"title":"DciResponseHeader","description":"Message header for on-search responses"},"DciSearchResponse":{"properties":{"transaction_id":{"type":"string","maxLength":99,"title":"Transaction Id","description":"Transaction identifier"},"correlation_id":{"type":"string","maxLength":99,"title":"Correlation Id","description":"Correlation identifier assigned by responder"},"search_response":{"items":{"$ref":"#/components/schemas/DciSearchResponseItem"},"type":"array","minItems":0,"title":"Search Response","description":"Array of search response entries"}},"type":"object","required":["transaction_id","correlation_id","search_response"],"title":"DciSearchResponse","description":"message payload for /registry/on-search"},"DciSearchResponseItem":{"properties":{"reference_id":{"type":"string","maxLength":99,"title":"Reference Id","description":"Reference id from corresponding SearchRequest"},"timestamp":{"type":"string","title":"Timestamp","description":"ISO-8601 timestamp"},"status":{"type":"string","title":"Status","description":"Enum: \"rcvd\", \"pdng\", \"succ\", \"rjct\""},"status_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Code","description":"Reason code explaining the status"},"status_reason_message":{"anyOf":[{"type":"string","maxLength":999},{"type":"null"}],"title":"Status Reason Message","description":"Human-readable status reason message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResultData"},{"type":"null"}],"description":"Search result data payload"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResultPagination"},{"type":"null"}],"description":"Pagination information for this result"},"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale","description":"Locale, e.g. 'en' or 'eng'"}},"additionalProperties":true,"type":"object","required":["reference_id","timestamp","status"],"title":"DciSearchResponseItem","description":"One entry in message.search_response[]"},"DciSearchResultData":{"properties":{"version":{"type":"string","title":"Version","description":"Schema version","default":"1.0.0"},"reg_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Type","description":"Registry type, e.g. ns:org:RegistryType:FR"},"reg_record_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Record Type","description":"Registry record type, e.g. spdci-extensions-dci:Farmer"},"reg_records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reg Records","description":"List of registry records (opaque JSON-LD objects)"}},"additionalProperties":true,"type":"object","required":["reg_records"],"title":"DciSearchResultData","description":"SearchResponse.search_response[i].data\n\nRegistry response payload.\nDeep registry objects are intentionally treated as opaque JSON."},"DciSearchResultPagination":{"properties":{"page_size":{"type":"integer","title":"Page Size","description":"Number of records per page"},"page_number":{"type":"integer","title":"Page Number","description":"Current page number (1-based)"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Total number of records matching query"}},"type":"object","required":["page_size","page_number"],"title":"DciSearchResultPagination","description":"SearchResponse.search_response[i].pagination"},"DciEncryptedMessage":{"properties":{"header":{"additionalProperties":true,"type":"object","title":"Header"},"ciphertext":{"type":"string","title":"Ciphertext"},"encrypted_key":{"type":"string","title":"Encrypted Key"},"tag":{"type":"string","title":"Tag"},"iv":{"type":"string","title":"Iv"}},"type":"object","required":["header","ciphertext","encrypted_key","tag","iv"],"title":"DciEncryptedMessage"},"ErrorListResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/ErrorResponse"},"type":"array","title":"Errors"}},"type":"object","required":["errors"],"title":"ErrorListResponse"},"ErrorResponse":{"properties":{"code":{"type":"string","title":"Code","default":""},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"ErrorResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Ping

> Returns "pong" always, if the service is healthy.\
> This can also used for service health checks.

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"paths":{"/ping":{"get":{"tags":["ping"],"summary":"Get Ping","description":"Returns \"pong\" always, if the service is healthy.\nThis can also used for service health checks.","operationId":"get_ping_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorListResponse"}}}}}}}},"components":{"schemas":{"ErrorListResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/ErrorResponse"},"type":"array","title":"Errors"}},"type":"object","required":["errors"],"title":"ErrorListResponse"},"ErrorResponse":{"properties":{"code":{"type":"string","title":"Code","default":""},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"ErrorResponse"}}}}
```

## The DciAuthorize object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciAuthorize":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciAuthorize"},"DciPurpose":{"properties":{"text":{"anyOf":[{},{"type":"null"}],"title":"Text"},"code":{"anyOf":[{},{"type":"null"}],"title":"Code"},"ref_uri":{"anyOf":[{},{"type":"null"}],"title":"Ref Uri"}},"additionalProperties":true,"type":"object","title":"DciPurpose"}}}}
```

## The DciConsent object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciConsent":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciConsent"},"DciPurpose":{"properties":{"text":{"anyOf":[{},{"type":"null"}],"title":"Text"},"code":{"anyOf":[{},{"type":"null"}],"title":"Code"},"ref_uri":{"anyOf":[{},{"type":"null"}],"title":"Ref Uri"}},"additionalProperties":true,"type":"object","title":"DciPurpose"}}}}
```

## The DciEncryptedMessage object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciEncryptedMessage":{"properties":{"header":{"additionalProperties":true,"type":"object","title":"Header"},"ciphertext":{"type":"string","title":"Ciphertext"},"encrypted_key":{"type":"string","title":"Encrypted Key"},"tag":{"type":"string","title":"Tag"},"iv":{"type":"string","title":"Iv"}},"type":"object","required":["header","ciphertext","encrypted_key","tag","iv"],"title":"DciEncryptedMessage"}}}}
```

## The DciPagination object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciPagination":{"properties":{"page_size":{"type":"integer","minimum":1,"title":"Page Size"},"page_number":{"type":"integer","minimum":1,"title":"Page Number"}},"type":"object","required":["page_size","page_number"],"title":"DciPagination"}}}}
```

## The DciPurpose object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciPurpose":{"properties":{"text":{"anyOf":[{},{"type":"null"}],"title":"Text"},"code":{"anyOf":[{},{"type":"null"}],"title":"Code"},"ref_uri":{"anyOf":[{},{"type":"null"}],"title":"Ref Uri"}},"additionalProperties":true,"type":"object","title":"DciPurpose"}}}}
```

## The DciQuery object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciQuery":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"}},"type":"object","required":["type","value"],"title":"DciQuery"}}}}
```

## The DciRequestHeader object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciRequestHeader":{"properties":{"version":{"type":"string","title":"Version"},"message_id":{"type":"string","title":"Message Id"},"message_ts":{"type":"string","title":"Message Ts"},"action":{"type":"string","title":"Action"},"sender_id":{"type":"string","title":"Sender Id"},"sender_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Uri"},"receiver_id":{"type":"string","title":"Receiver Id"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"is_msg_encrypted":{"type":"boolean","title":"Is Msg Encrypted","default":false},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["version","message_id","message_ts","action","sender_id","receiver_id"],"title":"DciRequestHeader"}}}}
```

## The DciResponseHeader object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciResponseHeader":{"properties":{"version":{"type":"string","title":"Version","default":"1.0.0"},"message_id":{"type":"string","title":"Message Id"},"message_ts":{"type":"string","title":"Message Ts"},"action":{"type":"string","title":"Action"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"status_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Code"},"status_reason_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Message"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"completed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed Count"},"sender_id":{"type":"string","title":"Sender Id"},"receiver_id":{"type":"string","title":"Receiver Id"},"sender_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Uri"},"is_msg_encrypted":{"type":"boolean","title":"Is Msg Encrypted","default":false},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"additionalProperties":true,"type":"object","required":["message_id","message_ts","action","sender_id","receiver_id"],"title":"DciResponseHeader","description":"Message header for on-search responses"}}}}
```

## The DciSearchCriteria object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchCriteria":{"properties":{"version":{"type":"string","title":"Version","default":"1.0.0"},"reg_type":{"type":"string","title":"Reg Type"},"reg_record_type":{"type":"string","title":"Reg Record Type"},"query_type":{"type":"string","title":"Query Type"},"query":{"$ref":"#/components/schemas/DciQuery"},"sort":{"anyOf":[{"items":{"$ref":"#/components/schemas/DciSortItem"},"type":"array"},{"type":"null"}],"title":"Sort"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciPagination"},{"type":"null"}]},"consent":{"anyOf":[{"$ref":"#/components/schemas/DciConsent"},{"type":"null"}]},"authorize":{"anyOf":[{"$ref":"#/components/schemas/DciAuthorize"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["reg_type","reg_record_type","query_type","query"],"title":"DciSearchCriteria"},"DciQuery":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"}},"type":"object","required":["type","value"],"title":"DciQuery"},"DciSortItem":{"properties":{"attribute_name":{"type":"string","title":"Attribute Name"},"sort_order":{"type":"string","enum":["asc","desc"],"title":"Sort Order"}},"type":"object","required":["attribute_name","sort_order"],"title":"DciSortItem"},"DciPagination":{"properties":{"page_size":{"type":"integer","minimum":1,"title":"Page Size"},"page_number":{"type":"integer","minimum":1,"title":"Page Number"}},"type":"object","required":["page_size","page_number"],"title":"DciPagination"},"DciConsent":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciConsent"},"DciPurpose":{"properties":{"text":{"anyOf":[{},{"type":"null"}],"title":"Text"},"code":{"anyOf":[{},{"type":"null"}],"title":"Code"},"ref_uri":{"anyOf":[{},{"type":"null"}],"title":"Ref Uri"}},"additionalProperties":true,"type":"object","title":"DciPurpose"},"DciAuthorize":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciAuthorize"}}}}
```

## The DciSearchRequest object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchRequest":{"properties":{"transaction_id":{"type":"string","maxLength":99,"title":"Transaction Id"},"search_request":{"items":{"$ref":"#/components/schemas/DciSearchRequestItem"},"type":"array","title":"Search Request"}},"type":"object","required":["transaction_id","search_request"],"title":"DciSearchRequest"},"DciSearchRequestItem":{"properties":{"reference_id":{"type":"string","maxLength":99,"title":"Reference Id"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"search_criteria":{"$ref":"#/components/schemas/DciSearchCriteria"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale","default":"eng"}},"type":"object","required":["reference_id","search_criteria"],"title":"DciSearchRequestItem"},"DciSearchCriteria":{"properties":{"version":{"type":"string","title":"Version","default":"1.0.0"},"reg_type":{"type":"string","title":"Reg Type"},"reg_record_type":{"type":"string","title":"Reg Record Type"},"query_type":{"type":"string","title":"Query Type"},"query":{"$ref":"#/components/schemas/DciQuery"},"sort":{"anyOf":[{"items":{"$ref":"#/components/schemas/DciSortItem"},"type":"array"},{"type":"null"}],"title":"Sort"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciPagination"},{"type":"null"}]},"consent":{"anyOf":[{"$ref":"#/components/schemas/DciConsent"},{"type":"null"}]},"authorize":{"anyOf":[{"$ref":"#/components/schemas/DciAuthorize"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["reg_type","reg_record_type","query_type","query"],"title":"DciSearchCriteria"},"DciQuery":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"}},"type":"object","required":["type","value"],"title":"DciQuery"},"DciSortItem":{"properties":{"attribute_name":{"type":"string","title":"Attribute Name"},"sort_order":{"type":"string","enum":["asc","desc"],"title":"Sort Order"}},"type":"object","required":["attribute_name","sort_order"],"title":"DciSortItem"},"DciPagination":{"properties":{"page_size":{"type":"integer","minimum":1,"title":"Page Size"},"page_number":{"type":"integer","minimum":1,"title":"Page Number"}},"type":"object","required":["page_size","page_number"],"title":"DciPagination"},"DciConsent":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciConsent"},"DciPurpose":{"properties":{"text":{"anyOf":[{},{"type":"null"}],"title":"Text"},"code":{"anyOf":[{},{"type":"null"}],"title":"Code"},"ref_uri":{"anyOf":[{},{"type":"null"}],"title":"Ref Uri"}},"additionalProperties":true,"type":"object","title":"DciPurpose"},"DciAuthorize":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciAuthorize"}}}}
```

## The DciSearchRequestEnvelope object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchRequestEnvelope":{"properties":{"signature":{"type":"string","title":"Signature"},"header":{"$ref":"#/components/schemas/DciRequestHeader"},"message":{"$ref":"#/components/schemas/DciSearchRequest"}},"additionalProperties":true,"type":"object","required":["signature","header","message"],"title":"DciSearchRequestEnvelope"},"DciRequestHeader":{"properties":{"version":{"type":"string","title":"Version"},"message_id":{"type":"string","title":"Message Id"},"message_ts":{"type":"string","title":"Message Ts"},"action":{"type":"string","title":"Action"},"sender_id":{"type":"string","title":"Sender Id"},"sender_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Uri"},"receiver_id":{"type":"string","title":"Receiver Id"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"is_msg_encrypted":{"type":"boolean","title":"Is Msg Encrypted","default":false},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["version","message_id","message_ts","action","sender_id","receiver_id"],"title":"DciRequestHeader"},"DciSearchRequest":{"properties":{"transaction_id":{"type":"string","maxLength":99,"title":"Transaction Id"},"search_request":{"items":{"$ref":"#/components/schemas/DciSearchRequestItem"},"type":"array","title":"Search Request"}},"type":"object","required":["transaction_id","search_request"],"title":"DciSearchRequest"},"DciSearchRequestItem":{"properties":{"reference_id":{"type":"string","maxLength":99,"title":"Reference Id"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"search_criteria":{"$ref":"#/components/schemas/DciSearchCriteria"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale","default":"eng"}},"type":"object","required":["reference_id","search_criteria"],"title":"DciSearchRequestItem"},"DciSearchCriteria":{"properties":{"version":{"type":"string","title":"Version","default":"1.0.0"},"reg_type":{"type":"string","title":"Reg Type"},"reg_record_type":{"type":"string","title":"Reg Record Type"},"query_type":{"type":"string","title":"Query Type"},"query":{"$ref":"#/components/schemas/DciQuery"},"sort":{"anyOf":[{"items":{"$ref":"#/components/schemas/DciSortItem"},"type":"array"},{"type":"null"}],"title":"Sort"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciPagination"},{"type":"null"}]},"consent":{"anyOf":[{"$ref":"#/components/schemas/DciConsent"},{"type":"null"}]},"authorize":{"anyOf":[{"$ref":"#/components/schemas/DciAuthorize"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["reg_type","reg_record_type","query_type","query"],"title":"DciSearchCriteria"},"DciQuery":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"}},"type":"object","required":["type","value"],"title":"DciQuery"},"DciSortItem":{"properties":{"attribute_name":{"type":"string","title":"Attribute Name"},"sort_order":{"type":"string","enum":["asc","desc"],"title":"Sort Order"}},"type":"object","required":["attribute_name","sort_order"],"title":"DciSortItem"},"DciPagination":{"properties":{"page_size":{"type":"integer","minimum":1,"title":"Page Size"},"page_number":{"type":"integer","minimum":1,"title":"Page Number"}},"type":"object","required":["page_size","page_number"],"title":"DciPagination"},"DciConsent":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciConsent"},"DciPurpose":{"properties":{"text":{"anyOf":[{},{"type":"null"}],"title":"Text"},"code":{"anyOf":[{},{"type":"null"}],"title":"Code"},"ref_uri":{"anyOf":[{},{"type":"null"}],"title":"Ref Uri"}},"additionalProperties":true,"type":"object","title":"DciPurpose"},"DciAuthorize":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciAuthorize"}}}}
```

## The DciSearchRequestItem object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchRequestItem":{"properties":{"reference_id":{"type":"string","maxLength":99,"title":"Reference Id"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"search_criteria":{"$ref":"#/components/schemas/DciSearchCriteria"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale","default":"eng"}},"type":"object","required":["reference_id","search_criteria"],"title":"DciSearchRequestItem"},"DciSearchCriteria":{"properties":{"version":{"type":"string","title":"Version","default":"1.0.0"},"reg_type":{"type":"string","title":"Reg Type"},"reg_record_type":{"type":"string","title":"Reg Record Type"},"query_type":{"type":"string","title":"Query Type"},"query":{"$ref":"#/components/schemas/DciQuery"},"sort":{"anyOf":[{"items":{"$ref":"#/components/schemas/DciSortItem"},"type":"array"},{"type":"null"}],"title":"Sort"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciPagination"},{"type":"null"}]},"consent":{"anyOf":[{"$ref":"#/components/schemas/DciConsent"},{"type":"null"}]},"authorize":{"anyOf":[{"$ref":"#/components/schemas/DciAuthorize"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["reg_type","reg_record_type","query_type","query"],"title":"DciSearchCriteria"},"DciQuery":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"}},"type":"object","required":["type","value"],"title":"DciQuery"},"DciSortItem":{"properties":{"attribute_name":{"type":"string","title":"Attribute Name"},"sort_order":{"type":"string","enum":["asc","desc"],"title":"Sort Order"}},"type":"object","required":["attribute_name","sort_order"],"title":"DciSortItem"},"DciPagination":{"properties":{"page_size":{"type":"integer","minimum":1,"title":"Page Size"},"page_number":{"type":"integer","minimum":1,"title":"Page Number"}},"type":"object","required":["page_size","page_number"],"title":"DciPagination"},"DciConsent":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciConsent"},"DciPurpose":{"properties":{"text":{"anyOf":[{},{"type":"null"}],"title":"Text"},"code":{"anyOf":[{},{"type":"null"}],"title":"Code"},"ref_uri":{"anyOf":[{},{"type":"null"}],"title":"Ref Uri"}},"additionalProperties":true,"type":"object","title":"DciPurpose"},"DciAuthorize":{"properties":{"@context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Context"},"@type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"@Type"},"ts":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ts"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/DciPurpose"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"DciAuthorize"}}}}
```

## The DciSearchResponse object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchResponse":{"properties":{"transaction_id":{"type":"string","maxLength":99,"title":"Transaction Id","description":"Transaction identifier"},"correlation_id":{"type":"string","maxLength":99,"title":"Correlation Id","description":"Correlation identifier assigned by responder"},"search_response":{"items":{"$ref":"#/components/schemas/DciSearchResponseItem"},"type":"array","minItems":0,"title":"Search Response","description":"Array of search response entries"}},"type":"object","required":["transaction_id","correlation_id","search_response"],"title":"DciSearchResponse","description":"message payload for /registry/on-search"},"DciSearchResponseItem":{"properties":{"reference_id":{"type":"string","maxLength":99,"title":"Reference Id","description":"Reference id from corresponding SearchRequest"},"timestamp":{"type":"string","title":"Timestamp","description":"ISO-8601 timestamp"},"status":{"type":"string","title":"Status","description":"Enum: \"rcvd\", \"pdng\", \"succ\", \"rjct\""},"status_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Code","description":"Reason code explaining the status"},"status_reason_message":{"anyOf":[{"type":"string","maxLength":999},{"type":"null"}],"title":"Status Reason Message","description":"Human-readable status reason message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResultData"},{"type":"null"}],"description":"Search result data payload"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResultPagination"},{"type":"null"}],"description":"Pagination information for this result"},"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale","description":"Locale, e.g. 'en' or 'eng'"}},"additionalProperties":true,"type":"object","required":["reference_id","timestamp","status"],"title":"DciSearchResponseItem","description":"One entry in message.search_response[]"},"DciSearchResultData":{"properties":{"version":{"type":"string","title":"Version","description":"Schema version","default":"1.0.0"},"reg_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Type","description":"Registry type, e.g. ns:org:RegistryType:FR"},"reg_record_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Record Type","description":"Registry record type, e.g. spdci-extensions-dci:Farmer"},"reg_records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reg Records","description":"List of registry records (opaque JSON-LD objects)"}},"additionalProperties":true,"type":"object","required":["reg_records"],"title":"DciSearchResultData","description":"SearchResponse.search_response[i].data\n\nRegistry response payload.\nDeep registry objects are intentionally treated as opaque JSON."},"DciSearchResultPagination":{"properties":{"page_size":{"type":"integer","title":"Page Size","description":"Number of records per page"},"page_number":{"type":"integer","title":"Page Number","description":"Current page number (1-based)"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Total number of records matching query"}},"type":"object","required":["page_size","page_number"],"title":"DciSearchResultPagination","description":"SearchResponse.search_response[i].pagination"}}}}
```

## The DciSearchResponseEnvelope object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchResponseEnvelope":{"properties":{"signature":{"type":"string","title":"Signature","description":"Signature of {header}+{message}"},"header":{"$ref":"#/components/schemas/DciResponseHeader"},"message":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResponse"},{"$ref":"#/components/schemas/DciEncryptedMessage"}],"title":"Message"}},"additionalProperties":true,"type":"object","required":["signature","header","message"],"title":"DciSearchResponseEnvelope","description":"Envelope for POST /registry/on-search\n\n{\n  \"signature\": \"...\",\n  \"header\": { ... },\n  \"message\": { ...SearchResponse... } | { ...EncryptedMessage... }\n}"},"DciResponseHeader":{"properties":{"version":{"type":"string","title":"Version","default":"1.0.0"},"message_id":{"type":"string","title":"Message Id"},"message_ts":{"type":"string","title":"Message Ts"},"action":{"type":"string","title":"Action"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"status_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Code"},"status_reason_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Message"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"completed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed Count"},"sender_id":{"type":"string","title":"Sender Id"},"receiver_id":{"type":"string","title":"Receiver Id"},"sender_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Uri"},"is_msg_encrypted":{"type":"boolean","title":"Is Msg Encrypted","default":false},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"additionalProperties":true,"type":"object","required":["message_id","message_ts","action","sender_id","receiver_id"],"title":"DciResponseHeader","description":"Message header for on-search responses"},"DciSearchResponse":{"properties":{"transaction_id":{"type":"string","maxLength":99,"title":"Transaction Id","description":"Transaction identifier"},"correlation_id":{"type":"string","maxLength":99,"title":"Correlation Id","description":"Correlation identifier assigned by responder"},"search_response":{"items":{"$ref":"#/components/schemas/DciSearchResponseItem"},"type":"array","minItems":0,"title":"Search Response","description":"Array of search response entries"}},"type":"object","required":["transaction_id","correlation_id","search_response"],"title":"DciSearchResponse","description":"message payload for /registry/on-search"},"DciSearchResponseItem":{"properties":{"reference_id":{"type":"string","maxLength":99,"title":"Reference Id","description":"Reference id from corresponding SearchRequest"},"timestamp":{"type":"string","title":"Timestamp","description":"ISO-8601 timestamp"},"status":{"type":"string","title":"Status","description":"Enum: \"rcvd\", \"pdng\", \"succ\", \"rjct\""},"status_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Code","description":"Reason code explaining the status"},"status_reason_message":{"anyOf":[{"type":"string","maxLength":999},{"type":"null"}],"title":"Status Reason Message","description":"Human-readable status reason message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResultData"},{"type":"null"}],"description":"Search result data payload"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResultPagination"},{"type":"null"}],"description":"Pagination information for this result"},"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale","description":"Locale, e.g. 'en' or 'eng'"}},"additionalProperties":true,"type":"object","required":["reference_id","timestamp","status"],"title":"DciSearchResponseItem","description":"One entry in message.search_response[]"},"DciSearchResultData":{"properties":{"version":{"type":"string","title":"Version","description":"Schema version","default":"1.0.0"},"reg_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Type","description":"Registry type, e.g. ns:org:RegistryType:FR"},"reg_record_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Record Type","description":"Registry record type, e.g. spdci-extensions-dci:Farmer"},"reg_records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reg Records","description":"List of registry records (opaque JSON-LD objects)"}},"additionalProperties":true,"type":"object","required":["reg_records"],"title":"DciSearchResultData","description":"SearchResponse.search_response[i].data\n\nRegistry response payload.\nDeep registry objects are intentionally treated as opaque JSON."},"DciSearchResultPagination":{"properties":{"page_size":{"type":"integer","title":"Page Size","description":"Number of records per page"},"page_number":{"type":"integer","title":"Page Number","description":"Current page number (1-based)"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Total number of records matching query"}},"type":"object","required":["page_size","page_number"],"title":"DciSearchResultPagination","description":"SearchResponse.search_response[i].pagination"},"DciEncryptedMessage":{"properties":{"header":{"additionalProperties":true,"type":"object","title":"Header"},"ciphertext":{"type":"string","title":"Ciphertext"},"encrypted_key":{"type":"string","title":"Encrypted Key"},"tag":{"type":"string","title":"Tag"},"iv":{"type":"string","title":"Iv"}},"type":"object","required":["header","ciphertext","encrypted_key","tag","iv"],"title":"DciEncryptedMessage"}}}}
```

## The DciSearchResponseItem object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchResponseItem":{"properties":{"reference_id":{"type":"string","maxLength":99,"title":"Reference Id","description":"Reference id from corresponding SearchRequest"},"timestamp":{"type":"string","title":"Timestamp","description":"ISO-8601 timestamp"},"status":{"type":"string","title":"Status","description":"Enum: \"rcvd\", \"pdng\", \"succ\", \"rjct\""},"status_reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason Code","description":"Reason code explaining the status"},"status_reason_message":{"anyOf":[{"type":"string","maxLength":999},{"type":"null"}],"title":"Status Reason Message","description":"Human-readable status reason message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResultData"},{"type":"null"}],"description":"Search result data payload"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/DciSearchResultPagination"},{"type":"null"}],"description":"Pagination information for this result"},"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale","description":"Locale, e.g. 'en' or 'eng'"}},"additionalProperties":true,"type":"object","required":["reference_id","timestamp","status"],"title":"DciSearchResponseItem","description":"One entry in message.search_response[]"},"DciSearchResultData":{"properties":{"version":{"type":"string","title":"Version","description":"Schema version","default":"1.0.0"},"reg_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Type","description":"Registry type, e.g. ns:org:RegistryType:FR"},"reg_record_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Record Type","description":"Registry record type, e.g. spdci-extensions-dci:Farmer"},"reg_records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reg Records","description":"List of registry records (opaque JSON-LD objects)"}},"additionalProperties":true,"type":"object","required":["reg_records"],"title":"DciSearchResultData","description":"SearchResponse.search_response[i].data\n\nRegistry response payload.\nDeep registry objects are intentionally treated as opaque JSON."},"DciSearchResultPagination":{"properties":{"page_size":{"type":"integer","title":"Page Size","description":"Number of records per page"},"page_number":{"type":"integer","title":"Page Number","description":"Current page number (1-based)"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Total number of records matching query"}},"type":"object","required":["page_size","page_number"],"title":"DciSearchResultPagination","description":"SearchResponse.search_response[i].pagination"}}}}
```

## The DciSearchResultData object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchResultData":{"properties":{"version":{"type":"string","title":"Version","description":"Schema version","default":"1.0.0"},"reg_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Type","description":"Registry type, e.g. ns:org:RegistryType:FR"},"reg_record_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg Record Type","description":"Registry record type, e.g. spdci-extensions-dci:Farmer"},"reg_records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reg Records","description":"List of registry records (opaque JSON-LD objects)"}},"additionalProperties":true,"type":"object","required":["reg_records"],"title":"DciSearchResultData","description":"SearchResponse.search_response[i].data\n\nRegistry response payload.\nDeep registry objects are intentionally treated as opaque JSON."}}}}
```

## The DciSearchResultPagination object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSearchResultPagination":{"properties":{"page_size":{"type":"integer","title":"Page Size","description":"Number of records per page"},"page_number":{"type":"integer","title":"Page Number","description":"Current page number (1-based)"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Total number of records matching query"}},"type":"object","required":["page_size","page_number"],"title":"DciSearchResultPagination","description":"SearchResponse.search_response[i].pagination"}}}}
```

## The DciSortItem object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"DciSortItem":{"properties":{"attribute_name":{"type":"string","title":"Attribute Name"},"sort_order":{"type":"string","enum":["asc","desc"],"title":"Sort Order"}},"type":"object","required":["attribute_name","sort_order"],"title":"DciSortItem"}}}}
```

## The ErrorListResponse object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"ErrorListResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/ErrorResponse"},"type":"array","title":"Errors"}},"type":"object","required":["errors"],"title":"ErrorListResponse"},"ErrorResponse":{"properties":{"code":{"type":"string","title":"Code","default":""},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"ErrorResponse"}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"ErrorResponse":{"properties":{"code":{"type":"string","title":"Code","default":""},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"ErrorResponse"}}}}
```

## The G2PPaginationResponse object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"G2PPaginationResponse":{"properties":{"number_of_items":{"type":"integer","minimum":0,"title":"Number Of Items"},"number_of_pages":{"type":"integer","minimum":0,"title":"Number Of Pages"}},"type":"object","required":["number_of_items","number_of_pages"],"title":"G2PPaginationResponse"}}}}
```

## The G2PResponseHeader object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"G2PResponseHeader":{"properties":{"request_id":{"type":"string","title":"Request Id"},"response_status":{"$ref":"#/components/schemas/G2PResponseStatus"},"response_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Error Code"},"response_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Error Message"},"response_timestamp":{"type":"string","format":"date-time","title":"Response Timestamp"}},"type":"object","required":["request_id","response_status","response_timestamp"],"title":"G2PResponseHeader"},"G2PResponseStatus":{"type":"string","enum":["ERROR","SUCCESS"],"title":"G2PResponseStatus"}}}}
```

## The G2PResponseStatus object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"G2PResponseStatus":{"type":"string","enum":["ERROR","SUCCESS"],"title":"G2PResponseStatus"}}}}
```

## The HTTPValidationError object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## The IngestDataPayload object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"IngestDataPayload":{"properties":{"correlation_id":{"type":"string","title":"Correlation Id"}},"type":"object","required":["correlation_id"],"title":"IngestDataPayload"}}}}
```

## The IngestDataResponse object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"IngestDataResponse":{"properties":{"response_header":{"$ref":"#/components/schemas/G2PResponseHeader"},"response_body":{"anyOf":[{"$ref":"#/components/schemas/IngestDataResponseBody"},{"type":"null"}]}},"type":"object","required":["response_header"],"title":"IngestDataResponse"},"G2PResponseHeader":{"properties":{"request_id":{"type":"string","title":"Request Id"},"response_status":{"$ref":"#/components/schemas/G2PResponseStatus"},"response_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Error Code"},"response_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Error Message"},"response_timestamp":{"type":"string","format":"date-time","title":"Response Timestamp"}},"type":"object","required":["request_id","response_status","response_timestamp"],"title":"G2PResponseHeader"},"G2PResponseStatus":{"type":"string","enum":["ERROR","SUCCESS"],"title":"G2PResponseStatus"},"IngestDataResponseBody":{"properties":{"pagination_response":{"anyOf":[{"$ref":"#/components/schemas/G2PPaginationResponse"},{"type":"null"}]},"response_payload":{"anyOf":[{"$ref":"#/components/schemas/IngestDataPayload"},{"type":"null"}]}},"type":"object","title":"IngestDataResponseBody"},"G2PPaginationResponse":{"properties":{"number_of_items":{"type":"integer","minimum":0,"title":"Number Of Items"},"number_of_pages":{"type":"integer","minimum":0,"title":"Number Of Pages"}},"type":"object","required":["number_of_items","number_of_pages"],"title":"G2PPaginationResponse"},"IngestDataPayload":{"properties":{"correlation_id":{"type":"string","title":"Correlation Id"}},"type":"object","required":["correlation_id"],"title":"IngestDataPayload"}}}}
```

## The IngestDataResponseBody object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"IngestDataResponseBody":{"properties":{"pagination_response":{"anyOf":[{"$ref":"#/components/schemas/G2PPaginationResponse"},{"type":"null"}]},"response_payload":{"anyOf":[{"$ref":"#/components/schemas/IngestDataPayload"},{"type":"null"}]}},"type":"object","title":"IngestDataResponseBody"},"G2PPaginationResponse":{"properties":{"number_of_items":{"type":"integer","minimum":0,"title":"Number Of Items"},"number_of_pages":{"type":"integer","minimum":0,"title":"Number Of Pages"}},"type":"object","required":["number_of_items","number_of_pages"],"title":"G2PPaginationResponse"},"IngestDataPayload":{"properties":{"correlation_id":{"type":"string","title":"Correlation Id"}},"type":"object","required":["correlation_id"],"title":"IngestDataPayload"}}}}
```

## The ValidationError object

```json
{"openapi":"3.1.0","info":{"title":"OpenG2P Registry Beneficiary Portal API","version":"2.0.0"},"components":{"schemas":{"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openg2p.org/products/registry/registry/developer-zone/api-documentation/partner-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
