Template

Credential Template

Every issued credential will be based on a template as a standard. So the credential template will be used to define the required fields, the corresponding data type, and the issuer ... Later verifiers can be able to rely on it to determine the exact type of credential they want to verify.

Each template will belong to a business as a credential issuer

Create Template

POST https://api.dentity.com/core/api/v1/programmatic/credential/template

Creates a new credential template.

Headers

Name
Type
Description

x-api-key*

String

API Key

Request Body

Name
Type
Description

logoURL*

String

Image template

credentialIssuer*

String

Credential issuer name

credentialExpiration*

String

Date and time credential expires

descriptions*

Array

Description for customFields

customFields*

Array

Field when you want to add in attribute field. Ex: [

“customField1”,

“customField2”,

“customField3”,

“customField4”,

“customField5”

]

templateName*

String

Template name

credentialType*

String

Credential type

numberOfCredentials

Number|Null

Limit total credentials can be issued

{
    "data": {
        "plaidConfig": {
            "template": "",
            "enablePII": false
        },
        "verificationSettings": {
            "method": null,
            "price": 0,
            "age": 0
        },
        "numberOfCredentials": null,
        "isDefault": false,
        "isPasses": false,
        "dateIssued": "2023-11-02T09:30:26.893Z",
        "status": "active",
        "customFields": [
            "holderFullNamePopulatedAtIssuance"
        ],
        "verifierSources": [],
        "requireVerifierSource": false,
        "passkit": {
            "isEnabled": false
        },
        "orcaScan": {
            "isEnabled": false
        },
        "isPlatform": false,
        "totalOffered": 0,
        "totalIssued": 0,
        "totalListing": 0,
        "includeGovernance": false,
        "collaborator": [],
        "_id": "65445cef51290b002be5af43",
        "templateId": "urn:template:dentity-dev:template-demo-61dbb8930dfa450011f7d9aa-1698979053833",
        "name": "Template Demo",
        "credentialIssuer": "Dentity",
        "credentialType": "Credential Type",
        "logoId": "62e0b62ca7f1ac0011103cf9",
        "credentialExpiration": null,
        "detail": {
            "id": "urn:template:dentity-dev:template-demo-61dbb8930dfa450011f7d9aa-1698979053833",
            "name": "TemplateDemo61dbb8930dfa450011f7d9aa1698979053833",
            "version": 1,
            "fields": {
                "credentialIssuer": {
                    "title": "credentialIssuer",
                    "description": "Credential Issuer",
                    "optional": false,
                    "type": 0
                },
                "credentialType": {
                    "title": "credentialType",
                    "description": "Credential Type",
                    "optional": false,
                    "type": 0
                },
                "holderFullName": {
                    "title": "holderFullName",
                    "description": "Holder Full Name",
                    "optional": true,
                    "type": 0
                },
                "holderFullNamePopulatedAtIssuance": {
                    "title": "holderFullNamePopulatedAtIssuance",
                    "description": "Holder Full Name (Populated at Issuance)",
                    "optional": true,
                    "type": 0
                }
            },
            "allowAdditionalFields": false,
            "schemaUri": "https://schema.trinsic.cloud/dentity-dev/template-demo-61dbb8930dfa450011f7d9aa-1698979053833",
            "ecosystemId": "urn:trinsic:ecosystems:dentity-dev",
            "type": "VerifiableCredential",
            "createdBy": "urn:trinsic:wallets:z8wCvUe4sM5eTnYYHFaxxjs",
            "dateCreated": "2023-11-03T02:37:34.0122393Z",
            "title": "Template Demo 61dbb8930dfa450011f7d9aa 1698979053833",
            "description": "",
            "fieldOrdering": {
                "credentialIssuer": {
                    "order": 0,
                    "section": "Data"
                },
                "credentialType": {
                    "order": 1,
                    "section": "Data"
                },
                "holderFullName": {
                    "order": 2,
                    "section": "Data"
                },
                "holderFullNamePopulatedAtIssuance": {
                    "order": 3,
                    "section": "Data"
                }
            }
        },
        "partner": "61dbb8930dfa450011f7d9aa",
        "customAttributes": [
            {
                "key": "holderFullNamePopulatedAtIssuance",
                "description": "Holder Full Name (Populated at Issuance)"
            }
        ],
        "dateCreated": "2023-11-03T02:37:35.498Z",
        "dateUpdated": "2023-11-03T02:37:35.498Z"
    }
}

Get Template by Id

GET https://api.dentity.com/core/api/v1/programmatic/credential/template/:id

Fetch a credential template definition by template ID.

Path Parameters

Name
Type
Description

id*

String

Template ID

Headers

Name
Type
Description

x-api-key*

String

API Key

Get All Templates

GET https://api.dentity.com/core/api/v1/programmatic/credential/template

Fetch all credential templates.

Query Parameters

Name
Type
Description

page

Number

Current page

pageSize

Number

Total items each page

Headers

Name
Type
Description

x-api-key*

String

API Key

Delete Template

DELETE https://api.dentity.com/core/api/v1/programmatic/credential/template/:id

Delete a credential template by template ID.

Path Parameters

Name
Type
Description

id*

String

Template ID

Headers

Name
Type
Description

x-api-key*

String

API Key

Last updated