Offers (DCP)

Specifications and best practice implementations for Verifiable Credentials are currently being developed. This page is expected to be updated, closely following these developments.

The POST request to the /offers endpoint prompts a holder to request a new Verifiable Credential.

The POST request to the /offers is an OPTIONAL endpoint and is part of the iSHARE Framework's Verifiable Credentials support in line with the Decentralised Claims Protocol (DCP).

Issuer initiates reissuance of credential at holder

post

A Credential Issuer can proactively prompt a Holder to request a new Verifiable Credential. More information in the DCP specification.

Body
all ofOptional
Responses
200

Credential offer received successfully

No content

post
/offers
POST /offers HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 2

{}

No content

Request model

The model for the CredentialOfferMessage is defined in: https://eclipse-dataspace-dcp.github.io/decentralized-claims-protocol/v1.0/resources/issuance/credential-offer-message-schema.json.

  • @context Array of Strings. Root level. (Required) Specifies a valid Json-Ld context. Must contain "https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"

  • type String. Root level. (Required) A string specifying the CredentialOfferMessage type. Must contain "CredentialOfferMessage"

  • issuer

    String. Root level. (Required) The credential issuer DID.

  • credentials Array of Objects. Root level. (Required) An array of credential objects that the issuer supports.

    • id String. Contained in the credential object. (Required) A string defining a unique, stable identifier for this CredentialObject.

    • type String. Contained in credential object. (Required) A string specifying the object type. Must contain CredentialObject.

    • credentialType String. Contained in credential object. A single string specifying type of credential being offered.

    • bindingMethods Array of strings. Contained in credential object. An array of strings defining the key material that an issued credential is bound to.

    • profile String. Contained in credential object. Contains the alias of the profiles, e.g. "vc20-bssl/jwt".

    • issuancePolicy Object. Contained in credential object. A presentation definition signifying the required Verifiable Presentation for issuance. Further details are omitted from this specifications, refer to https://identity.foundation/presentation-exchange/spec/v2.1.1/#presentation-definition for more information.

Example request

POST /offers
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json

{
  "@context": [
    "https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"
  ],
  "type": "CredentialOfferMessage",
  "issuer": "did:ishare:EU.NL.NTRLNL-10000000",
  "credentials": [
    {
      "id": "d5c77b0e-7f4e-4fd5-8c5f-28b5fc3f96d1",
      "type": "CredentialObject",
      "credentialType": "FrameworkRole",
      "bindingMethods": [
        "did:web"
      ],
      "profile": "vc10-sl2021/jwt",
      "issuancePolicy": {
        "id": "a468fc48-5c1a-43c7-903e-ab1851882afb",
        "input_descriptors": [
          {
            "id": "framework-compliance",
            "name": "Requires proof of compliance to framework",
            "purpose" :: 
            "constraints": {
              "fields": [
                {
                  "path": [
                    "$.vc.type"
                  ],
                  "filter": {
                    "type": "string",
                    "pattern": "^FrameworkCompliance$"
                  }
                }
              ]
            }
          }
        ]
      }
    }
  ]
}

Response model

On succesfull receipt of the CredentialOfferMessage, the holder must return a 200 code.

Last updated