Codat Lending API

The Codat Lending API enables digital lenders, neobanks, and corporate card providers to make smarter credit decisions on small businesses by aggregating and analyzing standardized financial data from accounting, banking, and commerce platforms to assess SMB creditworthiness.

OpenAPI Specification

codat-lending-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "servers": [
    {
      "description": "Production",
      "url": "https://api.codat.io"
    }
  ],
  "info": {
    "title": "Lending",
    "description": "Our Lending solution helps you make smarter credit decisions on small businesses by enabling you to pull your customers' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently.\n\nThe Lending solution is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers.\n\n[Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas)\n\n<!-- Start Codat Tags Table -->\n## Endpoints\n\n| Endpoints | Description |\n| :- |:- |\n| Companies | Create and manage your SMB users' companies. |\n| Connections | Create new and manage existing data connections for a company. |\n| Bank statements | Retrieve banking data from linked bank accounts. |\n| Sales | Retrieve standardized sales data from a linked commerce software. |\n| Financial statements | Financial data and reports from a linked accounting software. |\n| Liabilities | Debt and other liabilities. |\n| Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. |\n| Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. |\n| Transactions | Data from a linked accounting software representing transactions. |\n| Company info | View company information fetched from the source platform. |\n| Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. |\n| Excel reports | Download reports in Excel format. |\n| Manage data | Control how data is retrieved from an integration. |\n| File upload | Endpoints to manage uploaded files. |\n| Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. |\n<!-- End Codat Tags Table -->",
    "version": "3.0.0",
    "contact": {
      "name": "Codat",
      "email": "[email protected]"
    },
    "termsOfService": "https://www.codat.io/legals/"
  },
  "security": [
    {
      "auth_header": []
    }
  ],
  "x-speakeasy-retries": {
    "strategy": "backoff",
    "backoff": {
      "initialInterval": 500,
      "maxInterval": 60000,
      "maxElapsedTime": 3600000,
      "exponent": 1.5
    },
    "statusCodes": [
      408,
      429,
      "5XX"
    ],
    "retryConnectionErrors": true
  },
  "x-speakeasy-name-override": [
    {
      "operationId": "^list-.*?",
      "methodNameOverride": "list"
    },
    {
      "operationId": "^list-.*?-attachments",
      "methodNameOverride": "list-attachments"
    },
    {
      "operationId": "^get-.*?",
      "methodNameOverride": "get"
    },
    {
      "operationId": "^get-create-.*?-model",
      "methodNameOverride": "get-create-model"
    },
    {
      "operationId": "^get-create-update.*?-model",
      "methodNameOverride": "get-create-update-model"
    },
    {
      "operationId": "^get-.*?-attachment",
      "methodNameOverride": "get-attachment"
    },
    {
      "operationId": "^update-.*?",
      "methodNameOverride": "update"
    },
    {
      "operationId": "^create-.*?",
      "methodNameOverride": "create"
    },
    {
      "operationId": "^delete-.*?",
      "methodNameOverride": "delete"
    },
    {
      "operationId": "^delete-.*?-attachment",
      "methodNameOverride": "delete-attachment"
    },
    {
      "operationId": "^download-.*?-attachment",
      "methodNameOverride": "download-attachment"
    },
    {
      "operationId": "^upload-.*?-attachment",
      "methodNameOverride": "upload-attachment"
    }
  ],
  "x-codat-docs-path": "lending-api",
  "x-codat-keep-docs-paths-local": true,
  "x-codat-speakeasy-pagination": {
    "type": "offsetLimit",
    "inputs": [
      {
        "name": "page",
        "in": "parameters",
        "type": "page"
      }
    ],
    "outputs": {
      "results": "$.results"
    }
  },
  "tags": [
    {
      "name": "Companies",
      "description": "Create and manage your SMB users' companies."
    },
    {
      "name": "Connections",
      "description": "Create new and manage existing data connections for a company."
    },
    {
      "name": "Bank statements",
      "description": "Retrieve banking data from linked bank accounts."
    },
    {
      "name": "Sales",
      "description": "Retrieve standardized sales data from a linked commerce software."
    },
    {
      "name": "Financial statements",
      "description": "Financial data and reports from a linked accounting software."
    },
    {
      "name": "Liabilities",
      "description": "Debt and other liabilities."
    },
    {
      "name": "Accounts payable",
      "description": "Data from a linked accounting software representing money the business owes money to its suppliers."
    },
    {
      "name": "Accounts receivable",
      "description": "Data from a linked accounting software representing money owed to the business for sold goods or services."
    },
    {
      "name": "Accounting bank data",
      "description": "Access bank transactions from an accounting software."
    },
    {
      "name": "Transactions",
      "description": "Data from a linked accounting software representing transactions."
    },
    {
      "name": "Company info",
      "description": "View company information fetched from the source platform."
    },
    {
      "name": "Data integrity",
      "description": "Match mutable accounting data with immutable banking data to increase confidence in financial data."
    },
    {
      "name": "Excel reports",
      "description": "Download reports in Excel format."
    },
    {
      "name": "Manage data",
      "description": "Control how data is retrieved from an integration."
    },
    {
      "name": "File upload",
      "description": "Endpoints to manage uploaded files."
    },
    {
      "name": "Loan writeback",
      "description": "Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle."
    },
    {
      "name": "Manage reports",
      "description": "Generate and review generated reports for a company."
    },
    {
      "name": "Financial summary",
      "description": "View financial summary information for a company, including credit model reports and accounting score."
    }
  ],
  "paths": {
    "/companies": {
      "get": {
        "summary": "List companies",
        "tags": [
          "Companies"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Companies"
                },
                "examples": {
                  "One company": {
                    "value": {
                      "results": [
                        {
                          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                          "name": "My Test Company",
                          "description": "My Test Company make testing software",
                          "platform": "",
                          "redirect": "https://link.codat.io/company/3fa85f64-5717-4562-b3fc-2c963f66afa6",
                          "lastSync": "2022-01-01T12:30:00.000Z",
                          "dataConnections": [
                            {
                              "id": "51baa045-4836-4317-a42e-3542e991e581",
                              "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390",
                              "integrationKey": "vjms",
                              "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b",
                              "platformName": "Pandle",
                              "linkUrl": "https://link-api.codat.io/companies/3fa85f64-5717-4562-b3fc-2c963f66afa6/connections/51baa045-4836-4317-a42e-3542e991e581/start",
                              "status": "Linked",
                              "lastSync": "2022-01-01T12:30:00.000Z",
                              "created": "2022-01-01T11:30:00Z",
                              "sourceType": "Accounting"
                            }
                          ],
                          "created": "2022-01-01T11:30:00Z",
                          "createdByUserName": "Mike Smith",
                          "products": [
                            "spend-insights",
                            "lending",
                            "expenses-v1",
                            "commerce"
                          ],
                          "referenceSubsidiaryCompanies": []
                        }
                      ],
                      "pageNumber": 1,
                      "pageSize": 100,
                      "totalResults": 1,
                      "_links": {
                        "current": {
                          "href": "/companies?page=1&pageSize=100"
                        },
                        "self": {
                          "href": "/companies"
                        }
                      }
                    }
                  },
                  "List of Companies": {
                    "value": {
                      "results": [
                        {
                          "id": "d1568dde-adf6-11ed-afa1-0242ac120002",
                          "name": "Technicalium",
                          "description": "Technology services, including web and app design and development",
                          "platform": "",
                          "redirect": "https://link.codat.io/company/d1568dde-adf6-11ed-afa1-0242ac120002",
                          "lastSync": "2022-01-01T12:30:00.000Z",
                          "dataConnections": [
                            {
                              "id": "51baa045-4836-4317-a42e-3542e991e581",
                              "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390",
                              "integrationKey": "vjms",
                              "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b",
                              "platformName": "Pandle",
                              "linkUrl": "https://link-api.codat.io/companies/d1568dde-adf6-11ed-afa1-0242ac120002/connections/51baa045-4836-4317-a42e-3542e991e581/start",
                              "status": "Linked",
                              "lastSync": "2022-01-01T12:30:00.000Z",
                              "created": "2022-01-01T11:30:00Z",
                              "sourceType": "Accounting"
                            }
                          ],
                          "created": "2022-01-01T11:30:00Z",
                          "createdByUserName": "Joe Bloggs",
                          "products": [
                            "spend-insights",
                            "lending",
                            "payables-v2"
                          ],
                          "referenceSubsidiaryCompanies": []
                        },
                        {
                          "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                          "name": "Toft stores",
                          "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                          "dataConnections": [],
                          "created": "2022-11-10T10:45:18Z",
                          "createdByUserName": "Dan Tzabar",
                          "products": [
                            "spend-insights"
                          ],
                          "referenceSubsidiaryCompanies": [
                            {
                              "id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d",
                              "name": "Toft stores UK",
                              "links": {
                                "portal": "https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary"
                              }
                            },
                            {
                              "id": "db94eddc-9212-4568-9b5c-3eab0e325913",
                              "name": "Toft stores US",
                              "links": {
                                "portal": "https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary"
                              }
                            }
                          ]
                        },
                        {
                          "id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d",
                          "name": "Toft stores UK",
                          "redirect": "https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d",
                          "dataConnections": [
                            {
                              "id": "d5ab61b7-1ad0-46fd-9f9f-b6761047941e",
                              "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137",
                              "integrationKey": "akxx",
                              "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f",
                              "platformName": "Oracle NetSuite",
                              "linkUrl": "https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start",
                              "status": "Linked",
                              "lastSync": "2022-01-01T12:30:00.000Z",
                              "created": "2022-01-01T11:30:00Z",
                              "sourceType": "Accounting"
                            }
                          ],
                          "created": "2022-11-10T10:45:18Z",
                          "createdByUserName": "Dan Tzabar",
                          "products": [
                            "lending",
                            "spend-insights",
                            "payables"
                          ],
                          "referenceParentCompany": {
                            "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                            "name": "Toft stores",
                            "links": {
                              "portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"
                            }
                          },
                          "referenceSubsidiaryCompanies": []
                        },
                        {
                          "id": "db94eddc-9212-4568-9b5c-3eab0e325913",
                          "name": "Toft stores US",
                          "redirect": "https://link.codat.io/company/db94eddc-9212-4568-9b5c-3eab0e325913",
                          "dataConnections": [
                            {
                              "id": "1e5c8c9e-27fd-4ba9-9a2a-d02ba65bc2fb",
                              "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137",
                              "integrationKey": "akxx",
                              "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f",
                              "platformName": "Oracle NetSuite",
                              "linkUrl": "https://link-api.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/connections/1e5c8c9e-27fd-4ba9-9a2a-d02ba65bc2fb/start",
                              "status": "Linked",
                              "lastSync": "2022-01-01T12:30:00.000Z",
                              "created": "2022-01-01T11:30:00Z",
                              "sourceType": "Accounting"
                            }
                          ],
                          "created": "2022-11-10T10:45:18Z",
                          "createdByUserName": "Dan Tzabar",
                          "products": [
                            "spend-insights"
                          ],
                          "referenceParentCompany": {
                            "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                            "name": "Toft stores",
                            "links": {
                              "portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"
                            }
                          },
                          "referenceSubsidiaryCompanies": []
                        }
                      ],
                      "pageNumber": 1,
                      "pageSize": 100,
                      "totalResults": 3,
                      "_links": {
                        "current": {
                          "href": "/companies?page=1&pageSize=100"
                        },
                        "self": {
                          "href": "/companies"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Malformed-Query"
          },
          "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"
          }
        },
        "operationId": "list-companies",
        "description": "The *List companies* endpoint returns a list of [companies](https://docs.codat.io/lending-api#/schemas/Company) associated to your instances.\n\nA [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\n## Filter by tags\n\nThe *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):\n\n- equals (`=`)\n- not equals (`!=`)\n- contains (`~`)\n\nFor example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: \n- Foreign key: `uid = {yourCustomerId}`\n- Region: `region != uk`\n- Owning team and region: `region = uk && owningTeam = invoice-finance`",
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/query"
          },
          {
            "$ref": "#/components/parameters/orderBy"
          },
          {
            "name": "tags",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "region=uk && team=invoice-finance",
            "description": "Filter companies by tags using the \"equals\" (=), \"not equals\" (!=), and \"contains\" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying)."
          }
        ]
      },
      "post": {
        "summary": "Create company",
        "tags": [
          "Companies"
        ],
        "operationId": "create-company",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "x-speakeasy-usage-example": true,
                "schema": {
                  "$ref": "#/components/schemas/Company"
                },
                "examples": {
                  "With no description": {
                    "value": {
                      "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                      "name": "Technicalium",
                      "description": "",
                      "platform": "",
                      "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                      "dataConnections": [],
                      "created": "2022-11-10T10:45:18.1950523Z",
                      "createdByUserName": "Dan Tzabar",
                      "products": [
                        "spend-insights"
                      ],
                      "referenceSubsidiaryCompanies": []
                    }
                  },
                  "With a description": {
                    "value": {
                      "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                      "name": "Technicalium",
                      "description": "Technology services, including web and app design and development",
                      "platform": "",
                      "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                      "dataConnections": [],
                      "created": "2022-11-10T10:45:18.1950523Z",
                      "createdByUserName": "Dan Tzabar",
                      "products": [
                        "spend-insights"
                      ],
                      "referenceSubsidiaryCompanies": []
                    }
                  },
                  "With a tag": {
                    "value": {
                      "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                      "name": "Technicalium",
                      "description": "",
                      "platform": "",
                      "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0",
                      "dataConnections": [],
                      "created": "2022-11-10T10:45:18.1950523Z",
                      "createdByUserName": "Dan Tzabar",
                      "products": [
                        "spend-insights"
                      ],
                      "tags": {
                        "region": "us"
                      },
                      "referenceSubsidiaryCompanies": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/Payment-Required"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/Too-Many-Requests"
          },
          "500": {
            "$ref": "#/components/responses/Internal-Server-Error"
          },
          "503": {
            "$ref": "#/components/responses/Service-Unavailable"
          }
        },
        "description": "Use the *Create company* endpoint to create a new [company](https://docs.codat.io/lending-api#/schemas/Company) that represents your customer in Codat. \n\nA [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\nIf forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyRequestBody"
              },
              "examples": {
                "With no description": {
                  "value": {
                    "name": "Technicalium"
                  }
                },
                "With a description": {
                  "value": {
                    "name": "Technicalium",
                    "description": "Technology services, including web and app design and development"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/companies/{companyId}": {
      "put": {
        "summary": "Replace company",
        "description": "Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload.\n\nA [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.",
        "operationId": "replace-company",
        "x-speakeasy-name-override": "replace",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "tags": [
          "Companies"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "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"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyRequestBody"
              },
              "examples": {
                "Update name": {
                  "value": {
                    "name": "New Name"
                  }
                },
                "Update description": {
                  "value": {
                    "name": "Same name",
                    "description": "Additional documents required"
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update company",
        "description": "Use the *Update company* endpoint to update the name, description, or tags of the company.\n\nThe *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update.  \n\nA [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.",
        "operationId": "update-company",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "tags": [
          "Companies"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "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"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdateRequest"
              },
              "examples": {
                "Update tags": {
                  "value": {
                    "tags": {
                      "refrence": "new reference"
                    }
                  }
                },
                "Update name": {
                  "value": {
                    "name": "New Name"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a company",
        "operationId": "delete-company",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "description": "The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/lending-api#/schemas/Company), its [connections](https://docs.codat.io/lending-api#/schemas/Connection) and any cached data. This operation is irreversible.\n\nA [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n",
        "tags": [
          "Companies"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "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"
          }
        }
      },
      "get": {
        "summary": "Get company",
        "operationId": "get-company",
        "description": "The *Get company* endpoint returns a single company for a given `companyId`.\n\nA [company](https://docs.codat.io/lending-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/lending-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/companyId"
          }
        ],
        "tags": [
          "Companies"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                },
                "examples": {
                  "Simple company": {
                    "va

# --- truncated at 32 KB (5491 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/codat/refs/heads/main/openapi/codat-lending-openapi.json