Issue Credential

Issue Credential #

Issue an ATP Credential #

The Create Credential API creates a verifiable credential in response to an onboarding request launched by a trading partner user. The API can be used by the Credential Issuer to provide CARO with the created credentials.

Issued credentials are revocable by default via Spherity’s EthrRevocationRegistry revocation method. If you with to use the LDAP revocation method, make sure to specify the optional credentialStatusId parameter with all necessary information.

Request #

Method #

Request methodEndpoint
POST/api/v1/credentials

Headers #

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

Body #

Issuer Identifier
The Issuer DID is assigned to your Service Provider Account when you get access to CARO. You do not need to specify your DID in any interactions with CARO.
Issuance Date
Issuance Date parameter will only be used to issue credentials that will become valid in the future. You do not need to use this parameter if you are issuing a credential that needs to be valid from the present time onwards.
KeyDescriptionTypeRequired
credentialIdID of the issued credential. If left out, CARO will generate an appropriate ID.string (urn:uuid:)
credentialTypeType of the issued credentialenum(string) / IdentityCredential OR DSCSAATPCredential
credentialStatusIdCredentialStatus URL in LDAP format. If left out, EthrRevocationRegistry method will be used by default.string
recipientDidThe DID that will receive and hold the credentialstring
dataThe json of Credential Datajson
expirationDateCustom expiration date (default: 1 year)string (ISO 8601 format)
issuanceDateCustom issuance date (default: current date)string (ISO 8601 format)
onboardingIdID of the onboarding the credential issuance originates fromstring

Credential Data #

KeyDescriptionTypeRequired
issuerNameThe name of the credential issuerstring
legalNameThe legal name of the organizationstring
streetAddressThe street address of the organizationstring
addressLocalityThe address locality of the organizationstring
addressRegionThe address region of the organizationstring
postalCodeThe postal code of the organizationstring
addressCountryThe address country of the organizationstring
parentOrganizationThe name of the parent organizationstring🟡 \ If type is IdentityCredential
organizationTypeThe type of organizationstring🟡 \ If type is DSCSAATPCredential
identifierThe identifier DID that the credential is issued tostring🟡 \ If type is DSCSAATPCredential

Response #

KeyDescriptionType
idInternal id of the issued credentialstring (uuid)
createdAtTime of credential creationstring (ISO 8601 format)
updatedAtTime of credential creationstring (ISO 8601 format)
typeCreated credential typeenum(string) / IdentityCredential OR DSCSAATPCredential
dataVerifiable credentialcredential data

Examples #

Example request body
{
    "credentialId" : "urn:uuid:31ec4c88-56f4-420d-a525-aba23a59af5d",
    "credentialType": "DSCSAATPCredential",
    "credentialStatusId": "ldap://example.com",
    "expirationDate": "2025-06-01T09:17:17.038Z",
    "issuanceDate": "2022-06-01T09:17:17.038Z",
    "recipientDid": "did:ethr:ropsten:0x022e41cff8e1d8c34f82397312490f96379cac8027696d8774f3eef72551691def",
    "onboardingId": "a0cedaf1-576d-4d6b-a7c6-c3859f9938b2",
    "data": {
      "issuerName": "Example Company",
      "legalName": "ABC Limited",
      "streetAddress": "Plot A, Street B, Area C",
      "addressLocality": "ABC",
      "addressRegion": "EFG",
      "postalCode": "000000",
      "addressCountry": "US",
      "parentOrganization": "Parent",
      "organizationType": "NGO",
      "identifier": "Some reasonable Identifier",
    },
}
Example response body
{
  "id": "780ea089-1eef-4e2a-8666-46d0b1118c59",
  "createdAt": "2022-06-01T09:17:17.038Z",
  "updatedAt": "2022-06-01T09:17:17.038Z",
  "type": "DSCSAATPCredential",
  "data": {
    "@context": [
      ...
    ],
    "id": "urn:uuid:a620a63c-8206-4825-b469-61bd660979c3",
    "type": [
      "VerifiableCredential",
      "DSCSAATPCredential"
    ],
    "issuer": "did:ethr:...",
    "issuanceDate": "2022-06-01T09:17:17.038Z",
    "expirationDate": "2023-06-01T09:17:17.038Z",
    "onboardingId": "a0cedaf1-576d-4d6b-a7c6-c3859f9938b2",
    "credentialSubject": {
      "id": "did:ethr:...",
      "type": "DSCSAATPCredential",
      "issuerName": "Example Issuer",
      "legalName": "ABC Limited",
      "streetAddress": "Plot A, Street B, Area C",
      "postalCode": "000000",
      "organizationType": "NGO",
      "addressCountry": "US",
      "addressLocality": "ABC",
      "addressRegion": "EFG",
      "identifier": "did:ethr:..."
    },
    "proof": {
      "jws": "...",
      "type": "EcdsaSecp256k1RecoverySignature2020",
        "created": "2022-06-01T09:17:17.038Z",
        "proofPurpose": "assertionMethod",
        "verificationMethod": "did:ethr:...#controller"
    }
  }
}