From 21a8c9518867aa1ca4038a2e844ba699118ec772 Mon Sep 17 00:00:00 2001 From: Codat Pipeline Bot Date: Wed, 20 Nov 2024 11:45:11 +0000 Subject: [PATCH] Latest Open API Specification --- static/oas/Codat-Bank-Feeds.json | 188 +++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/static/oas/Codat-Bank-Feeds.json b/static/oas/Codat-Bank-Feeds.json index a141fb574..e5a1e850c 100644 --- a/static/oas/Codat-Bank-Feeds.json +++ b/static/oas/Codat-Bank-Feeds.json @@ -3307,6 +3307,127 @@ } } }, + "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/batch": { + "parameters": [ + { + "$ref": "#/components/parameters/companyId" + }, + { + "$ref": "#/components/parameters/connectionId" + } + ], + "post": { + "tags": [ + "Source accounts" + ], + "summary": "Batch create source accounts", + "description": "The _Batch create source accounts_ endpoint allows you to create multiple representations of your SMB's bank accounts within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.\n\n#### Account mapping variability\n\nThe method of mapping the source account to the target account varies depending on the accounting software your company uses.\n\n#### Mapping options:\n\n1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.\n2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.\n3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.\n\n### Integration-specific behaviour\n\n| Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |\n| --------------------- | ----------- | ---------------- | --------------------------- |\n| Xero | ✅ | ✅ | |\n| FreeAgent | ✅ | ✅ | |\n| Oracle NetSuite | ✅ | ✅ | |\n| Exact Online (NL) | ✅ | ✅ | |\n| QuickBooks Online | | | ✅ |\n| Sage | | | ✅ |\n\n> ### Versioning\n> If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.", + "operationId": "create-batch-source-account", + "x-speakeasy-name-override": "create-batch", + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourceAccountV2" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/SourceAccount" + } + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SourceAccountV2BatchCreateResponse" + }, + { + "$ref": "#/components/schemas/SourceAccountBatchCreateResponse" + } + ] + } + } + ] + } + } + } + }, + "207": { + "description": "Multi-Status", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SourceAccountV2BatchCreateResponse" + }, + { + "$ref": "#/components/schemas/SourceAccountBatchCreateResponse" + }, + { + "$ref": "#/components/schemas/SourceAccountBatchErrorResponse" + } + ] + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/Payment-Required" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/Not-Found" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/Too-Many-Requests" + }, + "500": { + "$ref": "#/components/responses/Internal-Server-Error" + }, + "503": { + "$ref": "#/components/responses/Service-Unavailable" + } + } + } + }, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}": { "patch": { "tags": [ @@ -6610,6 +6731,56 @@ } ] }, + "SourceAccountBatchCreateResponse": { + "title": "Batch source account request created response", + "description": "The account ID and source account object of the successfully created source account.", + "type": "object", + "properties": { + "sourceAccountId": { + "type": "string", + "description": "Unique ID for the source account.", + "examples": [ + "12345" + ] + }, + "result": { + "$ref": "#/components/schemas/SourceAccount" + } + } + }, + "SourceAccountBatchErrorResponse": { + "title": "Batch source account creation error", + "description": "Describes the error that occured when trying to create the specified source account.", + "type": "object", + "properties": { + "sourceAccountId": { + "type": "string", + "description": "Unique ID for the source account.", + "examples": [ + "12345" + ] + }, + "result": { + "type": "object", + "properties": { + "statusCode": { + "description": "The error status code for the attempted creation of the source account.", + "type": "string", + "examples": [ + 409 + ] + }, + "error": { + "description": "The error description for the attempted creation of the source account.", + "type": "string", + "examples": [ + "A bank account already exists with the same Id" + ] + } + } + } + } + }, "SourceAccountV2": { "title": "Source account (v2)", "type": "object", @@ -6801,6 +6972,23 @@ } ] }, + "SourceAccountV2BatchCreateResponse": { + "title": "Batch source account (v2) request created response", + "description": "The account ID and source account object of the successfully created source account.", + "type": "object", + "properties": { + "sourceAccountId": { + "type": "string", + "description": "Unique ID for the source account.", + "examples": [ + "12345" + ] + }, + "result": { + "$ref": "#/components/schemas/SourceAccountV2" + } + } + }, "SourceAccountWebhook": { "title": "Source account status changed webhook", "type": "object",