├── .gitignore ├── .npmignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bin └── cdk.ts ├── cdk.json ├── docs ├── Open_Banking_Brasil_-_mTLS_with_NGINX_proxy ├── postman.png ├── proxy-mtls-architecture-background.png └── proxy-mtls-architecture.png ├── jest.config.js ├── lib ├── apis.ts ├── base │ └── construct-base.ts ├── networking.ts ├── open-banking-brazil.ts └── proxy.ts ├── package.json ├── proxy ├── Dockerfile ├── client │ ├── OpenBankingBrazil.postman_collection.json │ └── ssl │ │ └── client.conf ├── generate-certs.sh ├── proxy.conf.template └── ssl │ └── bank.conf ├── spec ├── admin-api.yaml ├── channels-api.yaml ├── common-api.yaml └── products-services-api.yaml ├── test └── cdk.test.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | 10 | # Parcel default cache directory 11 | .parcel-cache 12 | 13 | .DS_Store 14 | 15 | *.sql 16 | 17 | OpenBankingBrazil/ 18 | dashboard/ 19 | .vscode/ 20 | 21 | # certs ignore 22 | proxy/ssl/bank.csr 23 | proxy/ssl/bank.crt 24 | proxy/ssl/bank.key 25 | 26 | proxy/client/ssl/client.csr 27 | proxy/client/ssl/client.crt 28 | proxy/client/ssl/client.key 29 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional 4 | documentation, we greatly value feedback and contributions from our community. 5 | 6 | Please read through this document before submitting any issues or pull requests to ensure we have all the necessary 7 | information to effectively respond to your bug report or contribution. 8 | 9 | 10 | ## Reporting Bugs/Feature Requests 11 | 12 | We welcome you to use the GitHub issue tracker to report bugs or suggest features. 13 | 14 | When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already 15 | reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: 16 | 17 | * A reproducible test case or series of steps 18 | * The version of our code being used 19 | * Any modifications you've made relevant to the bug 20 | * Anything unusual about your environment or deployment 21 | 22 | 23 | ## Contributing via Pull Requests 24 | Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: 25 | 26 | 1. You are working against the latest source on the *main* branch. 27 | 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. 28 | 3. You open an issue to discuss any significant work - we would hate for your time to be wasted. 29 | 30 | To send us a pull request, please: 31 | 32 | 1. Fork the repository. 33 | 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. 34 | 3. Ensure local tests pass. 35 | 4. Commit to your fork using clear commit messages. 36 | 5. Send us a pull request, answering any default questions in the pull request interface. 37 | 6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. 38 | 39 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and 40 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). 41 | 42 | 43 | ## Finding contributions to work on 44 | Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. 45 | 46 | 47 | ## Code of Conduct 48 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 49 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 50 | opensource-codeofconduct@amazon.com with any additional questions or comments. 51 | 52 | 53 | ## Security issue notifications 54 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. 55 | 56 | 57 | ## Licensing 58 | 59 | See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. 60 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Open Banking Brazil 2 | 3 | # Overview 4 | 5 | This repo intends to demonstrate how an environment with the Open Banking mock API's can work in AWS using mTLS. 6 | *** 7 | 8 | # Prerequisites: 9 | 10 | - [awscli](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) 11 | 12 | - [Pre configured AWS credentials](https://docs.aws.amazon.com/amazonswf/latest/developerguide/RubyFlowOptions.html) 13 | 14 | - [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) 15 | 16 | - [cdk](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html) 17 | 18 | - [Docker](https://docs.docker.com/get-docker/) 19 | 20 | ## How to deploy 21 | 22 | Make sure Docker is running. During the deploy we will use Docker to create the container that will be used to run NGINX. 23 | 24 | After Docker is running, execute the following commands: 25 | 26 | ``` 27 | git clone 28 | 29 | cd / 30 | 31 | ./proxy/generate-certs.sh 32 | 33 | npm install 34 | 35 | cdk bootstrap 36 | 37 | cdk synth 38 | 39 | cdk deploy 40 | ``` 41 | 42 | This will clone this repo, then install all packages required. CDK will then bootstrap a deploy environment in your account. You will then synthetize a cloudformation template and finally deploy it. The end result will be the following architecture: 43 | 44 | ![arquitetura](docs/proxy-mtls-architecture-background.png) 45 | 46 | # How to test 47 | 48 | There are two options for tests: 49 | 50 | - Postman 51 | - Terminal 52 | 53 | Before moving on, make sure you have in hand the your Network Load Balancer (NLB) URL. CDK shows you an output with the created assets and you should look for a name similar to "OpenBankingBrazil.ProxyProxyServiceLoadBalancerDNSE4FAFBA0". Copy the value of this key as it is the URL for your NLB. 54 | 55 | ## Postman 56 | 57 | Follow these steps to prepare your setup: 58 | 59 | - [Create Workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/) 60 | 61 | - [Create Environment](https://learning.postman.com/docs/sending-requests/variables/) 62 | 63 | Set the following env variables: 64 | 65 | | Key | Value | 66 | |----------|:-------------:| 67 | | host | YOUR-NLB-DNS | 68 | | version | v1 | 69 | 70 | - [Import json File](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/) 71 | 72 | 73 | ***The configuration file location:*** 74 | `proxy/client/OpenBankingBrazil.postman_collection.json` 75 | 76 | 77 | - [Configure the certificates](https://learning.postman.com/docs/sending-requests/certificates/) 78 | 79 | 80 | ***Use the following:*** 81 | 1. `proxy/client/ssl/client.crt`, 82 | 2. `proxy/client/ssl/client.key`. 83 | 3. The host is your NLB DNS. 84 | 85 | 86 | Finally you can run any of the requests and you should be able to see the response as the picture below: 87 | 88 | ![image](docs/postman.png) 89 | 90 | 91 | ## Terminal 92 | To test the mTLS connection, use terminal to run the following commands: 93 | 94 | ``` 95 | cd proxy/client/ssl 96 | HOST='YOUR-NLB-DNS-HERE' 97 | VERSION='v1' 98 | ``` 99 | 100 | There are the following paths available for tests: 101 | ``` 102 | $HOST/discovery/$VERSION/status 103 | 104 | $HOST/discovery/$VERSION/outstage 105 | 106 | $HOST/channels/$VERSION/branches 107 | 108 | $HOST/channels/$VERSION/electronic-channels 109 | 110 | $HOST/channels/$VERSION/phone-channels 111 | 112 | $HOST/channels/$VERSION/banking-agents 113 | 114 | $HOST/products-services/$VERSION/personal-accounts 115 | 116 | $HOST/products-services/$VERSION/business-accounts 117 | 118 | $HOST/products-services/$VERSION/personal-loans 119 | 120 | $HOST/products-services/$VERSION/business-loans 121 | 122 | $HOST/products-services/$VERSION/personal-financings 123 | 124 | $HOST/products-services/$VERSION/personal-invoice-financings 125 | 126 | $HOST/products-services/$VERSION/personal-credit-cards 127 | 128 | $HOST/products-services/$VERSION/business-credit-cards 129 | 130 | $HOST/admin/$VERSION/metrics 131 | ``` 132 | 133 | To test any of these paths, run the following command: 134 | 135 | `curl --key client.key --cert client.crt -k COMMAND` 136 | 137 | For example: 138 | 139 | ```` 140 | ★ ssl [docs] ♡ curl --key client.key --cert client.crt -k $HOST/channels/$VERSION/electronic-channels 141 | 142 | { 143 | "data": { 144 | "brand": { 145 | "name": "Organização A", 146 | "companies": [ 147 | { 148 | "name": "Empresa A1", 149 | "cnpjNumber": "45086338000178", 150 | "urlComplementaryList": "https://empresaa1.com/branches-banking", 151 | "channels": [ 152 | { 153 | "identification": { 154 | "type": "INTERNET_BANKING", 155 | "additionalInfo": "NA", 156 | "url": "https://empresaa1.com/internet-banking" 157 | }, 158 | "service": { 159 | "codes": [ 160 | "ABERTURA_CONTA", 161 | "RECEBIMENTOS_PAGAMENTOS_TRANSFERENCIAS_ELETRONICAS", 162 | "OPERACOES_CREDITO", 163 | "CARTAO_CREDITO", 164 | "OPERACOES_CAMBIO", 165 | "INVESTIMENTOS", 166 | "SEGUROS", 167 | "OUTROS" 168 | ], 169 | "additionalInfo": "Previdência Complementar" 170 | } 171 | } 172 | ] 173 | } 174 | ] 175 | } 176 | }, 177 | "links": { 178 | "self": "https://api.banco.com.br/open-banking/channels/v1/electronic-channels", 179 | "first": "https://api.banco.com.br/open-banking/channels/v1/electronic-channels", 180 | "prev": "null", 181 | "next": "null", 182 | "last": "https://api.banco.com.br/open-banking/channels/v1/electronic-channels" 183 | }, 184 | "meta": { 185 | "totalRecords": 1, 186 | "totalPages": 1 187 | } 188 | } 189 | ```` 190 | 191 | # Cleaning UP 192 | 193 | Run the following command: 194 | 195 | `cdk destroy` 196 | 197 | ## Security 198 | 199 | See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. 200 | 201 | ## License 202 | 203 | This library is licensed under the MIT-0 License. See the LICENSE file. 204 | -------------------------------------------------------------------------------- /bin/cdk.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import 'source-map-support/register'; 3 | import * as cdk from '@aws-cdk/core'; 4 | import { OpenBankingBrazil } from '../lib/open-banking-brazil'; 5 | 6 | const app = new cdk.App(); 7 | new OpenBankingBrazil(app, 'OpenBankingBrazil'); 8 | -------------------------------------------------------------------------------- /cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "npx ts-node bin/cdk.ts", 3 | "context": { 4 | "@aws-cdk/core:enableStackNameDuplicates": "true", 5 | "aws-cdk:enableDiffNoFail": "true" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /docs/Open_Banking_Brasil_-_mTLS_with_NGINX_proxy: -------------------------------------------------------------------------------- 1 | 7V1bc5s4FP41fiyDJMTl0XbsbrfZTHbT6eUpg41CaDF4sZzL/vqVbMRFkhMc40tcMpnWOsgCpO/7ztERIj00nD19zPz5/V9pQOIeNIOnHrroQQgsaLP/uOV5bXEgWhvCLArySqXhJvqP5EYzty6jgCxqFWmaxjSa143TNEnIlNZsfpalj/Vqd2lcP+vcD4liuJn6sWr9FgX0fm11sVna/yBReC/ODMz8yMwXlXPD4t4P0seKCY16aJilKV1/mj0NScw7T/TL+nvjDUeLC8tIQpt8gd6FAf0ztC++uP7V98HDzY8vf3/IB+PBj5f5Df9DwihN8kumz6If5mmU0FVf4gH7Zacamj3Mjgx5yYBYMshlp24Aaom3UTfIZaduAHLzQDo/kC+wYlBKteZN6fxm5QLZLxqkSxpHCRkWqDOZMcz8IGKjMUzjNGO2JE1Y7w3u6SxmJcA+Pt5HlNzM/Snv1UfGGGa7SxOa4x5AUc47nrfKcDPnn2dPIaeY4T8uLCPM0uV8dcpPDPnao7fZeiRZCzRLfxFxVT2IgOWMBn1+riiOpat9IBmNGP77cRTyhmnKz+PnpZjcUd4iu4UoCS9XpQtk5petO0XgL+5JkN+Litkcxvys5KliyjH8kaQzQrNnVkUcFXzKBQXlxceSnZ6T2+4rzMRCUfxcEcKi6ZI07EPOmy04ZCkc+no97Aj0/gn0MJ/q2AMt1wXWXtnT7w+cgbsP9jh19gCg0gcjrNIHOS3QJ5h8Xtz+C93Zz9D27X+ff35bkg+eQp/r5SSOppw+y0lCaEel90+lBZkus4g+35aVb1a8Eg03Ihmzj7wxGtntMa04j4ZpCq005NvINGh5Bq5zDXmroZfoBmxsaAgHsC3MrVNOkL7jXMe5s+IclmND19ASTkc3sD+6KWwbphlhloGf/GJd1eMh7Zj925/PGQl9ysL2RcfA98/A0wwgd6KYi03JrTlqBAlNT+fSoNkCw7RTMJVhPWjHvKuC6IF9DPnH/sz/j2c2THFskolDwsJOXvmCro3rT6yBjz4lj/5z83YkKmuxK4skgmPeAwqm2bExthzLqxy7iDLW0Gq2z4CU8XGQRXzoAATGOjjerX5krAggXvoTEl+niyhvfpJSms5eReqUXRXJ6tx7jWf+Yr7ujrvoiV+HnngZWaTLbErWtBuwoo6A/jy6DfNhamXm5Ei+BTqqZ7FcFfTC1jrmsRrDZdEDu+VKEGd+4JnIL5c3PG1KslmUrJxL51vev2/ZOrrTJv14dGeP4dh9B5k/CzWaTxUZwT3MpvTOx9Z4H4lgJAiJGPYcOGzYkqDoHy7aaZgmTHBT3u8rQP0klD7n6PGXNK3DjSRBn69wcLWN/cUimq6N4ygWVTb2+lpCX7ip/J6on4WEvlAvv1V+fy+OYUZiJj0P9VWV1odCNxKKD2fOjM78pIi6dwgHhjFXBH4nZeR+nKggB5XE7aJ6XQ3yyifn71duiGSjB7L2RmCTQC4Xq3O1ICroxLy603n1zqv/zl5dn7PZ4NT3l7OBWzr10n+PSmvFx4O3+Xitd32bR4cNPTpwd/Tgq6+yyIRPkIsKuRaVLV9zQ2VhypZhID3NINXHAL5Un31YX0GJgOJW3i7OsEl4cUXoY5r92i2wuEz9YLcWGMX9ZEqyUwpHcB+ZA3x+4UiyHvLbmI3a7UR0fDsLtlYd57oABWu0UdhaD1CQjgSHF8bK5CeHTznzedEzvaqTwGoqlLjtuc8GafTq0gjZvNeR/N76YvMvliO8rQpDIJ0qf1pvkwrL9YHj7V+FgfrAzVX/SzUt2ynZm5XMp+2mTRGABVgFqExk2IqIIU8VMWFrX8TUh06OIWILRlsqydjKVhGyvWZ5BH1f1Tr7MFJnS08nQU8O8DcIXWvaombVNbHVJ06m1VS8YTB21AWj30vBonxs2pUxYFl1ZGLLwJ4iYgdNFUE1V/SiiB0w71wTtrJSVdt2FC63oXCJ7QYnkqAWaYy2HM8pLh00HhsRyLXsVTYHva17C7eJtxgNeaKWaTf1mYZnjZ3G1cdPV99PyWVcmHgInPNzGVMxNLewHW9hudKqggl13sK2NN4CGCbal8PQwfU3cRjF5rFXHUbrorTbmDV6tKmTmN9dYpDtGp57fIlRNxR+vR6SbkLzdugwmVmwi7kVSebV1+5Wy5FtAAnL2UXT1mVnkIojtDcQaXfUdSB6PyBCDjoyhE5j+fYUIp/jBT76HJ/6IK20VLW+IyXFpyYLhb8TDQHLwK5lFj92vd2W1kgcaQMy9LwXL1Ouj7xDrFTr8pgd/g+bKWoX/4fGqbT2tx+coi1zmOe6EAO9hig92qKzae1FTeUVZEkdT2PFWYxOt+LcfmS6hxVnJMWi6ga1wy42q3PinTTuFHP+zdNr3mH0y8J6Xdk6ysSmJwkhNoBnmbaDsIMB9HZ9EmeHRQn9k6sN0KaDwoZArIYgdmXfC3fICj94wcCiePFUPXjxLEqvgluLidbCvc2bslXYNXysblfvCqQnHSC2DVfysE0RCoqXpVVSOC7yyh9nL67b3TLAlOsDp90AUzvMqvYW24BXSfM2HTffmeu4IxYpbbUzd0PO+1x35pLpomD8blvRXY9xpgLzOrqAZbiazTymoXv9Q8Xc+lYCNZtZQvBzB8FjQPBXSxD0HEd+yQ+AmvS5BXXvQyitrWNOTf/0v/Elwkt/Ngn8DnOHx1y87vl2YMfkyq3PcoCLDeypPv8Akx59eNXkWYM3hqGvhpNvDVSPEIZWXgV7hDjUcaQUuucYDnI8BExkWS6UAsemEakrpTiLPX4nFoFaLW8ae2GEa0y48ZNgkj4phOg27L67Dbvn+YonRRQ0O3L3+I4nPY/UJ6G6qdwZTeXQxqkcYoEyOompnAhiurnc6WCwxbmchDrTAMefyWmeqOumcuc1lUP1qZwFkGGe0FRu231G5/MqjD2tTUFTCrBc6TG4xmtTYiSKVQRkYNd0kIcs4GHk7GfN/sjv6mDF8q+mrKuXf3sGjf4H -------------------------------------------------------------------------------- /docs/postman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/openbanking-brazilian-reference-architecture/83ac8aa7f735412c8a39b2e988a27536f602d8be/docs/postman.png -------------------------------------------------------------------------------- /docs/proxy-mtls-architecture-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/openbanking-brazilian-reference-architecture/83ac8aa7f735412c8a39b2e988a27536f602d8be/docs/proxy-mtls-architecture-background.png -------------------------------------------------------------------------------- /docs/proxy-mtls-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/openbanking-brazilian-reference-architecture/83ac8aa7f735412c8a39b2e988a27536f602d8be/docs/proxy-mtls-architecture.png -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | roots: ['/test'], 3 | testMatch: ['**/*.test.ts'], 4 | transform: { 5 | '^.+\\.tsx?$': 'ts-jest' 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /lib/apis.ts: -------------------------------------------------------------------------------- 1 | import * as cdk from '@aws-cdk/core'; 2 | import * as ec2 from "@aws-cdk/aws-ec2"; 3 | import * as apigateway from "@aws-cdk/aws-apigateway"; 4 | import { Asset } from "@aws-cdk/aws-s3-assets"; 5 | import { ConstructBase } from './base/construct-base'; 6 | import { Networking } from './networking'; 7 | 8 | export interface ApiProps { 9 | readonly region: string, 10 | readonly networking: Networking; 11 | } 12 | 13 | export class Apis extends ConstructBase { 14 | 15 | private readonly props: ApiProps; 16 | 17 | readonly stageName = "stub"; 18 | readonly version = "v1"; 19 | 20 | readonly adminApi: apigateway.SpecRestApi; 21 | readonly channelsApi: apigateway.SpecRestApi; 22 | readonly commonsApi: apigateway.SpecRestApi; 23 | readonly productsServicesApi: apigateway.SpecRestApi; 24 | 25 | constructor(scope: cdk.Construct, id: string, props: ApiProps) { 26 | super(scope, id); 27 | 28 | this.props = props; 29 | 30 | this.adminApi = this.createApi('admin-api'); 31 | this.channelsApi = this.createApi('channels-api'); 32 | this.commonsApi = this.createApi('common-api'); 33 | this.productsServicesApi = this.createApi('products-services-api'); 34 | } 35 | 36 | private createApi(type: string): apigateway.SpecRestApi { 37 | 38 | let specAsset = new Asset(this, `${type}-asset`, { 39 | path: `spec/${type}.yaml`, 40 | }); 41 | 42 | let specTransformed = cdk.Fn.transform('AWS::Include', { 'Location': specAsset.s3ObjectUrl }); 43 | 44 | let api = new apigateway.SpecRestApi(this, type, { 45 | apiDefinition: apigateway.ApiDefinition.fromInline(specTransformed), 46 | endpointTypes: [apigateway.EndpointType.PRIVATE], 47 | deployOptions: { 48 | stageName: this.stageName 49 | } 50 | }); 51 | api.node.addDependency(this.props.networking.apigwVpce); 52 | 53 | return api; 54 | } 55 | 56 | public getUrl(api: apigateway.SpecRestApi): string { 57 | return `https://${api.restApiId}.execute-api.${this.props.region}.amazonaws.com/${this.stageName}/` 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /lib/base/construct-base.ts: -------------------------------------------------------------------------------- 1 | import * as cdk from '@aws-cdk/core'; 2 | 3 | export abstract class ConstructBase extends cdk.Construct { 4 | 5 | constructor(scope: cdk.Construct, id: string) { 6 | super(scope, id); 7 | } 8 | 9 | protected output(id: string, value: string) { 10 | let output = new cdk.CfnOutput(this, id, { 11 | value: value 12 | }); 13 | output.overrideLogicalId(id); 14 | } 15 | 16 | protected outputAndExport(id: string, value: string, exportName: string) { 17 | let output = new cdk.CfnOutput(this, id, { 18 | value: value, 19 | exportName: exportName 20 | }); 21 | output.overrideLogicalId(id); 22 | } 23 | } -------------------------------------------------------------------------------- /lib/networking.ts: -------------------------------------------------------------------------------- 1 | import * as cdk from '@aws-cdk/core'; 2 | import * as ec2 from "@aws-cdk/aws-ec2"; 3 | import { ConstructBase } from './base/construct-base'; 4 | 5 | 6 | export interface NetworkingProps { 7 | readonly region: string; 8 | } 9 | 10 | export class Networking extends ConstructBase { 11 | 12 | readonly props: NetworkingProps; 13 | 14 | readonly vpc: ec2.Vpc; 15 | readonly apigwVpce: ec2.VpcEndpoint; 16 | 17 | constructor(scope: cdk.Construct, id: string, props: NetworkingProps) { 18 | super(scope, id); 19 | 20 | this.props = props; 21 | 22 | this.vpc = this.createVpc(); 23 | this.apigwVpce = this.createApigwVpcEndpoint(); 24 | } 25 | 26 | private createVpc(): ec2.Vpc { 27 | let vpc = new ec2.Vpc(this, 'vpc', { 28 | maxAzs: 2, 29 | cidr: '172.29.0.0/16' 30 | }); 31 | this.output('VpcId', vpc.vpcId); 32 | 33 | return vpc; 34 | } 35 | 36 | private createApigwVpcEndpoint(): ec2.VpcEndpoint { 37 | let vpce = new ec2.InterfaceVpcEndpoint(this, 'ApigwVpce', { 38 | service: { 39 | name: `com.amazonaws.${this.props.region}.execute-api`, 40 | port: 443 41 | }, 42 | vpc: this.vpc, 43 | open: true, 44 | privateDnsEnabled: true 45 | }); 46 | 47 | let vpceId = vpce.node.defaultChild as ec2.CfnVPCEndpoint 48 | vpceId.overrideLogicalId('ApigwVpce') 49 | 50 | this.output('ApigwVpceId', vpce.vpcEndpointId); 51 | 52 | return vpce; 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /lib/open-banking-brazil.ts: -------------------------------------------------------------------------------- 1 | import * as cdk from '@aws-cdk/core'; 2 | import { Apis } from './apis'; 3 | import { Networking } from './networking'; 4 | import { Proxy } from './proxy'; 5 | 6 | export class OpenBankingBrazil extends cdk.Stack { 7 | 8 | readonly networking: Networking; 9 | readonly apis: Apis; 10 | readonly proxy: Proxy; 11 | 12 | constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { 13 | super(scope, id, props); 14 | 15 | this.networking = new Networking(this, 'Networking', { 16 | region: this.region 17 | }) 18 | 19 | this.apis = new Apis(this, 'Apis', { 20 | region: this.region, 21 | networking: this.networking 22 | }); 23 | 24 | this.proxy = new Proxy(this, 'Proxy', { 25 | region: this.region, 26 | networking: this.networking, 27 | apis: this.apis 28 | }); 29 | 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /lib/proxy.ts: -------------------------------------------------------------------------------- 1 | import * as cdk from '@aws-cdk/core'; 2 | import * as ec2 from "@aws-cdk/aws-ec2"; 3 | import * as ecs from "@aws-cdk/aws-ecs"; 4 | import { Protocol } from "@aws-cdk/aws-elasticloadbalancingv2" 5 | import { DockerImageAsset } from "@aws-cdk/aws-ecr-assets"; 6 | import * as ecsPatterns from "@aws-cdk/aws-ecs-patterns"; 7 | import { ConstructBase } from './base/construct-base'; 8 | import { Apis } from './apis'; 9 | import { Networking } from './networking'; 10 | 11 | export interface ProxyProps { 12 | readonly region: string; 13 | readonly networking: Networking; 14 | readonly apis: Apis; 15 | } 16 | 17 | export class Proxy extends ConstructBase { 18 | 19 | readonly props: ProxyProps; 20 | 21 | readonly cluster: ecs.Cluster; 22 | readonly service: ecsPatterns.NetworkLoadBalancedFargateService; 23 | 24 | constructor(scope: cdk.Construct, id: string, props: ProxyProps) { 25 | super(scope, id); 26 | 27 | this.props = props; 28 | 29 | this.cluster = this.createCluster(); 30 | this.service = this.createService(); 31 | } 32 | 33 | private createCluster(): ecs.Cluster { 34 | let cluster = new ecs.Cluster(this, 'ProxyCluster', { 35 | vpc: this.props.networking.vpc 36 | }); 37 | this.output('ProxyClusterARN', cluster.clusterArn); 38 | return cluster; 39 | } 40 | 41 | private createService(): ecsPatterns.NetworkLoadBalancedFargateService { 42 | let dockerImage = new DockerImageAsset(this, 'ProxyDockerImage', { 43 | directory: "proxy" 44 | }); 45 | 46 | let service = new ecsPatterns.NetworkLoadBalancedFargateService(this, 'ProxyService', { 47 | cluster: this.cluster, 48 | listenerPort: 443, 49 | cpu: 256, 50 | memoryLimitMiB: 512, 51 | healthCheckGracePeriod: cdk.Duration.seconds(10), 52 | taskImageOptions: { 53 | image: ecs.ContainerImage.fromDockerImageAsset(dockerImage), 54 | containerPort: 443, 55 | environment: { 56 | "VERSION": this.props.apis.version, 57 | "COMMON_API": this.props.apis.getUrl(this.props.apis.commonsApi), 58 | "CHANNELS_API": this.props.apis.getUrl(this.props.apis.channelsApi), 59 | "PRODUCTS_SERVICES_API": this.props.apis.getUrl(this.props.apis.productsServicesApi), 60 | "ADMIN_API": this.props.apis.getUrl(this.props.apis.adminApi) 61 | } 62 | } 63 | }); 64 | 65 | service.targetGroup.configureHealthCheck({ 66 | path: "/health", 67 | port: "80", 68 | protocol: Protocol.HTTP 69 | }); 70 | 71 | service.targetGroup.setAttribute('deregistration_delay.timeout_seconds', '0'); 72 | 73 | service.service.connections.allowFromAnyIpv4(ec2.Port.tcp(443)); 74 | service.service.connections.allowFrom(ec2.Peer.ipv4(this.props.networking.vpc.vpcCidrBlock), ec2.Port.tcp(80)); 75 | 76 | return service; 77 | } 78 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "open-banking-brazil", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk": "bin/cdk.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@aws-cdk/assert": "1.96.0", 15 | "@types/jest": "^26.0.10", 16 | "@types/node": "10.17.27", 17 | "aws-cdk": "1.96.0", 18 | "jest": "^26.4.2", 19 | "ts-jest": "^26.2.0", 20 | "ts-node": "^9.0.0", 21 | "typescript": "~3.9.7" 22 | }, 23 | "dependencies": { 24 | "@aws-cdk/core": "1.96.0", 25 | "@aws-cdk/aws-ec2": "1.96.0", 26 | "@aws-cdk/aws-apigateway": "1.96.0", 27 | "@aws-cdk/aws-s3-assets": "1.96.0", 28 | "@aws-cdk/aws-ecs": "1.96.0", 29 | "@aws-cdk/aws-ecr": "1.96.0", 30 | "@aws-cdk/aws-ecs-patterns": "1.96.0", 31 | "source-map-support": "^0.5.16" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | 3 | COPY ./proxy.conf.template /proxy.conf.template 4 | 5 | COPY ./ssl/bank.key /etc/ssl/bank.key 6 | COPY ./ssl/bank.crt /etc/ssl/bank.crt 7 | COPY ./client/ssl/client.crt /etc/ssl/client.crt 8 | 9 | CMD ["/bin/sh" , "-c" , "envsubst < /proxy.conf.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"] -------------------------------------------------------------------------------- /proxy/client/OpenBankingBrazil.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "7312536f-765a-44be-9b5d-3d56595a6983", 4 | "name": "OpenBankingBrazil", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 6 | }, 7 | "item": [ 8 | { 9 | "name": "APIs Comuns", 10 | "item": [ 11 | { 12 | "name": "API de Status", 13 | "request": { 14 | "method": "GET", 15 | "header": [], 16 | "url": { 17 | "raw": "https://{{host}}/discovery/{{version}}/status", 18 | "protocol": "https", 19 | "host": [ 20 | "{{host}}" 21 | ], 22 | "path": [ 23 | "discovery", 24 | "{{version}}", 25 | "status" 26 | ] 27 | } 28 | }, 29 | "response": [] 30 | }, 31 | { 32 | "name": "API de Outages", 33 | "request": { 34 | "method": "GET", 35 | "header": [], 36 | "url": { 37 | "raw": "https://{{host}}/discovery/{{version}}/outages", 38 | "protocol": "https", 39 | "host": [ 40 | "{{host}}" 41 | ], 42 | "path": [ 43 | "discovery", 44 | "{{version}}", 45 | "outages" 46 | ] 47 | } 48 | }, 49 | "response": [] 50 | } 51 | ] 52 | }, 53 | { 54 | "name": "API - Canais de Atendimento", 55 | "item": [ 56 | { 57 | "name": "Dependências próprias", 58 | "request": { 59 | "method": "GET", 60 | "header": [], 61 | "url": { 62 | "raw": "https://{{host}}/channels/{{version}}/branches", 63 | "protocol": "https", 64 | "host": [ 65 | "{{host}}" 66 | ], 67 | "path": [ 68 | "channels", 69 | "{{version}}", 70 | "branches" 71 | ] 72 | } 73 | }, 74 | "response": [] 75 | }, 76 | { 77 | "name": "Canais de atendimento eletrônico", 78 | "request": { 79 | "method": "GET", 80 | "header": [], 81 | "url": { 82 | "raw": "https://{{host}}/channels/{{version}}/electronic-channels", 83 | "protocol": "https", 84 | "host": [ 85 | "{{host}}" 86 | ], 87 | "path": [ 88 | "channels", 89 | "{{version}}", 90 | "electronic-channels" 91 | ] 92 | } 93 | }, 94 | "response": [] 95 | }, 96 | { 97 | "name": "Canais de atendimento telefônico", 98 | "request": { 99 | "method": "GET", 100 | "header": [], 101 | "url": { 102 | "raw": "https://{{host}}/channels/{{version}}/phone-channels", 103 | "protocol": "https", 104 | "host": [ 105 | "{{host}}" 106 | ], 107 | "path": [ 108 | "channels", 109 | "{{version}}", 110 | "phone-channels" 111 | ] 112 | } 113 | }, 114 | "response": [] 115 | }, 116 | { 117 | "name": "Correspondentes bancários", 118 | "request": { 119 | "method": "GET", 120 | "header": [], 121 | "url": { 122 | "raw": "https://{{host}}/channels/{{version}}/banking-agents", 123 | "protocol": "https", 124 | "host": [ 125 | "{{host}}" 126 | ], 127 | "path": [ 128 | "channels", 129 | "{{version}}", 130 | "banking-agents" 131 | ] 132 | } 133 | }, 134 | "response": [] 135 | }, 136 | { 137 | "name": "Terminais de autoatendimento compartilhados", 138 | "request": { 139 | "method": "GET", 140 | "header": [], 141 | "url": { 142 | "raw": "https://{{host}}/channels/{{version}}/shared-automated-teller-machines", 143 | "protocol": "https", 144 | "host": [ 145 | "{{host}}" 146 | ], 147 | "path": [ 148 | "channels", 149 | "{{version}}", 150 | "shared-automated-teller-machines" 151 | ] 152 | } 153 | }, 154 | "response": [] 155 | } 156 | ] 157 | }, 158 | { 159 | "name": "API - Produtos e Serviços", 160 | "item": [ 161 | { 162 | "name": "Contas pessoa física", 163 | "request": { 164 | "method": "GET", 165 | "header": [], 166 | "url": { 167 | "raw": "https://{{host}}/products-services/{{version}}/personal-accounts", 168 | "protocol": "https", 169 | "host": [ 170 | "{{host}}" 171 | ], 172 | "path": [ 173 | "products-services", 174 | "{{version}}", 175 | "personal-accounts" 176 | ] 177 | } 178 | }, 179 | "response": [] 180 | }, 181 | { 182 | "name": "Contas pessoa jurídica", 183 | "request": { 184 | "method": "GET", 185 | "header": [], 186 | "url": { 187 | "raw": "https://{{host}}/products-services/{{version}}/business-accounts", 188 | "protocol": "https", 189 | "host": [ 190 | "{{host}}" 191 | ], 192 | "path": [ 193 | "products-services", 194 | "{{version}}", 195 | "business-accounts" 196 | ] 197 | } 198 | }, 199 | "response": [] 200 | }, 201 | { 202 | "name": "Empréstimos pessoa física", 203 | "request": { 204 | "method": "GET", 205 | "header": [], 206 | "url": { 207 | "raw": "https://{{host}}/products-services/{{version}}/personal-loans", 208 | "protocol": "https", 209 | "host": [ 210 | "{{host}}" 211 | ], 212 | "path": [ 213 | "products-services", 214 | "{{version}}", 215 | "personal-loans" 216 | ] 217 | } 218 | }, 219 | "response": [] 220 | }, 221 | { 222 | "name": "Empréstimos pessoa jurídica", 223 | "request": { 224 | "method": "GET", 225 | "header": [], 226 | "url": { 227 | "raw": "https://{{host}}/products-services/{{version}}/business-loans", 228 | "protocol": "https", 229 | "host": [ 230 | "{{host}}" 231 | ], 232 | "path": [ 233 | "products-services", 234 | "{{version}}", 235 | "business-loans" 236 | ] 237 | } 238 | }, 239 | "response": [] 240 | }, 241 | { 242 | "name": "Financiamento Pessoa Física", 243 | "request": { 244 | "method": "GET", 245 | "header": [], 246 | "url": { 247 | "raw": "https://{{host}}/products-services/{{version}}/personal-financings", 248 | "protocol": "https", 249 | "host": [ 250 | "{{host}}" 251 | ], 252 | "path": [ 253 | "products-services", 254 | "{{version}}", 255 | "personal-financings" 256 | ] 257 | } 258 | }, 259 | "response": [] 260 | }, 261 | { 262 | "name": "Financiamento Pessoa Jurídica", 263 | "request": { 264 | "method": "GET", 265 | "header": [], 266 | "url": { 267 | "raw": "https://{{host}}/products-services/{{version}}/business-financings", 268 | "protocol": "https", 269 | "host": [ 270 | "{{host}}" 271 | ], 272 | "path": [ 273 | "products-services", 274 | "{{version}}", 275 | "business-financings" 276 | ] 277 | } 278 | }, 279 | "response": [] 280 | }, 281 | { 282 | "name": "Antecipação de recebíveis Pessoa Física", 283 | "request": { 284 | "method": "GET", 285 | "header": [], 286 | "url": { 287 | "raw": "https://{{host}}/products-services/{{version}}/personal-invoice-financings", 288 | "protocol": "https", 289 | "host": [ 290 | "{{host}}" 291 | ], 292 | "path": [ 293 | "products-services", 294 | "{{version}}", 295 | "personal-invoice-financings" 296 | ] 297 | } 298 | }, 299 | "response": [] 300 | }, 301 | { 302 | "name": "Antecipação de recebíveis Pessoa Jurídica", 303 | "request": { 304 | "method": "GET", 305 | "header": [], 306 | "url": { 307 | "raw": "https://{{host}}/products-services/{{version}}/business-invoice-financings", 308 | "protocol": "https", 309 | "host": [ 310 | "{{host}}" 311 | ], 312 | "path": [ 313 | "products-services", 314 | "{{version}}", 315 | "business-invoice-financings" 316 | ] 317 | } 318 | }, 319 | "response": [] 320 | }, 321 | { 322 | "name": "Cartão de crédito de pessoa física", 323 | "request": { 324 | "method": "GET", 325 | "header": [], 326 | "url": { 327 | "raw": "https://{{host}}/products-services/{{version}}/personal-credit-cards", 328 | "protocol": "https", 329 | "host": [ 330 | "{{host}}" 331 | ], 332 | "path": [ 333 | "products-services", 334 | "{{version}}", 335 | "personal-credit-cards" 336 | ] 337 | } 338 | }, 339 | "response": [] 340 | }, 341 | { 342 | "name": "Cartão de crédito de pessoa jurídica", 343 | "request": { 344 | "method": "GET", 345 | "header": [], 346 | "url": { 347 | "raw": "https://{{host}}/products-services/{{version}}/business-credit-cards", 348 | "protocol": "https", 349 | "host": [ 350 | "{{host}}" 351 | ], 352 | "path": [ 353 | "products-services", 354 | "{{version}}", 355 | "business-credit-cards" 356 | ] 357 | } 358 | }, 359 | "response": [] 360 | }, 361 | { 362 | "name": "Adiantamento a Depositante pessoa natural", 363 | "request": { 364 | "method": "GET", 365 | "header": [], 366 | "url": { 367 | "raw": "https://{{host}}/products-services/{{version}}/personal-unarranged-account-overdraft", 368 | "protocol": "https", 369 | "host": [ 370 | "{{host}}" 371 | ], 372 | "path": [ 373 | "products-services", 374 | "{{version}}", 375 | "personal-unarranged-account-overdraft" 376 | ] 377 | } 378 | }, 379 | "response": [] 380 | }, 381 | { 382 | "name": "Adiantamento a Depositante pessoa jurídica", 383 | "request": { 384 | "method": "GET", 385 | "header": [], 386 | "url": { 387 | "raw": "https://{{host}}/products-services/{{version}}/business-unarranged-account-overdraft", 388 | "protocol": "https", 389 | "host": [ 390 | "{{host}}" 391 | ], 392 | "path": [ 393 | "products-services", 394 | "{{version}}", 395 | "business-unarranged-account-overdraft" 396 | ] 397 | } 398 | }, 399 | "response": [] 400 | } 401 | ] 402 | }, 403 | { 404 | "name": "API - Admin", 405 | "item": [ 406 | { 407 | "name": "Métricas", 408 | "request": { 409 | "method": "GET", 410 | "header": [], 411 | "url": { 412 | "raw": "https://{{host}}/admin/{{version}}/metrics", 413 | "protocol": "https", 414 | "host": [ 415 | "{{host}}" 416 | ], 417 | "path": [ 418 | "admin", 419 | "{{version}}", 420 | "metrics" 421 | ] 422 | } 423 | }, 424 | "response": [] 425 | } 426 | ] 427 | } 428 | ] 429 | } -------------------------------------------------------------------------------- /proxy/client/ssl/client.conf: -------------------------------------------------------------------------------- 1 | [req] 2 | default_bits = 2048 3 | distinguished_name = dn 4 | prompt = no 5 | 6 | [dn] 7 | C="BR" 8 | ST="Sao Paulo" 9 | L="Sao Paulo" 10 | O="Bank XYZ" 11 | OU="IT" 12 | CN="*.bankxyz.com" 13 | 14 | [req_ext] 15 | subjectAltName = @alt_names 16 | 17 | [alt_names] 18 | IP.1 = 127.0.0.1 19 | DNS.1 = localhost 20 | DNS.2 = *.bankxyz.com 21 | -------------------------------------------------------------------------------- /proxy/generate-certs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | generate () { 4 | echo 5 | echo ">>> Generating for $1..." 6 | echo 7 | 8 | openssl genrsa -out $1.key 2048 9 | openssl req -new -key $1.key -out $1.csr -config $1.conf 10 | openssl x509 -req -days 3650 -in $1.csr -signkey $1.key -out $1.crt -extensions req_ext -extfile $1.conf 11 | 12 | echo 13 | echo ">>> Generated! Here is the CRT info for $1:" 14 | echo 15 | 16 | openssl x509 -in $1.crt -text -noout 17 | } 18 | 19 | generate "ssl/bank" 20 | generate "client/ssl/client" 21 | 22 | -------------------------------------------------------------------------------- /proxy/proxy.conf.template: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | 4 | ssl_certificate /etc/ssl/bank.crt; 5 | ssl_certificate_key /etc/ssl/bank.key; 6 | ssl_protocols TLSv1.2; 7 | ssl_prefer_server_ciphers on; 8 | ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5; 9 | 10 | ssl_client_certificate /etc/ssl/client.crt; 11 | ssl_verify_client on; 12 | 13 | location /discovery/${VERSION}/ { 14 | proxy_pass ${COMMON_API}; 15 | } 16 | 17 | location /channels/${VERSION}/ { 18 | proxy_pass ${CHANNELS_API}; 19 | } 20 | 21 | location /admin/${VERSION}/ { 22 | proxy_pass ${ADMIN_API}; 23 | } 24 | 25 | location /products-services/${VERSION}/ { 26 | proxy_pass ${PRODUCTS_SERVICES_API}; 27 | } 28 | 29 | } 30 | 31 | server { 32 | listen 80; 33 | 34 | location /health { 35 | add_header Content-Type text/plain; 36 | return 200 "Alive!"; 37 | } 38 | } -------------------------------------------------------------------------------- /proxy/ssl/bank.conf: -------------------------------------------------------------------------------- 1 | [req] 2 | default_bits = 2048 3 | distinguished_name = dn 4 | prompt = no 5 | 6 | [dn] 7 | C="BR" 8 | ST="Sao Paulo" 9 | L="Sao Paulo" 10 | O="AWS" 11 | OU="FSI" 12 | CN="*.amazonaws.com" 13 | 14 | [req_ext] 15 | subjectAltName = @alt_names 16 | 17 | [alt_names] 18 | IP.1 = 127.0.0.1 19 | DNS.1 = localhost 20 | DNS.2 = *.amazonaws.com 21 | DNS.3 = *.elb.us-east-1.amazonaws.com 22 | DNS.4 = *.elb.us-east-2.amazonaws.com 23 | DNS.5 = *.elb.us-west-1.amazonaws.com 24 | DNS.6 = *.elb.us-west-2.amazonaws.com 25 | DNS.7 = *.elb.af-south-1.amazonaws.com 26 | DNS.8 = *.elb.ap-east-1.amazonaws.com 27 | DNS.9 = *.elb.ap-south-1.amazonaws.com 28 | DNS.10 = *.elb.ap-northeast-3.amazonaws.com 29 | DNS.11 = *.elb.ap-northeast-2.amazonaws.com 30 | DNS.12 = *.elb.ap-southeast-1.amazonaws.com 31 | DNS.13 = *.elb.ap-southeast-2.amazonaws.com 32 | DNS.14 = *.elb.ap-northeast-1.amazonaws.com 33 | DNS.15 = *.elb.ca-central-1.amazonaws.com 34 | DNS.16 = *.elb.cn-north-1.amazonaws.com 35 | DNS.17 = *.elb.cn-northwest-1.amazonaws.com 36 | DNS.18 = *.elb.eu-central-1.amazonaws.com 37 | DNS.19 = *.elb.eu-west-1.amazonaws.com 38 | DNS.20 = *.elb.eu-west-2.amazonaws.com 39 | DNS.21 = *.elb.eu-south-1.amazonaws.com 40 | DNS.22 = *.elb.eu-west-3.amazonaws.com 41 | DNS.23 = *.elb.eu-north-1.amazonaws.com 42 | DNS.24 = *.elb.me-south-1.amazonaws.com 43 | DNS.25 = *.elb.sa-east-1.amazonaws.com 44 | -------------------------------------------------------------------------------- /spec/admin-api.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: APIs Admin do Open Banking Brasil 4 | description: As API's administrativas são recursos que podem ser consumidos apenas pelo diretório para avaliação e controle da qualidade dos serviços fornecidos pelas instituições financeiras 5 | version: 1.0.0-rc5.2 6 | contact: 7 | email: "apiteam@swagger.io" 8 | servers: 9 | - url: "http://api.banco.com.br/open-banking/admin/v1" 10 | # BUG: https://github.com/aws/aws-cdk/issues/9684 11 | # x-amazon-apigateway-endpoint-configuration: 12 | # vpcEndpointIds: 13 | # - Fn::Sub: "${ApigwVpce}" 14 | 15 | tags: 16 | - name: "Metrics" 17 | 18 | x-amazon-apigateway-request-validators: 19 | all: 20 | validateRequestParameters: true 21 | validateRequestBody: true 22 | 23 | x-amazon-apigateway-request-validator: all 24 | 25 | x-amazon-apigateway-policy: 26 | Version: "2012-10-17" 27 | Statement: 28 | - Effect: "Allow" 29 | Principal: "*" 30 | Action: "execute-api:Invoke" 31 | Resource: 32 | - "execute-api:/*" 33 | - Effect: "Deny" 34 | Principal: "*" 35 | Action: "execute-api:Invoke" 36 | Resource: 37 | - "execute-api:/*" 38 | Condition: 39 | StringNotEquals: 40 | aws:SourceVpce: 41 | Fn::Sub: "${ApigwVpce}" 42 | 43 | paths: 44 | /metrics: 45 | get: 46 | tags: 47 | - Metrics 48 | summary: Obtém as métricas de disponibilidade das APIs 49 | description: "Obtém as métricas de disponibilidade das APIs" 50 | operationId: "getMetrics" 51 | parameters: 52 | - $ref: "#/components/parameters/page" 53 | - $ref: "#/components/parameters/pageSize" 54 | - in: query 55 | name: period 56 | schema: 57 | type: string 58 | enum: 59 | - CURRENT 60 | - ALL 61 | required: false 62 | description: | 63 | Período a ser consultado 64 | * `CURRENT` - Métricas do dia atual. 65 | * `ALL` - Métricas de todo o período disponível. 66 | responses: 67 | "200": 68 | description: Dados das métricas 69 | content: 70 | application/json: 71 | schema: 72 | $ref: "#/components/schemas/ResponseMetricsList" 73 | x-amazon-apigateway-integration: 74 | type: "mock" 75 | requestTemplates: 76 | application/json: | 77 | {"statusCode" : 200} 78 | responses: 79 | "default": 80 | statusCode: "200" 81 | responseTemplates: 82 | application/json: | 83 | { 84 | "data": { 85 | "requestTime": "string", 86 | "availability": { 87 | "uptime" : { 88 | "generalUptimeRate" : "", 89 | "endpoints" : [ 90 | { 91 | "url" : "", 92 | "uptimeRate" : "" 93 | } 94 | ] 95 | }, 96 | "downtime" : { 97 | "generalDowntime" : 0, 98 | "scheduledOutage" : 0, 99 | "endpoints" : [ 100 | { 101 | "url" : "", 102 | "partialDowntime" : 0 103 | } 104 | ] 105 | } 106 | }, 107 | "invocations": { 108 | "unauthenticated": { 109 | "currentDay": 0, 110 | "previousDays": [ 111 | 0 112 | ] 113 | }, 114 | "highPriority": { 115 | "currentDay": 0, 116 | "previousDays": [ 117 | 0 118 | ] 119 | }, 120 | "mediumPriority": { 121 | "currentDay": 0, 122 | "previousDays": [ 123 | 0 124 | ] 125 | }, 126 | "unattended": { 127 | "currentDay": 0, 128 | "previousDays": [ 129 | 0 130 | ] 131 | }, 132 | }, 133 | "averageResponse": { 134 | "unauthenticated": { 135 | "currentDay": 0, 136 | "previousDays": [ 137 | 0 138 | ] 139 | }, 140 | "highPriority": { 141 | "currentDay": 0, 142 | "previousDays": [ 143 | 0 144 | ] 145 | }, 146 | "mediumPriority": { 147 | "currentDay": 0, 148 | "previousDays": [ 149 | 0 150 | ] 151 | }, 152 | "unattended": { 153 | "currentDay": 0, 154 | "previousDays": [ 155 | 0 156 | ] 157 | }, 158 | }, 159 | "averageTps": { 160 | "currentDay": 0, 161 | "previousDays": [ 162 | 0 163 | ] 164 | }, 165 | "peakTps": { 166 | "currentDay": 0, 167 | "previousDays": [ 168 | 0 169 | ] 170 | }, 171 | "errors": { 172 | "currentDay": 0, 173 | "previousDays": [ 174 | 0 175 | ] 176 | }, 177 | "rejections": { 178 | "currentDay": 0, 179 | "previousDays": [ 180 | 0 181 | ] 182 | } 183 | }, 184 | "links": { 185 | "self": "string" 186 | }, 187 | "meta": {} 188 | } 189 | components: 190 | schemas: 191 | ResponseMetricsList: 192 | type: object 193 | required: 194 | - data 195 | - links 196 | properties: 197 | data: 198 | type: object 199 | required: 200 | - requestTime 201 | - availability 202 | - invocations 203 | - averageResponse 204 | - averageTps 205 | - peakTps 206 | - errors 207 | - rejections 208 | properties: 209 | requestTime: 210 | type: string 211 | description: Data e hora que as métricas foram requisitadas. 212 | format: date-time 213 | availability: 214 | $ref: "#/components/schemas/AvailabilityMetrics" 215 | invocations: 216 | $ref: "#/components/schemas/InvocationMetrics" 217 | averageResponse: 218 | $ref: "#/components/schemas/AverageMetrics" 219 | averageTps: 220 | $ref: "#/components/schemas/AverageTPSMetrics" 221 | peakTps: 222 | $ref: "#/components/schemas/PeakTPSMetrics" 223 | errors: 224 | $ref: "#/components/schemas/ErrorMetrics" 225 | rejections: 226 | $ref: "#/components/schemas/RejectionMetrics" 227 | links: 228 | $ref: "#/components/schemas/Links" 229 | meta: 230 | $ref: "#/components/schemas/Meta" 231 | AvailabilityMetrics: 232 | type: object 233 | required: 234 | - uptime 235 | - downtime 236 | properties: 237 | uptime: 238 | type: object 239 | required: 240 | - generalUptimeRate 241 | - endpoints 242 | properties: 243 | generalUptimeRate: 244 | type: string 245 | description: Taxa de disponibilidade (considerando todos os serviços ativos ao mesmo tempo). 246 | endpoints: 247 | $ref: "#/components/schemas/EndpointUptime" 248 | downtime: 249 | type: object 250 | required: 251 | - generalDowntime 252 | - scheduledOutage 253 | - endpoints 254 | properties: 255 | generalDowntime: 256 | type: integer 257 | description: Quantidade de segundos de downtime (considerando qualquer api em downtime). 258 | scheduledOutage: 259 | type: integer 260 | description: Quantidade de segundos de indisponibilidade agendada. 261 | endpoints: 262 | $ref: "#/components/schemas/EndpointDowntime" 263 | EndpointUptime: 264 | type: object 265 | description: Tempos de uptime por endpoint. 266 | required: 267 | - url 268 | - uptimeRate 269 | properties: 270 | url: 271 | type: string 272 | description: URL do endpoint 273 | uptimeRate: 274 | type: string 275 | description: Taxa de disponibilidade do endpoint. 276 | EndpointDowntime: 277 | type: object 278 | description: Tempos de downtime por endpoint. 279 | required: 280 | - url 281 | - partialDowntime 282 | properties: 283 | url: 284 | type: string 285 | description: URL do endpoint 286 | partialDowntime: 287 | type: integer 288 | description: Quantidade de segundos de indisponibilidade do endpoint. 289 | InvocationMetrics: 290 | type: object 291 | required: 292 | - unauthenticated 293 | - highPriority 294 | - mediumPriority 295 | - unattended 296 | properties: 297 | unauthenticated: 298 | type: object 299 | description: Número de chamadas não autenticadas. 300 | required: 301 | - currentDay 302 | - previousDays 303 | properties: 304 | currentDay: 305 | type: integer 306 | description: Número de chamadas não autenticadas no dia atual. 307 | previousDays: 308 | type: array 309 | description: Número de chamadas não autenticadas nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 310 | items: 311 | type: integer 312 | highPriority: 313 | type: object 314 | description: Número de chamadas para o nível de alta prioridade. 315 | required: 316 | - currentDay 317 | - previousDays 318 | properties: 319 | currentDay: 320 | type: integer 321 | description: Número de chamadas no dia atual para o nível de alta prioridade. 322 | previousDays: 323 | type: array 324 | description: Número de chamadas nos dias anteriores para o nível de alta prioridade. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 325 | items: 326 | type: integer 327 | mediumPriority: 328 | type: object 329 | description: Número de chamadas para o nível de média prioridade. 330 | required: 331 | - currentDay 332 | - previousDays 333 | properties: 334 | currentDay: 335 | type: integer 336 | description: Número de chamadas no dia atual para o nível de média prioridade. 337 | previousDays: 338 | type: array 339 | description: Número de chamadas nos dias anteriores para o nível de média prioridade. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 340 | items: 341 | type: integer 342 | unattended: 343 | type: object 344 | description: Número de chamadas para o nível não acompanhado. 345 | required: 346 | - currentDay 347 | - previousDays 348 | properties: 349 | currentDay: 350 | description: Número de chamadas no dia atual para o nível não acompanhado. 351 | type: integer 352 | previousDays: 353 | type: array 354 | description: Número de chamadas nos dias anteriores para o nível não acompanhado. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 355 | items: 356 | type: integer 357 | AverageMetrics: 358 | type: object 359 | required: 360 | - unauthenticated 361 | - highPriority 362 | - mediumPriority 363 | - unattended 364 | properties: 365 | unauthenticated: 366 | type: object 367 | description: Tempo médio de resposta para chamadas não autenticadas. 368 | required: 369 | - currentDay 370 | - previousDays 371 | properties: 372 | currentDay: 373 | type: integer 374 | description: Tempo médio de resposta para chamadas no dia atual. 375 | previousDays: 376 | type: array 377 | description: Tempo médio de resposta para chamadas nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 378 | items: 379 | type: integer 380 | highPriority: 381 | type: object 382 | description: Tempo médio de resposta de chamadas para o nível de alta prioridade. 383 | required: 384 | - currentDay 385 | - previousDays 386 | properties: 387 | currentDay: 388 | type: integer 389 | description: Tempo médio de resposta para chamadas no dia atual. 390 | previousDays: 391 | type: array 392 | description: Tempo médio de resposta para chamadas nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 393 | items: 394 | type: integer 395 | mediumPriority: 396 | type: object 397 | description: Tempo médio de resposta para chamadas para o nível de média prioridade. 398 | required: 399 | - currentDay 400 | - previousDays 401 | properties: 402 | currentDay: 403 | type: integer 404 | description: Tempo médio de resposta para chamadas no dia atual. 405 | previousDays: 406 | type: array 407 | description: Tempo médio de resposta para chamadas nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 408 | items: 409 | type: integer 410 | unattended: 411 | type: object 412 | description: Tempo médio de resposta para chamadas para o nível não acompanhado. 413 | required: 414 | - currentDay 415 | - previousDays 416 | properties: 417 | currentDay: 418 | type: integer 419 | description: Tempo médio de resposta para chamadas no dia atual. 420 | previousDays: 421 | type: array 422 | description: Tempo médio de resposta para chamadas nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 423 | items: 424 | type: integer 425 | AverageTPSMetrics: 426 | type: object 427 | required: 428 | - currentDay 429 | - previousDays 430 | properties: 431 | currentDay: 432 | type: integer 433 | description: Número médio de chamadas por segundo no dia. 434 | previousDays: 435 | type: array 436 | description: Número médio de chamadas por segundo nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 437 | items: 438 | type: integer 439 | PeakTPSMetrics: 440 | type: object 441 | required: 442 | - currentDay 443 | - previousDays 444 | properties: 445 | currentDay: 446 | type: integer 447 | description: Pico de chamadas por segundo no dia. 448 | previousDays: 449 | type: array 450 | description: Pico de chamadas por segundo nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 451 | items: 452 | type: integer 453 | ErrorMetrics: 454 | type: object 455 | required: 456 | - currentDay 457 | - previousDays 458 | properties: 459 | currentDay: 460 | type: integer 461 | description: Número de chamadas com erro no dia atual. 462 | previousDays: 463 | type: array 464 | description: Número de chamadas com erro nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 465 | items: 466 | type: integer 467 | RejectionMetrics: 468 | type: object 469 | required: 470 | - currentDay 471 | - previousDays 472 | properties: 473 | currentDay: 474 | type: integer 475 | description: Número de chamadas rejeitadas no dia atual. 476 | previousDays: 477 | type: array 478 | description: Número de chamadas rejeitadas nos dias anteriores. O primeiro item do array é referente a ontem, e assim por diante. Devem ser retornados no máximo sete dias caso estejam disponíveis. 479 | items: 480 | type: integer 481 | Links: 482 | type: object 483 | properties: 484 | self: 485 | type: string 486 | description: URL da página atualmente requisitada 487 | example: "https://api.banco.com.br/open-banking/admin/v1/" 488 | first: 489 | type: string 490 | description: URL da primeira página de registros 491 | example: "https://api.banco.com.br/open-banking/admin/v1/" 492 | prev: 493 | type: string 494 | description: URL da página anterior de registros 495 | next: 496 | type: string 497 | description: URL da próxima página de registros 498 | last: 499 | type: string 500 | description: URL da última página de registros 501 | example: "https://api.banco.com.br/open-banking/admin/v1/" 502 | Meta: 503 | type: object 504 | properties: 505 | totalRecords: 506 | type: integer 507 | description: Total de registros encontrados 508 | example: 1 509 | totalPages: 510 | type: integer 511 | description: Total de páginas para os registros encontrados 512 | example: 1 513 | required: 514 | - totalRecords 515 | - totalPages 516 | parameters: 517 | page: 518 | name: page 519 | in: query 520 | description: Número da página que está sendo requisitada (o valor da primeira página é 1). 521 | schema: 522 | type: integer 523 | default: 1 524 | minimum: 1 525 | pageSize: 526 | name: page-size 527 | in: query 528 | description: Quantidade total de registros por páginas. 529 | schema: 530 | type: integer 531 | default: 25 532 | minimum: 1 533 | -------------------------------------------------------------------------------- /spec/channels-api.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: APIs OpenData do Open Banking Brasil 4 | description: As APIs descritas neste documento são referentes as APIs da fase OpenData do Open Banking Brasil. 5 | version: 1.0.0-rc5.2 6 | contact: 7 | email: "apiteam@swagger.io" 8 | tags: 9 | - name: "Channels" 10 | description: "Operações para listagem de canais de atendimentos" 11 | servers: 12 | - url: http://api.banco.com.br/open-banking/channels/v1 13 | # BUG: https://github.com/aws/aws-cdk/issues/9684 14 | # x-amazon-apigateway-endpoint-configuration: 15 | # vpcEndpointIds: 16 | # - Fn::Sub: "${ApigwVpce}" 17 | 18 | x-amazon-apigateway-request-validators: 19 | all: 20 | validateRequestParameters: true 21 | validateRequestBody: true 22 | 23 | x-amazon-apigateway-request-validator: all 24 | 25 | x-amazon-apigateway-policy: 26 | Version: "2012-10-17" 27 | Statement: 28 | - Effect: "Allow" 29 | Principal: "*" 30 | Action: "execute-api:Invoke" 31 | Resource: 32 | - "execute-api:/*" 33 | - Effect: "Deny" 34 | Principal: "*" 35 | Action: "execute-api:Invoke" 36 | Resource: 37 | - "execute-api:/*" 38 | Condition: 39 | StringNotEquals: 40 | aws:SourceVpce: 41 | Fn::Sub: "${ApigwVpce}" 42 | 43 | paths: 44 | /banking-agents: 45 | get: 46 | tags: 47 | - "Channels" 48 | summary: Obtém a lista de correspondentes bancários da instituição financeira. 49 | description: "Método para obter a lista de correspondentes bancários da instituição financeira." 50 | operationId: "getBankingAgents" 51 | parameters: 52 | - $ref: "#/components/parameters/page" 53 | - $ref: "#/components/parameters/pageSize" 54 | responses: 55 | "200": 56 | description: Lista de correspondentes bancários obtida com sucesso. 57 | content: 58 | application/json: 59 | schema: 60 | $ref: "#/components/schemas/ResponseBankingAgentsList" 61 | x-amazon-apigateway-integration: 62 | type: "mock" 63 | requestTemplates: 64 | application/json: | 65 | {"statusCode" : 200} 66 | responses: 67 | "default": 68 | statusCode: "200" 69 | responseTemplates: 70 | application/json: | 71 | { 72 | "data": { 73 | "brand": { 74 | "name": "Organização A", 75 | "companies": [ 76 | { 77 | "name": "Empresa A1", 78 | "cnpjNumber": "45086338000178", 79 | "contractors": [ 80 | { 81 | "name": "Empresa Contratante 1", 82 | "cnpjNumber": "99558332000137", 83 | "bankingAgents": [ 84 | { 85 | "identification": { 86 | "corporationName": "Empresa Correspondente A", 87 | "groupName": "Grupo Master", 88 | "cnpjNumber": "02345876000299", 89 | "isUnderestablishment": true 90 | }, 91 | "locations": [ 92 | { 93 | "postalAddress": { 94 | "address": "Av Tasuko Ykeda, 25", 95 | "districtName": "Centro", 96 | "townName": "Marília", 97 | "countrySubDivision": "SP", 98 | "postCode": "17500001", 99 | "additionalInfo": "Loja B.", 100 | "ibgeCode": "3550308", 101 | "country": "Brasil", 102 | "countryCode": "BRA", 103 | "geographicCoordinates": { 104 | "latitude": "-90.8365180", 105 | "longitude": "-180.836519" 106 | } 107 | }, 108 | "phones": [ 109 | { 110 | "type": "FIXO", 111 | "countryCallingCode": "55", 112 | "areaCode": "14", 113 | "number": "35721199" 114 | }, 115 | { 116 | "type": "MOVEL", 117 | "countryCallingCode": "55", 118 | "areaCode": "14", 119 | "number": "997865532" 120 | } 121 | ], 122 | "availability": { 123 | "standards": [ 124 | { 125 | "weekday": "SEGUNDA_FEIRA", 126 | "openingTime": "10:00:57Z", 127 | "closingTime": "16:00:57Z" 128 | }, 129 | { 130 | "weekday": "TERCA_FEIRA", 131 | "openingTime": "10:00:57Z", 132 | "closingTime": "16:00:57Z" 133 | }, 134 | { 135 | "weekday": "QUARTA_FEIRA", 136 | "openingTime": "10:00:57Z", 137 | "closingTime": "16:00:57Z" 138 | }, 139 | { 140 | "weekday": "QUINTA_FEIRA", 141 | "openingTime": "10:00:57Z", 142 | "closingTime": "16:00:57Z" 143 | }, 144 | { 145 | "weekday": "SEXTA_FEIRA", 146 | "openingTime": "10:00:57Z", 147 | "closingTime": "16:00:57Z" 148 | } 149 | ], 150 | "exception": "Exceto feriados municipais, estaduais e nacionais", 151 | "isPublicAccessAllowed": true 152 | } 153 | }, 154 | { 155 | "postalAddress": { 156 | "address": "R Yroshima Takasi, 72", 157 | "districtName": "Altos da Colina", 158 | "townName": "Marília", 159 | "countrySubDivision": "SP", 160 | "postCode": "17526760", 161 | "additionalInfo": "Loja 2.", 162 | "ibgeCode": "3550308", 163 | "country": "Brasil", 164 | "countryCode": "BRA", 165 | "geographicCoordinates": { 166 | "latitude": "-90.8365180", 167 | "longitude": "-180.836519" 168 | } 169 | }, 170 | "phones": [ 171 | { 172 | "type": "FIXO", 173 | "countryCallingCode": "55", 174 | "areaCode": "14", 175 | "number": "64721199" 176 | } 177 | ], 178 | "availability": { 179 | "standards": [ 180 | { 181 | "weekday": "SEGUNDA_FEIRA", 182 | "openingTime": "10:00:57Z", 183 | "closingTime": "16:00:57Z" 184 | }, 185 | { 186 | "weekday": "TERCA_FEIRA", 187 | "openingTime": "10:00:57Z", 188 | "closingTime": "16:00:57Z" 189 | }, 190 | { 191 | "weekday": "QUARTA_FEIRA", 192 | "openingTime": "10:00:57Z", 193 | "closingTime": "16:00:57Z" 194 | }, 195 | { 196 | "weekday": "QUINTA_FEIRA", 197 | "openingTime": "10:00:57Z", 198 | "closingTime": "16:00:57Z" 199 | }, 200 | { 201 | "weekday": "SEXTA_FEIRA", 202 | "openingTime": "10:00:57Z", 203 | "closingTime": "16:00:57Z" 204 | } 205 | ], 206 | "exception": "Exceto feriados municipais, estaduais e nacionais", 207 | "isPublicAccessAllowed": true 208 | } 209 | }, 210 | { 211 | "postalAddress": { 212 | "address": "Al Nasso Origami, 15, bloco A", 213 | "districtName": "Centro", 214 | "townName": "Marília", 215 | "countrySubDivision": "SP", 216 | "postCode": "17500-001", 217 | "additionalInfo": "Loja B.", 218 | "ibgeCode": "3550308", 219 | "country": "Brasil", 220 | "countryCode": "BRA", 221 | "latitude": "-90.8365180", 222 | "longitude": "-180.836519" 223 | }, 224 | "availability": { 225 | "standards": [ 226 | { 227 | "weekday": "SEGUNDA_FEIRA", 228 | "openingTime": "10:00:57Z", 229 | "closingTime": "16:00:57Z" 230 | }, 231 | { 232 | "weekday": "TERCA_FEIRA", 233 | "openingTime": "10:00:57Z", 234 | "closingTime": "16:00:57Z" 235 | }, 236 | { 237 | "weekday": "QUARTA_FEIRA", 238 | "openingTime": "10:00:57Z", 239 | "closingTime": "16:00:57Z" 240 | }, 241 | { 242 | "weekday": "QUINTA_FEIRA", 243 | "openingTime": "10:00:57Z", 244 | "closingTime": "16:00:57Z" 245 | }, 246 | { 247 | "weekday": "SEXTA_FEIRA", 248 | "openingTime": "10:00:57Z", 249 | "closingTime": "16:00:57Z" 250 | } 251 | ], 252 | "exception": "Exceto feriados municipais, estaduais e nacionais", 253 | "isPublicAccessAllowed": true 254 | } 255 | } 256 | ], 257 | "services": [ 258 | { 259 | "name": "RECEPCAO_ENCAMINHAMENTO_PROPOSTAS_ABERTURA_CONTAS_DEPOSITOS_VISTA_PRAZO_POUPANCA_MANTIDOS_INSTITUICAO_CONTRATANTE", 260 | "code": "RECEBE_ENCAMINHA_PROPOSTAS_ABERTURA_CONTAS" 261 | }, 262 | { 263 | "name": "REALIZACAO_RECEBIMENTOS_PAGAMENTOS_TRANSFERENCIAS_ELETRONICAS_VISANDO_MOVIMENTACAO_CONTAS_DEPOSITOS_TITULARIDADE_CLIENTES_MANTIDAS_INSTITUICAO_CONTRATANTE", 264 | "code": "REALIZA_RECEBIMENTOS_PAGAMENTOS_TRANSFERENCIAS_ELETRONICAS" 265 | }, 266 | { 267 | "name": "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA_OUTRAS_ATIVIDADES_DECORRENTES_EXECUCAO_CONTRATOS_CONVENIOS_PRESTACAO_SERVICOS", 268 | "code": "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA_EXECUCAO_CONTRATOS_CONVENIO" 269 | } 270 | ] 271 | } 272 | ] 273 | } 274 | ] 275 | } 276 | ] 277 | } 278 | }, 279 | "links": { 280 | "self": "https://api.banco.com.br/open-banking/channels/v1/banking-agents", 281 | "first": "https://api.banco.com.br/open-banking/channels/v1/banking-agents", 282 | "prev": "null", 283 | "next": "null", 284 | "last": "https://api.banco.com.br/open-banking/channels/v1/banking-agents" 285 | }, 286 | "meta": { 287 | "totalRecords": 1, 288 | "totalPages": 1 289 | } 290 | } 291 | /branches: 292 | get: 293 | tags: 294 | - "Channels" 295 | summary: Obtém a lista de dependências próprias da instituição financeira. 296 | description: "Método para obter a lista de dependências próprias da instituição financeira." 297 | operationId: "getBranches" 298 | parameters: 299 | - $ref: "#/components/parameters/page" 300 | - $ref: "#/components/parameters/pageSize" 301 | responses: 302 | "200": 303 | description: Lista de dependências próprias obtida com sucesso. 304 | content: 305 | application/json: 306 | schema: 307 | $ref: "#/components/schemas/ResponseBranchesList" 308 | x-amazon-apigateway-integration: 309 | type: "mock" 310 | requestTemplates: 311 | application/json: | 312 | {"statusCode" : 200} 313 | responses: 314 | "default": 315 | statusCode: "200" 316 | responseTemplates: 317 | application/json: | 318 | { 319 | "data": { 320 | "brand": { 321 | "name": "Organização A", 322 | "companies": [ 323 | { 324 | "name": "Empresa A1", 325 | "cnpjNumber": "45086338000178", 326 | "urlComplementaryList": "https://empresaa1.com/branches-banking", 327 | "branches": [ 328 | { 329 | "identification": { 330 | "type": "AGENCIA" 331 | "code": "0001", 332 | "checkDigit": "9", 333 | "name": "Marília", 334 | "relatedBranch": "0001", 335 | "openingDate": "2010-01-02" 336 | }, 337 | "postalAddress": { 338 | "address": "Av Naburo Ykesaki, 1270", 339 | "additionalInfo": "Loja B", 340 | "districtName": "Centro", 341 | "townName": "Marília", 342 | "ibgeCode": "3515890", 343 | "countrySubDivision": "SP", 344 | "postCode": "17500001", 345 | "country": "Brasil", 346 | "countryCode": "BRA", 347 | "geograficCoordinates": { 348 | "latitude": "-90.009876543", 349 | "longitude": "-180.00986543" 350 | } 351 | }, 352 | "availability": { 353 | "standards": [ 354 | { 355 | "weekday": "SEGUNDA_FEIRA", 356 | "openingTime": "10:00:57Z", 357 | "closingTime": "16:00:57Z" 358 | }, 359 | { 360 | "weekday": "TERCA_FEIRA", 361 | "openingTime": "10:00:57Z", 362 | "closingTime": "16:00:57Z" 363 | }, 364 | { 365 | "weekday": "QUARTA_FEIRA", 366 | "openingTime": "10:00:57Z", 367 | "closingTime": "16:00:57Z" 368 | }, 369 | { 370 | "weekday": "QUINTA_FEIRA", 371 | "openingTime": "10:00:57Z", 372 | "closingTime": "16:00:57Z" 373 | }, 374 | { 375 | "weekday": "SEXTA_FEIRA", 376 | "openingTime": "10:00:57Z", 377 | "closingTime": "16:00:57Z" 378 | } 379 | ], 380 | "exception": "Exceto feriados municipais, estaduais e nacionais", 381 | "isPublicAccessAllowed": true 382 | }, 383 | "phones": [ 384 | { 385 | "type": "FIXO", 386 | "countryCallingCode": "55", 387 | "areaCode": "14", 388 | "number": "35721199" 389 | }, 390 | { 391 | "type": "MOVEL", 392 | "countryCallingCode": "55", 393 | "areaCode": "14", 394 | "number": "997865532" 395 | } 396 | ], 397 | "services": [ 398 | { 399 | "name": "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA", 400 | "code": "RECEBE_PAGA_QUALQUER_NATUREZA" 401 | }, 402 | { 403 | "name": "OUTROS_PRODUTOS_SERVICOS", 404 | "code": "OUTROS_PRODUTOS_SERVICOS", 405 | "additionalInfo": "Renegociação" 406 | } 407 | ] 408 | } 409 | ] 410 | } 411 | ] 412 | } 413 | }, 414 | "links": { 415 | "self": "https://api.banco.com.br/open-banking/channels/v1/branches", 416 | "first": "https://api.banco.com.br/open-banking/channels/v1/branches", 417 | "prev": "null", 418 | "next": "null", 419 | "last": "https://api.banco.com.br/open-banking/channels/v1/branches" 420 | }, 421 | "meta": { 422 | "totalRecords": 1, 423 | "totalPages": 1 424 | } 425 | } 426 | /electronic-channels: 427 | get: 428 | tags: 429 | - "Channels" 430 | summary: Obtém a lista de canais eletrônicos de atendimento da instituição financeira. 431 | description: "Método para obter a lista de canais eletrônicos de atendimento da instituição financeira." 432 | operationId: "getElectronicChannels" 433 | parameters: 434 | - $ref: "#/components/parameters/page" 435 | - $ref: "#/components/parameters/pageSize" 436 | responses: 437 | "200": 438 | description: Lista de canais eletrônicos de atendimento obtida com sucesso. 439 | content: 440 | application/json: 441 | schema: 442 | $ref: "#/components/schemas/ResponseElectronicChannelsList" 443 | x-amazon-apigateway-integration: 444 | type: "mock" 445 | requestTemplates: 446 | application/json: | 447 | {"statusCode" : 200} 448 | responses: 449 | "default": 450 | statusCode: "200" 451 | responseTemplates: 452 | application/json: | 453 | { 454 | "data": { 455 | "brand": { 456 | "name": "Organização A", 457 | "companies": [ 458 | { 459 | "name": "Empresa A1", 460 | "cnpjNumber": "45086338000178", 461 | "urlComplementaryList": "https://empresaa1.com/branches-banking", 462 | "electronicChannels": [ 463 | { 464 | "identification": { 465 | "type": "INTERNET_BANKING", 466 | "urls": [ 467 | "https://empresaa1.com/internet-banking" 468 | ] 469 | }, 470 | "services": [ 471 | { 472 | "name": "ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA", 473 | "code": "ABRE_CONTA_DEPOSITO_OU_PRE_PAGA" 474 | }, 475 | { 476 | "name": "CARTAO_CREDITO", 477 | "code": "CARTAO_CREDITO" 478 | } 479 | ] 480 | }, 481 | { 482 | "identification": { 483 | "type": "MOBILE_BANKING", 484 | "urls": [ 485 | "https://empresaa1.com/mobile-zeta", 486 | "https://empresaa1.com/mobile-aaa", 487 | "https://empresaa1.com/mobile-bbb" 488 | ] 489 | }, 490 | "services": [ 491 | { 492 | "name": "CARTAO_CREDITO", 493 | "code": "CARTAO_CREDITO" 494 | }, 495 | { 496 | "name": "OPERACOES_ARRENDAMENTO_MERCANTIL", 497 | "code": "OPERA_ARRENDAMENTO_MERCANTIL" 498 | }, 499 | { 500 | "name": "OUTROS_PRODUTOS_SERVICOS", 501 | "code": "OUTROS_PRODUTOS_SERVICOS", 502 | "additionalInfo": "Atendimento em outros idiomas" 503 | } 504 | 505 | ] 506 | }, 507 | { 508 | "identification": { 509 | "type": "CHAT", 510 | "urls": [ 511 | "https://empresaa1.com/channels-chat1", 512 | "https://empresaa1.com/channels-chat2" 513 | ] 514 | }, 515 | "services": [ 516 | { 517 | "name": "SEGUROS", 518 | "code": "SEGUROS" 519 | }, 520 | { 521 | "name": "APLICACOES_RESGATES_INVESTIMENTOS", 522 | "code": "APLICA_RESGATA_INVESTIMENTOS" 523 | }, 524 | { 525 | "name": "EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGAMENTO_SOLICITACAO_CLIENTES_USUARIOS", 526 | "code": "EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGTO" 527 | } 528 | ] 529 | } 530 | ] 531 | } 532 | ] 533 | } 534 | }, 535 | "links": { 536 | "self": "https://api.banco.com.br/open-banking/channels/v1/electronic-channels", 537 | "first": "https://api.banco.com.br/open-banking/channels/v1/electronic-channels", 538 | "prev": "null", 539 | "next": "null", 540 | "last": "https://api.banco.com.br/open-banking/channels/v1/electronic-channels" 541 | }, 542 | "meta": { 543 | "totalRecords": 1, 544 | "totalPages": 1 545 | } 546 | } 547 | /phone-channels: 548 | get: 549 | tags: 550 | - "Channels" 551 | summary: "Obtém a lista de canais telefônicos de atendimento da instituição financeira." 552 | description: "Método para obter a lista de canais telefônicos de atendimento da instituição financeira." 553 | operationId: "getPhoneChannels" 554 | parameters: 555 | - $ref: "#/components/parameters/page" 556 | - $ref: "#/components/parameters/pageSize" 557 | responses: 558 | "200": 559 | description: Lista de canais telefônicos de atendimento obtida com sucesso. 560 | content: 561 | application/json: 562 | schema: 563 | $ref: "#/components/schemas/ResponsePhoneChannelsList" 564 | x-amazon-apigateway-integration: 565 | type: "mock" 566 | requestTemplates: 567 | application/json: | 568 | {"statusCode" : 200} 569 | responses: 570 | "default": 571 | statusCode: "200" 572 | responseTemplates: 573 | application/json: | 574 | { 575 | "data": { 576 | "brand": { 577 | "name": "Organização A", 578 | "companies": [ 579 | { 580 | "name": "Empresa A1", 581 | "cnpjNumber": "45086338000178", 582 | "urlComplementaryList": "https://empresaa1.com/branches-banking", 583 | "phoneChannels": [ 584 | { 585 | "identification": { 586 | "type": "CENTRAL_TELEFONICA", 587 | "phones": [ 588 | { 589 | "countryCallingCode": "55", 590 | "areaCode": "14", 591 | "number": "35721199", 592 | "additionalInfo": "NA" 593 | }, 594 | { 595 | "countryCallingCode": "55", 596 | "areaCode": "14", 597 | "number": "997865532", 598 | "additionalInfo": "NA" 599 | } 600 | ] 601 | }, 602 | "services": [ 603 | { 604 | "name": "ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA", 605 | "code": "ABRE_CONTA_DEPOSITO_OU_PRE_PAGA" 606 | }, 607 | { 608 | "name": "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA", 609 | "code": "RECEBE_PAGA_QUALQUER_NATUREZA" 610 | }, 611 | { 612 | "name": "OUTROS_PRODUTOS_SERVICOS", 613 | "code": "OUTROS_PRODUTOS_SERVICOS", 614 | "additionalInfo": "Atendimento em outros idiomas" 615 | } 616 | ] 617 | }, 618 | { 619 | "identification": { 620 | "type": "SAC", 621 | "phones": [ 622 | { 623 | "countryCallingCode": "55", 624 | "areaCode": "14", 625 | "number": "40044828", 626 | "additionalInfo": "DDI '55'; DDD '11', 40044828, 'Para clientes no exterior'" 627 | }, 628 | { 629 | "countryCallingCode": "55", 630 | "areaCode": "14", 631 | "number": "40044828", 632 | "additionalInfo": "DDI ' ', DDD ' ', 40044828, 'Para regiões metropolitanas'" 633 | }, 634 | { 635 | "countryCallingCode": "55", 636 | "areaCode": "14", 637 | "number": "40044828", 638 | "additionalInfo": "DDI ' ', DDD ' ', 40044828, 'Para demais localidades'" 639 | } 640 | ] 641 | }, 642 | "services": [ 643 | { 644 | "name": "RECLAMACOES", 645 | "code": "RECLAMACOES" 646 | }, 647 | { 648 | "name": "INFORMACOES", 649 | "code": "INFORMACOES" 650 | }, 651 | { 652 | "name": "CANCELAMENTO", 653 | "code": "CANCELAMENTO" 654 | } 655 | ] 656 | }, 657 | { 658 | "identification": { 659 | "type": "OUVIDORIA", 660 | "phones": [ 661 | { 662 | "countryCallingCode": "55", 663 | "areaCode": "14", 664 | "number": "40045555", 665 | "additionalInfo": "DDI '55'; DDD '11', 40045555, 'Para clientes no exterior'" 666 | }, 667 | { 668 | "countryCallingCode": "55", 669 | "areaCode": "14", 670 | "number": "40045555", 671 | "additionalInfo": "DDI ' ', DDD ' ', 40045555, 'Para regiões metropolitanas'" 672 | }, 673 | { 674 | "countryCallingCode": "55", 675 | "areaCode": "14", 676 | "number": "40045555", 677 | "additionalInfo": "DDI ' ', DDD ' ', 40045555, 'Para demais localidades'" 678 | } 679 | ] 680 | }, 681 | "services": [ 682 | { 683 | "name": "RECLAMACOES", 684 | "code": "RECLAMACOES" 685 | }, 686 | { 687 | "name": "INFORMACOES", 688 | "code": "INFORMACOES" 689 | } 690 | ] 691 | }, 692 | { 693 | "identification": { 694 | "type": "OUTROS", 695 | "additionalInfo": "Receptivo", 696 | "phones": [ 697 | { 698 | "countryCallingCode": "55", 699 | "areaCode": "NA", 700 | "number": "40043277", 701 | "additionalInfo": "DDI ' ', DDD ' ', 40043277', 'Para regiões metropolitanas'" 702 | }, 703 | { 704 | "countryCallingCode": "NA", 705 | "areaCode": "NA", 706 | "number": "40043277", 707 | "additionalInfo": "DDI ' ', DDD ' ', 40043277', 'Para demais localidades'" 708 | } 709 | ] 710 | }, 711 | "services": [ 712 | { 713 | "name": "OUTROS_PRODUTOS_SERVICOS", 714 | "code": "OUTROS_PRODUTOS_SERVICOS", 715 | "additionalInfo": "Previdência Privada" 716 | } 717 | ] 718 | } 719 | ] 720 | } 721 | ] 722 | } 723 | }, 724 | "links": { 725 | "self": "https://api.banco.com.br/open-banking/channels/v1/phone-channels", 726 | "first": "https://api.banco.com.br/open-banking/channels/v1/phone-channels", 727 | "prev": "null", 728 | "next": "null", 729 | "last": "https://api.banco.com.br/open-banking/channels/v1/phone-channels" 730 | }, 731 | "meta": { 732 | "totalRecords": 1, 733 | "totalPages": 1 734 | } 735 | } 736 | /shared-automated-teller-machines: 737 | get: 738 | tags: 739 | - "Channels" 740 | summary: "Obtém a lista de terminais compartilhados de autoatendimento." 741 | description: "Método para obter a lista de terminais compartilhados de autoatendimento da instituição financeira." 742 | operationId: "getSharedAutomatedTellerMachines" 743 | parameters: 744 | - $ref: "#/components/parameters/page" 745 | - $ref: "#/components/parameters/pageSize" 746 | responses: 747 | "200": 748 | description: Lista de terminais compartilhados de autoatendimento obtida com sucesso. 749 | content: 750 | application/json: 751 | schema: 752 | $ref: "#/components/schemas/ResponseSharedAutomatedTellerMachinesList" 753 | x-amazon-apigateway-integration: 754 | type: "mock" 755 | requestTemplates: 756 | application/json: | 757 | {"statusCode" : 200} 758 | responses: 759 | "default": 760 | statusCode: "200" 761 | responseTemplates: 762 | application/json: | 763 | { 764 | "data": { 765 | "brand": { 766 | "name": "Organização A", 767 | "companies": [ 768 | { 769 | "name": "Empresa A1", 770 | "cnpjNumber": "45086338000178", 771 | "urlComplementaryList": "https://empresadaorganizacaoa.com/complementarylist", 772 | "sharedAutomatedTellerMachines": [ 773 | { 774 | "identification": { 775 | "ownerName": "João da Silva Santos" 776 | }, 777 | "postalAddress": { 778 | "address": "Av Naburo Ykesaki, 1270", 779 | "additionalInfo": "Fundos", 780 | "districtName": "Centro", 781 | "townName": "Marília", 782 | "ibgeCode": "3515890" 783 | "countrySubDivision": "SP", 784 | "postCode": "17500001", 785 | "country": "Brasil", 786 | "countryCode": "BRA", 787 | "geographicCoordinates": { 788 | "latitude": "-90.8365180", 789 | "longitude": "-180.836519" 790 | } 791 | }, 792 | "availability": { 793 | "standards": [ 794 | { 795 | "weekday": "SEGUNDA_FEIRA", 796 | "openingTime": "10:00:57Z", 797 | "closingTime": "16:00:57Z" 798 | }, 799 | { 800 | "weekday": "TERCA_FEIRA", 801 | "openingTime": "10:00:57Z", 802 | "closingTime": "16:00:57Z" 803 | }, 804 | { 805 | "weekday": "QUARTA_FEIRA", 806 | "openingTime": "10:00:57Z", 807 | "closingTime": "16:00:57Z" 808 | }, 809 | { 810 | "weekday": "QUINTA_FEIRA", 811 | "openingTime": "10:00:57Z", 812 | "closingTime": "16:00:57Z" 813 | }, 814 | { 815 | "weekday": "SEXTA_FEIRA", 816 | "openingTime": "10:00:57Z", 817 | "closingTime": "16:00:57Z" 818 | } 819 | ], 820 | "exception": "Exceto feriados municipais, nacionais e estaduais", 821 | "isPublicAccessAllowed": true 822 | }, 823 | "services": [ 824 | { 825 | "name": "ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA", 826 | "code": "ABRE_CONTA_DEPOSITO_OU_PRE_PAGA" 827 | }, 828 | { 829 | "name": "SAQUE_MOEDA_EM_ESPECIE", 830 | "code": "SAQUE_MOEDA_ESPECIE" 831 | }, 832 | { 833 | "name": "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA", 834 | "code": "RECEBE_PAGA_QUALQUER_NATUREZA" 835 | }, 836 | { 837 | "name": "TRANSFERENCIAS_ELETRONICAS_VISANDO_MOVIMENTACAO", 838 | "code": "TRANSFERENCIAS_ELETRONICAS_MOVIMENTA_CONTAS_DEPOSITOS_OU_PAGA_TITULARES_CLIENTES" 839 | }, 840 | { 841 | "name": "CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS_E_CONTAS", 842 | "code": "CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS" 843 | }, 844 | { 845 | "name": "APLICACOES_RESGATES_INVESTIMENTOS", 846 | "code": "APLICA_RESGATA_INVESTIMENTOS" 847 | }, 848 | { 849 | "name": "CARTAO_CREDITO", 850 | "code": "CARTAO_CREDITO" 851 | }, 852 | { 853 | "name": "SEGUROS", 854 | "code": "SEGUROS" 855 | }, 856 | { 857 | "name": "OPERACOES_ARRENDAMENTO_MERCANTIL", 858 | "code": "OPERACOES_ARRENDAMENTO_MERCANTIL" 859 | }, 860 | { 861 | "name": "OUTROS_PRODUTOS_SERVICOS", 862 | "code": "OUTROS_PRODUTOS_SERVICOS", 863 | "additionalInfo": "Serviços complementares de atendimento via terminais de autoatendimento." 864 | } 865 | ] 866 | } 867 | ] 868 | } 869 | ] 870 | } 871 | }, 872 | "links": { 873 | "self": "https://api.banco.com.br/open-banking/channels/v1/shared-automated-teller-machines", 874 | "first": "https://api.banco.com.br/open-banking/channels/v1/shared-automated-teller-machines", 875 | "prev": "null", 876 | "next": "null", 877 | "last": "https://api.banco.com.br/open-banking/channels/v1/shared-automated-teller-machines" 878 | }, 879 | "meta": { 880 | "totalRecords": 1, 881 | "totalPages": 1 882 | } 883 | } 884 | components: 885 | schemas: 886 | ResponseBankingAgentsList: 887 | type: object 888 | required: 889 | - data 890 | - links 891 | - meta 892 | properties: 893 | data: 894 | type: object 895 | required: 896 | - brand 897 | properties: 898 | brand: 899 | $ref: "#/components/schemas/BankingAgentsBrand" 900 | links: 901 | $ref: "#/components/schemas/Links" 902 | meta: 903 | $ref: "#/components/schemas/Meta" 904 | example: 905 | data: 906 | brand: 907 | name: "Organização A" 908 | companies: 909 | - name: "Empresa A1" 910 | cnpjNumber: "45086338000178" 911 | contractors: 912 | - name: "Empresa Contratante 1" 913 | cnpjNumber: "99558332000137" 914 | bankingAgents: 915 | - identification: 916 | corporationName: "Empresa Correspondente A" 917 | groupName: "Grupo Master" 918 | cnpjNumber: "02345876000299" 919 | isUnderestablishment: true 920 | locations: 921 | - postalAddress: 922 | address: "Av Tasuko Ykeda, 25" 923 | districtName: "Centro" 924 | townName: "Marília" 925 | countrySubDivision: "SP" 926 | postCode: "17500001" 927 | additionalInfo: "Loja B." 928 | ibgeCode: "3550308" 929 | country: "Brasil" 930 | countryCode: "BRA" 931 | geographicCoordinates: 932 | latitude: "-90.8365180" 933 | longitude: "-180.836519" 934 | phones: 935 | - type: "FIXO" 936 | countryCallingCode: "55" 937 | areaCode: "14" 938 | number: "35721199" 939 | - type: "MOVEL" 940 | countryCallingCode: "55" 941 | areaCode: "14" 942 | number: "997865532" 943 | availability: 944 | standards: 945 | - weekday: SEGUNDA_FEIRA 946 | openingTime: "10:00:57Z" 947 | closingTime: "16:00:57Z" 948 | - weekday: TERCA_FEIRA 949 | openingTime: "10:00:57Z" 950 | closingTime: "16:00:57Z" 951 | - weekday: QUARTA_FEIRA 952 | openingTime: "10:00:57Z" 953 | closingTime: "16:00:57Z" 954 | - weekday: QUINTA_FEIRA 955 | openingTime: "10:00:57Z" 956 | closingTime: "16:00:57Z" 957 | - weekday: SEXTA_FEIRA 958 | openingTime: "10:00:57Z" 959 | closingTime: "16:00:57Z" 960 | exception: "Exceto feriados municipais, estaduais e nacionais" 961 | isPublicAccessAllowed: true 962 | - postalAddress: 963 | address: "R Yroshima Takasi, 72" 964 | districtName: "Altos da Colina" 965 | townName: "Marília" 966 | countrySubDivision: "SP" 967 | postCode: "17526760" 968 | additionalInfo: "Loja 2." 969 | ibgeCode: "3550308" 970 | country: "Brasil" 971 | countryCode: "BRA" 972 | geographicCoordinates: 973 | latitude: "-90.8365180" 974 | longitude: "-180.836519" 975 | phones: 976 | - type: "FIXO" 977 | countryCallingCode: "55" 978 | areaCode: "14" 979 | number: "64721199" 980 | availability: 981 | standards: 982 | - weekday: SEGUNDA_FEIRA 983 | openingTime: "10:00:57Z" 984 | closingTime: "16:00:57Z" 985 | - weekday: TERCA_FEIRA 986 | openingTime: "10:00:57Z" 987 | closingTime: "16:00:57Z" 988 | - weekday: QUARTA_FEIRA 989 | openingTime: "10:00:57Z" 990 | closingTime: "16:00:57Z" 991 | - weekday: QUINTA_FEIRA 992 | openingTime: "10:00:57Z" 993 | closingTime: "16:00:57Z" 994 | - weekday: SEXTA_FEIRA 995 | openingTime: "10:00:57Z" 996 | closingTime: "16:00:57Z" 997 | exception: "Exceto feriados municipais, estaduais e nacionais" 998 | isPublicAccessAllowed: true 999 | - postalAddress: 1000 | address: "Al Nasso Origami, 15, bloco A" 1001 | districtName: "Centro" 1002 | townName: "Marília" 1003 | countrySubDivision: "SP" 1004 | postCode: "17500001" 1005 | additionalInfo: "Loja B." 1006 | ibgeCode: "3550308" 1007 | country: "Brasil" 1008 | countryCode: "BRA" 1009 | geographicCoordinates: 1010 | latitude: "-90.8365180" 1011 | longitude: "-180.836519" 1012 | availability: 1013 | standards: 1014 | - weekday: SEGUNDA_FEIRA 1015 | openingTime: "10:00:57Z" 1016 | closingTime: "16:00:57Z" 1017 | - weekday: TERCA_FEIRA 1018 | openingTime: "10:00:57Z" 1019 | closingTime: "16:00:57Z" 1020 | - weekday: QUARTA_FEIRA 1021 | openingTime: "10:00:57Z" 1022 | closingTime: "16:00:57Z" 1023 | - weekday: QUINTA_FEIRA 1024 | openingTime: "10:00:57Z" 1025 | closingTime: "16:00:57Z" 1026 | - weekday: SEXTA_FEIRA 1027 | openingTime: "10:00:57Z" 1028 | closingTime: "16:00:57Z" 1029 | exception: "Exceto feriados municipais, estaduais e nacionais" 1030 | isPublicAccessAllowed: true 1031 | services: 1032 | - name: "RECEPCAO_ENCAMINHAMENTO_PROPOSTAS_ABERTURA_CONTAS_DEPOSITOS_VISTA_PRAZO_POUPANCA_MANTIDOS_INSTITUICAO_CONTRATANTE" 1033 | code: "RECEBE_ENCAMINHA_PROPOSTAS_ABERTURA_CONTAS" 1034 | additionalInfo: "NA" 1035 | - name: "REALIZACAO_RECEBIMENTOS_PAGAMENTOS_TRANSFERENCIAS_ELETRONICAS_VISANDO_MOVIMENTACAO_CONTAS_DEPOSITOS_TITULARIDADE_CLIENTES_MANTIDAS_INSTITUICAO_CONTRATANTE" 1036 | code: "REALIZA_RECEBIMENTOS_PAGAMENTOS_TRANSFERENCIAS_ELETRONICAS" 1037 | additionalInfo: "NA" 1038 | - name: "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA_OUTRAS_ATIVIDADES_DECORRENTES_EXECUCAO_CONTRATOS_CONVENIOS_PRESTACAO_SERVICOS" 1039 | code: "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA_EXECUCAO_CONTRATOS_CONVENIO" 1040 | additionalInfo: "NA" 1041 | links: 1042 | self: "https://api.banco.com.br/open-banking/channels/v1/banking-agents" 1043 | first: "https://api.banco.com.br/open-banking/channels/v1/banking-agents" 1044 | prev: "null" 1045 | next: "null" 1046 | last: "https://api.banco.com.br/open-banking/channels/v1/banking-agents" 1047 | meta: 1048 | totalRecords: 1 1049 | totalPages: 1 1050 | BankingAgentsBrand: 1051 | type: object 1052 | required: 1053 | - name 1054 | - companies 1055 | allOf: 1056 | - $ref: "#/components/schemas/Brand" 1057 | properties: 1058 | name: 1059 | type: string 1060 | description: Nome da marca selecionada pela Organização proprietário da dependência (titular). 1061 | maxLength: 80 1062 | companies: 1063 | type: array 1064 | items: 1065 | $ref: "#/components/schemas/BankingAgentsCompanies" 1066 | minItems: 1 1067 | description: Lista de instituições pertencentes à marca 1068 | BankingAgentsCompanies: 1069 | type: object 1070 | required: 1071 | - name 1072 | - cnpjNumber 1073 | - contractors 1074 | properties: 1075 | name: 1076 | type: string 1077 | maxLength: 80 1078 | pattern: \w*\W* 1079 | description: Nome da Instituição, pertencente à marca, responsável pelo Correspondente Bancário no país. 1080 | example: "Empresa da Organização A" 1081 | contractors: 1082 | type: array 1083 | items: 1084 | $ref: "#/components/schemas/BankingAgentsContractor" 1085 | minItems: 1 1086 | description: Relação de informações de um contratante do serviço de correspondente. 1087 | allOf: 1088 | - $ref: "#/components/schemas/CNPJ" 1089 | BankingAgentsContractor: 1090 | type: object 1091 | required: 1092 | - name 1093 | - cnpjNumber 1094 | properties: 1095 | name: 1096 | type: string 1097 | maxLength: 100 1098 | pattern: \w*\W* 1099 | bankingAgents: 1100 | type: array 1101 | items: 1102 | $ref: "#/components/schemas/BankingAgent" 1103 | minItems: 1 1104 | allOf: 1105 | - $ref: "#/components/schemas/CNPJ" 1106 | ResponseBranchesList: 1107 | type: object 1108 | required: 1109 | - data 1110 | - links 1111 | - meta 1112 | properties: 1113 | data: 1114 | type: object 1115 | required: 1116 | - brand 1117 | properties: 1118 | brand: 1119 | $ref: "#/components/schemas/BranchesBrand" 1120 | links: 1121 | $ref: "#/components/schemas/Links" 1122 | meta: 1123 | $ref: "#/components/schemas/Meta" 1124 | example: 1125 | data: 1126 | brand: 1127 | name: Organização A 1128 | companies: 1129 | - name: Empresa A1 1130 | cnpjNumber: "45086338000178" 1131 | urlComplementaryList: "https://empresaa1.com/branches-banking" 1132 | branches: 1133 | - identification: 1134 | type: "AGENCIA" 1135 | code: "0001" 1136 | checkDigit: "9" 1137 | name: "Marília" 1138 | relatedBranch: "0001" 1139 | openingDate: "2010-01-02" 1140 | postalAddress: 1141 | address: "Av Naburo Ykesaki, 1270" 1142 | additionalInfo: "Loja B" 1143 | districtName: "Centro" 1144 | townName: "Marília" 1145 | ibgeCode: "3550308" 1146 | countrySubDivision: "SP" 1147 | postCode: "17500-001" 1148 | country: "Brasil" 1149 | countryCode: "BRA" 1150 | geographicCoordinates: 1151 | latitude: "-90.8365180" 1152 | longitude: "-180.836519" 1153 | availability: 1154 | standards: 1155 | - weekday: SEGUNDA_FEIRA 1156 | openingTime: "10:00:57Z" 1157 | closingTime: "16:00:57Z" 1158 | - weekday: TERCA_FEIRA 1159 | openingTime: "10:00:57Z" 1160 | closingTime: "16:00:57Z" 1161 | - weekday: QUARTA_FEIRA 1162 | openingTime: "10:00:57Z" 1163 | closingTime: "16:00:57Z" 1164 | - weekday: QUINTA_FEIRA 1165 | openingTime: "10:00:57Z" 1166 | closingTime: "16:00:57Z" 1167 | - weekday: SEXTA_FEIRA 1168 | openingTime: "10:00:57Z" 1169 | closingTime: "16:00:57Z" 1170 | exception: "Exceto feriados municipais, estaduais e nacionais" 1171 | isPublicAccessAllowed: true 1172 | phones: 1173 | - type: FIXO 1174 | countryCallingCode: "55" 1175 | areaCode: "14" 1176 | number: "35721199" 1177 | - type: MOVEL 1178 | countryCallingCode: "55" 1179 | areaCode: "14" 1180 | number: "997865532" 1181 | services: 1182 | - name: "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA" 1183 | code: "RECEBE_PAGA_QUALQUER_NATUREZA" 1184 | - name: "OUTROS_PRODUTOS_SERVICOS" 1185 | code: "OUTROS_PRODUTOS_SERVICOS" 1186 | additionalInfo: "Renegociação" 1187 | links: 1188 | self: "https://api.banco.com.br/open-banking/channels/v1/branches" 1189 | first: "https://api.banco.com.br/open-banking/channels/v1/branches" 1190 | prev: "null" 1191 | next: "null" 1192 | last: "https://api.banco.com.br/open-banking/channels/v1/branches" 1193 | meta: 1194 | totalRecords: 1 1195 | totalPages: 1 1196 | BranchesBrand: 1197 | type: object 1198 | required: 1199 | - name 1200 | - companies 1201 | properties: 1202 | name: 1203 | type: string 1204 | description: Nome da Marca reportada pelo participante do Open Banking. O conceito a que se refere a 'marca' é em essência uma promessa da empresa em fornecer uma série específica de atributos, benefícios e serviços uniformes aos clientes. 1205 | maxLength: 80 1206 | pattern: \w*\W* 1207 | companies: 1208 | type: array 1209 | items: 1210 | $ref: "#/components/schemas/BranchesCompany" 1211 | minItems: 1 1212 | description: Companies traz uma lista de todas as instuituições da Marca. 1213 | BranchesCompany: 1214 | type: object 1215 | required: 1216 | - name 1217 | - cnpjNumber 1218 | properties: 1219 | name: 1220 | type: string 1221 | maxLength: 80 1222 | pattern: \w*\W* 1223 | cnpjNumber: 1224 | type: string 1225 | minLength: 14 1226 | maxLength: 14 1227 | pattern: '^(\d{14})$|^NA$' 1228 | description: | 1229 | Número completo do CNPJ da instituição responsável pela dependência - o CNPJ corresponde ao número de inscrição no Cadastro de Pessoa Jurídica. 1230 | Deve-se ter apenas os números do CNPJ, sem máscara 1231 | example: "45086338000178" 1232 | urlComplementaryList: 1233 | type: string 1234 | maxLength: 1024 1235 | pattern: \w*\W* 1236 | example: "https://example.com/mobile-banking" 1237 | branches: 1238 | type: array 1239 | items: 1240 | $ref: "#/components/schemas/Branch" 1241 | minItems: 1 1242 | description: Lista de Dependências de uma Instituição 1243 | allOf: 1244 | - $ref: "#/components/schemas/CNPJ" 1245 | ResponseElectronicChannelsList: 1246 | type: object 1247 | required: 1248 | - data 1249 | - links 1250 | - meta 1251 | properties: 1252 | data: 1253 | type: object 1254 | required: 1255 | - brand 1256 | properties: 1257 | brand: 1258 | $ref: "#/components/schemas/ElectronicChannelsBrand" 1259 | links: 1260 | $ref: "#/components/schemas/Links" 1261 | meta: 1262 | $ref: "#/components/schemas/Meta" 1263 | example: 1264 | data: 1265 | brand: 1266 | name: "Organização A" 1267 | companies: 1268 | - name: "Empresa A1" 1269 | cnpjNumber: "45086338000178" 1270 | urlComplementaryList: "https://empresaa1.com/branches-banking" 1271 | electronicChannels: 1272 | - identification: 1273 | type: "INTERNET_BANKING" 1274 | additionalInfo: "NA" 1275 | urls: 1276 | - "https://empresaa1.com/internet-banking" 1277 | services: 1278 | - name: "ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA" 1279 | code: "ABRE_CONTA_DEPOSITO_OU_PRE_PAGA" 1280 | additionalInfo: "NA" 1281 | - name: "SEGUROS" 1282 | code: "SEGUROS" 1283 | additionalInfo: "NA" 1284 | links: 1285 | self: "https://api.banco.com.br/open-banking/channels/v1/electronic-channels" 1286 | first: "https://api.banco.com.br/open-banking/channels/v1/electronic-channels" 1287 | prev: "null" 1288 | next: "null" 1289 | last: "https://api.banco.com.br/open-banking/channels/v1/electronic-channels" 1290 | meta: 1291 | totalRecords: 1 1292 | totalPages: 1 1293 | ElectronicChannelsBrand: 1294 | type: object 1295 | required: 1296 | - name 1297 | - companies 1298 | properties: 1299 | name: 1300 | type: string 1301 | description: Nome da marca selecionada pela Organização proprietária da dependência (titular). 1302 | example: "Marca A" 1303 | maxLength: 80 1304 | pattern: \w*\W* 1305 | companies: 1306 | type: array 1307 | items: 1308 | $ref: "#/components/schemas/ElectronicChannelsCompanies" 1309 | minItems: 1 1310 | description: Lista de instituições pertencentes à marca 1311 | ElectronicChannelsCompanies: 1312 | type: object 1313 | required: 1314 | - name 1315 | - electronicChannels 1316 | - cnpjNumber 1317 | properties: 1318 | name: 1319 | type: string 1320 | description: Nome da marca selecionada pela Organização proprietária da dependência (titular). 1321 | example: "Empresa da Marca A" 1322 | maxLength: 80 1323 | pattern: \w*\W* 1324 | urlComplementaryList: 1325 | type: string 1326 | maxLength: 1024 1327 | pattern: \w*\W* 1328 | example: "https://example.com/mobile-banking" 1329 | electronicChannels: 1330 | type: array 1331 | items: 1332 | $ref: "#/components/schemas/ElectronicChannel" 1333 | minItems: 1 1334 | maxItems: 4 1335 | description: Lista de canais de atendimento eltrônico 1336 | allOf: 1337 | - $ref: "#/components/schemas/CNPJ" 1338 | BankingAgent: 1339 | type: object 1340 | required: 1341 | - identification 1342 | - locations 1343 | - services 1344 | properties: 1345 | identification: 1346 | $ref: "#/components/schemas/BankingAgentIdentification" 1347 | locations: 1348 | type: array 1349 | items: 1350 | $ref: "#/components/schemas/BankingAgentLocation" 1351 | minItems: 1 1352 | description: Relação de informações referentes as localizações dos Correspondentes bancários. 1353 | services: 1354 | type: array 1355 | items: 1356 | $ref: "#/components/schemas/BankingAgentService" 1357 | minItems: 1 1358 | maxItems: 20 1359 | description: "Traz a relação de serviços disponbilizados pelo Canal de Atendimento" 1360 | BankingAgentIdentification: 1361 | type: object 1362 | properties: 1363 | corporationName: 1364 | type: string 1365 | maxLength: 100 1366 | pattern: \w*\W* 1367 | groupName: 1368 | type: string 1369 | maxLength: 100 1370 | pattern: \w*\W* 1371 | isUnderestablishment: 1372 | type: boolean 1373 | description: Indicador do Correspondente Bancário ser um Substabelecimento (são empresas que foram contratadas por um correspondente bancário para prestar serviços. A empresa substabelecida é tratada como um correspondente do banco e tem praticamente os mesmos direitos e obrigações que possui o correspondente direto) 1374 | allOf: 1375 | - $ref: "#/components/schemas/CNPJ" 1376 | required: 1377 | - cnpjNumber 1378 | - corporationName 1379 | BankingAgentLocation: 1380 | type: object 1381 | required: 1382 | - postalAddress 1383 | properties: 1384 | postalAddress: 1385 | $ref: "#/components/schemas/BankingAgentPostalAddress" 1386 | availability: 1387 | $ref: "#/components/schemas/BankingAgentAvailability" 1388 | phones: 1389 | type: array 1390 | items: 1391 | $ref: "#/components/schemas/Phone" 1392 | BankingAgentPostalAddress: 1393 | type: object 1394 | required: 1395 | - address 1396 | - districtName 1397 | - townName 1398 | - countrySubDivision 1399 | - postCode 1400 | allOf: 1401 | - $ref: "#/components/schemas/PostalAddress" 1402 | BankingAgentAvailability: 1403 | type: object 1404 | properties: 1405 | standards: 1406 | type: array 1407 | items: 1408 | required: 1409 | - weekday 1410 | properties: 1411 | weekday: 1412 | type: string 1413 | enum: 1414 | - DOMINGO 1415 | - SEGUNDA_FEIRA 1416 | - TERCA_FEIRA 1417 | - QUARTA_FEIRA 1418 | - QUINTA_FEIRA 1419 | - SEXTA_FEIRA 1420 | - SABADO 1421 | description: Dia da semana de abertura 1422 | openingTime: 1423 | type: string 1424 | description: Horário de abertura (UTC) 1425 | maxLength: 13 1426 | pattern: ^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)|Z$ 1427 | closingTime: 1428 | type: string 1429 | description: Horário de fechamento (UTC) 1430 | maxLength: 13 1431 | pattern: ^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)|Z$ 1432 | exception: 1433 | type: string 1434 | maxLength: 2000 1435 | pattern: \w*\W* 1436 | example: Exceto feriados municipais, nacionais e estaduais 1437 | isPublicAccessAllowed: 1438 | type: boolean 1439 | example: false 1440 | BankingAgentService: 1441 | type: object 1442 | properties: 1443 | name: 1444 | type: string 1445 | enum: 1446 | - RECEPCAO_ENCAMINHAMENTO_PROPOSTAS_ABERTURA_CONTAS_DEPOSITOS_VISTA_PRAZO_POUPANCA_MANTIDOS_INSTITUICAO_CONTRATANTE 1447 | - REALIZACAO_RECEBIMENTOS_PAGAMENTOS_TRANSFERENCIAS_ELETRONICAS_VISANDO_MOVIMENTACAO_CONTAS_DEPOSITOS_TITULARIDADE_CLIENTES_MANTIDAS_INSTITUICAO_CONTRATANTE 1448 | - RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA_OUTRAS_ATIVIDADES_DECORRENTES_EXECUCAO_CONTRATOS_CONVENIOS_PRESTACAO_SERVICOS 1449 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGAMENTO_CURSADAS_INTERMEDIO_INSTITUICAO_CONTRATANTE_SOLICITACAO_CLIENTES_USUARIOS 1450 | - RECEPCAO_ENCAMINHAMENTO_PROPOSTAS_OPERACAO_CREDITO_ARRENDAMENTO_MERCANTIL_CONCESSAO_INSTITUICAO_CONTRATANTE 1451 | - RECEBIMENTOS_PAGAMENTOS_RELACIONADOS_LETRAS_CAMBIO_ACEITE_INSTITUICAO_CONTRATANTE 1452 | - RECEPCAO_ENCAMINHAMENTO_PROPOSTAS_FORNECIMENTO_CARTAO_CREDITO_RESPONSABILIDADE_INSTITUICAO_CONTRATANTE 1453 | - REALIZACAO_OPERACOES_CAMBIO_RESPONSABILIDADE_INSTITUICAO_CONTRATANTE 1454 | - OUTROS 1455 | description: "Relação dos Nomes de serviços prestados pelo Correspondente" 1456 | code: 1457 | type: string 1458 | enum: 1459 | - RECEBE_ENCAMINHA_PROPOSTAS_ABERTURA_CONTAS 1460 | - REALIZA_RECEBIMENTOS_PAGAMENTOS_TRANSFERENCIAS_ELETRONICAS 1461 | - RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA_EXECUCAO_CONTRATOS_CONVENIO 1462 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGAMENTO 1463 | - RECEBE_ENCAMINHA_PROPOSTAS_CREDITO_ARRENDAMENTO_MERCANTIL 1464 | - RECEBE_PAGAMENTOS_RELACIONADOS_LETRAS_CAMBIO_ACEITE_INSTITUICAO 1465 | - RECEBE_ENCAMINHA_PROPOSTAS_FORNECIMENTO_CARTAO_CREDITO 1466 | - REALIZA_OPERACOES_CAMBIO 1467 | - OUTROS 1468 | description: "> 1469 | Relação dos Códigos relativos aos serviços prestados pelo Correspondente 1470 | \n* `RECEBE_ENCAMINHA_PROPOSTAS_ABERTURA_CONTAS` - Recepção e encaminhamento de propostas de abertura de contas 1471 | \n* `REALIZA_RECEBIMENTOS_PAGAMENTOS_TRANSFERENCIAS_ELETRONICAS` - Realização de recebimentos, pagamentos e transferências eletrônicas 1472 | \n* `RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA_EXECUCAO_CONTRATOS_CONVENIO` - Recebimentos e pagamentos de qualquer natureza 1473 | \n* `EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGAMENTO` - Execução ativa e passiva de ordens de pagamento 1474 | \n* `RECEBE_ENCAMINHA_PROPOSTAS_CREDITO_ARRENDAMENTO_MERCANTIL` - Recepção e encaminhamento de propostas de operações de crédito e de arrendamento mercantil 1475 | \n* `RECEBE_PAGAMENTOS_RELACIONADOS_LETRAS_CAMBIO_ACEITE_INSTITUICAO` - Recebimento e pagamentos relacionados a letras de câmbio de aceite da instituição 1476 | \n* `RECEBE_ENCAMINHA_PROPOSTAS_FORNECIMENTO_CARTAO_CREDITO` - Recepção e encaminhamento de propostas de fornecimento de cartões de crédito 1477 | \n* `REALIZA_OPERACOES_CAMBIO` - Realização de operações de câmbio 1478 | \n* `OUTROS` - Outros" 1479 | additionalInfo: 1480 | type: string 1481 | maxLength: 2000 1482 | pattern: \w*\W* 1483 | description: Campo aberto para detalhamento 1484 | required: 1485 | - name 1486 | - code 1487 | Branch: 1488 | type: object 1489 | description: Dependência de instituições financeiras e demais instituições, autorizadas a funcionar pelo Banco Central do Brasil, destinada à prática das atividades para as quais a instituição esteja regularmente habilitada. 1490 | required: 1491 | - identification 1492 | - postalAddress 1493 | - availability 1494 | - services 1495 | properties: 1496 | identification: 1497 | $ref: "#/components/schemas/BranchIdentification" 1498 | postalAddresses: 1499 | $ref: "#/components/schemas/BranchPostalAddress" 1500 | availability: 1501 | $ref: "#/components/schemas/BranchAvailability" 1502 | phones: 1503 | type: array 1504 | items: 1505 | $ref: "#/components/schemas/BranchPhone" 1506 | minItems: 1 1507 | description: Lista de telefones da Dependência 1508 | services: 1509 | type: array 1510 | description: Traz a relação de serviços disponbilizados pelo Canal de Atendimento 1511 | items: 1512 | $ref: "#/components/schemas/BranchService" 1513 | minItems: 1 1514 | maxItems: 20 1515 | BranchPostalAddress: 1516 | type: object 1517 | required: 1518 | - address 1519 | - districtName 1520 | - townName 1521 | - countrySubDivision 1522 | - postCode 1523 | allOf: 1524 | - $ref: "#/components/schemas/PostalAddress" 1525 | BranchPhone: 1526 | type: object 1527 | required: 1528 | - type 1529 | allOf: 1530 | - $ref: "#/components/schemas/Phone" 1531 | BranchIdentification: 1532 | type: object 1533 | properties: 1534 | type: 1535 | type: string 1536 | enum: 1537 | - AGENCIA 1538 | - POSTO_ATENDIMENTO 1539 | - POSTO_ATENDIMENTO_ELETRONICO 1540 | - UNIDADE_ADMINISTRATIVA_DESMEMBRADA 1541 | description: " > 1542 | Tipo da dependência, segundo a regulamentação do Bacen, na Resolução Nº 4072, de 26 de abril de 2012: 1543 | Dependência de instituições financeiras e demais instituições, autorizadas a funcionar pelo Banco Central do Brasil, destinada à prática das atividades para as quais a instituição esteja regularmente habilitada. 1544 | \n* `AGENCIA`: Agência é a dependência destinada ao atendimento aos clientes, ao público em geral e aos associados de cooperativas de crédito, no exercício de atividades da instituição, não podendo ser móvel ou transitória; 1545 | \n* `POSTO_ATENDIMENTO`: Posto de Atendimento é a dependência subordinada a agência ou à sede da instituição financeira, destinada ao atendimento ao público no exercício de uma ou mais de suas atividades, podendo ser fixo ou móvel. Segundo Art.15. Os Postos de Atendimento Bancário (PAB), Postos Avançados de Atendimento (PAA), Postos de Atendimento Transitórios (PAT), Postos de Compra de Ouro (PCO), Postos de Atendimento Cooperativo (PAC), Postos de Atendimento de Microcrédito (PAM), Postos Bancários de Arrecadação e Pagamento (PAP) e os Postos de Câmbio atualmente em funcionamento serão considerados PA. 1546 | \n* `POSTO_ATENDIMENTO_ELETRONICO`: Posto de Atendimento Eletrônico é a dependência constituída por um ou mais terminais de autoatendimento, subordinada a agência ou à sede da instituição, destinada à prestação de serviços por meio eletrônico, podendo ser fixo ou móvel, permanente ou transitório 1547 | \n* `UNIDADE_ADMINISTRATIVA_DESMEMBRADA `: Unidade Administrativa Desmembrada (UAD) segundo a Resolução 4072 , BCB, 2012, no Art. 8º \"... é dependência destinada à execução de atividades administrativas da instituição, vedado o atendimento ao público\"" 1548 | code: 1549 | type: string 1550 | maxLength: 4 1551 | pattern: ^\d{4}$|^NA$ 1552 | description: Código identificador da dependência 1553 | checkDigit: 1554 | type: string 1555 | maxLength: 1 1556 | pattern: \w*\W* 1557 | description: Dígito verificador do código da dependência 1558 | name: 1559 | type: string 1560 | maxLength: 100 1561 | pattern: \w*\W* 1562 | description: Nome da dependência 1563 | relatedBranch: 1564 | type: string 1565 | maxLength: 4 1566 | pattern: ^\d{4}$ 1567 | description: Código da agência vinculada ao Posto de Atendimento - se aplicável 1568 | openingDate: 1569 | type: string 1570 | maxLength: 10 1571 | pattern: ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])$ 1572 | description: Data de abertura da dependência (uma string com data conforme especificação RFC-3339. p.ex. 2014-03-19) 1573 | required: 1574 | - type 1575 | - code 1576 | - checkDigit 1577 | - name 1578 | BranchAvailability: 1579 | type: object 1580 | properties: 1581 | standards: 1582 | type: array 1583 | description: Lista disponibilidade padrão da depêndencia por dias da semana 1584 | items: 1585 | properties: 1586 | weekday: 1587 | type: string 1588 | enum: 1589 | - DOMINGO 1590 | - SEGUNDA_FEIRA 1591 | - TERCA_FEIRA 1592 | - QUARTA_FEIRA 1593 | - QUINTA_FEIRA 1594 | - SEXTA_FEIRA 1595 | - SABADO 1596 | description: Dia da semana de abertura da dependência bancária 1597 | openingTime: 1598 | type: string 1599 | description: Horário de abertura da dependência bancária (UTC) 1600 | maxLength: 13 1601 | pattern: ^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)|Z$|^NA$ 1602 | closingTime: 1603 | type: string 1604 | description: Horário de fechamento da dependência bancária (UTC) 1605 | maxLength: 13 1606 | pattern: ^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)|Z$|^NA$ 1607 | required: 1608 | - weekday 1609 | - openingTime 1610 | - closingTime 1611 | minItems: 1 1612 | maxItems: 7 1613 | exception: 1614 | type: string 1615 | maxLength: 2000 1616 | pattern: \w*\W* 1617 | description: Em campo texto devem ser registradas todas as Exceções para o não atendimento. 1618 | isPublicAccessAllowed: 1619 | type: boolean 1620 | description: Indica se a instalação da Dependência tem acesso restrito a clientes. 1621 | required: 1622 | - standards 1623 | - exception 1624 | BranchService: 1625 | type: object 1626 | properties: 1627 | name: 1628 | type: string 1629 | enum: 1630 | - ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA 1631 | - SAQUE_MOEDA_EM_ESPECIE 1632 | - RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA 1633 | - TRANSFERENCIAS_ELETRONICAS_VISANDO_MOVIMENTACAO_CONTAS_DEPOSITOS_OU_PAGAMENTO_TITULARIDADE_CLIENTES 1634 | - CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS_CONTAS_PAGAMENTOS 1635 | - APLICACOES_RESGATES_INVESTIMENTOS 1636 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGAMENTO_SOLICITACAO_CLIENTES_USUARIOS 1637 | - DEPOSITOS_MOEDA_ESPECIE_CHEQUE 1638 | - OPERACOES_CREDITO_BEM_COMO_OUTROS_SERVICOS_PRESTADOS_ACOMPANHAMENTO_OPERACAO 1639 | - CARTAO_CREDITO 1640 | - SEGUROS 1641 | - OPERACOES_ARRENDAMENTO_MERCANTIL 1642 | - ABERTURA_CONTA_PAGAMENTO_POS_PAGA 1643 | - COMPRA_VENDA_MOEDA_ESTRANGEIRA_ESPECIE 1644 | - COMPRA_VENDA_CHEQUE_CHEQUE_VIAGEM_BEM_COMO_CARGA_MOEDA_ESTRANGEIRA_CARTAO_PRE_PAGO 1645 | - COMPRA_VENDA_OURO 1646 | - OUTROS_PRODUTOS_SERVICOS 1647 | - CANCELAMENTO 1648 | - INFORMACOES 1649 | - RECLAMACOES 1650 | description: Nome dos Serviços efetivamente prestados pelo Canal de Atendimento 1651 | code: 1652 | type: string 1653 | enum: 1654 | - ABRE_CONTA_DEPOSITO_OU_PRE_PAGA 1655 | - SAQUE_MOEDA_ESPECIE 1656 | - RECEBE_PAGA_QUALQUER_NATUREZA 1657 | - TRANSFERENCIAS_ELETRONICAS_MOVIMENTA_CONTAS_DEPOSITOS_OU_PAGTO_TITULARES_CLIENTES 1658 | - CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS_PAGTOS 1659 | - APLICA_RESGATA_INVESTIMENTOS 1660 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGTO 1661 | - DEPOSITO_MOEDA_ESPECIE_CHEQUE 1662 | - OPERA_CREDITO_OUTROS_SERVICOS_ACOMPANHA_OPERACAO 1663 | - CARTAO_CREDITO 1664 | - SEGUROS 1665 | - OPERA_ARRENDAMENTO_MERCANTIL 1666 | - ABERTURA_CONTA_PAGAMENTO_POS_PAGA 1667 | - COMPRA_VENDA_MOEDA_ESTRANGEIRA_ESPECIE 1668 | - COMPRA_VENDA_CHEQUE_CHEQUE_VIAGEM_CARGA_MOEDA_ESTRANGEIRA_CARTAO_PRE_PAGO 1669 | - COMPRA_VENDA_OURO 1670 | - OUTROS_PRODUTOS_SERVICOS 1671 | - CANCELAMENTO 1672 | - INFORMACOES 1673 | - RECLAMACOES 1674 | description: Código dos Serviços efetivamente prestados pelo Canal de Atendimento 1675 | additionalInfo: 1676 | type: string 1677 | description: Texto livre para complementar informação relativa ao Serviço disponível, quando for selecionada a opção 'OUTROS_PRODUTOS_SERVICOS' 1678 | maxLength: 2000 1679 | pattern: \w*\W* 1680 | required: 1681 | - code 1682 | - name 1683 | ElectronicChannel: 1684 | type: object 1685 | properties: 1686 | identification: 1687 | $ref: "#/components/schemas/ElectronicChannelIdentification" 1688 | services: 1689 | type: array 1690 | items: 1691 | $ref: "#/components/schemas/ElectronicChannelService" 1692 | minItems: 1 1693 | maxItems: 20 1694 | description: "Traz a relação de serviços disponbilizados pelo Canal de Atendimento" 1695 | required: 1696 | - identification 1697 | - services 1698 | ElectronicChannelIdentification: 1699 | type: object 1700 | required: 1701 | - type 1702 | - urls 1703 | properties: 1704 | type: 1705 | type: string 1706 | enum: 1707 | - INTERNET_BANKING 1708 | - MOBILE_BANKING 1709 | - SAC 1710 | - OUVIDORIA 1711 | - CHAT 1712 | - OUTROS 1713 | description: "Tipo de canal de atendimento eletrônico" 1714 | example: "CHAT" 1715 | additionalInfo: 1716 | type: string 1717 | pattern: \w*\W* 1718 | maxLength: 300 1719 | description: | 1720 | Campo de texto livre para descrever complementação de informações necessárias. De preenchimento obrigatório para o tipo de canal de atendimento 'OUTROS' 1721 | Restrição: Preenchimento obrigatório para o tipo de canal de atendimento 'OUTROS' 1722 | urls: 1723 | type: array 1724 | items: 1725 | $ref: "#/components/schemas/ElectronicChannelUrl" 1726 | minItems: 1 1727 | description: Lista das URLs que atendem um tipo de canal eletrônico selecionado 1728 | ElectronicChannelUrl: 1729 | type: string 1730 | pattern: \w*\W* 1731 | maxLength: 1024 1732 | ElectronicChannelService: 1733 | type: object 1734 | required: 1735 | - name 1736 | - code 1737 | properties: 1738 | name: 1739 | type: string 1740 | enum: 1741 | - ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA 1742 | - SAQUE_MOEDA_EM_ESPECIE 1743 | - RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA 1744 | - TRANSFERENCIAS_ELETRONICAS_VISANDO_MOVIMENTACAO_CONTAS_DEPOSITOS_OU_PAGAMENTO_TITULARIDADE_CLIENTES 1745 | - CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS_CONTAS_PAGAMENTOS 1746 | - APLICACOES_RESGATES_INVESTIMENTOS 1747 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGAMENTO_SOLICITACAO_CLIENTES_USUARIOS 1748 | - DEPOSITOS_MOEDA_ESPECIE_CHEQUE 1749 | - OPERACOES_CREDITO_BEM_COMO_OUTROS_SERVICOS_PRESTADOS_ACOMPANHAMENTO_OPERACAO 1750 | - CARTAO_CREDITO 1751 | - SEGUROS 1752 | - OPERACOES_ARRENDAMENTO_MERCANTIL 1753 | - ABERTURA_CONTA_PAGAMENTO_POS_PAGA 1754 | - COMPRA_VENDA_MOEDA_ESTRANGEIRA_ESPECIE 1755 | - COMPRA_VENDA_CHEQUE_CHEQUE_VIAGEM_BEM_COMO_CARGA_MOEDA_ESTRANGEIRA_CARTAO_PRE_PAGO 1756 | - COMPRA_VENDA_OURO 1757 | - OUTROS_PRODUTOS_SERVICOS 1758 | - CANCELAMENTO 1759 | - INFORMACOES 1760 | - RECLAMACOES 1761 | description: "Nome dos Serviços efetivamente prestados pelo Canal de Atendimento" 1762 | example: "ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA" 1763 | code: 1764 | type: string 1765 | enum: 1766 | - ABRE_CONTA_DEPOSITO_OU_PRE_PAGA 1767 | - SAQUE_MOEDA_ESPECIE 1768 | - RECEBE_PAGA_QUALQUER_NATUREZA 1769 | - TRANSFERENCIAS_ELETRONICAS_MOVIMENTA_CONTAS_DEPOSITOS_OU_PAGTO_TITULARES_CLIENTES 1770 | - CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS_PAGTOS 1771 | - APLICA_RESGATA_INVESTIMENTOS 1772 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGTO 1773 | - DEPOSITO_MOEDA_ESPECIE_CHEQUE 1774 | - OPERA_CREDITO_OUTROS_SERVICOS_ACOMPANHA_OPERACAO 1775 | - CARTAO_CREDITO 1776 | - SEGUROS 1777 | - OPERA_ARRENDAMENTO_MERCANTIL 1778 | - ABERTURA_CONTA_PAGAMENTO_POS_PAGA 1779 | - COMPRA_VENDA_MOEDA_ESTRANGEIRA_ESPECIE 1780 | - COMPRA_VENDA_CHEQUE_CHEQUE_VIAGEM_CARGA_MOEDA_ESTRANGEIRA_CARTAO_PRE_PAGO 1781 | - COMPRA_VENDA_OURO 1782 | - OUTROS_PRODUTOS_SERVICOS 1783 | - CANCELAMENTO 1784 | - INFORMACOES 1785 | - RECLAMACOES 1786 | description: "Código dos Serviços efetivamente prestados pelo Canal de Atendimento" 1787 | example: "ABRE_CONTA_DEPOSITO_OU_PRE_PAGA" 1788 | additionalInfo: 1789 | type: string 1790 | maxLength: 2000 1791 | pattern: \w*\W* 1792 | description: "Texto livre para complementar informação relativa ao Serviço disponível, quando for selecionada a opção 'OUTROS_PRODUTOS_SERVICOS'" 1793 | example: "SIC" 1794 | Phone: 1795 | type: object 1796 | properties: 1797 | type: 1798 | type: string 1799 | enum: 1800 | - FIXO 1801 | - MOVEL 1802 | example: "FIXO" 1803 | description: "Identificação do Tipo de telefone da dependência. p.ex.FIXO, MOVEL." 1804 | countryCallingCode: 1805 | type: string 1806 | maxLength: 4 1807 | pattern: ^\d{1,4}$ 1808 | example: "55" 1809 | description: "Número de DDI (Discagem Direta Internacional) para telefone de acesso ao Canal - se houver. p.ex. '55'" 1810 | areaCode: 1811 | type: string 1812 | maxLength: 2 1813 | pattern: ^\d{2}$ 1814 | example: "19" 1815 | description: "Número de DDD (Discagem Direta à Distância) do telefone da dependência - se houver. p.ex. '19'" 1816 | number: 1817 | type: string 1818 | maxLength: 11 1819 | pattern: "^([0-9]{8,11})$" 1820 | example: "35721199" 1821 | description: "Número de telefone da dependência - se houver" 1822 | PostalAddress: 1823 | type: object 1824 | properties: 1825 | address: 1826 | type: string 1827 | description: "Deverá trazer toda a informação referente ao endereço da dependência informada: Tipo de logradouro + Nome do logradouro + Número do Logradouro (se não existir usar ' s/n') + complemento (se houver), como, p.ex.: 'R Diamatina, 59, bloco 35, fundos' 'Praça da Boa Vontade s/n'" 1828 | maxLength: 150 1829 | pattern: \w*\W* 1830 | example: "Av Naburo Ykesaki, 1270" 1831 | additionalInfo: 1832 | type: string 1833 | description: "Alguns logradouros ainda necessitam ser especificados por meio de complemento" 1834 | maxLength: 30 1835 | pattern: \w*\W* 1836 | example: "Fundos" 1837 | districtName: 1838 | type: string 1839 | description: "Bairro é uma comunidade ou região localizada em uma cidade ou município de acordo com as suas subdivisões geográficas. p.ex: 'Paraíso'" 1840 | maxLength: 50 1841 | pattern: \w*\W* 1842 | example: "Centro" 1843 | townName: 1844 | type: string 1845 | description: "Localidade: O nome da localidade corresponde à designação da cidade ou município no qual o endereço está localizado. p.ex. 'São Paulo'" 1846 | maxLength: 50 1847 | pattern: \w*\W* 1848 | example: "Marília" 1849 | ibgeCode: 1850 | type: string 1851 | description: "Código IBGE do município" 1852 | maxLength: 7 1853 | pattern: ^\d{7}$ 1854 | example: "3515890" 1855 | countrySubDivision: 1856 | type: string 1857 | description: "Enumeração referente a cada sigla da unidade da federação que identifica o estado ou o distrito federal, no qual o endereço está localizado. p.ex. 'AC'. São consideradas apenas as siglas para os estados brasileiros" 1858 | enum: 1859 | - AC 1860 | - AL 1861 | - AP 1862 | - AM 1863 | - BA 1864 | - CE 1865 | - DF 1866 | - ES 1867 | - GO 1868 | - MA 1869 | - MT 1870 | - MS 1871 | - MG 1872 | - PA 1873 | - PB 1874 | - PR 1875 | - PE 1876 | - PI 1877 | - RJ 1878 | - RN 1879 | - RS 1880 | - RO 1881 | - RR 1882 | - SC 1883 | - SP 1884 | - SE 1885 | - TO 1886 | example: "SP" 1887 | postCode: 1888 | type: string 1889 | description: "Código de Endereçamento Postal" 1890 | pattern: (\d{8}|^NA$) 1891 | maxLength: 8 1892 | example: "17500001" 1893 | country: 1894 | type: string 1895 | description: "Nome do país" 1896 | maxLength: 80 1897 | pattern: \w*\W* 1898 | example: "Brasil" 1899 | countryCode: 1900 | type: string 1901 | description: "Código do país" 1902 | example: "BRA" 1903 | geographicCoordinates: 1904 | $ref: "#/components/schemas/GeographicCoordinates" 1905 | ResponseSharedAutomatedTellerMachinesList: 1906 | type: object 1907 | required: 1908 | - data 1909 | - links 1910 | - meta 1911 | properties: 1912 | data: 1913 | type: object 1914 | properties: 1915 | brand: 1916 | $ref: "#/components/schemas/SharedAutomatedTellerMachinesBrand" 1917 | links: 1918 | $ref: "#/components/schemas/Links" 1919 | meta: 1920 | $ref: "#/components/schemas/Meta" 1921 | SharedAutomatedTellerMachinesBrand: 1922 | type: object 1923 | allOf: 1924 | - $ref: "#/components/schemas/Brand" 1925 | properties: 1926 | companies: 1927 | type: array 1928 | items: 1929 | $ref: "#/components/schemas/SharedAutomatedTellerMachinesCompanies" 1930 | description: Lista de instituições pertencentes à marca 1931 | SharedAutomatedTellerMachinesCompanies: 1932 | properties: 1933 | sharedAutomatedTellerMachines: 1934 | type: array 1935 | items: 1936 | $ref: "#/components/schemas/SharedAutomatedTellerMachines" 1937 | allOf: 1938 | - $ref: "#/components/schemas/SharedAutomatedTellerMachinesCompany" 1939 | SharedAutomatedTellerMachines: 1940 | type: object 1941 | properties: 1942 | identification: 1943 | $ref: "#/components/schemas/SharedAutomatedTellerMachinesIdentification" 1944 | postalAddress: 1945 | $ref: "#/components/schemas/SharedAutomatedTellerMachinesPostalAddress" 1946 | availability: 1947 | $ref: "#/components/schemas/SharedAutomatedTellerMachinesAvailability" 1948 | services: 1949 | type: array 1950 | items: 1951 | $ref: "#/components/schemas/SharedAutomatedTellerMachinesServices" 1952 | SharedAutomatedTellerMachinesServices: 1953 | type: object 1954 | properties: 1955 | name: 1956 | type: string 1957 | enum: 1958 | - ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA 1959 | - SAQUE_MOEDA_EM_ESPECIE 1960 | - RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA 1961 | - TRANSFERENCIAS_ELETRONICAS_VISANDO_MOVIMENTACAO 1962 | - CONTAS_DEPOSITOS_OU_PAGAMENTO_TITULARIDADE_CLIENTES 1963 | - CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS_E_CONTAS 1964 | - PAGAMENTOS 1965 | - APLICACOES_RESGATES_INVESTIMENTOS 1966 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGAMENTO_SOLICITACAO 1967 | - CLIENTES_USUARIOS 1968 | - DEPOSITOS_MOEDA_ESPECIE_CHEQUE 1969 | - OPERACOES_CREDITO_BEM_COMO_OUTROS_SERVICOS_PRESTADOS_ACOMPANHAMENTO_OPERACAO 1970 | - CARTAO_CREDITO 1971 | - SEGUROS 1972 | - OPERACOES_ARRENDAMENTO_MERCANTIL 1973 | - ABERTURA_CONTA_PAGAMENTO_POS_PAGA 1974 | - COMPRA_VENDA_MOEDA_ESTRANGEIRA_ESPECIE 1975 | - COMPRA_VENDA_CHEQUE_CHEQUE_VIAGEM_BEM_COMO_CARGA_MOEDA_ESTRANGEIRA_CARTAO_PRE_PAGO 1976 | - COMPRA_VENDA_OURO 1977 | - OUTROS_PRODUTOS_SERVICOS 1978 | - CANCELAMENTO 1979 | - INFORMACOES 1980 | - RECLAMACOES 1981 | description: "Nome dos Serviços efetivamente prestados pelo Terminal de Autoatendimento Compartilhado informado" 1982 | example: OUTROS_PRODUTOS_SERVICOS 1983 | code: 1984 | type: string 1985 | enum: 1986 | - ABRE_CONTA_DEPOSITO_OU_PRE_PAGA 1987 | - SAQUE_MOEDA_ESPECIE 1988 | - RECEBE_PAGA_QUALQUER_NATUREZA 1989 | - TRANSFERENCIAS_ELETRONICAS_MOVIMENTA_CONTAS_DEPOSITOS_OU_PAGA_TITULARES_CLIENTES 1990 | - CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS 1991 | - PAGAMENTOS 1992 | - APLICA_RESGATA_INVESTIMENTOS 1993 | - EXECUTA_ATIVA_PASSIVA_ORDENS_PAGAMENTO 1994 | - DEPOSITA_MOEDA_ESPECIE_CHEQUE 1995 | - OPERA_CREDITO_OUTROS_SERVICOS_ACOMPANHA_OPERACAO 1996 | - CARTAO_CREDITO 1997 | - SEGUROS 1998 | - OPERA_ARRENDAMENTO_MERCANTIL 1999 | - ABERTURA_CONTA_PAGAMENTO_POS_PAGA 2000 | - COMPRA_VENDE_MOEDA_ESTRANGEIRA_ESPECIE 2001 | - COMPRA_VENDE_CHEQUE_CHEQUE_VIAGEM_CARGA_MOEDA_ESTRANGEIRA_CARTAO_PRE_PAGO 2002 | - COMPRA_VENDE_OURO 2003 | - OUTROS_PRODUTOS_SERVICOS 2004 | - CANCELAMENTO 2005 | - INFORMACOES 2006 | - RECLAMACOES 2007 | description: "Código dos Serviços efetivamente prestados pelo Terminal de Autoatendimento Compartilhado informado" 2008 | example: OUTROS_PRODUTOS_SERVICOS 2009 | additionalInfo: 2010 | type: string 2011 | maxLength: 2000 2012 | pattern: \w*\W* 2013 | description: Texto livre para complementar informação relativa ao Serviço disponível, quando for preenchida a opção 'OUTROS_PRODUTOS_SERVICOS' 2014 | example: "Serviços complementares de atendimento via terminais de autoatendimento." 2015 | SharedAutomatedTellerMachinesIdentification: 2016 | type: object 2017 | properties: 2018 | ownerName: 2019 | type: string 2020 | maxLength: 100 2021 | pattern: \w*\W* 2022 | description: "Nome do proprietário do terminal de Autoatendimento Compartilhado" 2023 | example: "João da Silva Santos" 2024 | #################### 2025 | ## Phone ElectronicChannels ## 2026 | #################### 2027 | #### ResponsePhoneChannelsList #### 2028 | ResponsePhoneChannelsList: 2029 | type: object 2030 | required: 2031 | - data 2032 | - links 2033 | - meta 2034 | properties: 2035 | data: 2036 | type: object 2037 | required: 2038 | - brand 2039 | properties: 2040 | brand: 2041 | $ref: "#/components/schemas/PhoneChannelsBrand" 2042 | links: 2043 | $ref: "#/components/schemas/Links" 2044 | meta: 2045 | $ref: "#/components/schemas/Meta" 2046 | example: 2047 | data: 2048 | brand: 2049 | name: "Organização A" 2050 | companies: 2051 | - name: "Empresa A1" 2052 | cnpjNumber: "45086338000178" 2053 | urlComplementaryList: "https://empresaa1.com/branches-banking" 2054 | phoneChannels: 2055 | - identification: 2056 | type: "CENTRAL_TELEFONICA" 2057 | phones: 2058 | - countryCallingCode: "55" 2059 | areaCode: "14" 2060 | number: "35721199" 2061 | additionalInfo: "NA" 2062 | - countryCallingCode: "55" 2063 | areaCode: "14" 2064 | number: "997865532" 2065 | additionalInfo: "NA" 2066 | services: 2067 | - name: "ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA" 2068 | code: "ABRE_CONTA_DEPOSITO_OU_PRE_PAGA" 2069 | - name: "RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA" 2070 | code: "RECEBE_PAGA_QUALQUER_NATUREZA" 2071 | - name: "OUTROS_PRODUTOS_SERVICOS" 2072 | code: "OUTROS_PRODUTOS_SERVICOS" 2073 | additionalInfo: "Atendimento em outros idiomas" 2074 | - identification: 2075 | type: "SAC" 2076 | phones: 2077 | - countryCallingCode: "55" 2078 | areaCode: "14" 2079 | number: "40044828" 2080 | additionalInfo: "DDI '55'; DDD '11', 40044828, 'Para clientes no exterior'" 2081 | - countryCallingCode: "55" 2082 | areaCode: "14" 2083 | number: "40044828" 2084 | additionalInfo: "DDI ' ', DDD ' ', 40044828, 'Para regiões metropolitanas'" 2085 | - countryCallingCode: "55" 2086 | areaCode: "14" 2087 | number: "40044828" 2088 | additionalInfo: "DDI ' ', DDD ' ', 40044828, 'Para demais localidades'" 2089 | services: 2090 | - name: "RECLAMACOES" 2091 | code: "RECLAMACOES" 2092 | - name: "INFORMACOES" 2093 | code: "INFORMACOES" 2094 | - name: "CANCELAMENTO" 2095 | code: "CANCELAMENTO" 2096 | - identification: 2097 | type: "OUVIDORIA" 2098 | phones: 2099 | - countryCallingCode: "55" 2100 | areaCode: "14" 2101 | number: "40045555" 2102 | additionalInfo: "DDI '55'; DDD '11', 40045555, 'Para clientes no exterior'" 2103 | - countryCallingCode: "55" 2104 | areaCode: "14" 2105 | number: "40045555" 2106 | additionalInfo: "DDI ' ', DDD ' ', 40045555, 'Para regiões metropolitanas'" 2107 | - countryCallingCode: "55" 2108 | areaCode: "14" 2109 | number: "40045555" 2110 | additionalInfo: "DDI ' ', DDD ' ', 40045555, 'Para demais localidades'" 2111 | services: 2112 | - name: "RECLAMACOES" 2113 | code: "RECLAMACOES" 2114 | - name: "INFORMACOES" 2115 | code: "INFORMACOES" 2116 | - identification: 2117 | type: "OUTROS" 2118 | additionalInfo: "Receptivo" 2119 | phones: 2120 | - countryCallingCode: "55" 2121 | areaCode: "NA" 2122 | number: "40043277" 2123 | additionalInfo: "DDI '55'; DDD '11', 40043277, 'Para clientes no metropolitanas'" 2124 | - countryCallingCode: "NA" 2125 | areaCode: "NA" 2126 | number: "40043277" 2127 | additionalInfo: "DDI ' ', DDD ' ', 40043277, 'Para regiões localidades'" 2128 | services: 2129 | - name: "OUTROS_PRODUTOS_SERVICOS" 2130 | code: "OUTROS_PRODUTOS_SERVICOS" 2131 | additionalInfo: "Previdência Privada" 2132 | links: 2133 | self: "https://api.banco.com.br/open-banking/channels/v1/phone-channels" 2134 | first: "https://api.banco.com.br/open-banking/channels/v1/phone-channels" 2135 | prev: "null" 2136 | next: "null" 2137 | last: "https://api.banco.com.br/open-banking/channels/v1/phone-channels" 2138 | meta: 2139 | totalRecords: 1 2140 | totalPages: 1 2141 | #### PhoneChannelsBrand #### 2142 | PhoneChannelsBrand: 2143 | type: object 2144 | required: 2145 | - name 2146 | - companies 2147 | properties: 2148 | name: 2149 | type: string 2150 | pattern: '\w*\W*' 2151 | maxLength: 80 2152 | description: "Nome da Marca reportada pelo participante do Open Banking. O conceito a que se refere a 'marca' utilizada está em definição pelos participantes." 2153 | example: "Marca A" 2154 | companies: 2155 | type: array 2156 | items: 2157 | $ref: "#/components/schemas/PhoneChannelsCompany" 2158 | minItems: 1 2159 | description: Lista de instituições pertencentes à marca 2160 | #### PhoneChannelsCompany #### 2161 | PhoneChannelsCompany: 2162 | type: object 2163 | required: 2164 | - name 2165 | - phoneChannels 2166 | - cnpjNumber 2167 | properties: 2168 | name: 2169 | type: string 2170 | pattern: \w*\W* 2171 | maxLength: 80 2172 | description: "Nome da Instituição, pertencente à organização, responsável pelo Canal Telefônico." 2173 | example: "Empresa da Marca A" 2174 | urlComplementaryList: 2175 | type: string 2176 | pattern: \w*\W* 2177 | maxLength: 1024 2178 | example: "https://example.com/mobile-banking" 2179 | phoneChannels: 2180 | type: array 2181 | items: 2182 | $ref: "#/components/schemas/PhoneChannel" 2183 | minItems: 1 2184 | description: Lista de canais de atendimento telefônico 2185 | allOf: 2186 | - $ref: "#/components/schemas/CNPJ" 2187 | #### PhoneChannel #### 2188 | PhoneChannel: 2189 | type: object 2190 | properties: 2191 | identification: 2192 | $ref: "#/components/schemas/PhoneChannelIdentification" 2193 | services: 2194 | type: array 2195 | items: 2196 | $ref: "#/components/schemas/PhoneChannelService" 2197 | minItems: 1 2198 | maxItems: 20 2199 | description: Traz a relação de serviços disponbilizados pelo Canal de Atendimento 2200 | required: 2201 | - identification 2202 | - services 2203 | #### PhoneChannelIdentification #### 2204 | PhoneChannelIdentification: 2205 | type: object 2206 | required: 2207 | - type 2208 | properties: 2209 | type: 2210 | type: string 2211 | enum: 2212 | - CENTRAL_TELEFONICA 2213 | - SAC 2214 | - OUVIDORIA 2215 | - OUTROS 2216 | description: " 2217 | Tipo de canal telefônico de atendimento: 2218 | \n* `CENTRAL_TELEFONICA` 2219 | \n* `SAC` 2220 | \n* `OUVIDORIA` 2221 | \n* `OUTROS`" 2222 | example: "OUVIDORIA" 2223 | additionalInfo: 2224 | type: string 2225 | pattern: \w*\W* 2226 | maxLength: 300 2227 | description: Campo de texto livre para descrever informações complementateres sobre canais telefônicos. De preenchimento obrigatório quando o tipo de canal de atendimento telefônico selecionado for "OUTROS" 2228 | phones: 2229 | type: array 2230 | items: 2231 | $ref: "#/components/schemas/PhoneChannelPhone" 2232 | minItems: 1 2233 | description: "Lista de telefones do Canal de Atendimento" 2234 | #### PhoneChannelPhone #### 2235 | PhoneChannelPhone: 2236 | type: object 2237 | required: 2238 | - countryCallingCode 2239 | - areaCode 2240 | - number 2241 | properties: 2242 | countryCallingCode: 2243 | type: string 2244 | maxLength: 4 2245 | pattern: ^\d{1,4}$|^NA$ 2246 | example: "55" 2247 | description: "Número de DDI (Discagem Direta Internacional) para telefone de acesso ao Canal - se houver." 2248 | areaCode: 2249 | type: string 2250 | maxLength: 2 2251 | pattern: ^\d{2}$|^NA$ 2252 | example: "19" 2253 | description: "Número de DDD (Discagem Direta à Distância) para telefone de acesso ao Canal - se houver." 2254 | number: 2255 | type: string 2256 | maxLength: 13 2257 | pattern: ^([0-9]{8,11})$|^NA$ 2258 | example: "08007787788" 2259 | description: "Número de telefone de acesso ao canal." 2260 | additionalInfo: 2261 | type: string 2262 | maxLength: 300 2263 | pattern: \w*\W* 2264 | example: "Mensagem complementar necessária para o agrupamento da identificação do telefone." 2265 | #### PhoneChannelService #### 2266 | PhoneChannelService: 2267 | type: object 2268 | required: 2269 | - name 2270 | - code 2271 | properties: 2272 | name: 2273 | type: string 2274 | enum: 2275 | - ABERTURA_CONTAS_DEPOSITOS_OU_PAGAMENTO_PRE_PAGA 2276 | - SAQUE_MOEDA_EM_ESPECIE 2277 | - RECEBIMENTOS_PAGAMENTOS_QUALQUER_NATUREZA 2278 | - TRANSFERENCIAS_ELETRONICAS_VISANDO_MOVIMENTACAO_CONTAS_DEPOSITOS_OU_PAGAMENTO_TITULARIDADE_CLIENTES 2279 | - CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS_CONTAS_PAGAMENTOS 2280 | - APLICACOES_RESGATES_INVESTIMENTOS 2281 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGAMENTO_SOLICITACAO_CLIENTES_USUARIOS 2282 | - DEPOSITOS_MOEDA_ESPECIE_CHEQUE 2283 | - OPERACOES_CREDITO_BEM_COMO_OUTROS_SERVICOS_PRESTADOS_ACOMPANHAMENTO_OPERACAO 2284 | - CARTAO_CREDITO 2285 | - SEGUROS 2286 | - OPERACOES_ARRENDAMENTO_MERCANTIL 2287 | - ABERTURA_CONTA_PAGAMENTO_POS_PAGA 2288 | - COMPRA_VENDA_MOEDA_ESTRANGEIRA_ESPECIE 2289 | - COMPRA_VENDA_CHEQUE_CHEQUE_VIAGEM_BEM_COMO_CARGA_MOEDA_ESTRANGEIRA_CARTAO_PRE_PAGO 2290 | - COMPRA_VENDA_OURO 2291 | - OUTROS_PRODUTOS_SERVICOS 2292 | - CANCELAMENTO 2293 | - INFORMACOES 2294 | - RECLAMACOES 2295 | description: "Nome dos Serviços efetivamente prestados pelo Canal de Atendimento" 2296 | code: 2297 | type: string 2298 | enum: 2299 | - ABRE_CONTA_DEPOSITO_OU_PRE_PAGA 2300 | - SAQUE_MOEDA_ESPECIE 2301 | - RECEBE_PAGA_QUALQUER_NATUREZA 2302 | - TRANSFERENCIAS_ELETRONICAS_MOVIMENTA_CONTAS_DEPOSITOS_OU_PAGTO_TITULARES_CLIENTES 2303 | - CONSULTA_SALDOS_EXTRATOS_CONTAS_DEPOSITOS_PAGTOS 2304 | - APLICA_RESGATA_INVESTIMENTOS 2305 | - EXECUCAO_ATIVA_PASSIVA_ORDENS_PAGTO 2306 | - DEPOSITO_MOEDA_ESPECIE_CHEQUE 2307 | - OPERA_CREDITO_OUTROS_SERVICOS_ACOMPANHA_OPERACAO 2308 | - CARTAO_CREDITO 2309 | - SEGUROS 2310 | - OPERA_ARRENDAMENTO_MERCANTIL 2311 | - ABERTURA_CONTA_PAGAMENTO_POS_PAGA 2312 | - COMPRA_VENDA_MOEDA_ESTRANGEIRA_ESPECIE 2313 | - COMPRA_VENDA_CHEQUE_CHEQUE_VIAGEM_CARGA_MOEDA_ESTRANGEIRA_CARTAO_PRE_PAGO 2314 | - COMPRA_VENDA_OURO 2315 | - OUTROS_PRODUTOS_SERVICOS 2316 | - CANCELAMENTO 2317 | - INFORMACOES 2318 | - RECLAMACOES 2319 | description: "Código dos Serviços efetivamente prestados pelo Canal de Atendimento" 2320 | additionalInfo: 2321 | type: string 2322 | pattern: \w*\W* 2323 | maxLength: 2000 2324 | description: "Texto livre para complementar informação relativa ao Serviço disponível, quando for selecionada a opção 'OUTROS_PRODUTOS_SERVICOS'" 2325 | example: "" 2326 | GeographicCoordinates: 2327 | type: object 2328 | description: Informação referente a geolocalização informada. 2329 | properties: 2330 | latitude: 2331 | description: Informação da latitude referente a geolocalização informada. 2332 | type: string 2333 | pattern: ^-?\d{1,2}\.\d{1,9}$ 2334 | maxLength: 13 2335 | example: "-90.8365180" 2336 | longitude: 2337 | description: Informação da longitude referente a geolocalização informada. 2338 | type: string 2339 | pattern: ^-?\d{1,3}\.\d{1,8}$ 2340 | maxLength: 13 2341 | example: "-180.836519" 2342 | Brand: 2343 | type: object 2344 | properties: 2345 | name: 2346 | type: string 2347 | maxLength: 80 2348 | pattern: \w*\W* 2349 | description: Nome da marca selecionada pela Organização 2350 | example: Organização A 2351 | CNPJ: 2352 | type: object 2353 | properties: 2354 | cnpjNumber: 2355 | type: string 2356 | pattern: '^(\d{14})$|^NA$' 2357 | description: Número completo do CNPJ da instituição 2358 | maxLength: 14 2359 | example: "50685362000135" 2360 | Links: 2361 | type: object 2362 | properties: 2363 | self: 2364 | type: string 2365 | description: URL da página atualmente requisitada 2366 | example: "https://api.banco.com.br/open-banking/channels/v1/" 2367 | first: 2368 | type: string 2369 | description: URL da primeira página de registros 2370 | example: "https://api.banco.com.br/open-banking/channels/v1/" 2371 | prev: 2372 | type: string 2373 | description: URL da página anterior de registros 2374 | next: 2375 | type: string 2376 | description: URL da próxima página de registros 2377 | last: 2378 | type: string 2379 | description: URL da última página de registros 2380 | example: "https://api.banco.com.br/open-banking/channels/v1/" 2381 | Meta: 2382 | type: object 2383 | properties: 2384 | totalRecords: 2385 | type: integer 2386 | description: Total de registros encontrados 2387 | example: 1 2388 | totalPages: 2389 | type: integer 2390 | description: Total de páginas para os registros encontrados 2391 | example: 1 2392 | required: 2393 | - totalRecords 2394 | - totalPages 2395 | 2396 | #### ATM specific schemas because of optional NA values #### 2397 | SharedAutomatedTellerMachinesCompany: 2398 | type: object 2399 | properties: 2400 | name: 2401 | type: string 2402 | description: Nome da Instituição, pertencente à Marca. 2403 | maxLength: 80 2404 | pattern: \w*\W* 2405 | example: "Empresa da Organização A" 2406 | urlComplementaryList: 2407 | type: string 2408 | pattern: \w*\W* 2409 | maxLength: 1024 2410 | description: | 2411 | URL de link para lista complementar com os nomes e CNPJs agrupados para o caso instituições ofertantes de produtos e serviços com as mesmas características. 2412 | example: "https://empresadaorganizacaoa.com/complementarylist" 2413 | cnpjNumber: 2414 | type: string 2415 | pattern: '^(\d{14})$|^NA$' 2416 | description: Número completo do CNPJ da instituição 2417 | maxLength: 14 2418 | example: "50685362000135" 2419 | SharedAutomatedTellerMachinesAvailability: 2420 | type: object 2421 | properties: 2422 | standards: 2423 | type: array 2424 | items: 2425 | properties: 2426 | weekday: 2427 | type: string 2428 | enum: 2429 | - DOMINGO 2430 | - SEGUNDA_FEIRA 2431 | - TERCA_FEIRA 2432 | - QUARTA_FEIRA 2433 | - QUINTA_FEIRA 2434 | - SEXTA_FEIRA 2435 | - SABADO 2436 | description: Dia da semana de abertura 2437 | example: SEGUNDA_FEIRA 2438 | openingTime: 2439 | type: string 2440 | description: Horário de abertura (UTC) 2441 | maxLength: 13 2442 | pattern: ^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)|Z$|^NA$ 2443 | example: "10:00:57Z" 2444 | closingTime: 2445 | type: string 2446 | description: Horário de fechamento (UTC) 2447 | maxLength: 13 2448 | pattern: ^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)|Z$|^NA$ 2449 | example: "16:00:57Z" 2450 | exception: 2451 | type: string 2452 | maxLength: 2000 2453 | pattern: \w*\W* 2454 | example: Exceto feriados municipais, nacionais e estaduais 2455 | isPublicAccessAllowed: 2456 | type: boolean 2457 | example: false 2458 | SharedAutomatedTellerMachinesPostalAddress: 2459 | type: object 2460 | properties: 2461 | address: 2462 | type: string 2463 | description: "Deverá trazer toda a informação referente ao endereço da dependência informada: Tipo de logradouro + Nome do logradouro + Número do Logradouro (se não existir usar ' s/n') + complemento (se houver), como, p.ex.: 'R Diamatina, 59, bloco 35, fundos' 'Praça da Boa Vontade s/n'" 2464 | maxLength: 150 2465 | pattern: \w*\W* 2466 | example: "Av Naburo Ykesaki, 1270" 2467 | additionalInfo: 2468 | type: string 2469 | description: "Complemento" 2470 | maxLength: 30 2471 | pattern: \w*\W* 2472 | example: "Fundos" 2473 | districtName: 2474 | type: string 2475 | description: "Bairro é uma comunidade ou região localizada em uma cidade ou município de acordo com as suas subdivisões geográficas. p.ex: 'Paraíso'" 2476 | maxLength: 50 2477 | pattern: \w*\W* 2478 | example: "Centro" 2479 | townName: 2480 | type: string 2481 | description: "Localidade: O nome da localidade corresponde à designação da cidade ou município no qual o endereço está localizado. p.ex. 'São Paulo'" 2482 | maxLength: 50 2483 | pattern: \w*\W* 2484 | example: "Marília" 2485 | ibgeCode: 2486 | type: string 2487 | description: "Código IBGE do município" 2488 | maxLength: 7 2489 | pattern: \d{7} 2490 | example: "3515890" 2491 | countrySubDivision: 2492 | type: string 2493 | description: "Enumeração referente a cada sigla da unidade da federação que identifica o estado ou o distrito federal, no qual o endereço está localizado. p.ex. 'AC'. São consideradas apenas as siglas para os estados brasileiros" 2494 | enum: 2495 | - AC 2496 | - AL 2497 | - AP 2498 | - AM 2499 | - BA 2500 | - CE 2501 | - DF 2502 | - ES 2503 | - GO 2504 | - MA 2505 | - MT 2506 | - MS 2507 | - MG 2508 | - PA 2509 | - PB 2510 | - PR 2511 | - PE 2512 | - PI 2513 | - RJ 2514 | - RN 2515 | - RS 2516 | - RO 2517 | - RR 2518 | - SC 2519 | - SP 2520 | - SE 2521 | - TO 2522 | example: "SP" 2523 | postCode: 2524 | type: string 2525 | description: "Código de Endereçamento Postal" 2526 | pattern: (\d{8})|^NA$ 2527 | maxLength: 8 2528 | example: "17500001" 2529 | country: 2530 | type: string 2531 | description: "Nome do país" 2532 | maxLength: 80 2533 | pattern: \w*\W* 2534 | example: "Brasil" 2535 | countryCode: 2536 | type: string 2537 | description: "Código do país" 2538 | example: "BRA" 2539 | geographicCoordinates: 2540 | $ref: "#/components/schemas/GeographicCoordinates" 2541 | parameters: 2542 | page: 2543 | name: page 2544 | in: query 2545 | description: Número da página que está sendo requisitada (o valor da primeira página é 1). 2546 | schema: 2547 | type: integer 2548 | default: 1 2549 | minimum: 1 2550 | pageSize: 2551 | name: page-size 2552 | in: query 2553 | description: Quantidade total de registros por páginas. 2554 | schema: 2555 | type: integer 2556 | default: 25 2557 | minimum: 1 2558 | -------------------------------------------------------------------------------- /spec/common-api.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: APIs OpenData do Open Banking Brasil 4 | description: As APIs descritas neste documento são referentes as APIs da fase OpenData do Open Banking Brasil. 5 | version: 1.0.0-rc5.2 6 | contact: 7 | email: "apiteam@swagger.io" 8 | servers: 9 | - url: 'http://api.banco.com.br/open-banking/discovery/v1' 10 | # BUG: https://github.com/aws/aws-cdk/issues/9684 11 | # x-amazon-apigateway-endpoint-configuration: 12 | # vpcEndpointIds: 13 | # - Fn::Sub: "${ApigwVpce}" 14 | 15 | tags: 16 | - name: "Discovery" 17 | 18 | x-amazon-apigateway-request-validators: 19 | all: 20 | validateRequestParameters: true 21 | validateRequestBody: true 22 | 23 | x-amazon-apigateway-request-validator: all 24 | 25 | x-amazon-apigateway-policy: 26 | Version: "2012-10-17" 27 | Statement: 28 | - Effect: "Allow" 29 | Principal: "*" 30 | Action: "execute-api:Invoke" 31 | Resource: 32 | - "execute-api:/*" 33 | - Effect: "Deny" 34 | Principal: "*" 35 | Action: "execute-api:Invoke" 36 | Resource: 37 | - "execute-api:/*" 38 | Condition: 39 | StringNotEquals: 40 | aws:SourceVpce: 41 | Fn::Sub: "${ApigwVpce}" 42 | 43 | paths: 44 | /status: 45 | get: 46 | tags: 47 | - Discovery 48 | summary: a descrição referente ao código de status retornado pelas APIs 49 | description: " descrição referente ao código de status retornado pelas APIs" 50 | operationId: "getStatus" 51 | parameters: 52 | - $ref: "#/components/parameters/page" 53 | - $ref: "#/components/parameters/pageSize" 54 | responses: 55 | '200': 56 | description: código de status retornado pelas APIs 57 | content: 58 | application/json: 59 | schema: 60 | $ref: '#/components/schemas/ResponseDiscoveryStatusList' 61 | x-amazon-apigateway-integration: 62 | type: "mock" 63 | requestTemplates: 64 | application/json: | 65 | {"statusCode" : 200} 66 | responses: 67 | "default": 68 | statusCode: "200" 69 | responseTemplates: 70 | application/json: | 71 | { 72 | "data": { 73 | "status": [ 74 | { 75 | "code": "SCHEDULED_OUTAGE", 76 | "explanation": "Manutenção Planejada", 77 | "detectionTime": "2020-01-01T01:00:00Z", 78 | "expectedResolutionTime": "2020-01-01T01:00:00Z", 79 | "updateTime": "2020-01-02T01:00:00Z", 80 | "unavailableEndpoints": [ 81 | "https://api.banco.com.br/open-banking/channels/v1/branches" 82 | ] 83 | }, 84 | { 85 | "code": "PARTIAL_FAILURE", 86 | "explanation": "Falha na execução do serviço", 87 | "detectionTime": "2020-01-01T01:00:00Z", 88 | "expectedResolutionTime": "2020-01-01T01:00:00Z", 89 | "updateTime": "2020-01-02T01:00:00Z", 90 | "unavailableEndpoints": [ 91 | "https://api.banco.com.br/open-banking/channels/v1/electronic-channels" 92 | ] 93 | } 94 | ], 95 | "links": { 96 | "self": "https://api.banco.com.br/open-banking/discovery/v1/status" 97 | }, 98 | "meta": { 99 | "totalRecords": 1, 100 | "totalPages": 1 101 | } 102 | } 103 | } 104 | 105 | /outages: 106 | get: 107 | tags: 108 | - Discovery 109 | summary: a descrição referente ao código de status retornado pelas APIs 110 | description: "a descrição referente ao código de status retornado pelas APIs" 111 | operationId: "getOutage" 112 | parameters: 113 | - $ref: "#/components/parameters/page" 114 | - $ref: "#/components/parameters/pageSize" 115 | responses: 116 | '200': 117 | description: código de status retornado pelas APIs 118 | content: 119 | application/json: 120 | schema: 121 | $ref: '#/components/schemas/ResponseDiscoveryOutageList' 122 | x-amazon-apigateway-integration: 123 | type: "mock" 124 | requestTemplates: 125 | application/json: | 126 | {"statusCode" : 200} 127 | responses: 128 | "default": 129 | statusCode: "200" 130 | responseTemplates: 131 | application/json: | 132 | { 133 | "data": { 134 | "outages": [ 135 | { 136 | "outageTime": "2020-07-21T08:30:00Z", 137 | "duration": "PT2H30M", 138 | "isPartial": false, 139 | "explanation": "Atualização do API Gateway", 140 | "unavailableEndpoints": [ 141 | "https://api.banco.com.br/open-banking/discovery/v1/outages" 142 | ] 143 | } 144 | ] 145 | }, 146 | "links": { 147 | "self": "https://api.banco.com.br/open-banking/discovery/v1/outages" 148 | }, 149 | "meta": { 150 | "totalRecords": 1, 151 | "totalPages": 1 152 | } 153 | } 154 | components: 155 | schemas: 156 | ResponseDiscoveryStatusList: 157 | type: object 158 | required: 159 | - data 160 | - links 161 | - meta 162 | properties: 163 | data: 164 | type: object 165 | required: 166 | - status 167 | properties: 168 | status: 169 | type: array 170 | items: 171 | $ref: '#/components/schemas/Status' 172 | links: 173 | $ref: '#/components/schemas/Links' 174 | meta: 175 | $ref: '#/components/schemas/Meta' 176 | ResponseDiscoveryOutageList: 177 | type: object 178 | required: 179 | - data 180 | - links 181 | - meta 182 | properties: 183 | data: 184 | type: array 185 | items: 186 | required: 187 | - outageTime 188 | - duration 189 | - isPartial 190 | - explanation 191 | properties: 192 | outageTime: 193 | type: string 194 | description: Data e hora planejada do início da indisponibilidade 195 | example: '2020-07-21T08:30:00Z' 196 | duration: 197 | type: string 198 | description: Duração prevista da indisponibilidade 199 | example: PT2H30M 200 | isPartial: 201 | type: boolean 202 | description: Flag que indica se a indisponibilidade é parcial (atingindo apenas alguns end points) ou total (atingindo todos os end points) 203 | example: false 204 | explanation: 205 | type: string 206 | description: Explicação sobre os motivos da indisponibilidade. 207 | example: Atualização do API Gateway 208 | links: 209 | $ref: '#/components/schemas/Links' 210 | meta: 211 | $ref: '#/components/schemas/Meta' 212 | Links: 213 | type: object 214 | properties: 215 | self: 216 | type: string 217 | description: URL da página atualmente requisitada 218 | example: 'https://api.banco.com.br/open-banking/channels/v1/' 219 | first: 220 | type: string 221 | description: URL da primeira página de registros 222 | example: 'https://api.banco.com.br/open-banking/channels/v1/' 223 | prev: 224 | type: string 225 | description: URL da página anterior de registros 226 | next: 227 | type: string 228 | description: URL da próxima página de registros 229 | last: 230 | type: string 231 | description: URL da última página de registros 232 | example: 'https://api.banco.com.br/open-banking/channels/v1/' 233 | Meta: 234 | type: object 235 | properties: 236 | totalRecords: 237 | type: integer 238 | description: Total de registros encontrados 239 | example: 1 240 | totalPages: 241 | type: integer 242 | description: Total de páginas para os registros encontrados 243 | example: 1 244 | required: 245 | - totalRecords 246 | - totalPages 247 | Status: 248 | type: object 249 | required: 250 | - code 251 | - explanation 252 | properties: 253 | code: 254 | type: string 255 | enum: 256 | - OK 257 | - PARTIAL_FAILURE 258 | - UNAVAILABLE 259 | - SCHEDULED_OUTAGE 260 | description: > 261 | Condição atual da API: 262 | * `OK` - A implementação é totalmente funcional 263 | * `PARTIAL_FAILURE` - Um ou mais endpoints estão indisponíveis 264 | * `UNAVAILABLE` - A implementação completa está indisponível 265 | * `SCHEDULED_OUTAGE` - Uma interrupção anunciada está em vigor 266 | example: OK 267 | explanation: 268 | type: string 269 | description: Fornece uma explicação da interrupção atual que pode ser exibida para um cliente final. Será obrigatoriamente preenchido se code tiver algum valor que não seja OK 270 | example: Retorno com Sucesso 271 | detectionTime: 272 | type: string 273 | description: A data e hora em que a interrupção atual foi detectada. Será obrigatoriamente preenchido se a propriedade code for PARTIAL_FAILURE ou UNAVAILABLE 274 | example: '2020-07-21T08:30:00Z' 275 | expectedResolutionTime: 276 | type: string 277 | description: A data e hora em que o serviço completo deve continuar (se conhecido). Será obrigatoriamente preenchido se code tiver algum valor que não seja OK 278 | example: '2020-07-21T08:30:00Z' 279 | updateTime: 280 | type: string 281 | description: A data e hora em que esse status foi atualizado pela última vez pelo titular dos dados. 282 | example: '2020-01-02T01:00:00Z' 283 | unavailableEndpoints: 284 | type: array 285 | description: Endpoints com indisponibilidade 286 | items: 287 | type: string 288 | example: 289 | - 'https://api.banco.com.br/open-banking/channels/v1/electronic-channels' 290 | parameters: 291 | page: 292 | name: page 293 | in: query 294 | description: Número da página que está sendo requisitada (o valor da primeira página é 1). 295 | schema: 296 | type: integer 297 | default: 1 298 | minimum: 1 299 | pageSize: 300 | name: page-size 301 | in: query 302 | description: Quantidade total de registros por páginas. 303 | schema: 304 | type: integer 305 | default: 25 306 | minimum: 1 307 | -------------------------------------------------------------------------------- /test/cdk.test.ts: -------------------------------------------------------------------------------- 1 | import { expect as expectCDK, matchTemplate, MatchStyle } from '@aws-cdk/assert'; 2 | import * as cdk from '@aws-cdk/core'; 3 | import * as Cdk from '../lib/open-banking-brazil'; 4 | 5 | test('Empty Stack', () => { 6 | // const app = new cdk.App(); 7 | // // WHEN 8 | // const stack = new Cdk.CdkStack(app, 'MyTestStack'); 9 | // // THEN 10 | // expectCDK(stack).to(matchTemplate({ 11 | // "Resources": {} 12 | // }, MatchStyle.EXACT)) 13 | }); 14 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2018", 4 | "module": "commonjs", 5 | "lib": ["es2018"], 6 | "declaration": true, 7 | "strict": true, 8 | "noImplicitAny": true, 9 | "strictNullChecks": true, 10 | "noImplicitThis": true, 11 | "alwaysStrict": true, 12 | "noUnusedLocals": false, 13 | "noUnusedParameters": false, 14 | "noImplicitReturns": true, 15 | "noFallthroughCasesInSwitch": false, 16 | "inlineSourceMap": true, 17 | "inlineSources": true, 18 | "experimentalDecorators": true, 19 | "strictPropertyInitialization": false, 20 | "typeRoots": ["./node_modules/@types"] 21 | }, 22 | "exclude": ["cdk.out"] 23 | } 24 | --------------------------------------------------------------------------------