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.

Metadata

Release files for sageintacctrestsdk 1.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sageintacctrestsdk 1.9.0
File Size Uploaded
sageintacctrestsdk-1.9.0.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sageintacctrestsdk 1.9.0
File Interpreter ABI Platform
sageintacctrestsdk-1.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.9 kB

Release files / sageintacctrestsdk-1.9.0.tar.gz

Download URL sageintacctrestsdk-1.9.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a9ea8eb87192b89385ab567e79d7ab6adf4a618f5310770602def5f0119a34dc
BLAKE2b-256 checksum
How to use checksums
60e3453273c0cee280612488f791ea2d66b812e95bf11a5aef30a72a3c56c83d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / sageintacctrestsdk-1.9.0-py3-none-any.whl

Download URL sageintacctrestsdk-1.9.0-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ceb5c6eec60a13b109f2b5801db6087915d41cb4378f2b5f14dfbcd8398fa88
BLAKE2b-256 checksum
How to use checksums
056da69532f9191d1a7c4b0641ac38f24ecd1f9b627afd737ee0bc43e1f3e0d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page