SVX Documentation
HomepageAPISDK
Current
Current
  • Docs
  • Concepts
    • Digital Identity and Why It's Important
    • Digital Wallets
    • Ecosystems
    • Information Security
    • Personal Data & Attributes
    • Privacy- and Security-by-design
    • Secure Data Storage
    • Selective Disclosure / ZKP
    • Tokens and Tokenisation
    • Verifiable Credentials
    • Terminology
  • Platform
    • Secure Value Exchange
    • Authorisation, Tenant & Organisation Manager (ATOM)
    • Credential Service
    • Decentralised Identifiers (DIDs)
    • Keys
    • Tenants, Organisations, and End-Users
    • Vault
      • Enterprise Vault
    • Portal
    • Supported Standards
  • Guides
    • Onboarding to SVX
    • API Guides
      • Credentials
        • Credential Schemas
        • Credential Types
        • Issue Credentials
        • Presentation Definitions
        • Presentations
      • DIDs
        • DID Resolver
        • DID Registrar
        • DID Methods
          • did:key
          • did:web
          • did:ebsi
          • did:indy
        • DID Controller Keypair
      • OpenID Connect
        • For Verifiable Presentation
      • Users
        • Inviting End-Users
        • Authenticating End-Users
      • Vault
        • Items and Slots
        • Connections and Sharing
        • Classification Hierarchies
        • Attachments
        • On-sharing & Client Tasks
        • Account Delegation
      • Machine-2-Machine Communication
    • Portal Tutorials
      • Tenant Administrators
        • Onboard to a Tenancy
        • Dashboard and Navigation
        • Manage Tenancy
        • Manage Tenant Administrators
        • Manage Organisations
        • Manage Organisation Administrators
        • Credential Schemas
        • Applications
        • End Users
      • Organisation Administrators
        • Manage Organisation
        • Onboarding and Organisation Setup
        • Dashboard and Navigation
        • Manage Organisation Administrators
        • Credential Templates
        • View Credentials
        • Verification Templates
        • Verification Requests
        • Connections
        • Applications
    • Wallet Tutorials
      • Wallet Set Up
      • Provider Registration
      • Organisation Configuration
      • Credentials
      • Requests
      • Security
      • Wallet Recovery
  • Tools
    • Meeco SDK & CLI
    • Cryppo SDK & CLI
  • Releases
    • 2.1.1
    • 2.1.0
    • 2.0.0
    • 1.4.3
    • 1.4.2
    • 1.4.1
    • 1.4.0
    • 1.3.8
    • 1.3.7
    • 1.3.6
    • 1.3.5
    • 1.3.4
    • 1.3.3
    • 1.3.2
    • 1.3.0
    • 1.2.5
    • 1.2.4
    • 1.2.3
    • 1.2.2
    • 1.2.1
    • 1.2.0
    • 1.1.0
    • 1.0.0
    • Legacy API-of-Me
  • Policies
    • Privacy
    • Developer Policy
Powered by GitBook
On this page
  • Prerequisites
  • Verifiable Credential JSON Schema
  • Who can undertake this operation?
  • Create Credential Schema
  • Read Credential Schemas
  • Update Credential Schema
  • Read Verifiable Credential JSON Schema

Was this helpful?

Edit on GitHub
  1. Guides
  2. API Guides
  3. Credentials

Credential Schemas

Last updated 1 year ago

Was this helpful?

Credential schemas are used to define the structure of the claims of a verifiable credential (VC) and are associated with the property of a credential. Schemas use the specification, published by the W3C Credentials Working Group.

Using schemas in the credential workflow allows Tenants, Organisations and users to:

  • Agree on the structure of data and facilitate data exchange

  • Extract information from the schema

It is possible to create a credential without specifying a schema via the API, however, when using Meeco's Enterprise Portal to create credentials, this step is mandatory. In the Enterprise Portal, a user is required to upload a schema file which is then visually displayed as a form.

A credential schema, once published, is versioned and made available via a public URL. This allows anyone to validate it at any point in time.

Prerequisites

  • Verifiable Credential JSON Schema

Verifiable Credential JSON Schema

Each VC JSON Schema consists of the following mandatory attributes:

  • Name - A locally unique identifier to address the VC schema.

  • JSON Schema – Object that describes the schema the credential is validated against.

are plain JSON objects that cosist of following mandatory attributes (at the top level):

  • $schema - The schema specification used (e.g. https://json-schema.org/draft/2019-09/schema)

  • required – Array of required properties. Array MUST include id.

  • additionalProperties – MUST be false

  • type – MUST be object

Below is an example JSON schema. Note that all the attributes contained within a JSON schema will be used to form a credential. Attributes can be customised, and those that appear in the example below are indicative of possible options.

{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "title": "Example",
  "description": "Example",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
    }
  },
  "required": ["id"],
  "additionalProperties": false,
}

Note that the $id property of the JSON Schema is set by the platform. When one is present in the schema, it will be overridden.

Also note that https://json-schema.org/draft/2020-12/schema is not supported at this point in time.

Who can undertake this operation?

Credential schemas are created and managed by Tenant Administrators who can assign them to Organisations.

An Organisation can list the credential schemas that are assigned to them.

Anyone can read the JSON schema (via a separate endpoint) that is part of the credential schema object.

Create Credential Schema

Creation of a credential schema.

Endpoint

POST /schemas

Request

  • Name – Name of the credential schema

  • JSON Schema - JSON schema file

  • List of organisations - Organisations where this credential schema can be used (optional)

Response

The response received is a credential schema object. Upon creation, version 1.0 is assigned.

Read Credential Schemas

Retrieve a list of credential schemas.

Endpoint

GET /schemas

Request

  • Organisation (header)

Response

A list of credential schema objects available to the user.

In the context of an Organisation, the organization_ids attribute contains only one item: caller organisation ID.

Update Credential Schema

Update an existing credential schema by ID.

Note that in this version, the schema cannot be updated.

Endpoint:

PUT /schemas/{id}

Request

  • The ID of the credential schema

  • Name – Name of the credential schema

  • List of organisations - Organisations where this credential schema can be used (optional)

Response

The updated credential schema object.

Read Verifiable Credential JSON Schema

A public endpoint that returns the JSON schema file. No authentication necessary.

Endpoint

GET /schemas/{id}/{version}/schema.json

Request

  • Id – ID of the Credential Schema

  • Version – Version of the credential schema

Response

Returns JSON schema for a credential schema.

Data Schema
Verifiable Credentials JSON Schema
JSON schemas