Registry APIs
Details of the Registry APIs to access and manage registry entities
Participating Organisations/Systems Registry APIs
This API is to create a participant in the registry. API generates a unique participant code and returns the code in the response on successfule creation of participant.
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /participant/create HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 486
{
"linked_registry_codes": [
"text"
],
"participant_name": "text",
"scheme_code": "default",
"roles": "payer",
"address": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"primaryEmail": "[email protected]",
"additionalEmail": [
"[email protected]"
],
"phone": [
"080 40004000"
],
"primaryMobile": "9899912323",
"additionalMobile": [
"9100091000",
"9899912323"
],
"status": [
"Created"
],
"signing_cert_path": "text",
"encryption_cert": "text",
"endpoint_url": "https://example.com",
"payment_details": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
{
"participant_code": "pcpt01@HCX01"
}
This API is to retrieve details of a single participant from the registry, using their participant code.
Unique identifier of the participant/scheme on the HCX instance
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
GET /participant/read/{participant_code} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"participant_code": "pcpt01@HCX01",
"linked_registry_codes": [
"text"
],
"participant_name": "text",
"scheme_code": "default",
"roles": "payer",
"address": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"primaryEmail": "[email protected]",
"additionalEmail": [
"[email protected]"
],
"phone": [
"080 40004000"
],
"primaryMobile": "9899912323",
"additionalMobile": [
"9100091000",
"9899912323"
],
"status": [
"Created"
],
"signing_cert_path": "text",
"encryption_cert": "text",
"endpoint_url": "https://example.com",
"payment_details": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
This API is to search for participants in the registry. API returns list of participants matching the input criteria.
Search filter supports all the fields. If multiple filter conditions are provided, they are processed by applying AND operation.
Limit and Offset are optional fields. The limit option allows you to limit the number of rows should be returned in the response, while offset allows you to omit a specified number of rows before the beginning of the result set.
Following are the operations supported by search filter:
-
contains("contains")
-
eq("=")
-
neq("!=")
-
between("range")
-
or("or")
-
startsWith("startsWith")
-
endsWith("endsWith")
-
notContains("notContains")
-
notStartsWith("notStartsWith")
-
notEndsWith("notEndsWith")
-
queryString("queryString")
-
gt(">")
-
lt("<")
-
gte(">=")
-
lte("<=")
Following are few example of search filter usage:
- Filters to fetch the list of participants with role provider and status is Created. Search response will return only 10 participants as the limit is 10.
{
"filters": {
"roles": { "eq": "provider" },
"status": { "eq": "Created" }
},
"limit": 10,
"offset": 0
}
- Filters to fetch the list of participants with role provider and payor.
{
"filters": {
"roles": { "or": ["provider","payor"] }
}
}
- Filters to fetch the list of participants with participant name containing Hospital.
{
"filters": {
"participant_name": { "contains": "Hospital" }
}
}
- Filters with nested fields, the below filter will return list of participants with the given ifsc code.
{
"filters": {
"payment_details.ifsc_code": { "eq": "BANK0001234" }
}
}
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /participant/search HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"filters": {
"participant_code": {
"eq": "pcpt01@HCX01"
}
},
"limit": 10,
"offset": 0
}
{
"timestamp": "1629057611000",
"participants": [
{
"participant_code": "pcpt01@HCX01",
"linked_registry_codes": [
"text"
],
"participant_name": "text",
"scheme_code": "default",
"roles": "payer",
"address": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"primaryEmail": "[email protected]",
"additionalEmail": [
"[email protected]"
],
"phone": [
"080 40004000"
],
"primaryMobile": "9899912323",
"additionalMobile": [
"9100091000",
"9899912323"
],
"status": [
"Created"
],
"signing_cert_path": "text",
"encryption_cert": "text",
"endpoint_url": "https://example.com",
"payment_details": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}
This API is to update a participant's information in the registry. participant_code must be mandatorily provided in the request.
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /participant/update HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 520
{
"participant_code": "pcpt01@HCX01",
"linked_registry_codes": [
"text"
],
"participant_name": "text",
"scheme_code": "default",
"roles": "payer",
"address": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"primaryEmail": "[email protected]",
"additionalEmail": [
"[email protected]"
],
"phone": [
"080 40004000"
],
"primaryMobile": "9899912323",
"additionalMobile": [
"9100091000",
"9899912323"
],
"status": [
"Created"
],
"signing_cert_path": "text",
"encryption_cert": "text",
"endpoint_url": "https://example.com",
"payment_details": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
No content
This API is to delete a participant from the registry. API only does a soft delete of the participant.
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /participant/delete HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"participant_code": "pcpt01@HCX01"
}
No content
Following OpenAPI 3.0 document describes the participant organisations registry and the associated APIs. Same specification can be visualised in Swagger Editor.
User Registry APIs
This API is to create a user in the registry. API generates a unique user id and returns the id in the response on successfull creation of user.
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /user/create HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 219
{
"user_name": "User 01",
"pin": "text",
"mobile": 8522812345,
"email": "user01@domain_name.com",
"linked_user_id": "text",
"tenant_roles": [
{
"participant_code": "pcpt@hcx",
"role": "admin"
}
],
"created_by": "Participant code / user Id"
}
{
"timestamp": "1629057611000",
"user_id": "user01@HCX01"
}
This API is to retrieve details of a single user from the registry, using their user id .
Unique identifier of the user/scheme on the HCX instance
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
GET /user/read/{user_id} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"user_id": "user01@HCX01",
"user_name": "text",
"pin": "text",
"mobile": 8522812345,
"email": "user01@domain_name.com",
"linked_user_id": "text",
"tenant_roles": [
{
"participant_code": "pcpt@hcx",
"role": "admin"
}
],
"created_by": "Participant code / user Id"
}
This API is to search for users in the registry. API returns list of users matching the input criteria.
Search filter supports all the fields. If multiple filter conditions are provided, they are processed by applying AND operation.
Limit and Offset are optional fields. The limit option allows you to limit the number of rows should be returned in the response, while offset allows you to omit a specified number of rows before the beginning of the result set.
Following are the operations supported by search filter:
-
contains("contains")
-
eq("=")
-
neq("!=")
-
between("range")
-
or("or")
-
startsWith("startsWith")
-
endsWith("endsWith")
-
notContains("notContains")
-
notStartsWith("notStartsWith")
-
notEndsWith("notEndsWith")
-
queryString("queryString")
-
gt(">")
-
lt("<")
-
gte(">=")
-
lte("<=")
Following are few example of search filter usage:
- Filters to fetch the list of users with user_id user01@hcx Search response will return the user details.
{
"filters": {
"user_id": { "eq": "user01" }
}
}
- Filters to fetch the list of users with user name containing user01.
{
"filters": {
"user_name": { "contains": "user01" }
}
}
- Filters with nested fields, the below filter will return list of users with the given role .
{
"filters": {
"tenant_roles.roles": { "eq": "admin" }
}
}
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /user/search HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"filters": {
"user_id": {
"eq": "user01@HCX01"
}
},
"limit": 10,
"offset": 0
}
{
"timestamp": "1629057611000",
"users": [
{
"user_id": "user01@HCX01",
"user_name": "text",
"pin": "text",
"mobile": 8522812345,
"email": "user01@domain_name.com",
"linked_user_id": "text",
"tenant_roles": [
{
"participant_code": "pcpt@hcx",
"role": "admin"
}
],
"created_by": "Participant code / user Id"
}
]
}
This API is to update a user's information in the registry. user_id must be mandatorily provided in the request.
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /user/update HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 179
{
"user_id": "user01@HCX01",
"user_name": "user01",
"pin": "text",
"mobile": 8522812345,
"email": "user01@domain_name.com",
"linked_user_id": "text",
"created_by": "Participant code / user Id"
}
{
"timestamp": "1629057611000",
"user_id": "user01@HCX01"
}
This API is to delete a user from the registry. API only does a soft delete of the user.
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /user/delete HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"user_id": "user01@HCX01"
}
{
"timestamp": "1629057611000",
"user_id": "user01@HCX01",
"status": "Inactive"
}
This API is to add users to a participant.
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /participant/user/add HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 134
{
"participant_code": "participant01@HCX01",
"users": [
{
"user_id": "user01",
"role": "viewer"
},
{
"user_id": "user02",
"role": "config-manager"
}
]
}
{
"timestamp": "1629057611000",
"status": "SUCCESS"
}
This API is to remove users from a participant.
OK
Client Error
Resource not found
Downstream systems down/unhandled exceptions.
POST /participant/user/remove HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"participant_code": "participant01@HCX01",
"users": [
"“user01”",
"“user02”"
]
}
{
"timestamp": "1629057611000",
"status": "SUCCESS"
}
Following OpenAPI 3.0 specification details these APIs in detail. These API specs can be opened in swagger editor via this link.
Last updated
Was this helpful?