Skip to content

speakeasy-sdks/codat-sdks

Repository files navigation

Codat API SDKs

The Codat API SDKs are language specific libraries for accessing the Codat API. The Codat API provides secure access to contributed business data from your SME customers mapped to our accounting, banking, and commerce data models.

Installation

For installation please see instructions on fetching from package managers for each langauge specific SDK.

Requirements

  • TypeScript 4.8+
  • Python3
  • Golang

Basic Usage

Here is an example usage for typescript. Please see relevant examples for each language specific SDK.

import { SDK, withSecurity} from "@codatio/codat-ts";
import { GetCompaniesCompanyIdConnectionsConnectionIdDataAccountTransactionsRequest, GetCompaniesCompanyIdConnectionsConnectionIdDataAccountTransactionsResponse } from "@codatio/codat-ts/src/sdk/models/operations";
import { AxiosError } from "axios";

const sdk = new SDK(withSecurity(
    security: {
    apiKeyAuth: {
        apiKey: "YOUR_API_KEY_HERE",
    },
}
));

const req: GetCompaniesCompanyIdConnectionsConnectionIdDataAccountTransactionsRequest = {
    security: {
        codatLogin: {
            authorization: "Bearer YOUR_ACCESS_TOKEN_HERE",
        },
    },
    pathParams: {
        companyId: "sit",
        connectionId: "voluptas",
    },
    queryParams: {
        orderBy: "culpa",
        page: 501233450539197794,
        pageSize: 3390393562759376202,
        query: "dolor",
    },
};

sdk.accountTransactions.getCompaniesCompanyIdConnectionsConnectionIdDataAccountTransactions(req).then((res: GetCompaniesCompanyIdConnectionsConnectionIdDataAccountTransactionsResponse | AxiosError) => {
    // handle response
});

Authentication

To authenticate the Codat SDKs you will need to provide a Codat API Token. Codat expects the API key to be included in all API requests to the server, Base64 encoded within an 'Authorization' header.

Authorization: Basic YOUR_ENCODED_API_KEY

SDK Available Operations

accounts

  • batch - Get Batch Accounts
  • create - Create Account
  • details - Get Account Details
  • find - Get Account
  • list - Get All Accounts
  • update - Update Account

attendees

  • batch - Get Batch Event Attendees
  • create - Create Event Attendee
  • details - Get Event Attendee Details
  • find - Get Event Attendee
  • list - Get All Event Attendees
  • update - Update Event Attendee

connections

  • delete - Delete Connection
  • find - Get Connection
  • list - Get All Connections

contacts

  • batch - Get Batch Contacts
  • create - Create Contact
  • details - Get Contact Details
  • find - Get Contact
  • list - Get All Contacts
  • update - Update Contact

deals

  • batch - Get Batch Deals
  • create - Create Deal
  • details - Get Deal Details
  • find - Get Deal
  • list - Get All Deals
  • update - Update Deal

emails

  • batch - Get Batch Emails
  • create - Create Email
  • details - Get Email Details
  • find - Get Email
  • list - Get All Emails
  • update - Update Email

events

  • batch - Get Batch Events
  • create - Create Event
  • details - Get Event Details
  • find - Get Event
  • list - Get All Events
  • update - Update Event

integrations

  • list - Get CRM Integrations

leads

  • batch - Get Batch Leads
  • create - Create Lead
  • details - Get Lead Details
  • find - Get Lead
  • list - Get All Leads
  • update - Update Lead

links

  • create - Exchange Public Token for Access Token

notes

  • batch - Get Batch Notes
  • create - Create Note
  • details - Get Note Details
  • find - Get Note
  • list - Get All Notes
  • update - Update Note

passthrough

  • create - Passthrough Request

tasks

  • batch - Get Batch Tasks
  • create - Create Task
  • details - Get Task Details
  • find - Get Task
  • list - Get All Tasks
  • update - Update Task

tokens

  • create - Create Link Token

users

  • batch - Get Batch Users
  • details - Get User Details
  • find - Get User
  • list - Get All Users

webhooks

  • create - Create Webhook
  • delete - Remove Webhook
  • find - Get Webhook

SDK Generated by Speakeasy