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.
Request
#
Method
#
Request method | Endpoint |
---|
POST | /api/v1/credentials |
Authentication
Please see Using a Token for a detailed description of how to authenticate yourself with our API.
Note that bearer tokens have a validity of 24 h. Please reuse each token until its expiry.
Name | Value |
---|
Content-Type | application/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.
Key | Description | Type | Required |
---|
credentialId | ID of the issued credential | string | ✅ |
credentialType | Type of the issued credential | enum(string) | IdentityCredential OR DSCSAATPCredential | ✅ |
credentialStatusId | CredentialStatus URL in LDAP format | string | ✅ |
recipientDid | The DID that will receive and hold the credential | string | ✅ |
data | The json of Credential Data | json | ✅ |
expirationDate | Custom expiration date (default: 1 year) | string (ISO 8601 format) | ❌ |
issuanceDate | Custom issuance date (default: current date) | string (ISO 8601 format) | ❌ |
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 valid from the present time onwards.
Credential Data
#
Key | Description | Type | Required |
---|
issuerName | The name of the credential issuer | string | ✅ |
legalName | The legal name of the organization | string | ✅ |
streetAddress | The street address of the organization | string | ✅ |
addressLocality | The address locality of the organization | string | ✅ |
addressRegion | The address region of the organization | string | ✅ |
postalCode | The postal code of the organization | string | ✅ |
addressCountry | The address country of the organization | string | ✅ |
parentOrganization | The name of the parent organization | string | 🟡 | If type is IdentityCredential |
organizationType | The type of organization | string | 🟡 | If type is DSCSAATPCredential |
identifier | The identifier DID that the credential is issued to | string | 🟡 | If type is DSCSAATPCredential |
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",
"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",
},
}