Skip to main content

Import credential schema

Imports a shared credential schema to a mobile verifier. These schemas can be used to create proof schemas.

Make an HTTP request on the URL retrieved from the shared credential schema to preview the schema. To import, pass the schema along with the organization ID of the mobile verifier.

Function

importCredentialSchema(request: ImportCredentialSchemaRequest): Promise<CredentialSchema["id"]>

Parameters

export interface ImportCredentialSchemaRequest {
organisationId: string,
schema: ImportCredentialSchemaRequestSchema
}
export interface ImportCredentialSchemaRequestSchema {
id: string;
createdDate: string;
lastModified: string;
name: string;
format: string;
revocationMethod: string;
organisationId: string;
importedSourceUrl: string;
claims: ImportCredentialSchemaClaimSchema[];
walletStorageType?: WalletStorageType;
schemaId: string;
schemaType: CredentialSchemaType;
layoutType?: LayoutType;
layoutProperties?: ImportCredentialSchemaLayoutProperties;
allowSuspension?: boolean;
}

Fields

  • url - URL of the shared proof schema, typically from a QR code.

  • organisationId - The organization ID of the mobile verifier.

Return value

The uuid of the imported credential schema is returned.