@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
@required {Authorization: str, Data: map{ExpirationDateTime: str(date-time), DebtorAccount!: map{SchemeName!: str, Identification!: str, Name: str, SecondaryIdentification: str, Proxy: map}}}
@optional {x-fapi-auth-date: str, x-fapi-customer-ip-address: str, x-fapi-interaction-id: str, x-customer-user-agent: str}
@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)}}
@errors {400, 401, 403, 405, 406, 415, 429, 500}

@endpoint GET /funds-confirmation-consents/{ConsentId}
@required {ConsentId: str, Authorization: str}
@optional {x-fapi-auth-date: str, x-fapi-customer-ip-address: str, x-fapi-interaction-id: str, x-customer-user-agent: str}
@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)}}
@errors {400, 401, 403, 405, 406, 429, 500}

@endpoint DELETE /funds-confirmation-consents/{ConsentId}
@required {ConsentId: str, Authorization: str}
@optional {x-fapi-auth-date: str, x-fapi-customer-ip-address: str, x-fapi-interaction-id: str, x-customer-user-agent: str}
@returns(204)
@errors {400, 401, 403, 405, 406, 429, 500}

@endgroup

@group funds-confirmations
@endpoint POST /funds-confirmations
@required {Authorization: str, Data: map{ConsentId!: str, Reference!: str, InstructedAmount!: map{Amount!: str, Currency!: str}}}
@optional {x-fapi-auth-date: str, x-fapi-customer-ip-address: str, x-fapi-interaction-id: str, x-customer-user-agent: str}
@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)}}
@errors {400, 401, 403, 405, 406, 415, 429, 500}

@endgroup

@end
