Skip to main content

GET /vc-templates/:templateName

Retrieve a Verifiable Credential Template by its Name.

{{baseUrl}}/vc-templates/:templateName

Headers

HeaderTypeDescription
x-api-keystringThe API key required for authentication.

Path Parameters

ParameterTypeDescription
templateIdstringThe name of the Verifiable Credential template.
templateName: DegreeSample

Click Send and wait for the response.

Response (Success - 201)

TypeDescription
objectReturns the vc-template.

Sample Response Body:

{
"_id": "67135af410ac412819206661",
"templateId": "a56542f5-31df-41f9-bf24-c4fffc3eff7b",
"name": "DegreeSample",
"description": "Schema for marriage certificate template",
"context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": [
"VerifiableCredential",
"DegreeSample"
],
"issuer": "did:earthid:testnet:7QFmnthxqyJVmdBC8WbMtVrfEfenMbVAw3JWYC4kmkYu",
"issuanceDate": "2024-10-19T07:19:17.503Z",
"expirationDate": "2029-10-19T07:19:17.503Z",
"credentialSubject": [
{
"attributeName": "degreeName",
"type": "string",
"description": "Degree Name"
},
{
"attributeName": "dateOfBirth",
"type": "string",
"description": "Date of Birth"
},
{
"attributeName": "city",
"type": "string",
"description": "City of University"
}
],
"__v": 0
}

Response (Server Error - 500)

ParameterTypeDescription
errorstringDescribes the error that occurred.

Sample Response Body:

{
"error": "Server error"
}