Basic Credential Issuance Payload
This document explains the structure of the payload
object used in credential issuance. It outlines its key components, role, and usage, providing a comprehensive understanding of how the payload
object functions within the system.
Overview
The payload
object contains the core details required for issuing credentials. It defines the schemas, attributes, and formats associated with the request. This modular design ensures flexibility and precision in data handling.
Structure
The payload
object is defined by the following properties:
-
schemaId
- Type:
string
- Description: The unique identifier for the schema. This defines the structure of the credential or data being requested.
- Required: Yes
- Type:
-
expirationDate
- Type:
string
(ISO 8601 format) - Description: The optional expiration date for the credential or data request.
- Example:
2024-07-15T13:45:30Z
- Type:
-
format
- Type:
string
- Description: Specifies the format of the credential. Examples include
W3C
andsd-jwt
. - Default:
W3C
- Type:
-
attributes
- Type:
array
- Description: An array of
attributes
objects, each representing a key-value pair to be included in the credential.
- Type:
Attributes Object Structure
Each attributes
object within the payload
array has the following properties:
-
key
- Type:
string
- Description: The name of the attribute, corresponding to a field in the schema.
- Required: Yes
- Type:
-
value
- Type:
any
- Description: The value assigned to the key. This can be any data type based on the schema.
- Required: No
- Type:
Example Payload
Here is an example of a complete payload
object:
{
"payload": {
"schemaId": "https://137.dev-one37.id/bc/public/schemas/com.one37id.email/1.0",
"expirationDate": "2024-12-31T23:59:59Z",
"format": "w3c",
"attributes": [
{
"key": "email",
"value": "user@example.com"
},
{
"key": "_namespace",
"value": "personal.contact.verifiedemail"
}
]
}
}
Explanation
schemaId
: Specifies the schema used for verifying theemail
attribute.expirationDate
: Sets the expiration date for the data request.format
: Indicates the format of the credential asw3c
.attributes
: Includes an array of key-value pairs defining the data points for the credential.