Skip to content

View Template API V2

GET https://secure-{REGION}.id123.io/api/v2/ action: view-template

New to the API?

Start with the API V2 Introduction for authentication, terminology (IDMS, Card Template, API Key), and a full endpoint list.

Introduction

This API is used to retrieve detailed template information that already exists in the institution’s account. If you do not pass the correct ‘card-template-id’ for the card that you are trying to retrieve, you will receive an error. All request parameters are mandatory to get the right template information. A “list-templates” API returns limited information about templates and users must use the “view-template” API to get detailed information.

Request Format

GET /api/v2/ HTTP/1.1
Host: secure-{REGION}.id123.io
X-API-KEY: API_KEY
Content-Type: application/json
Content-Length: 43

{
   "action" : "view-template",
   "card-template-id": "CARD_TEMPLATE_ID"
}

Success Response

{
   "status": "success",
   "code": "S2009",
   "message": "Card template was retrieved successfully.",
   "data": {
       "card-template-id": "CARD_TEMPLATE_ID",
       "institution": "INSTITUTE_NAME",
       "issuance-type": "INSTITUTION_ISSUED",
       "title": "TEMPLATE_TITLE",
       "created-at": "yyyy-mm-ddThh:mm:ss+00:00", //UTC
       "last-updated": "yyyy-mm-ddThh:mm:ss+00:00", //UTC
       "fields": {
           "barcode": [
               {
                   "key": "barcode",
                   "label": "BARCODE_LABEL",
                   "type": "BARCODE_TYPE",
                   "format": "BARCODE_FORMAT",
                   "source": "BARCODE_SOURCE",
                   "source-key": "BARCODE_SOURCE_KEY",
                   "tip": "BARCODE_TOOLTIP",
                   "max-length": 20, // Barcode max length
                   "min-length": 0, // Barcode min length
                   "editable": false, // If barcode editable or not true/false
                   "required": false, // If barcode required or not true/false
                   "value": "BARCODE_VALUE"
               }
           ],
           "image": [
               {
                   "key": "id-photo",
                   "label": "Photo",
                   "type": null,
                   "source": null,
                   "editable": false,
                   "value": null,
                   "max-length": 0,
                   "min-length": 0,
                   "required": false,
                   "format": null,
                   "tip": null
               }
           ],
           "name-fields": [
               {
                   "key": "name",
                   "label": "FIELD_LABEL",
                   "type": "FIELD_TYPE",
                   "source": "FIELD_SOURCE",
                   "editable": true, // If field editable or not (true/false)
                   "value": "FIELD_VALUE",
                   "max-length": 400, // Field value max length
                   "min-length": 0, // Field value min length
                   "required": false, // If field required or not (true/false)
                   "format": "FIELD_FORMAT",
                   "tip": "FIELD_TOOLTIP"
               }
           ],
           "front-fields": [
               {
                   "key": "front-1",
                   "label": "FIELD_LABEL",
                   "type": "FIELD_TYPE",
                   "source": "FIELD_SOURCE",
                   "editable": true, // If field editable or not (true/false)
                   "value": "FIELD_VALUE",
                   "max-length": 400, // Field value max length
                   "min-length": 0, // Field value min length
                   "required": false, // If field required or not (true/false)
                   "format": "FIELD_FORMAT",
                   "tip": "FIELD_TOOLTIP"
               }
           ],
           "secondary-fields": [
               {
                   "key": "secondary-1",
                   "label": "FIELD_LABEL",
                   "type": "FIELD_TYPE",
                   "source": "FIELD_SOURCE",
                   "editable": true, // If field editable or not (true/false)
                   "value": "FIELD_VALUE",
                   "max-length": 400, // Field value max length
                   "min-length": 0, // Field value min length
                   "required": false, // If field required or not (true/false)
                   "format": "FIELD_FORMAT",
                   "tip": "FIELD_TOOLTIP"
               }
           ],
           "back-fields": [
               {
                   "key": "back-1",
                   "label": "FIELD_LABEL",
                   "type": "FIELD_TYPE",
                   "source": "FIELD_SOURCE",
                   "editable": true, // If field editable or not (true/false)
                   "value": "FIELD_VALUE",
                   "max-length": 400, // Field value max length
                   "min-length": 0, // Field value min length
                   "required": false, // If field required or not (true/false)
                   "format": "FIELD_FORMAT",
                   "tip": "FIELD_TOOLTIP"
               }
           ]
       },
       "authentication-fields": [
           {
               "key": "security-question-1",
               "label": "SECURITY_QUESTION_LABEL",
               "type": "SECURITY_QUESTION_FIELD_TYPE",
               "case-sensitive": false, // If answer is case sensitive or not
               "tip": "SECURITY_QUESTION_TOOLTIP"
           },
           {
               "key": "security-question-2",
               "label": "SECURITY_QUESTION_LABEL",
               "type": "SECURITY_QUESTION_FIELD_TYPE",
               "case-sensitive": false, // If answer is case sensitive or not
               "tip": "SECURITY_QUESTION_TOOLTIP"
           },
           {
               "key": "unique-identifier",
               "label": "UNIQUE_IDENTIFIER_LABEL",
               "type": "UNIQUE_IDENTIFIER_VALUE_TYPE",
               "case-sensitive": false, // If answer is case sensitive or not
               "tip": "UNIQUE_IDENTIFIER_TOOLTIP"
           }
       ],
       "media": {
           "is-upload-allowed": false,
           "allowed-count": 4,
           "files": [
               {
                   "url": "https://dev-app.id123.io/image/dStSSnZiVmVLTHU1dHVVYWZONWJIZw%3D%3D%7CcvvtwkJ7oeDsFet2WxA46QOrP_J9_pHr0UVRl5w5M4GVwKguUd7_A8VOe44ReOTSmgLHoJkhkZB55rIIIW6WySkmP808jWh1aN_Ej-5oSqZJpubrldl7tfjsJrxdHsfnC86xXTBdv7U0B-orBaOuqLcxi5eLsIldleXC_PM-7Ssdo7liif1RZuw3YLzFS9oKrf2b7Ql92gehfWADssUmNTQSSssTLgAKODwAULA96Zs%3D%7CmViCp0MGyfYtONuy_J9x8A%3D%3D",
                   "order": 1
               }
           ]
       }
   }
}

Failure Response

{
    "status": "failure",
    "code": "ERROR CODE",
    "message": "ERROR MESSAGE",
    "card-template-id": "CARD_TEMPLATE_ID"
}