--- openapi: 3.0.3 info: title: Zand OpenBank Account API version: "1.0" servers: - url: https://api.dev.zand.ae - url: https://api.uat.zand.ae paths: /v1/accounts/{accountId}: get: tags: - Account summary: Get Account parameters: - name: accountId in: path description: Account Id required: true schema: type: string responses: default: description: The Account content: application/json: schema: $ref: '#/components/schemas/AccountGetApiResponse' "404": description: Operation not available (incorrect path) "500": description: Internal Server Error "400": description: Bad request (errors in the response body) content: application/json: {} "403": description: Forbidden content: application/json: {} "401": description: Not Authorized security: - SecurityScheme: [] post: tags: - Account summary: Create Account parameters: - name: accountId in: path description: Main Account Id required: true schema: type: string requestBody: description: Account Request Body content: application/json: schema: $ref: '#/components/schemas/CreateRequestBody' required: true responses: default: description: The Account content: application/json: schema: $ref: '#/components/schemas/AccountCreateApiResponse' "404": description: Operation not available (incorrect path) "500": description: Internal Server Error "400": description: Bad request (errors in the response body) content: application/json: {} "403": description: Forbidden content: application/json: {} "401": description: Not Authorized security: - SecurityScheme: [] delete: tags: - Account summary: Delete Account parameters: - name: accountId in: path description: Account Id required: true schema: type: string responses: default: description: Deleted Account content: application/json: schema: $ref: '#/components/schemas/AccountDeleteApiResponse' "404": description: Operation not available (incorrect path) "500": description: Internal Server Error "400": description: Bad request (errors in the response body) content: application/json: {} "403": description: Forbidden content: application/json: {} "401": description: Not Authorized security: - SecurityScheme: [] patch: tags: - Account summary: Update Account parameters: - name: accountId in: path description: Account Id required: true schema: type: string requestBody: description: Update Account Request Body content: application/json: schema: $ref: '#/components/schemas/UpdateRequestBody' required: true responses: default: description: Updated Account content: application/json: schema: $ref: '#/components/schemas/AccountUpdateApiResponse' "404": description: Operation not available (incorrect path) "500": description: Internal Server Error "400": description: Bad request (errors in the response body) content: application/json: {} "403": description: Forbidden content: application/json: {} "401": description: Not Authorized security: - SecurityScheme: [] /v1/accounts/{accountId}/balances: get: tags: - Account Balance summary: Get Account Balance parameters: - name: accountId in: path description: Account Id required: true schema: type: string responses: default: description: The Account Balance content: application/json: schema: $ref: '#/components/schemas/AccountBalanceGetApiResponse' "404": description: Operation not available (incorrect path) "500": description: Internal Server Error "400": description: Bad request (errors in the response body) content: application/json: {} "403": description: Forbidden content: application/json: {} "401": description: Not Authorized security: - SecurityScheme: [] /v1/accounts/{accountId}/statements: get: tags: - Account Statement summary: 'Get Account Statements (Summarised monthly totals for duration of max 90 days at a time.) ' parameters: - name: accountId in: path description: Account Id required: true schema: type: string - name: fromStatementDateTime in: query description: Statement Start DateTime e.g. 2022-10-28T00:00:00 required: true schema: type: string - name: toStatementDateTime in: query description: Statement End DateTime e.g. 2022-11-28T00:00:00 required: true schema: type: string responses: default: description: The Account Statement content: application/json: schema: $ref: '#/components/schemas/GetAccountStatementsResponse' "404": description: Operation not available (incorrect path) "500": description: Internal Server Error "400": description: Bad request (errors in the response body) content: application/json: {} "403": description: Forbidden content: application/json: {} "401": description: Not Authorized security: - SecurityScheme: [] /v1/accounts/{accountId}/statements/{statementId}/file: get: tags: - Account Statement summary: Get Account Statement transactions in json format for the document generation. (PDF binary will be supported in next version.) parameters: - name: accountId in: path description: Account Id required: true schema: type: string - name: fromStatementDateTime in: query description: Statement Start DateTime e.g. 2022-10-28T00:00:00 required: true schema: type: string - name: toStatementDateTime in: query description: Statement End DateTime e.g. 2022-11-28T00:00:00 required: true schema: type: string responses: default: description: The Account Statement content: application/json: schema: $ref: '#/components/schemas/GetAccountStatementFileResponse' "404": description: Operation not available (incorrect path) "500": description: Internal Server Error "400": description: Bad request (errors in the response body) content: application/json: {} "403": description: Forbidden content: application/json: {} "401": description: Not Authorized security: - SecurityScheme: [] /v1/accounts/{accountId}/statements/{statementId}/transactions: get: tags: - Account Statement summary: Get Account Statement Transactions by statement id parameters: - name: accountId in: path description: Account Id required: true schema: type: string - name: statementId in: path description: Statement Id required: true schema: type: string - name: fromStatementDateTime in: query description: Statement Start DateTime e.g. 2022-10-28T00:00:00 required: true schema: type: string - name: toStatementDateTime in: query description: Statement End DateTime e.g. 2022-11-28T00:00:00 required: true schema: type: string responses: default: description: The Account Statement transactions for given statement id. content: application/json: schema: $ref: '#/components/schemas/GetAccountStatementTransactionsResponse' "404": description: Operation not available (incorrect path) "500": description: Internal Server Error "400": description: Bad request (errors in the response body) content: application/json: {} "403": description: Forbidden content: application/json: {} "401": description: Not Authorized security: - SecurityScheme: [] components: schemas: Account: type: object properties: clientId: type: string accountId: type: string status: type: string statusUpdateDateAndTime: type: string currency: type: string accountType: type: string branchId: type: string accountSubType: type: string account: type: array items: $ref: '#/components/schemas/AccountDetailsResponseData' AccountBalanceGetApiResponse: type: object properties: accountId: type: string amount: $ref: '#/components/schemas/AccountBalanceGetApiResponseAmount' creditLine: type: array items: $ref: '#/components/schemas/AccountBalanceGetApiResponseCreditLine' dateTime: type: string AccountBalanceGetApiResponseAmount: type: object properties: amount: type: number currency: type: string AccountBalanceGetApiResponseCreditLine: type: object properties: included: type: boolean type: type: string amount: $ref: '#/components/schemas/AccountBalanceGetApiResponseAmount' AccountCreateApiResponse: type: object properties: data: $ref: '#/components/schemas/ApiResponseData' AccountDeleteApiResponse: type: object properties: data: $ref: '#/components/schemas/ApiResponseData' AccountDetailsResponseData: type: object properties: name: type: string accountTitle: type: string creditFrozen: format: int32 type: integer debitFrozen: format: int32 type: integer IBAN: type: string ref: type: string contactNo: type: string emailID: type: string segment: type: string groupCode: type: string economicActivityCode: type: string address: type: string AccountGetApiResponse: type: object properties: data: $ref: '#/components/schemas/ApiResponseData' AccountUpdateApiResponse: type: object properties: data: $ref: '#/components/schemas/ApiResponseData' Amount: type: object properties: amount: type: number currency: type: string Amount1: type: object properties: amount: type: number currency: type: string ApiResponseData: type: object properties: account: $ref: '#/components/schemas/Account' CreateRequestBody: required: - Currency - Id - Name type: object properties: Currency: minLength: 1 pattern: AED type: string Id: maxLength: 50 minLength: 5 type: string Name: maxLength: 100 minLength: 3 type: string CreditorAccount: $ref: '#/components/schemas/CreditorAccount' CreditorAccount: type: object properties: Identification: maxLength: 23 minLength: 23 pattern: "AE\\d{21}" type: string Data: type: object properties: Statement: type: array items: $ref: '#/components/schemas/StatementRecord' Data1: type: object properties: Statement: type: array items: $ref: '#/components/schemas/StatementRecord1' Data2: type: object properties: Statement: $ref: '#/components/schemas/Statement' GetAccountStatementFileResponse: type: object properties: Data: $ref: '#/components/schemas/Data2' GetAccountStatementTransactionsResponse: type: object properties: Data: $ref: '#/components/schemas/Data1' GetAccountStatementsResponse: type: object properties: Data: $ref: '#/components/schemas/Data' Statement: type: object properties: accountId: type: string statementId: type: string statementReference: type: string type: type: string startDateTime: type: string endDateTime: type: string creationDateTime: type: string statementDescription: type: string statementAmount: type: array items: $ref: '#/components/schemas/StatementAmount1' StatementAmount: type: object properties: creditDebitIndicator: type: string type: type: string amount: $ref: '#/components/schemas/Amount' StatementAmount1: type: object properties: creditDebitIndicator: type: string type: type: string amount: $ref: '#/components/schemas/Amount1' StatementRecord: type: object properties: accountId: type: string statementId: type: string statementReference: type: string type: type: string startDateTime: type: string endDateTime: type: string creationDateTime: type: string statementDescription: type: string statementTitle: type: string statementAmount: type: array items: $ref: '#/components/schemas/StatementAmount' StatementRecord1: type: object properties: accountId: type: string statementId: type: string statementReference: type: string type: type: string startDateTime: type: string endDateTime: type: string creationDateTime: type: string statementDescription: type: string statementTitle: type: string statementAmount: type: array items: $ref: '#/components/schemas/StatementAmount' statementRecords: type: array items: $ref: '#/components/schemas/TransactionRecord' TransactionRecord: type: object properties: trxReferenceNo: type: string channelRefID: type: string narrationID: type: string wDate: type: string valueDate: type: string chequeID: type: string description: type: string trxType: type: string amount: type: number foreignAmount: type: number balance: type: number trxTimeStamp: type: string UpdateRequestBody: required: - Status - Id - Name type: object properties: DebitFrozen: format: int32 maximum: 1 minimum: 0 type: integer CreditFrozen: format: int32 maximum: 1 minimum: 0 type: integer Status: maxLength: 1 minLength: 1 pattern: "[A]|[C]|[B]" type: string Id: maxLength: 50 minLength: 5 type: string Name: maxLength: 100 minLength: 3 type: string securitySchemes: ZandBank: type: oauth2 description: "Zand Bank OAuth2" flows: implicit: authorizationUrl: https://login.microsoftonline.com/7e2e4ae2-33d7-4adb-87f7-22ff5fb34ab5/oauth2/v2.0/authorize scopes: 'api://cde149d4-74cb-4f07-971e-f12ae88ca228/read': Allow read 'api://cde149d4-74cb-4f07-971e-f12ae88ca228/write': Allow write security: - ZandBank: - 'api://cde149d4-74cb-4f07-971e-f12ae88ca228/read' - 'api://cde149d4-74cb-4f07-971e-f12ae88ca228/write'