Credentials This API suite focuses on defining the types of verifiable credentials.
Retrieve the list of issued credential offers
GET
/api/v1/vc/offers
Retrieves the list of issued credential offers (no thid) or a specific offer (thid specified), either pending, accepted, or issued (point of view of Received or Issuer).
Headers
Name Value apikey = {Alice or Bob's key}
Query param
Response
200 401
Copy {
"data" : [
{
"recordId" : "61faa8cb-7bc9-4c41-a0e5-7c10d81dd98f" ,
"thid" : "87323d88-51ec-424f-882a-a1f2655888db" ,
"credentialFormat" : "JWT" ,
"validityPeriod" : 3600 ,
"claims" : {
"uid" : "12345" ,
"name" : "Stable Diffusion SDXL"
} ,
"automaticIssuance" : false ,
"createdAt" : "2024-10-03T15:28:01.776806Z" ,
"updatedAt" : "2024-10-03T15:28:02.395132Z" ,
"role" : "Issuer" ,
"protocolState" : "OfferSent" ,
"metaRetries" : 5
}
]
}
Get first Credential that matches a type
point of view of Holder or Issuer
GET
/api/v1/vc/match/{type}
Headers
Name Value apikey = {Alice or Bob's key}
Params
Response
200 401
Copy {
"data" : {
"recordId" : "fde44892-7269-45fb-ab80-b88869450cd0" ,
"vc" : {
"recordId" : "fde44892-7269-45fb-ab80-b88869450cd0" ,
"thid" : "259caa16-25db-48d0-a0d9-4400818ab2e0" ,
"credentialFormat" : "JWT" ,
"subjectId" : "did:prism:ca602ff65d8021bb4b77cbce6df6917e0b062d73f8c5fb7d0d6c3cded5874d88" ,
"claims" : {
"claim_type" : "test" ,
"object" : "a simple test"
} ,
"createdAt" : "2024-10-04T14:30:00.484157Z" ,
"updatedAt" : "2024-10-04T14:30:58.621911Z" ,
"role" : "Holder" ,
"protocolState" : "CredentialReceived" ,
"credential": "ZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2NpT2lKRlV6STFOa3NpZlEuZXlKcGMzTWlPaUprYVdRNmNISnBjMjA2WVRObFl6Y3hZVE01Wm1JMVltUTROMlF4T1Roa1lXTmhNVGM1TnpWbU5qTmpaalZpT1RVMk56YzBORGRsTlRjM05XRTVaV1JoWmpSak5XSXdORFE0WW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hSd09sd3ZYQzlvYjNOMExtUnZZMnRsY2k1cGJuUmxjbTVoYkRvNE1UQXdYQzlqYkc5MVpDMWhaMlZ1ZEZ3dlkzSmxaR1Z1ZEdsaGJDMXpkR0YwZFhOY0x6azVOVFk1TWpnNExXTTJNR1V0TkdVd1ppMWhOREJtTFRBMU5ESXpOVEJsWldRMVlpTXlOaUlzSW5SNWNHVWlPaUpUZEdGMGRYTk1hWE4wTWpBeU1VVnVkSEo1SWl3aWMzUmhkSFZ6VEdsemRFTnlaV1JsYm5ScFlXd2lPaUpvZEhSd09sd3ZYQzlvYjNOMExtUnZZMnRsY2k1cGJuUmxjbTVoYkRvNE1UQXdYQzlqYkc5MVpDMWhaMlZ1ZEZ3dlkzSmxaR1Z1ZEdsaGJDMXpkR0YwZFhOY0x6azVOVFk1TWpnNExXTTJNR1V0TkdVd1ppMWhOREJtTFRBMU5ESXpOVEJsWldRMVlpSjlmWDAubmw1RnB6ZlJ1Z1FBZU5sdUNCM1drdnlITTcyUlBYNVE1d3NOYk5MalpGWFRTM0VjdE9tZE1nbll0YVVoMll3QmZ2WEZMQVQtWFZiVDNwRHFyR0s4TFE=",
"metaRetries" : 5
}
}
}
Create a credential offer without using a referenced schema
POST
/api/v1/vc/offer-noschema
Headers
Body
Name Type Description didComm connection_id for exchanging request (offer/accept)
published short DID of author for this offer
offer valid for x seconds
the claims to be issued in the VC
Response
200 401
Copy {
"data" : {
"recordId" : "61faa8cb-7bc9-4c41-a0e5-7c10d81dd98f" ,
"thid" : "87323d88-51ec-424f-882a-a1f2655888db" ,
"credentialFormat" : "JWT" ,
"validityPeriod" : 3600 ,
"claims" : {
"uid" : "12345" ,
"name" : "Stable Diffusion SDXL"
} ,
"automaticIssuance" : false ,
"createdAt" : "2024-10-03T15:28:01.77680643Z" ,
"role" : "Issuer" ,
"protocolState" : "OfferPending" ,
"metaRetries" : 5
}
}
Accept an offer and issue the credential
POST
/api/v1/vc/accept
<Description of the endpoint>
Headers
Body
Name Type Description id of the pending offer to accept (compulsory / point of view of receiver)
Response
200 401
Copy {
"data" : {
"recordId" : "5aa7a5ec-35dc-4327-8e06-d9f51952c8ec" ,
"thid" : "87323d88-51ec-424f-882a-a1f2655888db" ,
"credentialFormat" : "JWT" ,
"subjectId" : "did:prism:ca602ff65d8021bb4b77cbce6df6917e0b062d73f8c5fb7d0d6c3cded5874d88" ,
"claims" : {
"uid" : "12345" ,
"name" : "Stable Diffusion SDXL"
} ,
"createdAt" : "2024-10-03T15:28:02.385192Z" ,
"updatedAt" : "2024-10-04T14:42:23.328716Z" ,
"role" : "Holder" ,
"protocolState" : "RequestPending" ,
"metaRetries" : 5
}
}
Issue the credential to the holder
POST
/api/v1/vc/issue
Finalizes the credential issuance for the offer and officially issues the credential.
Headers
Body
Name Type Description id of the pending offer to accept (compulsory / point of view of issuer)
Response
200 401
Copy {
"data" : {
"recordId" : "61faa8cb-7bc9-4c41-a0e5-7c10d81dd98f" ,
"thid" : "87323d88-51ec-424f-882a-a1f2655888db" ,
"credentialFormat" : "JWT" ,
"validityPeriod" : 3600 ,
"claims" : {
"uid" : "12345" ,
"name" : "Stable Diffusion SDXL"
} ,
"automaticIssuance" : false ,
"createdAt" : "2024-10-03T15:28:01.776806Z" ,
"updatedAt" : "2024-10-04T14:45:04.421Z" ,
"role" : "Issuer" ,
"protocolState" : "CredentialPending" ,
"metaRetries" : 5
}
}
Create a Credentials offer, accept it, and issue it to holder
POST
/api/v1/vc/issuance/custodial
A full offer + accept + issue vc (used in custodial mode)
Headers
Body
Name Type Description the connectionId between issuer and holder (compulsory)
apikey of peer 1 (issuer)
apikey of peer 2 (holder)
published short DID of issuer
published short DID of holder
Note: does not work well in Identus...
the claims to be issued in the VC
if true, will not duplicate issuance of same type, but will reuse latest one
Response
200 400
Copy {
"data" : {
"wasOffered" : true ,
"wasAccepted" : true ,
"vc" : {
"recordId" : "fde44892-7269-45fb-ab80-b88869450cd0" ,
"thid" : "259caa16-25db-48d0-a0d9-4400818ab2e0" ,
"credentialFormat" : "JWT" ,
"subjectId" : "did:prism:ca602ff65d8021bb4b77cbce6df6917e0b062d73f8c5fb7d0d6c3cded5874d88" ,
"claims" : {
"claim_type" : "test" ,
"object" : "a simple test"
} ,
"createdAt" : "2024-10-04T14:30:00.484157Z" ,
"updatedAt" : "2024-10-04T14:30:58.621911Z" ,
"role" : "Holder" ,
"protocolState" : "CredentialReceived" ,
"credential": "ZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2NpT2lKRlV6STFOa3NpZlEuZXlKcGMzTWlPaUprYVdRNmNISnBjMjA2WVRObFl6Y3hZVE01Wm1JMVltUTROMlF4T1Roa1lXTmhNVGM1TnpWbU5qTmpaalZpT1RVMk56YzBORGRsTlRjM05XRTVaV1JoWmpSak5XSXdORFE0WWpwRGJtOUxaVUpKTlVOblZuSmFXR3QwVFZKQlJWTnBORXREV0U1c1dUTkJlVTVVV25KTlVrbG9RV2M1VEMxa1UybExVRXBDVmpSWU9GQjNZa1pQTm1zemFtSlRlRlo0Y1ZOcFQyWnJTbVJXTnpkSVlXaEZhbk5MUWpJeGFHTXpVbXhqYWtGUlFWVnZkVU5uYkhwYVYwNTNUV3BWTW1GNlJWTkpVVTFwYjB0S05taHpWa0p4UlhkQ1VtdHplRzlxZVhkUGFIcDJSRm95U1RWaVZVcHZSalJxYUZOSFFUaEJJaXdpYzNWaUlqb2laR2xrT25CeWFYTnRPbU5oTmpBeVptWTJOV1E0TURJeFltSTBZamMzWTJKalpUWmtaalk1TVRkbE1HSXdOakprTnpObU9HTTFabUkzWkRCa05tTXpZMlJsWkRVNE56UmtPRGc2UTI1dlMyVkNTVFZEWjFaeVdsaHJkRTFvUVVWVGFUUkxRMWhPYkZrelFYbE9WRnB5VFZKSmFFRjZjak5pTFVwTU1HOHlRbVpmUWtsclRqTkZUWFJ5ZWprNFJHVTVXa2hPVm5WTmNVUnhRVU5LTW1jMFJXcHpTMEl5TVdoak0xSnNZMnBCVVVGVmIzVkRaMng2V2xkT2QwMXFWVEpoZWt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