From b2001b48a3dde014a3fd90828f7f76c6adb9a581 Mon Sep 17 00:00:00 2001 From: Codat Pipeline Bot Date: Mon, 25 Nov 2024 10:06:17 +0000 Subject: [PATCH] Latest Open API Specification --- static/oas/Codat-Bank-Feeds.json | 310 ++++++++++++++++++++----------- static/oas/Codat-Lending.json | 4 +- 2 files changed, 208 insertions(+), 106 deletions(-) diff --git a/static/oas/Codat-Bank-Feeds.json b/static/oas/Codat-Bank-Feeds.json index e5a1e850c..9e74bc416 100644 --- a/static/oas/Codat-Bank-Feeds.json +++ b/static/oas/Codat-Bank-Feeds.json @@ -707,6 +707,64 @@ } } }, + "/companies/{companyId}/accessToken": { + "get": { + "summary": "Get company access token", + "operationId": "get-company-access-token", + "x-speakeasy-name-override": "get-access-token", + "description": "Use the _Get company access token_ endpoint to return an access token for the specified company ID to use in Codat's embedded UI products.\n", + "parameters": [ + { + "$ref": "#/components/parameters/companyId" + } + ], + "tags": [ + "Companies" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompanyAccessToken" + }, + "examples": { + "Simple company": { + "value": { + "expiresIn": 86400, + "accessToken": "string", + "tokenType": "Bearer" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/Payment-Required" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/Not-Found" + }, + "429": { + "$ref": "#/components/responses/Too-Many-Requests" + }, + "500": { + "$ref": "#/components/responses/Internal-Server-Error" + }, + "503": { + "$ref": "#/components/responses/Service-Unavailable" + } + } + } + }, "/companies/{companyId}/connections": { "get": { "summary": "List connections", @@ -3179,7 +3237,7 @@ "operationId": "create-bank-account" } }, - "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts": { + "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/batch": { "parameters": [ { "$ref": "#/components/parameters/companyId" @@ -3192,23 +3250,29 @@ "tags": [ "Source accounts" ], - "summary": "Create source account", - "description": "The _Create Source Account_ endpoint allows you to create a representation of a bank account 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-source-account", + "summary": "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> ### 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": [ { - "$ref": "#/components/schemas/SourceAccountV2" + "type": "array", + "items": { + "$ref": "#/components/schemas/SourceAccountV2" + } }, { - "$ref": "#/components/schemas/SourceAccount" + "type": "array", + "items": { + "$ref": "#/components/schemas/SourceAccount" + } } ] - }, - "examples": {} + } } } }, @@ -3220,14 +3284,47 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/SourceAccountV2" - }, + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SourceAccountV2BatchCreateResponse" + }, + { + "$ref": "#/components/schemas/SourceAccountBatchCreateResponse" + } + ] + } + } + ] + } + } + } + }, + "207": { + "description": "Multi-Status", + "content": { + "application/json": { + "schema": { + "oneOf": [ { - "$ref": "#/components/schemas/SourceAccount" + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SourceAccountV2BatchCreateResponse" + }, + { + "$ref": "#/components/schemas/SourceAccountBatchCreateResponse" + }, + { + "$ref": "#/components/schemas/SourceAccountBatchErrorResponse" + } + ] + } } ] - }, - "examples": {} + } } } }, @@ -3246,6 +3343,9 @@ "404": { "$ref": "#/components/responses/Not-Found" }, + "409": { + "$ref": "#/components/responses/Conflict" + }, "429": { "$ref": "#/components/responses/Too-Many-Requests" }, @@ -3256,14 +3356,41 @@ "$ref": "#/components/responses/Service-Unavailable" } } - }, - "get": { + } + }, + "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts": { + "parameters": [ + { + "$ref": "#/components/parameters/companyId" + }, + { + "$ref": "#/components/parameters/connectionId" + } + ], + "post": { "tags": [ "Source accounts" ], - "summary": "List source accounts", - "description": "The _List source accounts_ endpoint returns a list of [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) for a given company's connection.\n\n[Source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account within Codat's domain from which transactions are synced into the accounting platform.\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": "list-source-accounts", + "summary": "Create single source account", + "description": "The _Create Source Account_ endpoint allows you to create a representation of a bank account 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> ### 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-source-account", + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/SourceAccountV2" + }, + { + "$ref": "#/components/schemas/SourceAccount" + } + ] + }, + "examples": {} + } + } + }, "responses": { "200": { "description": "Success", @@ -3272,10 +3399,10 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/SourceAccountV2/definitions/sourceAccounts" + "$ref": "#/components/schemas/SourceAccountV2" }, { - "$ref": "#/components/schemas/SourceAccount/definitions/sourceAccounts" + "$ref": "#/components/schemas/SourceAccount" } ] }, @@ -3283,6 +3410,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/Unauthorized" }, @@ -3305,47 +3435,14 @@ "$ref": "#/components/responses/Service-Unavailable" } } - } - }, - "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/batch": { - "parameters": [ - { - "$ref": "#/components/parameters/companyId" - }, - { - "$ref": "#/components/parameters/connectionId" - } - ], - "post": { + }, + "get": { "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" - } - } - ] - } - } - } - }, + "summary": "List source accounts", + "description": "The _List source accounts_ endpoint returns a list of [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) for a given company's connection.\n\n[Source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account within Codat's domain from which transactions are synced into the accounting platform.\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": "list-source-accounts", "responses": { "200": { "description": "Success", @@ -3354,53 +3451,17 @@ "schema": { "oneOf": [ { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SourceAccountV2BatchCreateResponse" - }, - { - "$ref": "#/components/schemas/SourceAccountBatchCreateResponse" - } - ] - } - } - ] - } - } - } - }, - "207": { - "description": "Multi-Status", - "content": { - "application/json": { - "schema": { - "oneOf": [ + "$ref": "#/components/schemas/SourceAccountV2/definitions/sourceAccounts" + }, { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SourceAccountV2BatchCreateResponse" - }, - { - "$ref": "#/components/schemas/SourceAccountBatchCreateResponse" - }, - { - "$ref": "#/components/schemas/SourceAccountBatchErrorResponse" - } - ] - } + "$ref": "#/components/schemas/SourceAccount/definitions/sourceAccounts" } ] - } + }, + "examples": {} } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/Unauthorized" }, @@ -3413,9 +3474,6 @@ "404": { "$ref": "#/components/responses/Not-Found" }, - "409": { - "$ref": "#/components/responses/Conflict" - }, "429": { "$ref": "#/components/responses/Too-Many-Requests" }, @@ -3731,7 +3789,7 @@ "Account mapping" ], "summary": "Create bank feed account mapping", - "description": "The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).\n\nA bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).\n\nTo find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.\n\n> **For custom builds only**\n>\n> Only use this endpoint if you are building your own account management UI.", + "description": "The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).\n\nA bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).\n\nTo find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.\n\n> **For custom builds only**\n>\n> Only use this endpoint if you are building your own account management UI.\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 | | | ✅ |", "operationId": "create-bank-account-mapping", "requestBody": { "content": { @@ -4352,7 +4410,7 @@ }, "bankFeeds.sourceAccount.connected": { "post": { - "description": "Called when a bank feed source account has become connected.", + "description": "Triggered when a bank feed source account has become connected to a target account. This occurs when a user sets up mapping between the two.", "x-svix-feature-flag": "bank-feeds", "requestBody": { "content": { @@ -5442,6 +5500,50 @@ } ] }, + "CompanyAccessToken": { + "title": "Company access token", + "description": "Details of the access token provisioned for a company.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/CompanyAccessToken/definitions/accessToken" + } + ], + "definitions": { + "accessToken": { + "title": "Access token", + "type": "object", + "properties": { + "expiresIn": { + "type": "integer", + "description": "The number of seconds until the access token expires.", + "example": 86400 + }, + "accessToken": { + "type": "string", + "description": "The access token for the company." + }, + "tokenType": { + "type": "string", + "description": "The type of token.", + "example": "Bearer" + } + }, + "required": [ + "expiresIn", + "accessToken", + "tokenType" + ] + } + }, + "examples": [ + { + "expiresIn": 86400, + "accessToken": "string", + "tokenType": "Bearer" + } + ] + }, "CompanyInformation": { "title": "Company information", "description": "Information about the company from the underlying accounting software.", diff --git a/static/oas/Codat-Lending.json b/static/oas/Codat-Lending.json index b00f747ba..3663ed354 100644 --- a/static/oas/Codat-Lending.json +++ b/static/oas/Codat-Lending.json @@ -93351,7 +93351,7 @@ "Loan writeback" ], "summary": "Create source account", - "description": "The _Create Source Account_ endpoint allows you to create a representation of a bank account 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.", + "description": "The _Create Source Account_ endpoint allows you to create a representation of a bank account 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> ### 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-source-account", "requestBody": { "content": { @@ -93431,7 +93431,7 @@ "Loan writeback" ], "summary": "Create bank feed account mapping", - "description": "The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).\n\nA bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).\n\nTo find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.\n\n> **For custom builds only**\n>\n> Only use this endpoint if you are building your own account management UI.", + "description": "The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).\n\nA bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software).\n\nTo find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint.\n\n> **For custom builds only**\n>\n> Only use this endpoint if you are building your own account management UI.\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 | | | ✅ |", "operationId": "create-bank-account-mapping", "x-speakeasy-group": "loan-writeback.source-accounts", "x-speakeasy-name-override": "create-mapping",