Codat Manage data API

Control how data is retrieved from an integration.

Operations 5

POST /companies/{companyId}/data/all Refresh all data #
GET /companies/{companyId}/dataStatus Get data status #
POST /companies/{companyId}/data/queue/{dataType} Refresh data type #
GET /companies/{companyId}/data/history List pull operations #
GET /companies/{companyId}/data/history/{datasetId} Get pull operation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/codat-manage-data-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

codat-manage-data-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lending Manage data API
  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.


    The 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.


    [Explore solution](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas)


    <!-- Start Codat Tags Table -->

    ## Endpoints


    | Endpoints | Description |

    | :- |:- |

    | Companies | Create and manage your SMB users'' companies. |

    | Connections | Create new and manage existing data connections for a company. |

    | Bank statements | Retrieve banking data from linked bank accounts. |

    | Sales | Retrieve standardized sales data from a linked commerce software. |

    | Financial statements | Financial data and reports from a linked accounting software. |

    | Liabilities | Debt and other liabilities. |

    | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. |

    | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. |

    | Transactions | Data from a linked accounting software representing transactions. |

    | Company info | View company information fetched from the source platform. |

    | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. |

    | Excel reports | Download reports in Excel format. |

    | Manage data | Control how data is retrieved from an integration. |

    | File upload | Endpoints to manage uploaded files. |

    | 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. |

    <!-- End Codat Tags Table -->'
  version: 3.0.0
  contact:
    name: Codat
    email: support@codat.io
  termsOfService: https://www.codat.io/legals/
servers:
- description: Production
  url: https://api.codat.io
security:
- auth_header: []
tags:
- name: Manage data
  description: Control how data is retrieved from an integration.
paths:
  /companies/{companyId}/data/all:
    parameters:
    - $ref: '#/components/parameters/companyId'
    post:
      summary: Refresh all data
      operationId: refresh-all-data-types
      x-speakeasy-group: manage-data.refresh
      x-speakeasy-name-override: all-data-types
      responses:
        '204':
          description: No Content
        '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'
      description: 'Refreshes all data types with `fetch on first link` set to `true` for a given company.


        This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.


        [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`.'
      tags:
      - Manage data
  /companies/{companyId}/dataStatus:
    parameters:
    - $ref: '#/components/parameters/companyId'
    get:
      summary: Get data status
      operationId: get-data-status
      x-speakeasy-group: manage-data
      x-speakeasy-name-override: get-status
      description: Get the state of each data type for a company
      tags:
      - Manage data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: Data statuses
                x-internal: true
                type: object
                properties:
                  accountTransactions:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  balanceSheet:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  bankAccounts:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  bankTransactions:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  billCreditNotes:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  billPayments:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  bills:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  cashFlowStatement:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  chartOfAccounts:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  company:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  creditNotes:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  customers:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  directCosts:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  directIncomes:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  invoices:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  itemReceipts:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  items:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  journalEntries:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  journals:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  paymentMethods:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  payments:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  profitAndLoss:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  purchaseOrders:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  salesOrders:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  suppliers:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  taxRates:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  trackingCategories:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  transfers:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  banking-accountBalances:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  banking-accounts:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  banking-transactionCategories:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  banking-transactions:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-companyInfo:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-customers:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-disputes:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-locations:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-orders:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-paymentMethods:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-payments:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-productCategories:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-products:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-taxComponents:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
                  commerce-transactions:
                    $ref: '#/components/schemas/DataStatus'
                    nullable: true
              examples:
                Example:
                  value:
                    accountTransactions:
                      dataType: accountTransactions
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    balanceSheet:
                      dataType: balanceSheet
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    bankAccounts:
                      dataType: bankAccounts
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    bankTransactions:
                      dataType: bankTransactions
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    billCreditNotes:
                      dataType: billCreditNotes
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    billPayments:
                      dataType: billPayments
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    bills:
                      dataType: bills
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    cashFlowStatement:
                      dataType: cashFlowStatement
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    chartOfAccounts:
                      dataType: chartOfAccounts
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    company:
                      dataType: company
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    creditNotes:
                      dataType: creditNotes
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    customers:
                      dataType: customers
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    directCosts:
                      dataType: directCosts
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    directIncomes:
                      dataType: directIncomes
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    invoices:
                      dataType: invoices
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    itemReceipts:
                      dataType: itemReceipts
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    items:
                      dataType: items
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    journalEntries:
                      dataType: journalEntries
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    journals:
                      dataType: journals
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    paymentMethods:
                      dataType: paymentMethods
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    payments:
                      dataType: payments
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    profitAndLoss:
                      dataType: profitAndLoss
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    purchaseOrders:
                      dataType: purchaseOrders
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    salesOrders:
                      dataType: salesOrders
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    suppliers:
                      dataType: suppliers
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    taxRates:
                      dataType: taxRates
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    trackingCategories:
                      dataType: trackingCategories
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    transfers:
                      dataType: transfers
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    banking-accountBalances:
                      dataType: banking-accountBalances
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    banking-accounts:
                      dataType: banking-accounts
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    banking-transactionCategories:
                      dataType: banking-transactionCategories
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    banking-transactions:
                      dataType: banking-transactions
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-companyInfo:
                      dataType: commerce-companyInfo
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-customers:
                      dataType: commerce-customers
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-disputes:
                      dataType: commerce-disputes
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-locations:
                      dataType: commerce-locations
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-orders:
                      dataType: commerce-orders
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-paymentMethods:
                      dataType: commerce-paymentMethods
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-payments:
                      dataType: commerce-payments
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-productCategories:
                      dataType: commerce-productCategories
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-products:
                      dataType: commerce-products
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-taxComponents:
                      dataType: commerce-taxComponents
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
                    commerce-transactions:
                      dataType: commerce-transactions
                      lastSuccessfulSync: '2022-01-01T00:00:00.000Z'
                      currentStatus: Complete
                      latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48
                      latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f
        '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}/data/queue/{dataType}:
    parameters:
    - $ref: '#/components/parameters/companyId'
    - $ref: '#/components/parameters/dataType'
    post:
      summary: Refresh data type
      operationId: refresh-data-type
      x-speakeasy-group: manage-data.refresh
      x-speakeasy-name-override: data-type
      description: 'Refreshes a given data type for a given company.


        This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.'
      tags:
      - Manage data
      parameters:
      - schema:
          type: string
          format: uuid
        in: query
        name: connectionId
        description: Optionally, provide a data connection id to only queue pull operations on that connection.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullOperation'
        '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'
  /companies/{companyId}/data/history:
    parameters:
    - $ref: '#/components/parameters/companyId'
    get:
      summary: List pull operations
      tags:
      - Manage data
      operationId: list-pull-operations
      x-speakeasy-group: manage-data.pull-operations
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullOperations'
              examples:
                Example:
                  value:
                    results:
                    - id: 97d60846-f07a-4d42-b5a0-0bdcc6ebf56b
                      companyId: 4645bd78-8988-45bc-ac9e-67ba5df6e4e5
                      connectionId: 51baa045-4836-4317-a42e-3542e991e581
                      dataType: invoices
                      status: Initial
                      requested: '2022-11-14T11:18:37.2798351Z'
                      progress: 10
                      isCompleted: false
                      isErrored: false
                    _links:
                      current:
                        href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=1&pageSize=2
                      self:
                        href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history
                      next:
                        href: /companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=2&pageSize=2
                    pageNumber: 0
                    pageSize: 0
                    totalResults: 0
        '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'
      description: Gets the pull operation history (datasets) for a given company.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/pageSize'
      - $ref: '#/components/parameters/query'
      - $ref: '#/components/parameters/orderBy'
  /companies/{companyId}/data/history/{datasetId}:
    parameters:
    - $ref: '#/components/parameters/companyId'
    - $ref: '#/components/parameters/datasetId'
    get:
      summary: Get pull operation
      operationId: get-pull-operation
      x-speakeasy-group: manage-data.pull-operations
      tags:
      - Manage data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullOperation'
              examples: {}
        '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'
      description: Retrieve information about a single dataset or pull operation.
components:
  schemas:
    DataType:
      x-internal: true
      $ref: '#/components/schemas/DataStatus/properties/dataType'
    DataStatus:
      title: Data status
      description: Describes the state of data in the Codat cache for a company and data type
      type: object
      required:
      - dataType
      - currentStatus
      properties:
        dataType:
          title: Data types
          x-internal: true
          type: string
          description: Available data types
          enum:
          - accountTransactions
          - balanceSheet
          - bankAccounts
          - bankTransactions
          - billCreditNotes
          - billPayments
          - bills
          - cashFlowStatement
          - chartOfAccounts
          - company
          - creditNotes
          - customers
          - directCosts
          - directIncomes
          - invoices
          - itemReceipts
          - items
          - journalEntries
          - journals
          - paymentMethods
          - payments
          - profitAndLoss
          - purchaseOrders
          - salesOrders
          - suppliers
          - taxRates
          - trackingCategories
          - transfers
          - banking-accountBalances
          - banking-accounts
          - banking-transactionCategories
          - banking-transactions
          - commerce-companyInfo
          - commerce-customers
          - commerce-disputes
          - commerce-locations
          - commerce-orders
          - commerce-paymentMethods
          - commerce-payments
          - commerce-productCategories
          - commerce-products
          - commerce-taxComponents
     

# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/codat/refs/heads/main/openapi/codat-manage-data-api-openapi.yml