diff --git a/accountAPI.yaml b/accountAPI.yaml index 71a3dbe..573f74d 100644 --- a/accountAPI.yaml +++ b/accountAPI.yaml @@ -183,11 +183,11 @@ paths: - in: query name: dateFrom schema: - $ref: '#/components/schemas/Date' + $ref: '#/components/schemas/date' - in: query name: dateTo schema: - $ref: '#/components/schemas/Date' + $ref: '#/components/schemas/date' - in: query name: bookingStatus required: true @@ -305,12 +305,9 @@ paths: content: application/json: schema: - type: object - properties: - conditionList: - type: array - items: - $ref: '#/components/schemas/iso20022ReportReference' + type: array + items: + $ref: '#/components/schemas/iso20022ReportReference' '400': $ref: '#/components/responses/standard400' '401': @@ -385,7 +382,7 @@ components: write: Grants write access schemas: - ## /accounts + # /accounts accountItem: title: Account Information Item type: object @@ -436,9 +433,7 @@ components: - balance properties: date: - type: string - format: date - example: 2010-02-15 + $ref: '#/components/schemas/date' balanceType: type: string enum: @@ -524,13 +519,9 @@ components: reversalIndicator: type: boolean bookingDate: - type: string - format: date - example: 2018-10-29 + $ref: '#/components/schemas/date' valueDate: - type: string - format: date - example: 2018-10-29 + $ref: '#/components/schemas/date' amount: $ref: '#/components/schemas/paymentCurrencyAmount' instructedAmount: @@ -859,10 +850,21 @@ components: type: string enum: - CAMT53 + schemaVersion: + type: string + example: camt.053.001.01 + description: Indicates the delivered camt.053 schema version. + pattern: camt\.053\.[0-9]{3}\.[0-9]{2} id: type: string + account: + $ref: '#/components/schemas/paymentIbanAccount' + dateFrom: + $ref: '#/components/schemas/date' + dateTo: + $ref: '#/components/schemas/date' - ## Shared with payments module + # Shared with payments module paymentIbanAccount: title: Payment IBAN Account type: object @@ -922,7 +924,7 @@ components: maxLength: 35 example: 00230 - # ---- Common Error Response + # ---- Common Error Response ---- commonErrorResponse: title: Common Error Response type: object @@ -960,17 +962,16 @@ components: - /problems/SERVICE_UNAVAILABLE example: /problems/TECHNICAL_ERROR - # ---- Date Formats - Date: + # ---- Date Formats ---- + date: type: string format: date example: 2018-04-13 - DateTime: + dateTime: type: string format: date-time example: 2018-04-13T11:11:11Z - # -------- # ---- Global Common Header Parameters ---- parameters: @@ -1006,8 +1007,7 @@ components: in: query description: 'The date to query, formatted as yyyy-mm-dd. Default value: current date' schema: - type: string - format: date + $ref: '#/components/schemas/date' clientid_in_header: name: X-CorAPI-Client-ID @@ -1096,7 +1096,7 @@ components: type: string example: cursorIDxyz - # --- Response Headers - used by Standard Responses --- + # ---- Response Headers - used by Standard Responses ---- headers: Content-Language: description: Response language - always en @@ -1151,24 +1151,24 @@ components: description: | Bad Request - The format of the request was invalid. - Examples: - - InvalidPayload: - type: /problems/INVALID_PAYLOAD - title: Payload does not comply with API specification - detail: Malformed JSON + Examples: + - InvalidPayload: + type: /problems/INVALID_PAYLOAD + title: Payload does not comply with API specification + detail: Malformed JSON + instance: path/to/corresponding/resource + + - InvalidParameter: + type: /problems/INVALID_PAYLOAD + title: Invalid parameter values have been detected + detail: Sent data could not processed instance: path/to/corresponding/resource - - InvalidParameter: - type: /problems/INVALID_PAYLOAD - title: Invalid parameter values have been detected - detail: Sent data could not processed - instance: path/to/corresponding/resource - - - MissingId: - type: /problems/INVALID_PAYLOAD - title: The payload was not valid - detail: ID is missing - instance: path/to/corresponding/resource + - MissingId: + type: /problems/INVALID_PAYLOAD + title: The payload was not valid + detail: ID is missing + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1183,7 +1183,7 @@ components: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | - Unauthorized - The request has not been applied because it provides no valid authentication credentials for the target resource. + Unauthorized - The request has not been applied because it provides no valid authentication credentials for the target resource. content: application/problem+json: schema: @@ -1199,25 +1199,25 @@ components: $ref: '#/components/headers/X-Correlation-ID' description: | Forbidden - A valid OAuth Token was received, but access was denied. (Depending on the security requirements, providers can return 404 instead) - + Examples: - - InsufficientPrivileges: - type: /problems/INSUFFICIENT_PRIVILEGES - title: No privileges for the requested operation - detail: Insufficient privileges for the requested operation - instance: path/to/corresponding/resource - - - ExpiredToken: - type: /problems/EXPIRED_TOKEN - title: The OAuth Token is expired - detail: The token is no longer valid - instance: path/to/corresponding/resource - - - NoFutureDateSupported: - type: /problems/MALFORMED_PAYLOAD - title: Invalid parameter values have been detected - detail: Data for date in the future cannot be requested - instance: path/to/corresponding/resource + - InsufficientPrivileges: + type: /problems/INSUFFICIENT_PRIVILEGES + title: No privileges for the requested operation + detail: Insufficient privileges for the requested operation + instance: path/to/corresponding/resource + + - ExpiredToken: + type: /problems/EXPIRED_TOKEN + title: The OAuth Token is expired + detail: The token is no longer valid + instance: path/to/corresponding/resource + + - NoFutureDateSupported: + type: /problems/MALFORMED_PAYLOAD + title: Invalid parameter values have been detected + detail: Data for date in the future cannot be requested + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1235,29 +1235,29 @@ components: Not Found - Either the endpoint does not exist or a requested resource is not yet available (e.g., account statements) Examples: - - InvalidAccounts: - type: /problems/INSUFFICIENT_PRIVILEGES - title: Insufficient privileges to access resource - detail: The provided token does not grant access to the requested account - instance: path/to/corresponding/resource - - - InvalidToken: - type: /problems/INSUFFICIENT_PRIVILEGES - title: Insufficient privileges to access resource - detail: The provided token is not valid - instance: path/to/corresponding/resource - - - WrongEndpointUrl: - type: /problems/TECHNICAL_ERROR - title: URL not found - detail: The requested endpoint does not exist - instance: path/to/corresponding/resource - - - NoIntradayDataSupported: - type: /problems/NOT_IMPLEMENTED - title: Feature is not implemented - detail: This interface does not support intraday data - instance: path/to/corresponding/resource + - InvalidAccounts: + type: /problems/INSUFFICIENT_PRIVILEGES + title: Insufficient privileges to access resource + detail: The provided token does not grant access to the requested account + instance: path/to/corresponding/resource + + - InvalidToken: + type: /problems/INSUFFICIENT_PRIVILEGES + title: Insufficient privileges to access resource + detail: The provided token is not valid + instance: path/to/corresponding/resource + + - WrongEndpointUrl: + type: /problems/TECHNICAL_ERROR + title: URL not found + detail: The requested endpoint does not exist + instance: path/to/corresponding/resource + + - NoIntradayDataSupported: + type: /problems/NOT_IMPLEMENTED + title: Feature is not implemented + detail: This interface does not support intraday data + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1275,11 +1275,11 @@ components: Method Not Allowed - The method received in the request-line is known by the origin server but not supported by the target resource. Examples: - - NotSupportedOperation: - type: /problems/WRONG_METHOD - title: This HTTP operation is not allowed on this endpoint - detail: Only GET operations are allowed - instance: path/to/corresponding/resource + - NotSupportedOperation: + type: /problems/WRONG_METHOD + title: This HTTP operation is not allowed on this endpoint + detail: Only GET operations are allowed + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1297,17 +1297,17 @@ components: Internal Server Error - The server encountered an unexpected condition that prevented it from fulfilling the request. Examples: - - TechnicalServerError: - type: /problems/TECHNICAL_ERROR - title: Technical error on server side - detail: Processing yielded a technical error - instance: path/to/corresponding/resource - - - ResourceTooLarge: - type: /problems/RESOURCE_TOO_LARGE - title: Generated resource was too large - detail: The generated resource exceeded the size limit - instance: path/to/corresponding/resource + - TechnicalServerError: + type: /problems/TECHNICAL_ERROR + title: Technical error on server side + detail: Processing yielded a technical error + instance: path/to/corresponding/resource + + - ResourceTooLarge: + type: /problems/RESOURCE_TOO_LARGE + title: Generated resource was too large + detail: The generated resource exceeded the size limit + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1324,12 +1324,12 @@ components: description: | Not Implemented - The server does not support the functionality required to fulfill the request. - Examples: - - EndpointNotImplemented: - type: /problems/NOT_IMPLEMENTED - title: Target endpoint is not implemented - detail: This endpoint is not implemented - instance: path/to/corresponding/resource + Examples: + - EndpointNotImplemented: + type: /problems/NOT_IMPLEMENTED + title: Target endpoint is not implemented + detail: This endpoint is not implemented + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1349,4 +1349,3 @@ components: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' - # ---- End Responses - Standard Errors diff --git a/paymentAPI.yaml b/paymentAPI.yaml index 0a8a79c..1146138 100644 --- a/paymentAPI.yaml +++ b/paymentAPI.yaml @@ -855,7 +855,7 @@ components: write: Grants write access schemas: - ## /payments + # /payments paymentSubmissionRequest: title: Payment Submission Request type: object @@ -876,9 +876,7 @@ components: maxLength: 32 example: TPP01746 requestedExecutionDate: - type: string - format: date - example: 2018-04-07 + $ref: '#/components/schemas/date' debtorAccount: $ref: '#/components/schemas/paymentIbanAccount' bookingInstruction: @@ -1297,8 +1295,7 @@ components: maxLength: 35 example: 00230 - # ---- Payment Data Model - # --- not supported by SIX bLink + # ---- Payment Data Model - not supported by SIX bLink ---- singlepaymentsSubmissionRequest: title: Single Payment Submission Request type: object @@ -1321,9 +1318,7 @@ components: maxLength: 32 example: TPP01746 requestedExecutionDate: - type: string - format: date - example: 2018-04-07 + $ref: '#/components/schemas/date' debtorAccount: $ref: '#/components/schemas/paymentIbanAccount' instructionId: @@ -1367,9 +1362,7 @@ components: maxLength: 32 example: TPP01746 requestedExecutionDate: - type: string - format: date - example: 2018-04-07 + $ref: '#/components/schemas/date' debtorAccount: $ref: '#/components/schemas/paymentIbanAccount' instructionId: @@ -1422,16 +1415,12 @@ components: description: > Start date of one break period. Standing order will not be processed from this date. Date format YYYY-MM-DD. - type: string - format: date - example: 2018-04-13 + $ref: '#/components/schemas/date' validToDate: description: > End date of one break period. Standing order will not be processed to this date. Date format YYYY-MM-DD. - type: string - format: date - example: 2018-04-13 + $ref: '#/components/schemas/date' standingorderSubmissionStatus: title: Standing Order Submission Status @@ -1454,7 +1443,7 @@ components: items: $ref: '#/components/schemas/paymentInstructionItemStatus' - # Schemas Information NextGenPSD2 for periodic orders + # Schema information NextGenPSD2 for periodic orders startDate: title: Start Date description: | @@ -1546,18 +1535,14 @@ components: - 29 - 30 - 31 - # End Schemas Information NextGenPSD2 for periodic orders - # ---- End Payment Data Model - # ---- Common Data Model v1.2.0 + # ---- Common Data Model ---- date: - title: Date type: string format: date example: 2018-04-13 dateTime: - title: Date Time type: string format: date-time example: 2018-04-13T11:11:11Z @@ -1598,10 +1583,8 @@ components: description: amount given with fractional digits, the separator is a dot type: string pattern: '-?\d{1,14}(?:\.\d{1,3})?' - # -------- - - # ---- Error Response (compliant to SIX b.Link) + # ---- Common Error Response (compliant to SIX b.Link) ---- commonErrorResponse: title: Common Error Response type: object @@ -1641,8 +1624,6 @@ components: - /problems/NOT_IMPLEMENTED - /problems/SERVICE_UNAVAILABLE example: /problems/TECHNICAL_ERROR - # ---- End Error Response - # ---- End Common Data Model # ---- Global Common Header Parameters ---- parameters: @@ -1712,7 +1693,7 @@ components: schema: type: string - # --- Response Headers - used by Standard Responses --- + # ---- Response Headers - used by Standard Responses ---- headers: Content-Language: description: Response language - always en @@ -1772,24 +1753,24 @@ components: description: | Bad Request - The format of the request was invalid. - Examples: - - InvalidPayload: - type: /problems/INVALID_PAYLOAD - title: Payload does not comply with API specification - detail: Malformed JSON - instance: path/to/corresponding/resource - - - InvalidParameter: - type: /problems/INVALID_PAYLOAD - title: Invalid parameter values have been detected - detail: Sent data could not processed - instance: path/to/corresponding/resource - - - MissingId: - type: /problems/INVALID_PAYLOAD - title: The payload was not valid - detail: ID is missing - instance: path/to/corresponding/resource + Examples: + - InvalidPayload: + type: /problems/INVALID_PAYLOAD + title: Payload does not comply with API specification + detail: Malformed JSON + instance: path/to/corresponding/resource + + - InvalidParameter: + type: /problems/INVALID_PAYLOAD + title: Invalid parameter values have been detected + detail: Sent data could not processed + instance: path/to/corresponding/resource + + - MissingId: + type: /problems/INVALID_PAYLOAD + title: The payload was not valid + detail: ID is missing + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1804,7 +1785,7 @@ components: X-Correlation-ID: $ref: '#/components/headers/X-Correlation-ID' description: | - Unauthorized - The request has not been applied because it provides no valid authentication credentials for the target resource. + Unauthorized - The request has not been applied because it provides no valid authentication credentials for the target resource. content: application/problem+json: schema: @@ -1820,25 +1801,25 @@ components: $ref: '#/components/headers/X-Correlation-ID' description: | Forbidden - A valid OAuth Token was received, but access was denied. (Depending on the security requirements, providers can return 404 instead) - + Examples: - - InsufficientPrivileges: - type: /problems/INSUFFICIENT_PRIVILEGES - title: No privileges for the requested operation - detail: Insufficient privileges for the requested operation - instance: path/to/corresponding/resource - - - ExpiredToken: - type: /problems/EXPIRED_TOKEN - title: The OAuth Token is expired - detail: The token is no longer valid - instance: path/to/corresponding/resource - - - NoFutureDateSupported: - type: /problems/MALFORMED_PAYLOAD - title: Invalid parameter values have been detected - detail: Data for date in the future cannot be requested - instance: path/to/corresponding/resource + - InsufficientPrivileges: + type: /problems/INSUFFICIENT_PRIVILEGES + title: No privileges for the requested operation + detail: Insufficient privileges for the requested operation + instance: path/to/corresponding/resource + + - ExpiredToken: + type: /problems/EXPIRED_TOKEN + title: The OAuth Token is expired + detail: The token is no longer valid + instance: path/to/corresponding/resource + + - NoFutureDateSupported: + type: /problems/MALFORMED_PAYLOAD + title: Invalid parameter values have been detected + detail: Data for date in the future cannot be requested + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1856,29 +1837,29 @@ components: Not Found - Either the endpoint does not exist or a requested resource is not yet available (e.g., account statements) Examples: - - InvalidAccounts: - type: /problems/INSUFFICIENT_PRIVILEGES - title: Insufficient privileges to access resource - detail: The provided token does not grant access to the requested account - instance: path/to/corresponding/resource - - - InvalidToken: - type: /problems/INSUFFICIENT_PRIVILEGES - title: Insufficient privileges to access resource - detail: The provided token is not valid - instance: path/to/corresponding/resource - - - WrongEndpointUrl: - type: /problems/TECHNICAL_ERROR - title: URL not found - detail: The requested endpoint does not exist - instance: path/to/corresponding/resource - - - NoIntradayDataSupported: - type: /problems/NOT_IMPLEMENTED - title: Feature is not implemented - detail: This interface does not support intraday data - instance: path/to/corresponding/resource + - InvalidAccounts: + type: /problems/INSUFFICIENT_PRIVILEGES + title: Insufficient privileges to access resource + detail: The provided token does not grant access to the requested account + instance: path/to/corresponding/resource + + - InvalidToken: + type: /problems/INSUFFICIENT_PRIVILEGES + title: Insufficient privileges to access resource + detail: The provided token is not valid + instance: path/to/corresponding/resource + + - WrongEndpointUrl: + type: /problems/TECHNICAL_ERROR + title: URL not found + detail: The requested endpoint does not exist + instance: path/to/corresponding/resource + + - NoIntradayDataSupported: + type: /problems/NOT_IMPLEMENTED + title: Feature is not implemented + detail: This interface does not support intraday data + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1896,11 +1877,11 @@ components: Method Not Allowed - The method received in the request-line is known by the origin server but not supported by the target resource. Examples: - - NotSupportedOperation: - type: /problems/WRONG_METHOD - title: This HTTP operation is not allowed on this endpoint - detail: Only GET operations are allowed - instance: path/to/corresponding/resource + - NotSupportedOperation: + type: /problems/WRONG_METHOD + title: This HTTP operation is not allowed on this endpoint + detail: Only GET operations are allowed + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1918,17 +1899,17 @@ components: Internal Server Error - The server encountered an unexpected condition that prevented it from fulfilling the request. Examples: - - TechnicalServerError: - type: /problems/TECHNICAL_ERROR - title: Technical error on server side - detail: Processing yielded a technical error - instance: path/to/corresponding/resource - - - ResourceTooLarge: - type: /problems/RESOURCE_TOO_LARGE - title: Generated resource was too large - detail: The generated resource exceeded the size limit - instance: path/to/corresponding/resource + - TechnicalServerError: + type: /problems/TECHNICAL_ERROR + title: Technical error on server side + detail: Processing yielded a technical error + instance: path/to/corresponding/resource + + - ResourceTooLarge: + type: /problems/RESOURCE_TOO_LARGE + title: Generated resource was too large + detail: The generated resource exceeded the size limit + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1945,12 +1926,12 @@ components: description: | Not Implemented - The server does not support the functionality required to fulfill the request. - Examples: - - EndpointNotImplemented: - type: /problems/NOT_IMPLEMENTED - title: Target endpoint is not implemented - detail: This endpoint is not implemented - instance: path/to/corresponding/resource + Examples: + - EndpointNotImplemented: + type: /problems/NOT_IMPLEMENTED + title: Target endpoint is not implemented + detail: This endpoint is not implemented + instance: path/to/corresponding/resource content: application/problem+json: schema: @@ -1970,4 +1951,3 @@ components: application/problem+json: schema: $ref: '#/components/schemas/commonErrorResponse' - # ---- End Responses - Standard Errors