Interface Address |
/did/createCredential |
Description |
The attribute values defined in the credential template are provided by the issuer for the DID user to obtain on the front page. The issuer issues the credentials for the DID user through this interface. If there are more Claim parameters than defined in the credential template, the server side will discard them. |
Interface request parameter |
No. |
Parameter |
Type |
Required |
Description |
1 |
|
CreateCredentialReq |
Y |
Wrapper class |
CreateCredentialReq |
1 |
cptId |
Long |
Y |
Credential template ID |
2 |
issuerDid |
String |
Y |
DID of the credential template issuer |
3 |
userDid |
String |
Y |
DID of the user requesting the credentials |
4 |
expirationDate |
String |
Y |
Credential expiration date |
5 |
claim |
Map<String, Object> |
Y |
Claim data |
6 |
type |
String |
Y |
Credential type, fill in Proof |
7 |
shortDesc |
String |
N |
Brief description of the credential template. If this field is null, the value of the title field in the credential template is displayed. If not, the input value is displayed. |
8 |
longDesc |
String |
N |
Detailed description of the credential template |
Interface response parameter |
No. |
Parameter |
Type |
Description |
1 |
|
CredentialWrapper |
Credential issuance information |
CredentialWrapper |
1 |
context |
String |
Specification |
2 |
id |
String |
Credential ID |
3 |
type |
String |
Credential type, fill in proof |
4 |
cptId |
Long |
Credential template ID |
5 |
issuerDid |
String |
DID of credential issuer |
6 |
userDid |
String |
DID of the user requesting the credentials |
7 |
expirationDate |
String |
Expiration date |
8 |
created |
String |
Created date |
9 |
shortDesc |
String |
Brief description of the credential |
10 |
longDesc |
String |
Detailed description of the credential |
11 |
claim |
Map<String, Object> |
Claim data |
12 |
proof |
Map<String, Object> |
Signature |