{"openapi":"3.0.0","info":{"title":"account-service","version":"1.0.0","description":"Information about organization and individual accounts can be accessed with the Accounts API. \n\n<img src=\"https://content.pstmn.io/39401055-ad5f-4790-bea9-83bd4bce6cb0/YWNjb3VudGdpcGh5LmdpZg==\" width=\"172\" height=\"189\">\n\nThis is QA thoughts on docs. Here's some new documentation\n\n### Account Statements\n\nAccount statement endpoints allow you to query statements at any point in the duration of the account's existence. Added some new stuff\n\nAccount statements pull all of the needed information when giving a user an overview of their account history.\n\n### Account Creation\n\nA new account can be created on behalf of a customer if all required information is included. Please see the request documentation for more information on this.\n\n### Account Overview\n\nAccount overview gives information about an account at the current state. For historical information, please use the Account Statements endpoints.\n\n## Authorization\n\nThis API uses OAuth 2.0 and requires you to have a registered application on the Hub before using the API.\n\nAfter your app has been approved, configure your OAuth client credentials and send a bearer token with requests that require authorization.\n\n_**⚠️ This service should be used in accordance with our Prohibited and Restricted Activities guidelines and is subject to standard rate limiting. Please thoroughly review the terms before implementing into your service.**_"},"servers":[{"url":"http://localhost:3000"}],"paths":{"/accounts/{accountNumber}/statement/date":{"get":{"summary":"Date Statements","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"},"example":"01Aug2025"},{"name":"to","in":"query","required":false,"description":"End of period","schema":{"type":"string"},"example":"31Aug2025"}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"description":"This is the desc","type":"string"},"balance":{"type":"object","properties":{"closing":{"type":"number"},"opening":{"type":"number"}}},"money":{"type":"object","properties":{"in":{"type":"number"},"out":{"type":"number"}}},"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"transactions":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number"},"balance":{"type":"number"},"date":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"}}}}}},"example":{"account":"ABC123","balance":{"closing":458.28,"opening":99.99},"money":{"in":164.88,"out":579.77},"period":{"from":"Oct 01 2025","to":"Oct 09 2025"},"transactions":[{"amount":717.65,"balance":137.07,"date":"Oct 09 2025 13:52:40","description":"MacGyver LLC","type":"invoice"},{"amount":-548.43,"balance":153.57,"date":"Oct 09 2025 16:27:31","description":"Beatty, Paucek and Gulgowski","type":"payment"},{"amount":-141.57,"balance":621.31,"date":"Tue Oct 10 2025 01:11:40","description":"Baumbach - Feest","type":"payment"},{"amount":-961.64,"balance":673.77,"date":"Oct 09 2025 22:04:53","description":"Witting and Sons","type":"payment"},{"amount":283.83,"balance":431.27,"date":"Oct 9 2025 18:18:37","description":"Hoeger and Sons","type":"invoice"},{"amount":-533.98,"balance":497.56,"date":"Oct 09 2025 15:10:26","description":"Collins - Rau","type":"withdrawal"},{"amount":311.25,"balance":309.01,"date":"Oct 09 2025 11:17:16","description":"Dickens, Goodwin and Swaniawski","type":"deposit"},{"amount":70.13,"balance":510.07,"date":"Tue Oct 10 2025 07:51:59","description":"Kemmer - Simonis","type":"deposit"},{"amount":516.64,"balance":85.61,"date":"Tue Oct 10 2025 05:18:37","description":"Johnston Inc","type":"invoice"},{"amount":-236.84,"balance":451.95,"date":"Tue Oct 10 2025 01:58:56","description":"Gulgowski LLC","type":"withdrawal"}]}}}},"404":{"description":"404 Not found"}},"tags":["Statement"]},"parameters":[{"name":"accountNumber","in":"path","required":true,"schema":{"type":"string"},"example":"ABC123"}]},"/accounts/{accountNumber}/statement/latest":{"get":{"summary":"Latest Statement","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string"},"balance":{"type":"object","properties":{"closing":{"type":"number"},"opening":{"type":"number"}}},"money":{"type":"object","properties":{"in":{"type":"number"},"out":{"type":"number"}}},"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"transactions":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number"},"balance":{"type":"number"},"date":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"}}}}}},"example":{"account":"ABC123","balance":{"closing":458.28,"opening":99.99},"money":{"in":164.88,"out":579.77},"period":{"from":"Oct 01 2025 11:34:41","to":"Oct 09 2025 11:34:41"},"transactions":[{"amount":717.65,"balance":137.07,"date":"Oct 09 2025 13:52:40","description":"MacGyver LLC","type":"invoice"},{"amount":-548.43,"balance":153.57,"date":"Oct 09 2025 16:27:31","description":"Beatty, Paucek and Gulgowski","type":"payment"},{"amount":-141.57,"balance":621.31,"date":"Tue Oct 10 2025 01:11:40","description":"Baumbach - Feest","type":"payment"},{"amount":-961.64,"balance":673.77,"date":"Oct 09 2025 22:04:53","description":"Witting and Sons","type":"payment"},{"amount":283.83,"balance":431.27,"date":"Oct 9 2025 18:18:37","description":"Hoeger and Sons","type":"invoice"},{"amount":-533.98,"balance":497.56,"date":"Oct 09 2025 15:10:26","description":"Collins - Rau","type":"withdrawal"},{"amount":311.25,"balance":309.01,"date":"Oct 09 2025 11:17:16","description":"Dickens, Goodwin and Swaniawski","type":"deposit"},{"amount":70.13,"balance":510.07,"date":"Tue Oct 10 2025 07:51:59","description":"Kemmer - Simonis","type":"deposit"},{"amount":516.64,"balance":85.61,"date":"Tue Oct 10 2025 05:18:37","description":"Johnston Inc","type":"invoice"},{"amount":-236.84,"balance":451.95,"date":"Tue Oct 10 2025 01:58:56","description":"Gulgowski LLC","type":"withdrawal"}]}}}}},"tags":["Statement"],"description":"### Retrieve Latest Account Statement\n\nThis endpoint retrieves the latest statement for a specific account identified by the `accountNumber`. It provides a summary of the account's financial activity over a defined period, including balances, money flow, and individual transactions.\n\n#### Request Parameters\n\n- **accountNumber** (path parameter): The unique identifier for the account whose latest statement is being requested. Ensure that the `accountNumber` is valid to receive the correct statement.\n    \n\n#### Response Format\n\nThe response will be a JSON object containing the following structure:\n\n- **balance**: An object representing the account balance.\n    \n    - **closing**: The closing balance of the account.\n        \n    - **opening**: The opening balance of the account.\n        \n- **money**: An object detailing the money flow.\n    \n    - **in**: Total amount of money received.\n        \n    - **out**: Total amount of money spent.\n        \n- **period**: An object indicating the statement period.\n    \n    - **from**: The start date of the statement period.\n        \n    - **to**: The end date of the statement period.\n        \n- **transactions**: An array of transaction objects, each containing:\n    \n    - **amount**: The amount of the transaction.\n        \n    - **balance**: The balance after the transaction.\n        \n    - **date**: The date of the transaction.\n        \n    - **description**: A brief description of the transaction.\n        \n    - **type**: The type of the transaction (e.g., debit, credit).\n        \n\n#### Notes\n\n- The response will contain all transactions within the specified period, along with the relevant balance information."},"parameters":[{"name":"accountNumber","in":"path","required":true,"schema":{"type":"string"},"example":"ABC123"}]},"/accounts/{accountNumber}":{"get":{"summary":"Overview request","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"object","properties":{"available":{"type":"number"},"present":{"type":"number"}}},"details":{"type":"object","properties":{"domestic":{"type":"object","properties":{"account":{"type":"string"},"routing":{"type":"string"}}},"international":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"}}}}},"interestRate":{"type":"number"},"lastStatementDate":{"type":"string"},"type":{"type":"string"}}},"example":{"balance":{"available":109.58,"present":344.54},"details":{"domestic":{"account":"34183769","routing":"69437301"},"international":{"bic":"AAQIMWT1","iban":"{AL10010054848GYQ8536W4967Q3R}"}},"interestRate":0.01,"lastStatementDate":"Tue Oct 10 2023 00:41:55 GMT-0500 (Central Daylight Time)","type":"Savings Account"}}}}},"security":[{"BearerAuth":[]}],"description":"### Retrieve Account Information\n\nThis endpoint allows you to retrieve detailed information about a specific account using its account number. It provides insights into the account's balance, details, interest rate, and other relevant information.\n\n#### Request Parameters\n\n- **accountNumber** (path parameter): The unique identifier for the account you wish to access. This should be provided in the URL.\n    \n\n#### Expected Response\n\nOn a successful request, the response will include the following information:\n\n- **balance**: An object containing:\n    \n    - **available**: The amount of funds available for withdrawal.\n        \n    - **present**: The total amount currently present in the account.\n        \n- **details**: An object providing account details:\n    \n    - **domestic**: An object containing:\n        \n        - **account**: The domestic account number.\n            \n        - **routing**: The domestic routing number.\n            \n    - **international**: An object containing:\n        \n        - **bic**: The Bank Identifier Code for international transactions.\n            \n        - **iban**: The International Bank Account Number.\n            \n- **interestRate**: The interest rate applicable to the account.\n    \n- **lastStatementDate**: The date of the last statement issued for the account.\n    \n- **type**: The type of account (e.g., savings, checking).\n    \n\n#### Notes\n\n- Ensure that the account number provided is valid; otherwise, the request may return an error.\n    \n- The response will be in JSON format, providing a structured overview of the account's status and details."},"parameters":[{"name":"accountNumber","in":"path","required":true,"schema":{"type":"string"},"example":"ABC123"}],"patch":{"summary":"Update","parameters":[{"name":"x-mock-response-code","in":"header","required":false,"schema":{"type":"integer"},"example":200}],"responses":{"200":{"description":"Update Account","content":{"application/json":{"schema":{"type":"object","properties":{"details":{"type":"object","properties":{"domestic":{"type":"object","properties":{"account":{"type":"string"},"routing":{"type":"string"}}},"international":{"type":"object","properties":{"bic":{"type":"string"},"iban":{"type":"string"}}}}},"type":{"type":"string"}}},"example":{"details":{"domestic":{"account":"02560233","routing":"71993962"},"international":{"bic":"PYAUISI1","iban":"AT780032406410040055"}},"type":"Investment Account"}}}}},"description":"## PATCH /accounts/{accountNumber}\n\nThis endpoint allows you to update the details of a specific account identified by `accountNumber`. The request is made using the HTTP PATCH method, which is typically used for partial updates to resources.\n\n### Request Body\n\nThe request requires a JSON payload with the following structure:\n\n- **holder** (object): Contains the account holder's information.\n    \n    - **address** (object): The address details of the account holder.\n        \n        - **city** (string): The city where the account holder resides.\n            \n        - **country** (string): The country of the account holder.\n            \n        - **street** (string): The street address of the account holder.\n            \n    - **dob** (string): The date of birth of the account holder.\n        \n    - **name** (object): The name details of the account holder.\n        \n        - **first** (string): The first name of the account holder.\n            \n        - **last** (string): The last name of the account holder.\n            \n        - **middle** (string): The middle name of the account holder (optional).\n            \n- **type** (string): The type of account being updated.\n    \n\n### Response\n\nThe response will return a status code indicating the result of the request. A successful update typically returns a JSON object with account details. However, if the account is not found, a `404 Not Found` status will be returned, along with an error message in JSON format:\n\n``` json\n{\n  \"error\": \"\"\n}\n\n ```\n\nIn case of a successful update, the response may look like this:\n\n``` json\n{\n  \"details\": {\n    \"domestic\": {\n      \"account\": \"\",\n      \"routing\": \"\"\n    },\n    \"international\": {\n      \"bic\": \"\",\n      \"iban\": \"\"\n    }\n  },\n  \"type\": \"\"\n}\n\n ```\n\n### Notes\n\n- Ensure that the `accountNumber` in the URL is valid and corresponds to an existing account.\n    \n- The payload must be correctly formatted as per the specified structure to avoid errors.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"holder":{"type":"object","properties":{"address":{"type":"object","properties":{"city":{"type":"string"},"country":{"type":"string"},"street":{"type":"string"}}},"dob":{"type":"string"},"name":{"type":"object","properties":{"first":{"type":"string"},"last":{"type":"string"},"middle":{"type":"string"}}}}},"type":{"type":"string"}}},"example":{"holder":{"address":{"city":"Seattle","country":"United States","street":"123 Market Street"},"dob":"1980-01-15","name":{"first":"Jane","last":"Doe","middle":"Q"}},"type":"Checking Account"}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}