diff --git a/json/Codat-Bank-Feeds.json b/json/Codat-Bank-Feeds.json index e5a1e85..9e74bc4 100644 --- a/json/Codat-Bank-Feeds.json +++ b/json/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/json/Codat-Lending.json b/json/Codat-Lending.json index b00f747..3663ed3 100644 --- a/json/Codat-Lending.json +++ b/json/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", diff --git a/yaml/Codat-Bank-Feeds.yaml b/yaml/Codat-Bank-Feeds.yaml index 3a311a5..79766fa 100644 --- a/yaml/Codat-Bank-Feeds.yaml +++ b/yaml/Codat-Bank-Feeds.yaml @@ -486,6 +486,44 @@ paths: value: name: Same name description: Additional documents required + '/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. + 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 @@ -2184,49 +2222,32 @@ paths: $ref: '#/components/responses/Service-Unavailable' description: "The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.\r\n\r\n[Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behaviour**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model)." operationId: create-bank-account - '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts': + '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/batch': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' post: tags: - Source accounts - summary: Create source account + summary: Create source accounts 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. - - #### Account mapping variability - - The method of mapping the source account to the target account varies depending on the accounting software your company uses. - - #### Mapping options: - - 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. - 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping. - 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. - - ### Integration-specific behaviour - - | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | - | --------------------- | ----------- | ---------------- | --------------------------- | - | Xero | ✅ | ✅ | | - | FreeAgent | ✅ | ✅ | | - | Oracle NetSuite | ✅ | ✅ | | - | Exact Online (NL) | ✅ | ✅ | | - | QuickBooks Online | | | ✅ | - | Sage | | | ✅ | + 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. > ### Versioning > 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 + operationId: create-batch-source-account + x-speakeasy-name-override: create-batch requestBody: content: application/json: schema: oneOf: - - $ref: '#/components/schemas/SourceAccountV2' - - $ref: '#/components/schemas/SourceAccount' - examples: {} + - type: array + items: + $ref: '#/components/schemas/SourceAccountV2' + - type: array + items: + $ref: '#/components/schemas/SourceAccount' responses: '200': description: Success @@ -2234,9 +2255,23 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/SourceAccountV2' - - $ref: '#/components/schemas/SourceAccount' - examples: {} + - 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': @@ -2247,18 +2282,36 @@ paths: $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' - 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: "\uFEFFThe _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. + + > ### Versioning + > 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 @@ -2266,9 +2319,11 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccounts' - - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccounts' + - $ref: '#/components/schemas/SourceAccountV2' + - $ref: '#/components/schemas/SourceAccount' examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2283,53 +2338,12 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $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. - - #### Account mapping variability - - The method of mapping the source account to the target account varies depending on the accounting software your company uses. - - #### Mapping options: - - 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. - 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping. - 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. - - ### Integration-specific behaviour - - | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | - | --------------------- | ----------- | ---------------- | --------------------------- | - | Xero | ✅ | ✅ | | - | FreeAgent | ✅ | ✅ | | - | Oracle NetSuite | ✅ | ✅ | | - | Exact Online (NL) | ✅ | ✅ | | - | QuickBooks Online | | | ✅ | - | Sage | | | ✅ | - - > ### Versioning - > 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: "\uFEFFThe _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 @@ -2337,25 +2351,9 @@ paths: 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' + - $ref: '#/components/schemas/SourceAccountV2/definitions/sourceAccounts' + - $ref: '#/components/schemas/SourceAccount/definitions/sourceAccounts' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2364,8 +2362,6 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' - '409': - $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': @@ -2566,7 +2562,7 @@ paths: tags: - Account mapping summary: Create bank feed account mapping - description: "\uFEFFThe *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: "\uFEFFThe *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: @@ -2988,7 +2984,7 @@ webhooks: description: Return a 200 status to indicate that the webhook was received successfully. 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: @@ -3805,6 +3801,36 @@ components: lastSync: '2022-10-27T10:22:43.6464237Z' created: '2022-10-27T09:53:29Z' sourceType: Banking + 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/yaml/Codat-Lending.yaml b/yaml/Codat-Lending.yaml index 0e53be1..3a7c610 100644 --- a/yaml/Codat-Lending.yaml +++ b/yaml/Codat-Lending.yaml @@ -64125,27 +64125,6 @@ paths: 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. - #### Account mapping variability - - The method of mapping the source account to the target account varies depending on the accounting software your company uses. - - #### Mapping options: - - 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. - 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping. - 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. - - ### Integration-specific behaviour - - | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | - | --------------------- | ----------- | ---------------- | --------------------------- | - | Xero | ✅ | ✅ | | - | FreeAgent | ✅ | ✅ | | - | Oracle NetSuite | ✅ | ✅ | | - | Exact Online (NL) | ✅ | ✅ | | - | QuickBooks Online | | | ✅ | - | Sage | | | ✅ | - > ### Versioning > 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 @@ -64192,7 +64171,7 @@ paths: tags: - Loan writeback summary: Create bank feed account mapping - description: "\uFEFFThe *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: "\uFEFFThe *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