Trust Registry Schemas

Get Trust Registry schemas

Returns the Trust Registry schemas

GEThttps://api-testnet.dock.io/trust-registries/{registryId}/schemas
Path parameters
registryId*string

A trust registry id

Query parameters
Response

List of schemas in the trust registry

Body
total*integer

Total number of schemas

Example: 200
list*array of TrustRegistrySchema (object)
Request
const response = await fetch('https://api-testnet.dock.io/trust-registries/{registryId}/schemas', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "total": 200,
  "list": [
    {
      "id": "https://schema.dock.io/ExampleSchema-V5-1722512884923.json",
      "name": "Example Schema",
      "public": false,
      "participantCount": 10,
      "prices": [
        {
          "currency": "USD",
          "digits": 100000000,
          "verifier": "did:dock:xyz"
        }
      ],
      "topParticipants": [
        {
          "id": "23314808-eec6-4492-9a8a-8f32e34b8155",
          "name": "Dock Issuer",
          "did": "did:dock:xyz",
          "description": "Labore voluptate adipisicing magna duis eu fugiat pariatur excepteur irure.",
          "logoUrl": "https://logo.dock.io/participant",
          "infoUrl": "https://info.dock.io/trust-registry/participant/1234",
          "status": "active",
          "role": "issuer",
          "created": "2024-11-21T07:24:54.889Z",
          "suspendedAt": "text",
          "issuerSchemas": [
            "https://schema.dock.io/ExampleSchema-V5-1722512884923.json"
          ],
          "verifierSchemas": [
            "https://schema.dock.io/ExampleSchema-V5-1722512884923.json"
          ]
        }
      ]
    }
  ]
}

Creates or updates a price for a schema ID with given currency and digits on a per issuer basis

POSThttps://api-testnet.dock.io/trust-registries/{registryId}/schemas/{schemaId}/price
Path parameters
registryId*string

A trust registry id

schemaId*string

A schema id

Body

Schema price metadata

currency*string

Currency code

Example: "USD"
digits*one of

Bigint representation of the price. Multiply by 1,000,000 to support fractional cents.

Example: 100000000
verifierDID (string)

DID as fully qualified, typically. did:dock:

Example: "did:dock:xyz"
Response

Trust Registry schema price has been updated

Request
const response = await fetch('https://api-testnet.dock.io/trust-registries/{registryId}/schemas/{schemaId}/price', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "currency": "USD",
      "digits": 100000000
    }),
});
const data = await response.json();
Response
{
  "type": "text",
  "message": "text"
}

Last updated