Skip to main content

Intacct REST SDK for Python

A Python SDK for the Sage Intacct REST API, providing a simple and intuitive interface to interact with Intacct's financial data and operations.

Local Setup

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate

# Install dev dependencies
pip install -r requirements.txt

Quick Start

1. Authentication Setup

First, you'll need to set up OAuth2 credentials with Intacct:

  1. Register your application in Intacct to get client_id and client_secret
  2. Set up environment variables or pass credentials directly
import os
from intacctsdk import IntacctRESTSDK

sdk = IntacctRESTSDK(
    refresh_token='your_refresh_token',
    entity_id='your_entity_id'  # Optional
)

2. Basic Usage

For comprehensive examples and usage patterns, see the example.py file which demonstrates:

  • OAuth2 authentication flow
  • Working with different modules dimensions
  • Filtering and querying data
  • Error handling
  • Token management

Common Methods

All API classes inherit from ApiBase and support these common methods:

get_all_generator(fields, filters=[], filter_expression=None, order_by=[], dimension_name=None)

Returns a generator that yields paginated results.

Parameters:

  • fields (List[str]): List of fields to retrieve
  • filters (List[Dict], optional): Filter conditions
  • filter_expression (str, optional): Filter expression ('and' or 'or')
  • order_by (List[Dict], optional): Sort conditions
  • dimension_name (str, optional): For dimensions API only

get_by_id(id)

Get a single object by its ID.

count(filters=[], filter_expression=None, dimension_name=None)

Get the count of objects matching the filters.

get_model()

Get the schema/model definition for the object type.

Error Handling

The SDK provides custom exceptions for different error scenarios:

from intacctsdk.exceptions import InvalidTokenError, BadRequestError, InternalServerError

try:
    accounts = list(sdk.accounts.get_all_generator(fields=['id', 'name']))
except InvalidTokenError as e:
    print(f"Token error: {e.message}")
    # Handle token refresh or re-authentication
except BadRequestError as e:
    print(f"Bad request: {e.message}")
    # Handle invalid parameters or request format
except InternalServerError as e:
    print(f"Server error: {e.message}")
    # Handle temporary server issues

License

This project is licensed under the MIT License - see the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sageintacctrestsdk-1.6.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sageintacctrestsdk-1.6.2-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file sageintacctrestsdk-1.6.2.tar.gz.

File metadata

  • Download URL: sageintacctrestsdk-1.6.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for sageintacctrestsdk-1.6.2.tar.gz
Algorithm Hash digest
SHA256 86485683c3f04ef7123201da99a4a751f2be95e7983dae7532b7ef20b465d1a8
MD5 c738f8aa929f96daa0303e8ef6e77eb1
BLAKE2b-256 0ca38a4b89b55e50bf34e39af0a125ec4530883989efd7a6794fe6960638fdf3

See more details on using hashes here.

File details

Details for the file sageintacctrestsdk-1.6.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sageintacctrestsdk-1.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 29a5df476ef8c445a5a9bae2522e60ca1476c69a2b9f4209110801567df3d67c
MD5 a595d68316c80af81607e13a79eacaca
BLAKE2b-256 f40903667a2b249e71270a4bbc778dc99e8fe16f78d4bb39704ef87d84731afa

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.6.2 This release

2 files

1.6.1

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page