Skip to main content

Integration Flow

Sequence

lts_v2.png

DARS Api

verify/request

The /verify/request service allows you to ask for verifiable credentials to a user

In order to request verifiable credentials to a user, a proof template (or request) must be previously created for the own organization. The proof request can be configured using Dizme Studio (see documentation)

POST  /verify​/request
Request body:
{
  "business_code": "string",
  "allow_multiple_read": true,
  "request_uid": "string"
}
busines_code : business code of the proof template configured on Dizme Studio.
By example PROOF_01 business code

allow_multiple_read : true value consent to scan many time the same qrcode from several users

request_uid : must be set with an own generated unique identifier for the request, if the attribute is omitted, a unique identifier will be automatically generated 
Example Response body:
{
   "status_code": 100,
   "message_code": 400,
   "message": "Invitation Created!",
   "request_uid": "12345-12345-12345",
   "invitation_short_link": "https://agent.dizme.io/api/v1/invitation/12345-12345-12345"
}


status_code : 100 success, 101 failure
message_code : internal code for operation 400 for “Invitation Created”
message : label for message of the operation
request_uid : the unique identifier of the request already sent or generated by the system.

invitation_short_link: url to be embended into ar qrcode/or to send to the user via other method (sms, email, webpage)

verify/response With this service an organization can confirm or reject a verification. Usually after a confirm verify with a success response an organization makes some business logic check or operation. Based on the result of this operation the organization can decide to confirm or reject the verification. The same Api can be used to “update” the notification status of an existing proof notification .

POST /verify​/response

Request body:
{
  "presentation_id": "string",
  "result": true,
  "descriptions": [
    {
      "lang": "string",
      "message": "string"
    }
  ]
"verify_result": string", (optional)
}


presentation_id : is a unique identifier for a specific outcome of a verification. This value will be received through the confirm verify callback.

result : 

true - if the organization confirms a successful verification for credential
 Example for notification status in wallet

false - if the organization refuse/reject credential data
 Example for notification status in wallet

verify_result

IN_PROGRESS - in combination with result=true can be used to define an in progress verification after received data credential.
Usually is used false when the organization accept the data from the proof response and need some other async operation to complete the verification

descriptions : list of messages description in various language
Example Response body:
{
   "status_code": 100,
   "message_code": 400,
   "message": "Invitation Created!"
}
status_code : 100 success, 101 failure
message_code : internal message code for operation 
message : label for message of the operation

agent/notify/send With this service an organization can send a push notification to the user wallet. In this case can send a message with the queue_item_id

POST /agent​/notify​/send

Request body:
{
  "connection_id": "d36b5123-27a3-45db-a5c1-ba696b42880a",
  "mime-type": "text/html",
  "title": [
    {
      "lang": "it",
      "message": "string"
    },
    {
      "lang": "en",
      "message": "string"
    }
  ],
  "body": [
    {
      "lang": "it",
      "message": "base64 string"
    },
    {
      "lang": "en",
      "message": "base64 string"
    }
  ]
}

connection_id : is a unique identifier for a specific connection with a user wallet. This value will be received through the connection notify callback.

mime-type : text/html for html body message. text/plain for plain text message

title : list of message title in various language

body : list of body title in various language
Example Response body:

{
  "status_code": 0,
  "message_code": 0,
  "message": "string",
  "notify_id": "string"
}


status_code : 100 success, 101 failure
message_code : internal message code for operation 
message : label for message of the operation
notify_id : is a unique identifier for a specific notification.

Callback API

verify/confirm

Upon invocation of this service, all the attributes requested in the verify request will be received.

POST/verification​/verify​/confirm
Request body:
{
  "organization_name": "string",
  "proof_business_code": "string",
  "request_uid": "string",
  "revealed_attributes": {},
  "unrevealed_attributes": {},
  "self_attested_attributes": {},
  "proof_request": {},
  "proof": {},
  "presentation_id": "string",
  "connection_id": "string"
}

example of revealed attribute :

revealed_attributes : {“attribute1”:”value”, “attribute2”:”value}
proof_business_code : business code of the proof template configured.
By example PROOF_01 is configured

request_uid : 
is a unique identifier of the verify request 

organization_name : name of the organization that require the proof

proof_request : raw value of the proof request
proof : raw value of the proof sent by the user wallet

presentation_id : is a unique identifier for a specific outcome of a verification. 

revealed_attributes : all the attributes that comes from credential with the value revealed 

self_attested_attributes : all the attributes that comes from self attested

unrevealed_attributes : all the attributes that comes from credential but without the value

Example Response body:
{
  "status_code": 100,
  "message_code": 0,
  "message": "Success!",
  "result": true,
  "send_response": false,
  "descriptions": [
    {
      "lang": "en",
      "message": "Verifica eseguita con successo"
    },
    {
      "lang": "it",
      "message": "Verify executed successfully"
    }
  ]
}

status_code : 100 success, 101 failure
message_code : internal code for operation 400 for “Invitation Created”
message : label for message of the operation
result : result of the organization verification. The organization accept the data of the proof response 

send_response : 
true -  send the response status to the wallet user

result=true - if the organization confirms a successful verification for credential

result=false - if the organization refuse/reject credential data

false - don’t send the response to the wallet . Usually is used false when the organization accept the data from the proof response and need some other async operation to complete the verification


descriptions: text messages

proof/discard

Forwarded the proof discard sent by the wallet owner

POST owners/proof/discard
Request body:
{
  "connection_id": "string",
  "request_uid": "string",
  "description": "string"
}


connection_id : is a unique identifier for a specific connection with an user wallet. This value will be received through the connection notify callback.

request_uid : 
is a unique identifier of the request that triggered the verification

description : description added from the wallet owner when reject the proof

Example Response body:
{
  "status_code": "100",
  "message_code": "0",
  "message": "Success!"
}


status_code : 100 success, 101 failure
message_code : internal code for operation 400 for “Invitation Created”
message : label for message of the operation