Create a presentation exchange template

The exchange template defines the key authorization request parameters that the verifier uses for wallet engagement and vp_token exchange. Values specified in the exchange template override any default values set in the verifier’s profile.

The exchange template also includes the DCQL (Digital Credential Query Language) query, which specifies the credentials and attributes the verifier requests from the wallet. DCQL enables precise control over what is requested during the presentation exchange. Verifiers can request the minimum set of attributes necessary, especially when using credential formats that support selective disclosure.

POST - https://<hostname>/diagency/v1.0/oidvc/vp/exchange_templates/ 
{
  "method": "POST",
  "body": {
    "name": "Mobile ID Verification",
    "exchange_template": {
    "client_id_prefix": "redirect_uri",
    "dcql_query": {
      “credentials": [
        {
           "id": "mdl",
           "format": "mso_mdoc",
           "meta": {
             "doctype_value": "org.iso.18013.5.1.mDL"
           },
           "claims": [
             {
               "path": [
                 "org.iso.18013.5.1",
                 "driving_privileges"
               ],
               "intent_to_retain": false
             },
             {
               "path": [
                 "org.iso.18013.5.1",
                 "birth_date"
               ],
               "intent_to_retain": false
             }
           ]
         }
       ]
     }
    }
  }
}