...
The Account Consent API specifies a RESTful API for consent management for accounts information sharing in WSO2 Open Banking. This API is secured with basic authentication. For more information, see configuring basic authentication for Consent Management APIs.
Info |
---|
You can find the REST API documentation for Accounts Information Sharing Consent Management APIs below: |
The following section contains sample requests and responses to the Account Information Sharing Consent Management v1.3.0 resources.
Create account consent resource
Creates an account information consent resource at the ASPSP regarding access to accounts of a given PSU-ID specified in this request. These accounts must be addressed explicitly in the method as parameters.
POST /berlin130/accounts
Localtabgroup |
---|
Localtab |
---|
| Code Block |
---|
curl -X POST \
https://localhost:9446/consent/berlin130/accounts \
-H 'Accept-Encoding: gzip,deflate' \
-H 'App-ID: 3' \
-H 'Authorization: Basic YWRtaW5Ad3NvMi5jb206d3NvMjEyMw==' \
-H 'Cache-Control: no-cache' \
-H 'Connection: Keep-Alive' \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Date: Tue, 27 Aug 2019 20:22:30 IST' \
-H 'Digest: SHA-256=Td/uza9bWMonzlIWCuWwnCurZJklfFUSHcmvpfWGLG8=' \
-H 'Host: localhost:9446' \
-H 'PSU-ID: admin@wso2.com@carbon.super' \
-H 'PSU-ID-Type: email' \
-H 'PSU-IP-Address: 127.0.1.1' -k \
-H 'Signature: keyId=\"SN=495062066,CA=CN=Unknown,OU=Unknown,O=Unknown,L=Unknown,ST=Unknown,C=Unknown\",algorithm=\"rsa-sha256\", headers=\"digest x-request-id date psu-id\",signature=cWBuhyIs0Y9rlAoV6/Zy72TahTCufNS8QhfqcPEtrgaUvuBCck81Z6hesvn0rKSXKC3LOVC664x4718dk7pDrgkpabUGhvLtc51rn4dkZ8vPdE4xztoAImVX6fZqnR/Ju3i5s/bbrLo0IiNPu/juWs1GEGK4XgrP8e5UOGMvkQDuuluvWEWjkW/WmISbxBhNjyrXW3Mc9T4KU/PI/LcW49CfyZw6c2MJ35Mg8pOW6QKY+E4CLKCN4QQ5Mp58dJknivIPGeoVPEzE/xlR8TzTxSNt5YJ17SDOMoQgUGUryfFsM77CUk4ZE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fzedVoH3ZEQBJmKXTfBrJ7Z3EWFXifgvdLqBJt8cFXEzjHTRdwBTeUdgjpsyRcbCgTWCTqk6bW5IaZUKkgW8Pr1KI5D3V15iflEoaXut5Rm1CTNDXkl3oKjG8qaSdDX4aflq3tLaj8Rx8JbOig+q99pGJK4hWhHI6nVl' \
-H 'TPP-Unique-ID: PSDUK-NCA-2' \
-H 'Transfer-Encoding: chunked' \
-H 'User-Agent: Synapse-PT-HttpComponents-NIO' \
-H 'X-Request-ID: 914d6152-b760-4360-8655-45490cf85725' \
-d '{
"access":{
"availableAccounts":"allAccounts"
},
"recurringIndicator":false,
"validUntil":"2020-12-31",
"frequencyPerDay":1,
"combinedServiceIndicator":false
}' |
|
Localtab |
---|
| Code Block |
---|
{
"consentStatus":"received",
"consentId":"792bb4eb-21de-4011-ae8d-cba2401152e1",
"scaMethods":[
{
"authenticationType":"SMS_OTP",
"authenticationMethodId":"sms-otp",
"name":"sms-otp",
"explanation":"SMS based one time password"
}
],
"chosenScaMethod":{
"authenticationType":"SMS_OTP",
"authenticationMethodId":"sms-otp",
"name":"sms-otp",
"explanation":"SMS based one time password"
},
"_links":{
"scaStatus":{
"href":"/consents/792bb4eb-21de-4011-ae8d-cba2401152e1/authorisations/de1449ee-13cb-4f9d-9d99-1207f40adf90"
},
"scaOAuth":{
"href":"https://localhost:8243/.well-known/openid-configuration"
},
"self":{
"href":"https://localhost:8243/xs2a/1.3.3/consents/792bb4eb-21de-4011-ae8d-cba2401152e1"
}
}
} |
|
|
Retrieve account consent resource
Reads the exact definition of the given consent resource {consentId}
including the validity status.
GET /berlin130/accounts/{consentId}
Localtabgroup |
---|
Localtab |
---|
| Code Block |
---|
curl -X GET \
https://localhost:9446/consent/berlin130/accounts/5e091f23-a554-45ad-ac15-cfe338b58142 \
-H 'X-Request-ID: 914d6152-b760-4360-8655-45490cf85720'\
-H 'Digest: SHA-256=Td/uza9bWMonzlIWCuWwnCurZJklfFUSHcmvpfWGLG8=' \
-H 'Signature: keyId=\"SN=495062066,CA=CN=Unknown,OU=Unknown,O=Unknown,L=Unknown,ST=Unknown,C=Unknown\",algorithm=\"rsa-sha256\", headers=\"digest x-request-id date psu-id\",signature=cWBuhyIs0Y9rlAoV6/Zy72TahTCufNS8QhfqcPEtrgaUvuBCck81Z6hesvn0rKSXKC3LOVC664x4718dk7pDrgkpabUGhvLtc51rn4dkZ8vPdE4xztoAImVX6fZqnR/Ju3i5s/bbrLo0IiNPu/juWs1GEGK4XgrP8e5UOGMvkQDuuluvWEWjkW/WmISbxBhNjyrXW3Mc9T4KU/PI/LcW49CfyZw6c2MJ35Mg8pOW6QKY+E4CLKCN4QQ5Mp58dJknivIPGeoVPEzE/xlR8TzTxSNt5YJ17SDOMoQgUGUryfFsM77CUk4ZE2nOiz6PyVWWSuPjKc99o2xw6Q2m99K09w==' \
-H 'TPP-Signature-Certificate: MIIDdzCCAl+gAwIBAgIEHYIMMjANBgkqhkiG9w0BAQsFADBsMRAwDgYDVQQGEwdVbmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYDVQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRAwDgYDVQQDEwdVbmtub3duMB4XDTE4MTEyOTA5MzIwMloXDTE5MDIyNzA5MzIwMlowbDEQMA4GA1UEBhMHVW5rbm93bjEQMA4GA1UECBMHVW5rbm93bjEQMA4GA1UEBxMHVW5rbm93bjEQMA4GA1UEChMHVW5rbm93bjEQMA4GA1UECxMHVW5rbm93bjEQMA4GA1UEAxMHVW5rbm93bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANYcaJyy1CaDbh8/ZH3hDd7Ek8QUEJzDdUbpJCP1DEO8jxYfTuMUUbXK813S3QffEMxkC129NUuTvtweNL+LxDdmAzIV3lkbwLHtqefYRIk0XAOC6TFnrZzgZLrHdctyx0jnVgWpnGPJwXJNdeyvYXeUcB6Cqhlk4QX4XOWtI6u4hw3xSwVRyIzKvI0XFIXVHDoluCoKljVW3dTQqEMtYyQRaUfcvrZqwc0tXIHn8fFJAvinuZzuLMLl7UYpfY4HtcFGsAnk/0gMKsKErZfUa2PsCj+a2Pe1R/vQaSNHrU2RRGZqANRmNwsccxKEJiqurI1e75LRybP5gjkvXiAC7lcCAwEAAaMhMB8wHQYDVR0OBBYEFCOWzWtwpvb/keDd3MmFxYLE3fTQMA0GCSqGSIb3DQEBCwUAA4IBAQCFRYB8liz/mGWVeuQPXcqaTY1AcI+1TkO9kcGywnTPZuP/z45ULgvO6UC8V8Qs22Zx6R393iq2iJz5lONDBcNXeWw+a5kYJGjUaOCyQo5lYHeCCmG6dFBC3tiQs01Cf7WWr5xbJSqVUID6wwACP0WMTLMBDpbCeQxgMYwCHaPxLE8/0YRnfzedVoH3ZEQBJmKXTfBrJ7Z3EWFXifgvdLqBJt8cFXEzjHTRdwBTeUdgjpsyRcbCgTWCTqk6bW5IaZUKkgW8Pr1KI5D3V15iflEoaXut5Rm1CTNDXkl3oKjG8qaSdDX4aflq3tLaj8Rx8JbOig+q99pGJK4hWhHI6nVl' \
-H 'PSU-IP-Address: 127.0.1.1' \
-H 'Accept-Encoding: gzip,deflate' -k \
-H 'Authorization: Basic YWRtaW5Ad3NvMi5jb206d3NvMjEyMw==' \
-H 'TPP-Unique-ID: PSDUK-NCA-2' |
|
Localtabgroup |
---|
Code Block |
---|
{
"access":{
},
"recurringIndicator":false,
"validUntil":"2020-12-31",
"frequencyPerDay":1,
"lastActionDate":"2019-08-28",
"consentStatus":"received",
"links":{
"card-account":{
"href":"card-accounts/"
},
"accounts":{
"href":"accounts/"
}
}
} |
|
|
Retrieve the status of an account consent resource
Reads the transaction status of the addressed consent resource.
GET /berlin130/accounts/{consentId}
Localtabgroup |
---|
Localtab |
---|
| Code Block |
---|
curl -X GET \
https://localhost:9446/consent/berlin130/accounts/5e091f23-a554-45ad-ac15-cfe338b58142/status \
-H 'Accept-Encoding: gzip,deflate' \
-H 'Authorization: Basic YWRtaW5Ad3NvMi5jb206d3NvMjEyMw==' \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Date: Tue, 27 Aug 2019 20:22:30 IST' \
-H 'Digest: SHA-256=Td/uza9bWMonzlIWCuWwnCurZJklfFUSHcmvpfWGLG8=' \
-H 'PSU-IP-Address: 127.0.1.1' \
-H 'Signature: keyId=\"SN=495062066,CA=CN=Unknown,OU=Unknown,O=Unknown,L=Unknown,ST=Unknown,C=Unknown\",algorithm=\"rsa-sha256\", headers=\"digest x-request-id date psu-id\",signature=cWBuhyIs0Y9rlAoV6/Zy72TahTCufNS8QhfqcPEtrgaUvuBCck81Z6hesvn0rKSXKC3LOVC664x4718dk7pDrgkpabUGhvLtc51rn4dkZ8vPdE4xztoAImVX6fZqnR/Ju3i5s/bbrLo0IiNPu/juWs1GEGK4XgrP8e5UOGMvkQDuuluvWEWjkW/WmISbxBhNjyrXW3Mc9T4KU/PI/LcW49CfyZw6c2MJ35Mg8pOW6QKY+E4CLKCN4QQ5Mp58dJknivIPGeoVPEzE/xlR8TzTxSNt5YJ17SDOMoQgUGUryfFsM77CUk4ZE2nOiz6PyVWWSuPjKc99o2xw6Q2m99K09w==' \
-H 'TPP-Signature-Certificate: MIIDdzCCAl+gAwIBAgIEHYIMMjANBgkqhkiG9w0BAQsFADBsMRAwDgYDVQQGEwdVbmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYDVQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRAwDgYDVQQDEwdVbmtub3duMB4XDTE4MTEyOTA5MzIwMloXDTE5MDIyNzA5MzIwMlowbDEQMA4GA1UEBhMHVW5rbm93bjEQMA4GA1UECBMHVW5rbm93bjEQMA4GA1UEBxMHVW5rbm93bjEQMA4GA1UEChMHVW5rbm93bjEQMA4GA1UECxMHVW5rbm93bjEQMA4GA1UEAxMHVW5rbm93bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANYcaJyy1CaDbh8/ZH3hDd7Ek8QUEJzDdUbpJCP1DEO8jxYfTuMUUbXK813S3QffEMxkC129NUuTvtweNL+LxDdmAzIV3lkbwLHtqefYRIk0XAOC6TFnrZzgZLrHdctyx0jnVgWpnGPJwXJNdeyvYXeUcB6Cqhlk4QX4XOWtI6u4hw3xSwVRyIzKvI0XFIXVHDoluCoKljVW3dTQqEMtYyQRaUfcvrZqwc0tXIHn8fFJAvinuZzuLMLl7UYpfY4HtcFGsAnk/0gMKsKErZfUa2PsCj+a2Pe1R/vQaSNHrU2RRGZqANRmNwsccxKEJiqurI1e75LRybP5gjkvXiAC7lcCAwEAAaMhMB8wHQYDVR0OBBYEFCOWzWtwpvb/keDd3MmFxYLE3fTQMA0GCSqGSIb3DQEBCwUAA4IBAQCFRYB8liz/mGWVeuQPXcqaTY1AcI+1TkO9kcGywnTPZuP/z45ULgvO6UC8V8Qs22Zx6R393iq2iJz5lONDBcNXeWw+a5kYJGjUaOCyQo5lYHeCCmG6dFBC3tiQs01Cf7WWr5xbJSqVUID6wwACP0WMTLMBDpbCeQxgMYwCHaPxLE8/0YRnfzedVoH3ZEQBJmKXTfBrJ7Z3EWFXifgvdLqBJt8cFXEzjHTRdwBTeUdgjpsyRcbCgTWCTqk6bW5IaZUKkgW8Pr1KI5D3V15iflEoaXut5Rm1CTNDXkl3oKjG8qaSdDX4aflq3tLaj8Rx8JbOig+q99pGJK4hWhHI6nVl' \
-H 'TPP-Unique-ID: PSDUK-NCA-2' -k \
-H 'X-Request-ID: 914d6152-b760-4360-8655-45490cf85720' |
|
Localtab |
---|
| Code Block |
---|
{
"consentStatus": "received"
} |
|
|
Remove accounts consent resource
Deletes the consent resource with the given consentId
.
DELETE /berlin130/accounts/{consentId}
Localtabgroup |
---|
Localtab |
---|
| Code Block |
---|
curl -X DELETE \
https://localhost:9446/consent/berlin130/accounts/5e091f23-a554-45ad-ac15-cfe338b58142 \
-H 'Accept-Encoding: gzip,deflate' \
-H 'Authorization: Basic YWRtaW5Ad3NvMi5jb206d3NvMjEyMw==' \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Date: Tue, 27 Aug 2019 20:22:30 IST' \
-H 'Digest: SHA-256=Td/uza9bWMonzlIWCuWwnCurZJklfFUSHcmvpfWGLG8=' \
-H 'PSU-IP-Address: 127.0.1.1' \
-H 'Signature: keyId=\"SN=495062066,CA=CN=Unknown,OU=Unknown,O=Unknown,L=Unknown,ST=Unknown,C=Unknown\",algorithm=\"rsa-sha256\", headers=\"digest x-request-id date psu-id\",signature=cWBuhyIs0Y9rlAoV6/Zy72TahTCufNS8QhfqcPEtrgaUvuBCck81Z6hesvn0rKSXKC3LOVC664x4718dk7pDrgkpabUGhvLtc51rn4dkZ8vPdE4xztoAImVX6fZqnR/Ju3i5s/bbrLo0IiNPu/juWs1GEGK4XgrP8e5UOGMvkQDuuluvWEWjkW/WmISbxBhNjyrXW3Mc9T4KU/PI/LcW49CfyZw6c2MJ35Mg8pOW6QKY+E4CLKCN4QQ5Mp58dJknivIPGeoVPEzE/xlR8TzTxSNt5YJ17SDOMoQgUGUryfFsM77CUk4ZE2nOiz6PyVWWSuPjKc99o2xw6Q2m99K09w==' \
-H 'TPP-Signature-Certificate: MIIDdzCCAl+gAwIBAgIEHYIMMjANBgkqhkiG9w0BAQsFADBsMRAwDgYDVQQGEwdVbmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYDVQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRAwDgYDVQQDEwdVbmtub3duMB4XDTE4MTEyOTA5MzIwMloXDTE5MDIyNzA5MzIwMlowbDEQMA4GA1UEBhMHVW5rbm93bjEQMA4GA1UECBMHVW5rbm93bjEQMA4GA1UEBxMHVW5rbm93bjEQMA4GA1UEChMHVW5rbm93bjEQMA4GA1UECxMHVW5rbm93bjEQMA4GA1UEAxMHVW5rbm93bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANYcaJyy1CaDbh8/ZH3hDd7Ek8QUEJzDdUbpJCP1DEO8jxYfTuMUUbXK813S3QffEMxkC129NUuTvtweNL+LxDdmAzIV3lkbwLHtqefYRIk0XAOC6TFnrZzgZLrHdctyx0jnVgWpnGPJwXJNdeyvYXeUcB6Cqhlk4QX4XOWtI6u4hw3xSwVRyIzKvI0XFIXVHDoluCoKljVW3dTQqEMtYyQRaUfcvrZqwc0tXIHn8fFJAvinuZzuLMLl7UYpfY4HtcFGsAnk/0gMKsKErZfUa2PsCj+a2Pe1R/vQaSNHrU2RRGZqANRmNwsccxKEJiqurI1e75LRybP5gjkvXiAC7lcCAwEAAaMhMB8wHQYDVR0OBBYEFCOWzWtwpvb/keDd3MmFxYLE3fTQMA0GCSqGSIb3DQEBCwUAA4IBAQCFRYB8liz/mGWVeuQPXcqaTY1AcI+1TkO9kcGywnTPZuP/z45ULgvO6UC8V8Qs22Zx6R393iq2iJz5lONDBcNXeWw+a5kYJGjUaOCyQo5lYHeCCmG6dFBC3tiQs01Cf7WWr5xbJSqVUID6wwACP0WMTLMBDpbCeQxgMYwCHaPxLE8/0YRnfzedVoH3ZEQBJmKXTfBrJ7Z3EWFXifgvdLqBJt8cFXEzjHTRdwBTeUdgjpsyRcbCgTWCTqk6bW5IaZUKkgW8Pr1KI5D3V15iflEoaXut5Rm1CTNDXkl3oKjG8qaSdDX4aflq3tLaj8Rx8JbOig+q99pGJK4hWhHI6nVl' \
-H 'TPP-Unique-ID: PSDUK-NCA-2' -k \
-H 'X-Request-ID: 914d6152-b761-4360-8655-45490cf85720' |
|
Localtab |
---|
| On the successful deletion of the consent, you get a 204 No Content response. |
|