Skip to content

merge-api/merge-accounting-python

Repository files navigation

Deprecation Notice

Merge has released a new version of our Python SDK. As part of that release, we are providing a deprecation notice of our legacy SDKs.

To help give you time to plan your migration to our latest SDK:

  • August 2023: SDK deprecation notice on our legacy Python SDKs.
  • Until February 2024: we’ll support updates as needed and address bugs in priority order
  • After February 2024: we’ll no longer make updates or bug fixes to the deprecated SDKs

For information about the deprecation notice see our help center and for information about migrating to the Python SDK, see the Python Migration Guide.

MergeAccountingClient

The unified API for building rich integrations with multiple Accounting & Finance platforms.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.1.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.merge.dev/

Requirements.

Python >= 3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/merge-api/merge-accounting-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/merge-api/merge-accounting-python.git)

Then import the package:

import MergeAccountingClient

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import MergeAccountingClient

Getting Started

Please follow the installation procedure and then run the following:

import time
import MergeAccountingClient
from pprint import pprint
from MergeAccountingClient.api import account_details_api
from MergeAccountingClient.model.account_details import AccountDetails
# Defining the host is optional and defaults to https://api.merge.dev/api/accounting/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = MergeAccountingClient.Configuration(
    host = "https://api.merge.dev/api/accounting/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with MergeAccountingClient.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = account_details_api.AccountDetailsApi(api_client)
    x_account_token = "X-Account-Token_example" # str | Token identifying the end user.

    try:
        api_response = api_instance.account_details_retrieve(x_account_token)
        pprint(api_response)
    except MergeAccountingClient.ApiException as e:
        print("Exception when calling AccountDetailsApi->account_details_retrieve: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.merge.dev/api/accounting/v1

Class Method HTTP request Description
AccountDetailsApi account_details_retrieve GET /account-details
AccountTokenApi account_token_retrieve GET /account-token/{public_token}
AccountsApi accounts_list GET /accounts
AccountsApi accounts_retrieve GET /accounts/{id}
AddressesApi addresses_retrieve GET /addresses/{id}
AttachmentsApi attachments_list GET /attachments
AttachmentsApi attachments_retrieve GET /attachments/{id}
AvailableActionsApi available_actions_retrieve GET /available-actions
BalanceSheetsApi balance_sheets_list GET /balance-sheets
BalanceSheetsApi balance_sheets_retrieve GET /balance-sheets/{id}
CashFlowStatementsApi cash_flow_statements_list GET /cash-flow-statements
CashFlowStatementsApi cash_flow_statements_retrieve GET /cash-flow-statements/{id}
CompanyInfoApi company_info_list GET /company-info
CompanyInfoApi company_info_retrieve GET /company-info/{id}
ContactsApi contacts_list GET /contacts
ContactsApi contacts_retrieve GET /contacts/{id}
CreditNotesApi credit_notes_list GET /credit-notes
CreditNotesApi credit_notes_retrieve GET /credit-notes/{id}
DeleteAccountApi delete_account_create POST /delete-account
ExpensesApi expenses_list GET /expenses
ExpensesApi expenses_retrieve GET /expenses/{id}
ForceResyncApi sync_status_resync_create POST /sync-status/resync
GenerateKeyApi generate_key_create POST /generate-key
IncomeStatementsApi income_statements_list GET /income-statements
IncomeStatementsApi income_statements_retrieve GET /income-statements/{id}
InvoicesApi invoices_create POST /invoices
InvoicesApi invoices_list GET /invoices
InvoicesApi invoices_meta_post_retrieve GET /invoices/meta/post
InvoicesApi invoices_retrieve GET /invoices/{id}
IssuesApi issues_list GET /issues
IssuesApi issues_retrieve GET /issues/{id}
ItemsApi items_list GET /items
ItemsApi items_retrieve GET /items/{id}
JournalEntriesApi journal_entries_create POST /journal-entries
JournalEntriesApi journal_entries_list GET /journal-entries
JournalEntriesApi journal_entries_meta_post_retrieve GET /journal-entries/meta/post
JournalEntriesApi journal_entries_retrieve GET /journal-entries/{id}
LinkTokenApi link_token_create POST /link-token
LinkedAccountsApi linked_accounts_list GET /linked-accounts
PassthroughApi passthrough_create POST /passthrough
PaymentsApi payments_list GET /payments
PaymentsApi payments_retrieve GET /payments/{id}
PhoneNumbersApi phone_numbers_retrieve GET /phone-numbers/{id}
PurchaseOrdersApi purchase_orders_list GET /purchase-orders
PurchaseOrdersApi purchase_orders_retrieve GET /purchase-orders/{id}
RegenerateKeyApi regenerate_key_create POST /regenerate-key
SyncStatusApi sync_status_list GET /sync-status
TaxRatesApi tax_rates_list GET /tax-rates
TaxRatesApi tax_rates_retrieve GET /tax-rates/{id}
TrackingCategoriesApi tracking_categories_list GET /tracking-categories
TrackingCategoriesApi tracking_categories_retrieve GET /tracking-categories/{id}
TransactionsApi transactions_list GET /transactions
TransactionsApi transactions_retrieve GET /transactions/{id}
VendorCreditsApi vendor_credits_list GET /vendor-credits
VendorCreditsApi vendor_credits_retrieve GET /vendor-credits/{id}
WebhookReceiversApi webhook_receivers_create POST /webhook-receivers
WebhookReceiversApi webhook_receivers_list GET /webhook-receivers

Documentation For Models

Documentation For Authorization

tokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

[email protected]

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in MergeAccountingClient.apis and MergeAccountingClient.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from MergeAccountingClient.api.default_api import DefaultApi
  • from MergeAccountingClient.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import MergeAccountingClient
from MergeAccountingClient.apis import *
from MergeAccountingClient.models import *

About

The Python API Client for the Merge Accounting API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published