Archived 2022.11.20. Content moved to error scenarios and responses.
Question
If a Data Holder (DH) gets a request for the Get Accounts API, and some accounts are not shareable, which of the following responses is correct:
- list all the accounts
- list only the shareable accounts
- return an error
Some APIs request data from multiple specified accounts. These APIs include Get Bulk Balances, Get Bulk Direct Debits and Get Scheduled Payments Bulk. If requests to these APIs include accounts that cannot be shared, should the DH respond with:
- an error
- data for only the accounts that can be shared
Answer
In a call to the Get Accounts API, the DH should return only the list of accounts that can be shared. If an account is not shareable it must not be returned in the accounts list.
For API calls that specify multiple accounts, where a request specifies an accountId that is not shareable, then an error must be returned.
If the accountId
is requested in the URL (for example, Get Account Balance), the HTTP status code is 404 (Not Found).
If the accountId
is provided in the request body (for example, Get Balances For Specific Accounts) then a 422 (Unprocessable Entity) status code is returned.
Standardised CDR error codes apply to both error responses. See:
- CDS Get Account Balance
- CDS Get Balances for Specific Accounts
- CDS Error Codes, 404 (Not Found)
- CDS Error Codes, 422 (Unprocessable Entity)
The DH must return IDs of blocked accounts in the "detail" field. In CDS Error Codes, 422 (Unprocessable Entity) Errors, the detail field description says "The error detail
is the account ID of the resource being requested."
Comments
0 comments
Please sign in to leave a comment.