API Reference

Create a Certificate Authority

Creates a Certificate Authority (CA) identifier (DID) and a new wallet address.

POST 'https://demo.eidcmp.wallid.io/api/v1/ca/

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Request Body

NameTypeDescription

wa

string

wallet address

admin_email

string

registered email address of the account admin

Example Request

{
    wa : "0x12b...bcD, 
    admin_email : "alice@example.com" 
}

Example Response

{
  "message": {
      "name": "CA Name",
      "admin_email": "test@test.io",
      "creatorWA": "0x4289128eb6e3b298140845364fbec0f7344ffe8b",
      "contract_address": "0x99999999",
      "admin": [
          "0x4289128eb6e3b298140845364fbec0f7344ffe8b"
      ],
      "issuerKey": {
          "type": "jwk",
          "jwk": {
              "kty": "OKP",
              "d": "Ho_2n9eidSDnKwKrw3pfxl_QYvBf-iLcIysR3ttsDlE",
              "crv": "Ed25519",
              "kid": "nDVD3o4MUzwPddZim_AQIkybSo3gc9pPsS06Ff3A0xU",
              "x": "slQ0XLMtyvETG9GDZz_89ytjspNRsn7fNBcWvtWRsS8"
          }
      },
      "issuerDid": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoibkRWRDNvNE1VendQZGRaaW1fQVFJa3liU28zZ2M5cFBzUzA2RmYzQTB4VSIsIngiOiJzbFEwWExNdHl2RVRHOUdEWnpfODl5dGpzcE5Sc243Zk5CY1d2dFdSc1M4In0",
      "_id": "670fb05a77d3b449d9e3b69f",
      "code": "0x172fde1d5fd586411af4939b776693e93235b1791d17a5d9d935c3886183b16d",
      "createdAt": "2024-10-16T12:23:54.517Z",
      "updatedAt": "2024-10-16T12:23:54.517Z",
      "cid": "670fb05a77d3b449d9e3b69f",
      "id": "670fb05a77d3b449d9e3b69f"
  }
}

Create a Template

Creates a Certificate template as achema with fixed attributes and corresponding dynamic attestations.

POST 'https://demo.eidcmp.wallid.io/api/v1/template/

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Request Body

NameTypeDescription

cid

string

CA identifier

name

string

Name of the Template

wa

string

CA wallet address

frontendProps

object

frontend elements and attributes of the certificate schema. Contains components object and current_layout array

components

object

contains all the visual and atribute elements of the certificate

CurrentLayout

string

type of certificate visual format (card, badge, vertical A4, horizontal H4)

Example Request

{
  cid: 'cid_value', 
  name: 'template_name',
  waAdmin: 'waAdmin_value', 
  frontendProps: {
    components: [
      {
        id: 'component_id'
        type: string
        inputType: string
        content: string
        styles: [TemplateElementStyles]
        className: string
        placeholder: string
        src: string
        text: string
        name: string
        value: string
        isActive: boolean
        isDraggable: boolean
        isEditable: boolean
        x: number
        y: number
        baseText: (string | undefined)[]
        originalText: string
        maxCharacters: string
        minCharacters: string
        isMandatory: boolean
      }
    ],
    currentLayout: 'horizontal_h4'
  }
}

Component Object elements

NameTypeDescription

id

string

type

string

inputType

string

content

string

styles

object

className

string

placeholder

string

src

string

text

string

name

string

value

string

isActive

boolean

isDraggable

boolean

x

number

y

number

baseText

(string | undefined)[]

originalText

string

maxCharacters

string

minCharacters

string

isMandatory

boolean

Styles object elements:

NameTypeDescription

width

string

height

string

color

string

backgroundColor

string

fontSize

string | number

fontWeight

string

textAlign

string

fontFamily

string

isItalic

boolean

isBold

boolean

isUnderlined

boolean

letterSpacing

string

previousWidth

number

warp

number

cursor

string

Example Response

{
    "cid": "66fd767cbd536ca460f33be4",
    "name": "Card",
    "creatorWa": "0x4289128eb6e3b298140845364fbec0f7344ffe8b",
    "frontendProps": {
        "name": "Card",
        "repeatedAttributes": false,
        "currentLayout": "Card",
        "design": "Card",
    },
    "lang": "en",
    "template_chain": {
        "sig": []
    },
    "status": "active",
    "admin": [
        "0x4289128eb6e3b298140845364fbec0f7344ffe8b"
    ],
    "tid": "670fb92e77d3b449d9e3b6fe"
}

Get Template

Returns the certificate template json file

GET 'https://demo.eidcmp.wallid.io/api/v1/template/:tid

Get Template File

Returns a the certificate template file in the specified file format (eg. .csv or .xls)

GET 'https://demo.eidcmp.wallid.io/api/v1/template/:tid/download/:fileFormat

Delete Template

Deletes Template from the API

DELETE 'https://demo.eidcmp.wallid.io/api/v1/template/:tid

Issue Certificates

Issues new certificate to and sends it to the a recipient email address.

POST 'https://demo.eidcmp.wallid.io/api/v1/credential/create

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Request Body

NameTypeDescription

cid

string

CA identifier

tid

string

Template identifier

waAdmin

string

CA wallet address

data

dictionary

object with data to be stored in the credential (in the format of a list of "key": "value" pairs)

email

string

recipient person email address

Example Request

{
   "cid": "cid_value", // Certificate Authority (CA) id
   "tid": "tid_value", // Template id
   "waAdmin": "waAdmin_value", // wallet address of the admin creating the credential
   "data": [{ "key": "value" }], // data to be stored in the credential (in the format of a list of key value pairs)
   "email": "user@domain.com",
}

Example Response

{
 "data": {
     "mgs": "The invite 670fb0d577d3b449d9e3b6a7 was sent!",
     "inviteId": "670fb0d577d3b449d9e3b6a7"
 },
 "credentialUrl": "openid-credential-offer://issuer.portal.walt.id/?credential_offer_uri=https%3A%2F%2Fissuer.portal.walt.id%2Fopenid4vc%2FcredentialOffer%3Fid%3Dc4d7f3f6-a8fb-4f89-8ca7-c2e9932dc3e4"
}

Verify Certificates

Creates a verification URL to get and display certificate and verification data.

POST 'https://demo.eidcmp.wallid.io/api/v1/credential/create-verify-url

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Request Body

NameTypeDescription

id

string

Certificate identifier

tid

string

Template identifier

guid

string

a unique identifier for the verification session and is returned in the init method

Example Request

{
   "id": "id_value", 
   "tid": "tid_value", 
   "guid": "guid_value",
}

Example Response

{
 "verificationUrl": "openid4vp://authorize?response_type=vp_token&client_id=https%3A%2F%2Fverifier.portal.walt.id%2Fopenid4vc%2Fverify&response_mode=direct_post&state=ClJIRQQu8FBr&presentation_definition_uri=https%3A%2F%2Fverifier.portal.walt.id%2Fopenid4vc%2Fpd%2FClJIRQQu8FBr&client_id_scheme=redirect_uri&client_metadata=%7B%22authorization_encrypted_response_alg%22%3A%22ECDH-ES%22%2C%22authorization_encrypted_response_enc%22%3A%22A256GCM%22%7D&nonce=f9ce4c7d-2804-4804-bc21-6e1fe199da60&response_uri=https%3A%2F%2Fverifier.portal.walt.id%2Fopenid4vc%2Fverify%2FClJIRQQu8FBr"
}

Redirect Verification Session

Triggers socket io event in the Verify page session

GET 'https://demo.eidcmp.wallid.io/api/v1/credential/redirect/:sessionId

Get Certificate data

Gets certificate data for the session in the OIDC format

GET 'https://demo.eidcmp.wallid.io/api/v1/credential/data/:sessionId

Last updated