Contracts
Gets Consent Flow Contract Details
GET /api/consent-flow-contract?uri=text HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"contract": {
"read": {
"anonymize": true,
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
}
},
"owner": {
"profileId": "text",
"displayName": "",
"shortBio": "",
"bio": "",
"did": "text",
"isPrivate": true,
"email": "text",
"image": "text",
"heroImage": "text",
"websiteLink": "text",
"isServiceProfile": false,
"type": "text",
"notificationsWebhook": "https://example.com",
"display": {
"backgroundColor": "text",
"backgroundImage": "text",
"fadeBackgroundImage": true,
"repeatBackgroundImage": true,
"fontColor": "text",
"accentColor": "text",
"accentFontColor": "text",
"idBackgroundImage": "text",
"fadeIdBackgroundImage": true,
"idBackgroundColor": "text",
"repeatIdBackgroundImage": true
},
"role": "",
"dob": ""
},
"name": "text",
"subtitle": "text",
"description": "text",
"reasonForAccessing": "text",
"image": "text",
"uri": "text",
"needsGuardianConsent": true,
"redirectUrl": "text",
"frontDoorBoostUri": "text",
"createdAt": "text",
"updatedAt": "text",
"expiresAt": "text",
"autoBoosts": [
"text"
],
"writers": [
{
"profileId": "text",
"displayName": "",
"shortBio": "",
"bio": "",
"did": "text",
"isPrivate": true,
"email": "text",
"image": "text",
"heroImage": "text",
"websiteLink": "text",
"isServiceProfile": false,
"type": "text",
"notificationsWebhook": "https://example.com",
"display": {
"backgroundColor": "text",
"backgroundImage": "text",
"fadeBackgroundImage": true,
"repeatBackgroundImage": true,
"fontColor": "text",
"accentColor": "text",
"accentFontColor": "text",
"idBackgroundImage": "text",
"fadeIdBackgroundImage": true,
"idBackgroundColor": "text",
"repeatIdBackgroundImage": true
},
"role": "",
"dob": ""
}
]
}
Creates a Consent Flow Contract for a profile
POST /api/consent-flow-contract HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 700
{
"contract": {
"read": {
"anonymize": true,
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
}
},
"name": "text",
"subtitle": "text",
"description": "text",
"reasonForAccessing": "text",
"needsGuardianConsent": true,
"redirectUrl": "text",
"frontDoorBoostUri": "text",
"image": "text",
"expiresAt": "text",
"autoboosts": [
{
"boostUri": "text",
"signingAuthority": {
"endpoint": "text",
"name": "text"
}
}
],
"writers": [
"text"
]
}
text
This route deletes a Consent Flow Contract
DELETE /api/consent-flow-contract?uri=text HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
Gets Consent Flow Contracts for a profile
25
POST /api/consent-flow-contracts HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 352
{
"limit": 25,
"cursor": "text",
"sort": "text",
"query": {
"read": {
"anonymize": true,
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true
}
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true
}
}
}
}
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"contract": {
"read": {
"anonymize": true,
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
}
},
"name": "text",
"subtitle": "text",
"description": "text",
"reasonForAccessing": "text",
"image": "text",
"uri": "text",
"needsGuardianConsent": true,
"redirectUrl": "text",
"frontDoorBoostUri": "text",
"createdAt": "text",
"updatedAt": "text",
"expiresAt": "text",
"autoBoosts": [
"text"
],
"writers": [
{
"profileId": "text",
"displayName": "",
"shortBio": "",
"bio": "",
"did": "text",
"isPrivate": true,
"email": "text",
"image": "text",
"heroImage": "text",
"websiteLink": "text",
"isServiceProfile": false,
"type": "text",
"notificationsWebhook": "https://example.com",
"display": {
"backgroundColor": "text",
"backgroundImage": "text",
"fadeBackgroundImage": true,
"repeatBackgroundImage": true,
"fontColor": "text",
"accentColor": "text",
"accentFontColor": "text",
"idBackgroundImage": "text",
"fadeIdBackgroundImage": true,
"idBackgroundColor": "text",
"repeatIdBackgroundImage": true
},
"role": "",
"dob": ""
}
]
}
]
}
This route grabs all the data that has been consented for a contract
25
POST /api/consent-flow-contract/data-for-contract HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 188
{
"limit": 25,
"cursor": "text",
"sort": "text",
"uri": "text",
"query": {
"anonymize": true,
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
}
}
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"date": "text"
}
]
}
This route grabs all the data that has been consented by a did
25
POST /api/consent-flow-contract/data-for-did HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 183
{
"limit": 25,
"cursor": "text",
"sort": "text",
"did": "text",
"query": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
},
"id": "text"
}
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"credentials": [
{
"category": "text",
"uri": "text"
}
],
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"date": "text",
"contractUri": "text"
}
]
}
This route grabs all the data that has been consented for all of your contracts
25
POST /api/consent-flow-contract/data HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 175
{
"limit": 25,
"cursor": "text",
"sort": "text",
"query": {
"anonymize": true,
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
}
}
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"date": "text"
}
]
}
Writes a boost credential to a did that has consented to a contract
POST /api/consent-flow-contract/write HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1029
{
"did": "text",
"contractUri": "text",
"boostUri": "text",
"credential": {
"@context": [
"text"
],
"id": "text",
"type": [
"text"
],
"issuer": "text",
"credentialSubject": {
"id": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"refreshService": {
"id": "text",
"type": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"credentialSchema": {
"id": "text",
"type": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"issuanceDate": "text",
"expirationDate": "text",
"credentialStatus": {
"type": "text",
"id": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"name": "text",
"description": "text",
"validFrom": "text",
"validUntil": "text",
"status": {
"type": "text",
"id": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"termsOfUse": {
"type": "text",
"id": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"evidence": {
"type": "text",
"id": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"proof": {
"type": "text",
"created": "text",
"challenge": "text",
"domain": "text",
"nonce": "text",
"proofPurpose": "text",
"verificationMethod": "text",
"jws": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
text
Issues and sends a boost credential via a registered signing authority to a DID that has consented to a contract.
POST /api/consent-flow-contract/write/via-signing-authority HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 106
{
"did": "text",
"contractUri": "text",
"boostUri": "text",
"signingAuthority": {
"name": "text",
"endpoint": "text"
}
}
text
Consents to a Contract with a hard set of terms
POST /api/consent-flow-contract/consent HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 462
{
"terms": {
"read": {
"anonymize": true,
"credentials": {
"shareAll": true,
"sharing": true,
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"sharing": true,
"shared": [
"text"
],
"shareAll": true,
"shareUntil": "text"
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"deniedWriters": [
"text"
]
},
"contractUri": "text",
"expiresAt": "text",
"oneTime": true,
"recipientToken": "text"
}
{
"termsUri": "text",
"redirectUrl": "text"
}
Gets all consented contracts for a user
25
POST /api/consent-flow-contracts/consent HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 399
{
"limit": 25,
"cursor": "text",
"sort": "text",
"query": {
"read": {
"anonymize": true,
"credentials": {
"shareAll": true,
"sharing": true,
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"sharing": true,
"shared": [
"text"
],
"shareAll": true,
"shareUntil": "text"
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
}
}
}
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"expiresAt": "text",
"oneTime": true,
"terms": {
"read": {
"anonymize": true,
"credentials": {
"shareAll": true,
"sharing": true,
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"sharing": true,
"shared": [
"text"
],
"shareAll": true,
"shareUntil": "text"
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"deniedWriters": [
"text"
]
},
"contract": {
"contract": {
"read": {
"anonymize": true,
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": {
"required": true,
"defaultEnabled": true
}
}
}
},
"owner": {
"profileId": "text",
"displayName": "",
"shortBio": "",
"bio": "",
"did": "text",
"isPrivate": true,
"email": "text",
"image": "text",
"heroImage": "text",
"websiteLink": "text",
"isServiceProfile": false,
"type": "text",
"notificationsWebhook": "https://example.com",
"display": {
"backgroundColor": "text",
"backgroundImage": "text",
"fadeBackgroundImage": true,
"repeatBackgroundImage": true,
"fontColor": "text",
"accentColor": "text",
"accentFontColor": "text",
"idBackgroundImage": "text",
"fadeIdBackgroundImage": true,
"idBackgroundColor": "text",
"repeatIdBackgroundImage": true
},
"role": "",
"dob": ""
},
"name": "text",
"subtitle": "text",
"description": "text",
"reasonForAccessing": "text",
"image": "text",
"uri": "text",
"needsGuardianConsent": true,
"redirectUrl": "text",
"frontDoorBoostUri": "text",
"createdAt": "text",
"updatedAt": "text",
"expiresAt": "text",
"autoBoosts": [
"text"
],
"writers": [
{
"profileId": "text",
"displayName": "",
"shortBio": "",
"bio": "",
"did": "text",
"isPrivate": true,
"email": "text",
"image": "text",
"heroImage": "text",
"websiteLink": "text",
"isServiceProfile": false,
"type": "text",
"notificationsWebhook": "https://example.com",
"display": {
"backgroundColor": "text",
"backgroundImage": "text",
"fadeBackgroundImage": true,
"repeatBackgroundImage": true,
"fontColor": "text",
"accentColor": "text",
"accentFontColor": "text",
"idBackgroundImage": "text",
"fadeIdBackgroundImage": true,
"idBackgroundColor": "text",
"repeatIdBackgroundImage": true
},
"role": "",
"dob": ""
}
]
},
"uri": "text",
"consenter": {
"profileId": "text",
"displayName": "",
"shortBio": "",
"bio": "",
"did": "text",
"isPrivate": true,
"email": "text",
"image": "text",
"heroImage": "text",
"websiteLink": "text",
"isServiceProfile": false,
"type": "text",
"notificationsWebhook": "https://example.com",
"display": {
"backgroundColor": "text",
"backgroundImage": "text",
"fadeBackgroundImage": true,
"repeatBackgroundImage": true,
"fontColor": "text",
"accentColor": "text",
"accentFontColor": "text",
"idBackgroundImage": "text",
"fadeIdBackgroundImage": true,
"idBackgroundColor": "text",
"repeatIdBackgroundImage": true
},
"role": "",
"dob": ""
},
"status": "live"
}
]
}
Updates the terms for a consented contract
POST /api/consent-flow-contract/consent/update HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 430
{
"uri": "text",
"terms": {
"read": {
"anonymize": true,
"credentials": {
"shareAll": true,
"sharing": true,
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"sharing": true,
"shared": [
"text"
],
"shareAll": true,
"shareUntil": "text"
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"deniedWriters": [
"text"
]
},
"expiresAt": "text",
"oneTime": true
}
true
Withdraws consent by deleting Contract Terms
DELETE /api/consent-flow-contract/consent/withdraw?uri=text HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
Gets the transaction history for a set of Consent Flow Contract Terms
25
POST /api/consent-flow-contract/consent/history HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 505
{
"limit": 25,
"cursor": "text",
"sort": "text",
"uri": "text",
"query": {
"terms": {
"read": {
"anonymize": true,
"credentials": {
"shareAll": true,
"sharing": true,
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"sharing": true,
"shared": [
"text"
],
"shareAll": true,
"shareUntil": "text"
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
}
}
},
"action": "consent",
"date": {
"$gt": "text"
},
"expiresAt": {
"$gt": "text"
},
"oneTime": true
}
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"expiresAt": "text",
"oneTime": true,
"terms": {
"read": {
"anonymize": true,
"credentials": {
"shareAll": true,
"sharing": true,
"categories": {
"ANY_ADDITIONAL_PROPERTY": {
"sharing": true,
"shared": [
"text"
],
"shareAll": true,
"shareUntil": "text"
}
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"write": {
"credentials": {
"categories": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"personal": {
"ANY_ADDITIONAL_PROPERTY": true
}
},
"deniedWriters": [
"text"
]
},
"id": "text",
"action": "consent",
"date": "text",
"uris": [
"text"
]
}
]
}
Checks if a profile has consented to the specified contract
GET /api/consent-flow-contract/verify?uri=text&profileId=text HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
Syncs credentials to a contract that the profile has consented to
POST /api/consent-flow-contract/sync HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 69
{
"termsUri": "text",
"categories": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
}
}
true
Gets all credentials that were issued via a contract
25
true
POST /api/consent-flow-contract/credentials HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 83
{
"limit": 25,
"cursor": "text",
"sort": "text",
"termsUri": "text",
"includeReceived": true
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"credentialUri": "text",
"termsUri": "text",
"contractUri": "text",
"boostUri": "text",
"category": "text",
"date": "text"
}
]
}
Gets all credentials that were written to any terms owned by this profile
25
false
POST /api/consent-flow-contracts/credentials HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"limit": 25,
"cursor": "text",
"sort": "text",
"includeReceived": false
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"credentialUri": "text",
"termsUri": "text",
"contractUri": "text",
"boostUri": "text",
"category": "text",
"date": "text"
}
]
}
Adds one or more autoboost configurations to an existing consent flow contract. The caller must be the contract owner or a designated writer. The signing authority for each autoboost must be registered to the caller.
POST /api/consent-flow-contracts/autoboosts/add HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 110
{
"contractUri": "text",
"autoboosts": [
{
"boostUri": "text",
"signingAuthority": {
"endpoint": "text",
"name": "text"
}
}
]
}
true
Removes one or more autoboosts from an existing consent flow contract, identified by their boost URIs. The caller must be the contract owner or a designated writer.
POST /api/consent-flow-contracts/autoboosts/remove HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"contractUri": "text",
"boostUris": [
"text"
]
}
true
Was this helpful?