Add offer
POST/api/oid4vci/offer
Creates a new credential offer
Request
- application/json
Bodyrequired
credential_issuerstringrequired
credential_configuration_idsstring[]required
grants object
Responses
- 200
- 403
- application/json
- Schema
- Example (auto)
Schema
idnumberrequired
createddate-timerequired
preAuthorizedCodestringrequired
holderIdstring
credentialTypestringrequired
credentialIdstring
revokedbooleanrequired
credentialSubject objectrequired
{
"id": 0,
"created": "2024-07-29T15:51:28.071Z",
"preAuthorizedCode": "string",
"holderId": "string",
"credentialType": "string",
"credentialId": "string",
"revoked": true,
"credentialSubject": {
"id": "string"
}
}
Forbidden
- application/json
- Schema
- Example (auto)
Schema
namestringrequired
statusstringrequired
codenumberrequired
messageobject
errorstring
{
"name": "string",
"status": "string",
"code": 0,
"message": {},
"error": "string"
}
Authorization: oauth2
name: oauth2type: oauth2scopes:wallet_manage_all_credentials
flows: { "password": { "scopes": { "wallet_view_did": "wallet_view_did", "wallet_manage_keys": "wallet_manage_keys", "wallet_use_keys": "wallet_use_keys", "wallet_view_own_credentials": "wallet_view_own_credentials", "wallet_view_all_credentials": "wallet_view_all_credentials", "wallet_manage_own_credentials": "wallet_manage_own_credentials", "wallet_manage_all_credentials": "wallet_manage_all_credentials", "wallet_issue_credentials": "wallet_issue_credentials", "wallet_view_presentations": "wallet_view_presentations" } } }
- curl
- http
- CURL
curl -L 'https://tsg.dataspac.es/api/oid4vci/offer' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"credential_issuer": "string",
"credential_configuration_ids": [
"string"
],
"grants": {
"urn:ietf:params:oauth:grant-type:pre-authorized_code": {
"pre-authorization_code": "string",
"tx_code": {
"input_mode": "string",
"length": 0,
"description": "string"
},
"interval": 0,
"authorization_server": "string"
},
"authorization_code": {
"issuer_state": "string",
"authorization_server": "string"
}
}
}'