Create Presentation

Create Presentation from a Credential #

The presentations endpoint may be used to retrieve a Verifiable Presentation for a requested credential type held by a DID. For instance, this could be used to retrieve a DID’s IdentityCredential.

Request #

Method #

Request methodEndpoint
POST/api/v1/credentials/presentations

Headers #

Authentication
Please see Using a Token for a detailed description of how to authenticate yourself with our API.
NameValue
Content-Typeapplication/json
AuthorizationBearer [token]

Body #

KeyDescriptionTypeRequired
holderDidDID of the holder for the requested presentationstring
credentialTypeType of credential that a presentation is requested forenum(string) | IdentityCredential OR DSCSAATPCredential

Examples #

Example request body
{
    "holderDid": "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH",
    "credentialType": "IdentityCredential"
}
Example response body
{
  "verifiableCredential": [
    {
      "proof": {
        "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19...",
        "type": "Ed25519Signature2018",
        "created": "2022-03-17T12:30:54Z",
        "proofPurpose": "assertionMethod",
        "verificationMethod": "did:key:z6MkicdicToW5HbxPP7zZV1H7RHvXgRMhoujWAF2n5WQkdd2#z6MkicdicToW5HbxPP7zZV1H7RHvXgRMhoujWAF2n5WQkdd2"
      },
      "id": "urn:uuid:31ec4c88-56f4-420d-a525-aba23a59af5d",
      "type": ["VerifiableCredential", "IdentityCredential"],
      "issuer": "did:key:z6MkicdicToW5HbxPP7zZV1H7RHvXgRMhoujWAF2n5WQkdd2",
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://open-credentialing-initiative.github.io/schemas/credentials/IdentityCredential-v1.0.0.jsonld",
        "https://spherity.github.io/vc-status-2021-ldap/contexts/vc-status-2021-ldap/v1.jsonld"
      ],
      "issuanceDate": "2022-03-17T12:30:54.121Z",
      "expirationDate": "2023-03-17T12:30:54.116Z",
      "credentialStatus": {
        "id": "ldaps://127.0.0.1:1111/o=urn:uuid:31ec4c88-56f4-420d-a525-aba23a59af5d,cn=CRL%20111,ou=Demo,dc=DemoIssuer,dc=com",
        "ssl": true,
        "host": "127.0.0.1:1111",
        "type": "RevocationStatus2021LDAP",
        "query": "o={{0}},cn={{1}},ou={{2}},dc={{3}}",
        "params": [
          "urn:uuid:31ec4c88-56f4-420d-a525-aba23a59af5d",
          "CRL 111",
          "Demo",
          "com"
        ]
      },
      "credentialSubject": {
        "id": "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH",
        "type": "IdentityCredential",
        "legalName": "Some Name",
        "issuerName": "DemoIssuer",
        "postalCode": "001111",
        "addressRegion": "Some Region",
        "streetAddress": "Some Street",
        "addressCountry": "Some Country",
        "addressLocality": "Some Locality",
        "parentOrganization": "Some Organization"
      }
    }
  ],
  "holder": "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH",
  "type": ["VerifiablePresentation"],
  "@context": ["https://www.w3.org/2018/credentials/v1"],
  "issuanceDate": "2022-03-17T12:30:54.000Z",
  "proof": {
    "type": "JwtProof2020",
    "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9..."
  }
}