Codat Manage data API

Control how data is retrieved from an integration.

OpenAPI Specification

codat-manage-data-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Bank Feeds Account mapping Manage data API
  version: 3.0.0
  contact:
    email: support@codat.io
    name: Codat
  description: 'Bank Feeds solution enables your SMB users to set up bank feeds from accounts in your application to supported accounting software.


    A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting software.


    [Explore solution](https://docs.codat.io/bank-feeds-api/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. |

    | Source accounts | Provide and manage lists of source bank accounts. |

    | Account mapping | Extra functionality for building an account management UI. |

    | Company information | Get detailed information about a company from the underlying platform. |

    | Transactions | Create new bank account transactions for a company''s connections, and see previous operations. |

    <!-- End Codat Tags Table -->'
  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:
    DateTime:
      title: Date time
      type: string
      examples:
      - '2022-10-23T00:00:00Z'
      - '2022-10-23'
      description: "In Codat's data model, dates and times are represented using the <a class=\"external\" href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:\n\n```\n2020-10-08T22:40:50Z\n2021-01-01T00:00:00\n```\n\n\n\nWhen syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:\n\n- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`\n- Unqualified local time: `2021-11-15T01:00:00`\n- UTC time offsets: `2021-11-15T01:00:00-05:00`\n\n> Time zones\n> \n> Not all dates from Codat will contain information about time zones.  \n> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced."
    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:

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