Create Credential Issuance Rule

POST {{apiPath}}/environments/{{envID}}/credentialTypes/{{credentialTypeID}}/issuanceRules

Use the POST {{apiPath}}/environments/{{envID}}/credentialTypes/{{credentialTypeID}}/issuanceRules operation to create a credential issuance rule for the specified credential type in the specified environment.

Note: You cannot create an issuance rule for a credential type if that credential type has management.mode set to MANAGED.

Prerequisites

Create a credential type to get a credentialTypeId for the endpoint. See also PingOne Credentials, especially Credential Types.

See Credential Issuance Rules data model for full property descriptions.

PropertyTypeRequired?
automationObjectRequired
automation.issueStringRequired
automation.revokeStringRequired
automation.updateStringRequired
digitalWalletApplication.idStringOptional
filterObjectOptional
filter.groupIdsString[]Required/Optional
filter.populationIdsString[]Required/Optional
filter.scimStringRequired/Optional
notificationObjectOptional
notification.templateObjectOptional
notification.template.localeStringRequired
notification.template.variantStringRequired
notification.template.variablesObject[]Required/Optional
statusStringRequired

Note: If filter.groupIds or filter.populationIds is used, a user can belong to any group or population in the array and the issuance rule applies to that user.

When an action in automation is set to PERIODIC and the period arrives, the credential service uses a notification template appropriate to the action, credential_issued, credential_updated, or credential_revoked, to send notice of the action taken to the user via email or SMS text. The notification.template object can define a variant and locale for the notifications, if needed, and applies to actions initiated periodically and actions initiated by an Apply Credential Issuance Rule Staged Changes request.

Note: The notification.template object applies a variant and locale to all three credential notification templates: credential_issued, credential_updated, and credential_revoked. When adding a variant or locale to any of the three notification templates, consider adding the same variant or locale to the other notification templates. If a matching variant is not defined, the default notification template is used. If a locale is not defined the notification template uses the user's preferred language or, if the user has no preferred language, the default language of the environment.

Request Body

{"status"=>"ACTIVE", "digitalWalletApplication"=>{"id"=>"{{digitalWalletApplicationID}}"}, "filter"=>{"populationIds"=>["{{popID}}"]}, "automation"=>{"issue"=>"PERIODIC", "update"=>"ON_DEMAND", "revoke"=>"ON_DEMAND"}}

RESPONSES

status: Created

{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/8a3a6157-5fb9-40b7-96c0-909331858248/issuanceRules/7888a5ed-ae7b-482c-973d-afd27973099c"}},"id":"7888a5ed-ae7b-482c-973d-afd27973099c","createdAt":"2023-03-01T20:29:51.912Z","updatedAt":"2023-03-01T20:29:51.912Z","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"credentialType":{"id":"8a3a6157-5fb9-40b7-96c0-909331858248"},"status":"ACTIVE","digitalWalletApplication":{"id":"6815c8a6-bc0b-4105-8f37-50f6c35583d7"},"filter":{"populationIds":["e85091a0-ddca-422e-935e-d1faf139df3d"]},"automation":{"issue":"PERIODIC","update":"ON_DEMAND","revoke":"ON_DEMAND"}}