@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Confirmation of Funds API Specification
@base /open-banking/v4.0/cbpii
@version 4.0.0
@auth OAuth2 | OAuth2
@endpoints 4
@toc funds-confirmation-consents(3), funds-confirmations(1)

@group funds-confirmation-consents
@endpoint POST /funds-confirmation-consents
@desc Create Funds Confirmation Consent
@required {Authorization: str # An Authorisation Token as per https://tools.ietf.org/html/rfc6750, Data: map{ExpirationDateTime: str(date-time), DebtorAccount!: map{SchemeName!: str, Identification!: str, Name: str, SecondaryIdentification: str, Proxy: map}}}
@optional {x-fapi-auth-date: str # The time when the PSU last logged in with the TPP.  All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below:  Sun, 10 Sep 2017 19:43:31 UTC, x-fapi-customer-ip-address: str # The PSU's IP address if the PSU is currently logged in with the TPP., x-fapi-interaction-id: str # An RFC4122 UID used as a correlation id., x-customer-user-agent: str # Indicates the user-agent that the PSU is using.}
@returns(201) {Data: map{ConsentId: str, CreationDateTime: str(date-time), Status: str, StatusReason: [map], StatusUpdateDateTime: str(date-time), ExpirationDateTime: str(date-time), DebtorAccount: map{SchemeName: str, Identification: str, Name: str, SecondaryIdentification: str, Proxy: map{Identification: str, Code: str, Type: str}}}, Links: map{Self: str(uri), First: str(uri), Prev: str(uri), Next: str(uri), Last: str(uri)}, Meta: map{TotalPages: int(int32), FirstAvailableDateTime: str(date-time), LastAvailableDateTime: str(date-time)}} # Funds Confirmation Consent Created
@errors {400: Bad request, 401: Unauthorized, 403: Forbidden, 405: Method Not Allowed, 406: Not Acceptable, 415: Unsupported Media Type, 429: Too Many Requests, 500: Internal Server Error}

@endpoint GET /funds-confirmation-consents/{ConsentId}
@desc Get Funds Confirmation Consent
@required {ConsentId: str # ConsentId, Authorization: str # An Authorisation Token as per https://tools.ietf.org/html/rfc6750}
@optional {x-fapi-auth-date: str # The time when the PSU last logged in with the TPP.  All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below:  Sun, 10 Sep 2017 19:43:31 UTC, x-fapi-customer-ip-address: str # The PSU's IP address if the PSU is currently logged in with the TPP., x-fapi-interaction-id: str # An RFC4122 UID used as a correlation id., x-customer-user-agent: str # Indicates the user-agent that the PSU is using.}
@returns(200) {Data: map{ConsentId: str, CreationDateTime: str(date-time), Status: str, StatusReason: [map], StatusUpdateDateTime: str(date-time), ExpirationDateTime: str(date-time), DebtorAccount: map{SchemeName: str, Identification: str, Name: str, SecondaryIdentification: str, Proxy: map{Identification: str, Code: str, Type: str}}}, Links: map{Self: str(uri), First: str(uri), Prev: str(uri), Next: str(uri), Last: str(uri)}, Meta: map{TotalPages: int(int32), FirstAvailableDateTime: str(date-time), LastAvailableDateTime: str(date-time)}} # Funds Confirmation Consent Read
@errors {400: Bad request, 401: Unauthorized, 403: Forbidden, 405: Method Not Allowed, 406: Not Acceptable, 429: Too Many Requests, 500: Internal Server Error}

@endpoint DELETE /funds-confirmation-consents/{ConsentId}
@desc Delete Funds Confirmation Consent
@required {ConsentId: str # ConsentId, Authorization: str # An Authorisation Token as per https://tools.ietf.org/html/rfc6750}
@optional {x-fapi-auth-date: str # The time when the PSU last logged in with the TPP.  All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below:  Sun, 10 Sep 2017 19:43:31 UTC, x-fapi-customer-ip-address: str # The PSU's IP address if the PSU is currently logged in with the TPP., x-fapi-interaction-id: str # An RFC4122 UID used as a correlation id., x-customer-user-agent: str # Indicates the user-agent that the PSU is using.}
@returns(204) Funds Confirmation Consent Deleted
@errors {400: Bad request, 401: Unauthorized, 403: Forbidden, 405: Method Not Allowed, 406: Not Acceptable, 429: Too Many Requests, 500: Internal Server Error}

@endgroup

@group funds-confirmations
@endpoint POST /funds-confirmations
@desc Create Funds Confirmation
@required {Authorization: str # An Authorisation Token as per https://tools.ietf.org/html/rfc6750, Data: map{ConsentId!: str, Reference!: str, InstructedAmount!: map{Amount!: str, Currency!: str}}}
@optional {x-fapi-auth-date: str # The time when the PSU last logged in with the TPP.  All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below:  Sun, 10 Sep 2017 19:43:31 UTC, x-fapi-customer-ip-address: str # The PSU's IP address if the PSU is currently logged in with the TPP., x-fapi-interaction-id: str # An RFC4122 UID used as a correlation id., x-customer-user-agent: str # Indicates the user-agent that the PSU is using.}
@returns(201) {Data: map{FundsConfirmationId: str, ConsentId: str, CreationDateTime: str(date-time), FundsAvailable: bool, Reference: str, InstructedAmount: map{Amount: str, Currency: str}}, Links: map{Self: str(uri), First: str(uri), Prev: str(uri), Next: str(uri), Last: str(uri)}, Meta: map{TotalPages: int(int32), FirstAvailableDateTime: str(date-time), LastAvailableDateTime: str(date-time)}} # Funds Confirmation Created
@errors {400: Bad request, 401: Unauthorized, 403: Forbidden, 405: Method Not Allowed, 406: Not Acceptable, 415: Unsupported Media Type, 429: Too Many Requests, 500: Internal Server Error}

@endgroup

@end
