Dentity
HomeBusiness
  • Dentity API Services
  • Reference
    • Verify Age and Identity
      • Client Documentation
      • Server Documentation
    • Wallets & Credentials
      • Prerequisites
      • API Endpoints
        • Wallet
        • Template
        • Credential
      • OpenID for Verifiable Credentials
        • OpenID Connect for Verifiable Presentations
  • Open Source ENS Library
Powered by GitBook
On this page
  • Create Template
  • Get Template by Id
  • Get All Templates
  • Delete Template
  1. Reference
  2. Wallets & Credentials
  3. API Endpoints

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"
    }
}
{
    "code": "bad_request",
    "message": "Template Name Exists",
    "errors": {
        "message": "Template Name Exists",
        "code": "bad_request",
        "status": 400
    }
}

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

{
    "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 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

```json
{
    "data": {
        "data": [
            {
                "_id": "647eee43cd41cd00114b66c9",
                "numberOfCredentials": null,
                "isDefault": false,
                "dateIssued": "2023-06-06T07:46:26.702Z",
                "status": "active",
                "customFields": [],
                "verifierSources": [],
                "requireVerifierSource": false,
                "passkit": {
                    "isEnabled": false,
                    "productionId": "",
                    "ticketTypeId": ""
                },
                "orcaScan": {
                    "isEnabled": false,
                    "callbackUrl": ""
                },
                "isPlatform": true,
                "totalOffered": 0,
                "totalIssued": 0,
                "totalListing": 0,
                "templateId": "urn:template:dentity-dev:verified-member-tracy",
                "name": "Verified Member Tracy",
                "credentialIssuer": "Verified Member Tracy",
                "credentialType": "Verified Member Tracy",
                "logoId": "logos/41f34323fd59031c9daa236ea2e681bb",
                "credentialExpiration": null,
                "detail": {
                    "id": "urn:template:dentity-dev:verified-member-tracy",
                    "name": "VerifiedMemberTracy",
                    "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
                        }
                    },
                    "allowAdditionalFields": false,
                    "schemaUri": "https://schema.trinsic.cloud/dentity-dev/verified-member-tracy",
                    "contextUri": "",
                    "ecosystemId": "urn:trinsic:ecosystems:dentity-dev",
                    "type": "VerifiableCredential",
                    "createdBy": "urn:trinsic:wallets:z8wCvUe4sM5eTnYYHFaxxjs",
                    "dateCreated": "2023-06-06T08:28:51.5132898Z",
                    "title": "Verified Member Tracy",
                    "description": "",
                    "fieldOrdering": {
                        "credentialIssuer": {
                            "order": 0,
                            "section": "Data"
                        },
                        "credentialType": {
                            "order": 1,
                            "section": "Data"
                        },
                        "holderFullName": {
                            "order": 2,
                            "section": "Data"
                        }
                    }
                },
                "partner": "61dbb8930dfa450011f7d9aa",
                "welcomeText": "",
                "customAttributes": [],
                "dateCreated": "2023-06-06T08:28:51.561Z",
                "dateUpdated": "2023-06-06T08:28:51.561Z",
                "__v": 0,
                "enableIdentityData": true,
                "isAvailable": true
            },
            {
                "_id": "647eefc50a5f4b321440bba7",
                "numberOfCredentials": null,
                "isDefault": false,
                "dateIssued": "2023-06-06T08:35:01.146Z",
                "status": "active",
                "customFields": [],
                "verifierSources": [],
                "requireVerifierSource": false,
                "passkit": {
                    "isEnabled": false
                },
                "orcaScan": {
                    "isEnabled": false
                },
                "isPlatform": false,
                "totalOffered": 0,
                "totalIssued": 0,
                "totalListing": 0,
                "templateId": "urn:template:unruffled-black-RGwuhvzn6e1:dentity-template-demo2",
                "name": "Dentity Template Demo 2",
                "credentialIssuer": "Dentity Template Demo 2",
                "credentialType": "Dentity Template Demo 2",
                "logoId": "logos/a35cf1cd4300891598443b6a73dc5bbe",
                "credentialExpiration": null,
                "detail": {
                    "id": "urn:template:unruffled-black-RGwuhvzn6e1:tracy-pham-mem-61dbb8930dfa450011f7d9aa-1686040515562",
                    "name": "TracyPhamMem61dbb8930dfa450011f7d9aa1686040515562",
                    "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
                        }
                    },
                    "allowAdditionalFields": false,
                    "schemaUri": "https://staging-schema.trinsic.cloud/unruffled-black-RGwuhvzn6e1/tracy-pham-mem-61dbb8930dfa450011f7d9aa-1686040515562",
                    "contextUri": "",
                    "ecosystemId": "urn:trinsic:ecosystems:unruffled-black-RGwuhvzn6e1",
                    "type": "VerifiableCredential",
                    "createdBy": "urn:trinsic:wallets:U1fsMLjEThs5gFeufR4vkA",
                    "dateCreated": "2023-06-06T08:35:19.3689416Z",
                    "title": "Dentity Template Demo 2 61dbb8930dfa450011f7d9aa 1686040515562",
                    "description": "",
                    "fieldOrdering": {
                        "credentialIssuer": {
                            "order": 0,
                            "section": "Data"
                        },
                        "credentialType": {
                            "order": 1,
                            "section": "Data"
                        },
                        "holderFullName": {
                            "order": 2,
                            "section": "Data"
                        }
                    }
                },
                "partner": "61dbb8930dfa450011f7d9aa",
                "customAttributes": [],
                "dateCreated": "2023-06-06T08:35:17.811Z",
                "dateUpdated": "2023-06-06T08:35:17.811Z",
                "__v": 0,
                "enableIdentityData": true,
                "isAvailable": true
            },
            {
                "_id": "647ef6c082bdeb0011fdec4c",
                "numberOfCredentials": null,
                "isDefault": false,
                "dateIssued": "2023-06-06T08:46:28.770Z",
                "status": "active",
                "customFields": [],
                "verifierSources": [],
                "requireVerifierSource": false,
                "passkit": {
                    "isEnabled": false
                },
                "orcaScan": {
                    "isEnabled": false
                },
                "isPlatform": false,
                "totalOffered": 1,
                "totalIssued": 1,
                "totalListing": 0,
                "templateId": "urn:template:dentity-dev:tracy-member-vvip-61dbb8930dfa450011f7d9aa-1686042303966",
                "name": "Tracy Member VVIP",
                "credentialIssuer": "Verified Member Tracy",
                "credentialType": "Tracy Pham 2804",
                "logoId": "logos/ed7e79f81e7eb52dbc65039249b4c425",
                "credentialExpiration": null,
                "detail": {
                    "id": "urn:template:dentity-dev:tracy-member-vvip-61dbb8930dfa450011f7d9aa-1686042303966",
                    "name": "TracyMemberVVIP61dbb8930dfa450011f7d9aa1686042303966",
                    "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
                        }
                    },
                    "allowAdditionalFields": false,
                    "schemaUri": "https://schema.trinsic.cloud/dentity-dev/tracy-member-vvip-61dbb8930dfa450011f7d9aa-1686042303966",
                    "contextUri": "",
                    "ecosystemId": "urn:trinsic:ecosystems:dentity-dev",
                    "type": "VerifiableCredential",
                    "createdBy": "urn:trinsic:wallets:z8wCvUe4sM5eTnYYHFaxxjs",
                    "dateCreated": "2023-06-06T09:05:04.6048500Z",
                    "title": "Tracy Member VVIP 61dbb8930dfa450011f7d9aa 1686042303966",
                    "description": "",
                    "fieldOrdering": {
                        "credentialIssuer": {
                            "order": 0,
                            "section": "Data"
                        },
                        "credentialType": {
                            "order": 1,
                            "section": "Data"
                        },
                        "holderFullName": {
                            "order": 2,
                            "section": "Data"
                        }
                    }
                },
                "partner": "61dbb8930dfa450011f7d9aa",
                "customAttributes": [],
                "dateCreated": "2023-06-06T09:05:04.662Z",
                "dateUpdated": "2023-06-06T09:21:04.802Z",
                "__v": 0,
                "enableIdentityData": true,
                "isAvailable": true
            },
            {
                "_id": "64800abbaa615d0011e130ab",
                "numberOfCredentials": null,
                "isDefault": false,
                "dateIssued": "2023-06-07T02:13:31.380Z",
                "status": "active",
                "customFields": [
                    "verifiedHello1",
                    "verifiedHello2",
                    "verifiedHello3"
                ],
                "verifierSources": [],
                "requireVerifierSource": false,
                "passkit": {
                    "isEnabled": false
                },
                "orcaScan": {
                    "isEnabled": false
                },
                "isPlatform": false,
                "totalOffered": 4,
                "totalIssued": 5,
                "totalListing": 0,
                "templateId": "urn:template:dentity-dev:verified-member-tracy-3-61dbb8930dfa450011f7d9aa-1686112954483",
                "name": "Verified Member Tracy 3",
                "credentialIssuer": "Verified Member Tracy",
                "credentialType": "Verified Member Tracy",
                "logoId": "logos/de57e3ddd919f847cfcd56bc155bac56",
                "credentialExpiration": null,
                "detail": {
                    "id": "urn:template:dentity-dev:verified-member-tracy-3-61dbb8930dfa450011f7d9aa-1686112954483",
                    "name": "VerifiedMemberTracy361dbb8930dfa450011f7d9aa1686112954483",
                    "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
                        },
                        "verifiedHello1": {
                            "title": "verifiedHello1",
                            "description": "Hello 1",
                            "optional": true,
                            "type": 0
                        },
                        "verifiedHello2": {
                            "title": "verifiedHello2",
                            "description": "hello 2",
                            "optional": true,
                            "type": 0
                        },
                        "verifiedHello3": {
                            "title": "verifiedHello3",
                            "description": "hello 3",
                            "optional": true,
                            "type": 0
                        }
                    },
                    "allowAdditionalFields": false,
                    "schemaUri": "https://schema.trinsic.cloud/dentity-dev/verified-member-tracy-3-61dbb8930dfa450011f7d9aa-1686112954483",
                    "contextUri": "",
                    "ecosystemId": "urn:trinsic:ecosystems:dentity-dev",
                    "type": "VerifiableCredential",
                    "createdBy": "urn:trinsic:wallets:z8wCvUe4sM5eTnYYHFaxxjs",
                    "dateCreated": "2023-06-07T04:42:35.0016955Z",
                    "title": "Verified Member Tracy 3 61dbb8930dfa450011f7d9aa 1686112954483",
                    "description": "",
                    "fieldOrdering": {
                        "credentialIssuer": {
                            "order": 0,
                            "section": "Data"
                        },
                        "credentialType": {
                            "order": 1,
                            "section": "Data"
                        },
                        "holderFullName": {
                            "order": 2,
                            "section": "Data"
                        },
                        "verifiedHello1": {
                            "order": 3,
                            "section": "Data"
                        },
                        "verifiedHello2": {
                            "order": 4,
                            "section": "Data"
                        },
                        "verifiedHello3": {
                            "order": 5,
                            "section": "Data"
                        }
                    }
                },
                "partner": "61dbb8930dfa450011f7d9aa",
                "customAttributes": [
                    {
                        "key": "verifiedHello1",
                        "description": "Hello 1"
                    },
                    {
                        "key": "verifiedHello2",
                        "description": "hello 2"
                    },
                    {
                        "key": "verifiedHello3",
                        "description": "hello 3"
                    }
                ],
                "dateCreated": "2023-06-07T04:42:35.054Z",
                "dateUpdated": "2023-06-23T10:37:50.084Z",
                "__v": 0,
                "includeGovernance": true,
                "enableIdentityData": true,
                "isAvailable": true
            },
            {
                "_id": "649513eaba2e08002ed24c33",
                "numberOfCredentials": null,
                "isDefault": false,
                "dateIssued": "2023-06-23T03:32:29.310Z",
                "status": "active",
                "customFields": [],
                "verifierSources": [],
                "requireVerifierSource": false,
                "passkit": {
                    "isEnabled": false,
                    "productionId": "",
                    "ticketTypeId": ""
                },
                "orcaScan": {
                    "isEnabled": false,
                    "callbackUrl": ""
                },
                "isPlatform": false,
                "totalOffered": 0,
                "totalIssued": 0,
                "totalListing": 0,
                "includeGovernance": false,
                "templateId": "urn:template:dentity-dev:dentity-template-demo",
                "name": "Dentity Template Demo",
                "credentialIssuer": "Dentity Template Demo",
                "credentialType": "Dentity Template Demo",
                "logoId": "logos/f046e4d771dc9304ef4bc668591466e3",
                "credentialExpiration": null,
                "detail": {
                    "id": "urn:template:dentity-dev:long-test-011",
                    "name": "LongTest011",
                    "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
                        }
                    },
                    "allowAdditionalFields": false,
                    "schemaUri": "https://schema.trinsic.cloud/dentity-dev/long-test-011",
                    "ecosystemId": "urn:trinsic:ecosystems:dentity-dev",
                    "type": "VerifiableCredential",
                    "createdBy": "urn:trinsic:wallets:z8wCvUe4sM5eTnYYHFaxxjs",
                    "dateCreated": "2023-06-23T03:39:22.7176863Z",
                    "title": "Dentity Template Demo",
                    "description": "",
                    "fieldOrdering": {
                        "credentialIssuer": {
                            "order": 0,
                            "section": "Data"
                        },
                        "credentialType": {
                            "order": 1,
                            "section": "Data"
                        },
                        "holderFullName": {
                            "order": 2,
                            "section": "Data"
                        }
                    }
                },
                "partner": "61dbb8930dfa450011f7d9aa",
                "welcomeText": "",
                "customAttributes": [],
                "dateCreated": "2023-06-23T03:39:22.770Z",
                "dateUpdated": "2023-06-23T03:39:22.770Z",
                "__v": 0,
                "enableIdentityData": true,
                "isAvailable": true
            }
        ],
        "page": 1,
        "pageSize": 5,
        "totalItem": 63,
        "totalPage": 13
    }
}
```

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

{
    "data": {
        "isSuccess": true
    }
}

Delete template: When a template is deleted. All credentials issued by this template will be removed from the wallet.

PreviousWalletNextCredential

Last updated 1 year ago