Codat Refresh data API

Initiate data refreshes, view pull status and history.

Operations 5

POST /companies/{companyId}/data/all Refresh all data #
POST /companies/{companyId}/data/queue/{dataType} Refresh data type #
GET /companies/{companyId}/dataStatus Get data status #
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-refresh-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-refresh-data-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Platform Refresh data API
  version: 3.0.0
  summary: Platform API
  description: "An API for the common components of all of Codat's products.\n\nThese end points cover creating and managing your companies, data connections, and integrations.\n\n[Read about the building blocks of Codat...](https://docs.codat.io/core-concepts/companies) | [See our OpenAPI spec](https://github.com/codatio/oas) \n\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| Connection management | Configure connection management UI and retrieve access tokens for authentication. |\n| Webhooks | Create and manage webhooks that listen to Codat's events. |\n| Integrations | Get a list of integrations supported by Codat and their logos. |\n| Refresh data | Initiate data refreshes, view pull status and history. |\n| Settings | Manage company profile configuration, sync settings, and API keys. |\n| Push data | Initiate and monitor Create, Update, and Delete operations. |\n| Supplemental data | Configure and pull additional data you can include in Codat's standard data types. |\n| Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. |\n<!-- End Codat Tags Table -->"
  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: Refresh data
  description: Initiate data refreshes, view pull status and history.
paths:
  /companies/{companyId}/data/all:
    parameters:
    - $ref: '#/components/parameters/companyId'
    post:
      summary: Refresh all data
      operationId: refresh-company-data
      x-speakeasy-name-override: all
      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:
      - Refresh data
  /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-name-override: by-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:
      - Refresh 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}/dataStatus:
    parameters:
    - $ref: '#/components/parameters/companyId'
    get:
      summary: Get data status
      operationId: get-company-data-status
      description: Get the state of each data type for a company
      tags:
      - Refresh data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataStatuses'
              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/history:
    parameters:
    - $ref: '#/components/parameters/companyId'
    get:
      summary: List pull operations
      tags:
      - Refresh data
      operationId: list-pull-operations
      x-speakeasy-name-override: list-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-name-override: get-pull-operation
      tags:
      - Refresh 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
          - commerce-transactions
          example: invoices
        lastSuccessfulSync:
          $ref: '#/components/schemas/DateTime'
        currentStatus:
          $ref: '#/components/schemas/PullOperation/properties/status'
        latestSyncId:
          type: string
          description: Unique identifier for most recent sync of data type.
          format: uuid
          example: ad474a37-2003-478e-baee-9af9f1ec2fe3
        latestSuccessfulSyncId:
          type: string
          description: Unique identifier for the most recent successful sync of data type.
          format: uuid
          example: 8220fc90-55b6-47bc-9417-48ac6ea93101
      examples:
      - dataType: string
        lastSuccessfulSync: '2022-01-01T13:00:00.000Z'
        currentStatus: string
        latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3
        latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101
    PullOperation:
      title: Pull operation
      description: 'Information about a queued, in progress or completed pull operation.

        *Formally called `dataset`*'
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the pull operation.
          example: 943accd0-4247-42d8-865b-363c8629e1da
        companyId:
          type: string
          format: uuid
          description: Unique identifier of the company associated to this pull operation.
          example: 22ece347-e5f6-4896-95e0-35a4c7f17023
        connectionId:
          type: string
          format: uuid
          description: Unique identifier of the connection associated to this pull operation.
          example: 50830828-7d39-4367-b0eb-5ddb2de5faa5
        dataType:
          title: Data types
          x-internal: true
          type: string
          description: The data type you are requesting in a pull operation.
        status:
          title: Dataset status
          type: string
          description: The current status of the dataset.
          enum:
          - Initial
          - Queued
          - Fetching
          - MapQueued
          - Mapping
          - Complete
          - FetchError
          - MapError
          - InternalError
          - ProcessingQueued
          - Processing
          - ProcessingError
          - ValidationQueued
          - Validating
          - ValidationError
          - AuthError
          - Cancelled
          - NotSupported
          - RateLimitError
          - PermissionsError
          - PrerequisiteNotMet
        statusDescription:
          type: string
          nullable: true
          description: Additional information about the dataset status.
          example: Paused until 2022-10-23T00:00:00.000Z
        errorMessage:
          type: string
          nullable: true
          description: A message about a transient or persistent error returned by Codat or the source platform.
        requested:
          $ref: '#/components/schemas/DateTime'
        completed:
          $ref: '#/components/schemas/DateTime'
        progress:
          type: integer
          description: An integer signifying the progress of the pull operation.
        isCompleted:
          type: boolean
          description: '`True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead.'
        isErrored:
          type: boolean
          description: '`True` if the pull operation entered an error state.'
      required:
      - id
      - companyId
      - connectionId
      - dataType
      - status
      - requested
      - progress
      - isCompleted
      - isErrored
      examples:
      - id: 97d60846-f07a-4d42-b5a0-0bdcc6ebf56b
        companyId: 4645bd78-8988-45bc-ac9e-67ba5df6e4e5
        connectionId: 51baa045-4836-4317-a42e-3542e991e581
        dataType: invoices
        status: Initial
        statusDescription: Paused until 2022-10-23T00:00:00.000Z
        requested: '2022-11-14T11:18:37.2798351Z'
        progress: 10
        isCompleted: false
        isErrored: false
    ErrorMessage:
      title: Error message
      type: object
      x-internal: true
      properties:
        statusCode:
          type: integer
          description: The HTTP status code returned by the error.
        service:
          type: string
          description: Codat's service the returned the error.
        error:
          type: string
          description: A brief description of the error.
        correlationId:
          type: string
          description: Unique identifier used to propagate to all downstream services and determine the source of the error.
        validation:
          $ref: '#/components/schemas/ErrorMessage/definitions/errorValidation'
        canBeRetried:
          type: string
          description: '`True` if the error occurred transiently and can be retried.'
        detailedErrorCode:
          type: integer
          description: Machine readable error code used to automate processes based on the code returned.
      definitions:
        errorValidation:
          title: Validation error
          type: object
          nullable: true
          description: A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here.
          properties:
            errors:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem'
            warnings:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem'
        errorValidationItem:
          title: Validation error item
          type: object
          properties:
            itemId:
              type: string
              nullable: true
              description: Unique identifier for a validation item.
            message:
              type: string
              nullable: true
              description: A message outlining validation item's issue.
            validatorName:
              type: string
              nullable: true
              description: Name of validator.
    PullOperations:
      title: Pull operations
      x-internal: true
      allOf:
      - type: object
        properties:
          results:
            type: array
            items:
              $ref: '#/components/schemas/PullOperation'
      - $ref: '#/components/schemas/PagingInfo'
    DateTime:
      title: Date time
      type: string
  

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