# Thredfi Partner API ## Docs - [Create business-scoped access token](https://docs.thredfi.com/api-reference/authentication/get-business-token.md): Create a business-scoped JWT token for accessing business-specific endpoints. Requires a valid partner (unscoped) Bearer token in the Authorization header. Use the BearerUnscoped option in Swagger UI. - [Get partner access token (client credentials)](https://docs.thredfi.com/api-reference/authentication/get-partner-token.md): OAuth2 token endpoint using Basic Authentication. Provide partner_uuid:api_key as username:password in Basic Auth header. Request body should be form-encoded with grant_type=client_credentials. - [Retrieve Bank Account Connection](https://docs.thredfi.com/api-reference/bank-accounts/get-bank-account.md): Retrieve detailed information about a specific bank account connection. - [List Bank Account Connections](https://docs.thredfi.com/api-reference/bank-accounts/list-bank-accounts.md): Retrieve a paginated list of bank account connections with advanced filtering options and statistics. - [List Bank Transactions (Business-scoped)](https://docs.thredfi.com/api-reference/bank-transactions/list-bank-transactions.md): Retrieve a paginated list of bank transactions for a specific business with advanced filtering options. - [Create bill payment with allocations](https://docs.thredfi.com/api-reference/bill-payments/create-bill-payment.md): Create a bill payment with embedded allocations in a single atomic operation. - [Delete (cancel) bill payment](https://docs.thredfi.com/api-reference/bill-payments/delete-bill-payment.md): Cancel a bill payment and reverse its allocations. Only pending or failed payments can be deleted. Completed payments cannot be deleted. This operation marks the payment as cancelled and updates bill statuses. Following the REST pattern, this uses POST method as it's a state change operation, not a… - [Get bill payment details](https://docs.thredfi.com/api-reference/bill-payments/get-bill-payment.md): Retrieve detailed information about a specific bill payment. - [List bill payments](https://docs.thredfi.com/api-reference/bill-payments/list-bill-payments.md): List all bill payments for a business with filtering and pagination. - [Update bill payment](https://docs.thredfi.com/api-reference/bill-payments/update-bill-payment.md): Update an existing bill payment's status or details. - [Create bill](https://docs.thredfi.com/api-reference/bills/create-bill.md): Create a new bill for a business with line items. Supports idempotency via external_id. - [Get bill](https://docs.thredfi.com/api-reference/bills/get-bill.md): Retrieve a single bill by ID for the specified business. - [List bills](https://docs.thredfi.com/api-reference/bills/list-bills.md): List all bills for a business with filters for status, vendor, dates, reference numbers, and amounts. Supports standardized pagination. - [Update bill](https://docs.thredfi.com/api-reference/bills/update-bill.md): Update bill via PUT. - [Void bill](https://docs.thredfi.com/api-reference/bills/void-bill.md): Marks a bill as voided. If the bill has payments applied, this will still mark as voided but does not alter allocations in this simplified implementation. - [Create business (idempotent)](https://docs.thredfi.com/api-reference/business-management/create-business.md): Create a new business with idempotency support via external_id. - [Get business](https://docs.thredfi.com/api-reference/business-management/get-business.md): Retrieve details of a specific business - [List businesses](https://docs.thredfi.com/api-reference/business-management/list-businesses.md): Returns a list of all active businesses registered in our platform by the partner with standardized pagination. - [Update business](https://docs.thredfi.com/api-reference/business-management/update-business.md): Partial update of business fields - [Archive account (soft delete)](https://docs.thredfi.com/api-reference/chart-of-accounts/archive-account.md): Archive an account (soft delete). - [Create account](https://docs.thredfi.com/api-reference/chart-of-accounts/create-account.md): Create a new account in the chart of accounts. - [Create child account](https://docs.thredfi.com/api-reference/chart-of-accounts/create-child-account.md): Create a child account under specified parent. - [Get account detail](https://docs.thredfi.com/api-reference/chart-of-accounts/get-account-detail.md): Get detailed information about a specific account by ID, code, or external_id. - [Get account journal entry lines](https://docs.thredfi.com/api-reference/chart-of-accounts/get-account-entries.md): Returns paginated journal entry lines for the account with running balance. - [Get accounts in hierarchical tree structure](https://docs.thredfi.com/api-reference/chart-of-accounts/get-chart-of-accounts-hierarchy.md): Returns all accounts organized in a hierarchical tree structure. - [List chart of accounts](https://docs.thredfi.com/api-reference/chart-of-accounts/list-chart-of-accounts.md): List all accounts with current balances for a business. - [Update account (partial)](https://docs.thredfi.com/api-reference/chart-of-accounts/update-account.md): Partial update of account fields. - [Create Customer Credit](https://docs.thredfi.com/api-reference/customer-credits/create-customer-credit.md): Create a customer credit note with line items and optional allocations. - [Delete (soft) Customer Credit](https://docs.thredfi.com/api-reference/customer-credits/delete-customer-credit.md): Soft delete customer credit. - [Get Customer Credit](https://docs.thredfi.com/api-reference/customer-credits/get-customer-credit.md): Retrieve a single customer credit by ID with all line items and allocations. - [List Customer Credits](https://docs.thredfi.com/api-reference/customer-credits/list-customer-credits.md): List all customer credits for a business with filtering and pagination. - [Update Customer Credit](https://docs.thredfi.com/api-reference/customer-credits/update-customer-credit.md): Update customer credit. - [Archive a customer](https://docs.thredfi.com/api-reference/customers/archive-customer.md): Archive a customer, hiding them from the business's active customer list. Archived customers can still be accessed by ID but are not returned in list requests by default. - [Create a customer](https://docs.thredfi.com/api-reference/customers/create-customer.md): Create a new customer within a business. Returns the created customer in the same format as the get customer endpoint. - [Get a customer](https://docs.thredfi.com/api-reference/customers/get-customer.md): Get an existing customer. - [List customers](https://docs.thredfi.com/api-reference/customers/list-customers.md): List all customers within a business. Only active customers are returned by default, but archived customers can be included via the include_archived flag. Supports standardized pagination. - [Unarchive a customer](https://docs.thredfi.com/api-reference/customers/unarchive-customer.md): Reactivate an archived customer, making them available in the business's active customer list. Only archived customers can be unarchived. - [Update a customer](https://docs.thredfi.com/api-reference/customers/update-customer.md): Update an existing customer. Returns the updated customer in the same format as the get customer endpoint. - [Create invoice](https://docs.thredfi.com/api-reference/invoices/create-invoice.md): Create a new invoice for a business with line items and optional payments. Supports optional document upload via multipart field `file` (with optional document_type, upload_source, metadata, tags). JSON-only requests remain supported when no file is provided. - [Fetch invoice](https://docs.thredfi.com/api-reference/invoices/get-invoice.md): Fetch a single invoice by ID for the specified business - [List invoices](https://docs.thredfi.com/api-reference/invoices/list-invoices.md): List all invoices for a business with comprehensive filtering options and standardized pagination - [Update invoice](https://docs.thredfi.com/api-reference/invoices/update-invoice.md): Update an existing invoice using PUT. Payments, refunds and writeoffs are preserved. - [Void invoice](https://docs.thredfi.com/api-reference/invoices/void-invoice.md): Void an existing invoice - [Get journal entry detail](https://docs.thredfi.com/api-reference/journal-entries/get-journal-entry-detail.md): Get detailed information about a specific journal entry including: - Full entry information - All debit/credit lines with account details - Accounting period information - Source information with linked documents (invoices, bills, payments, etc.) - Bank transa… - [List journal entries](https://docs.thredfi.com/api-reference/journal-entries/list-journal-entries.md): List all journal entries for a business with comprehensive filtering. - [Create invoice payment](https://docs.thredfi.com/api-reference/payments/create-payment.md): Record a payment for one or more customer invoices. The payment is recorded and invoices are updated, ready to be matched during reconciliation later. Supports idempotency via Idempotency-Key header. - [Delete (cancel) invoice payment](https://docs.thredfi.com/api-reference/payments/delete-payment.md): Cancel a payment and reverse its allocations. Only pending or failed payments can be deleted. Completed payments cannot be deleted - use refunds instead. This operation marks the payment as cancelled and updates invoice statuses. - [Get invoice payment](https://docs.thredfi.com/api-reference/payments/get-payment.md): Retrieve a single payment by ID with all its details and allocations. - [List invoice payments](https://docs.thredfi.com/api-reference/payments/list-payments.md): List all invoice payments for a business with filtering, pagination, and summary statistics. - [Partially update invoice payment](https://docs.thredfi.com/api-reference/payments/partial-update-payment.md): Partially update an existing payment's metadata, references, amounts, allocations, and status. Only provided fields will be updated. Amount changes are validated to ensure they don't break existing allocations. - [Update invoice payment](https://docs.thredfi.com/api-reference/payments/update-payment.md): Update an existing payment's metadata, references, amounts, allocations, and status. Amount changes are validated to ensure they don't break existing allocations. - [Create or update a payout](https://docs.thredfi.com/api-reference/payouts/create-payout.md): Create a new payout or update an existing one via external_id. Partners send completed processor settlements (Stripe, Adyen, etc.) with associated invoice payments and refund payments. Returns 201 for new payouts, 200 for updates. Updates are blocked if payout is already reconciled to a bank transac… - [Delete a payout](https://docs.thredfi.com/api-reference/payouts/delete-payout.md): Delete a payout if it is not reconciled to a bank transaction. This will unlink all associated payments and refund payments, making them available for other payouts. Blocked if payout is reconciled. - [Get a payout](https://docs.thredfi.com/api-reference/payouts/get-payout.md): Get detailed information about a specific payout, including expanded payment and refund payment arrays. - [List payouts](https://docs.thredfi.com/api-reference/payouts/list-payouts.md): List all payouts within a business. Supports filtering by processor, status, date range, and search capabilities. Returns paginated results with standardized pagination. - [Create refund payment](https://docs.thredfi.com/api-reference/refund-payments/create-refund-payment.md): Create a payment for an existing refund. Supports idempotency via external_id. - Amount must not exceed remaining refundable amount. - Status transitions: pending→processing (partial), →paid (fully covered). - [Delete refund payment](https://docs.thredfi.com/api-reference/refund-payments/delete-refund-payment.md): Delete refund payment and update refund status - [Fetch refund payment](https://docs.thredfi.com/api-reference/refund-payments/get-refund-payment.md): Retrieve a single refund payment by ID with all details and reconciliation information. - [List refund payments](https://docs.thredfi.com/api-reference/refund-payments/list-refund-payments.md): List all payments recorded for a refund, newest first. Supports pagination. - [Create refund (full or partial)](https://docs.thredfi.com/api-reference/refunds/create-refund.md): Create a simple refund for an invoice. Provide partial_amount to create a partial refund. - [Delete refund](https://docs.thredfi.com/api-reference/refunds/delete-refund.md): Delete refund - [Get refund](https://docs.thredfi.com/api-reference/refunds/get-refund.md): Retrieve a single refund by ID with all payments and allocations. - [List refunds](https://docs.thredfi.com/api-reference/refunds/list-refunds.md): List refunds for a business with filtering and search. - [Get accounts payable aging](https://docs.thredfi.com/api-reference/reports/get-ap-aging.md): Retrieve AP aging analysis grouped by vendor. - [Get accounts receivable aging](https://docs.thredfi.com/api-reference/reports/get-ar-aging.md): Retrieve AR aging analysis grouped by customer. - [Get balance sheet report](https://docs.thredfi.com/api-reference/reports/get-balance-sheet.md): Retrieve a Balance Sheet report for a business as of a specific date. - [Get cash flow statement](https://docs.thredfi.com/api-reference/reports/get-cash-flow-statement.md): Retrieve a Cash Flow Statement (Indirect Method) for a business within a date range. - [Get financial summary with trends](https://docs.thredfi.com/api-reference/reports/get-financial-summary.md): Retrieve financial summary with revenue, expenses, and profit trends. - [Get profit and loss report](https://docs.thredfi.com/api-reference/reports/get-profit-and-loss.md): Retrieve a Profit and Loss report for a business within a date range. - [Balance Sheet](https://docs.thredfi.com/api-reference/schemas/balance-sheet.md): Understanding the Balance Sheet report structure - [Cash Flow Statement](https://docs.thredfi.com/api-reference/schemas/cash-flow-statement.md): Understanding the Cash Flow Statement structure (Indirect Method) - [Chart of Accounts](https://docs.thredfi.com/api-reference/schemas/chart-of-accounts.md): Understanding the chart of accounts hierarchy and structure - [Ledger Account](https://docs.thredfi.com/api-reference/schemas/ledger-account.md): Structure and fields of a ledger account in the chart of accounts - [Profit & Loss Report](https://docs.thredfi.com/api-reference/schemas/profit-and-loss.md): Understanding the Profit & Loss report structure and calculations - [Profit & Loss Trends](https://docs.thredfi.com/api-reference/schemas/profit-and-loss-trends.md): Understanding the Profit & Loss Trends structure with revenue, expense, and profit data over time - [Create Vendor Credit](https://docs.thredfi.com/api-reference/vendor-credits/create-vendor-credit.md): Create a vendor credit note with line items and optional allocations. Supports idempotency via external_id and can create vendors on-the-fly using vendor_external_id. - [Delete (soft) Vendor Credit](https://docs.thredfi.com/api-reference/vendor-credits/delete-vendor-credit.md): Soft delete vendor credit. - [Get Vendor Credit](https://docs.thredfi.com/api-reference/vendor-credits/get-vendor-credit.md): Fetch a single vendor credit by ID. Returns complete credit details including line items, allocations, and metadata. - [List Vendor Credits](https://docs.thredfi.com/api-reference/vendor-credits/list-vendor-credits.md): List all vendor credits for a business with optional filtering and pagination. Supports filtering by status, vendor, and date ranges. - [Update Vendor Credit](https://docs.thredfi.com/api-reference/vendor-credits/update-vendor-credit.md): Update vendor credit. - [Create vendor refund payment with allocations](https://docs.thredfi.com/api-reference/vendor-refund-payments/create-vendor-refund-payment.md): Create a vendor refund payment with embedded allocations in a single atomic operation. - [Delete (cancel) vendor refund payment](https://docs.thredfi.com/api-reference/vendor-refund-payments/delete-vendor-refund-payment.md): Cancel a vendor refund payment and reverse its allocations. Only pending or failed payments can be deleted. Completed payments cannot be deleted. This operation marks the payment as cancelled and updates bill/refund statuses. Following the REST pattern, this uses POST method as it's a state change o… - [Get vendor refund payment details](https://docs.thredfi.com/api-reference/vendor-refund-payments/get-vendor-refund-payment.md): Retrieve detailed information about a specific vendor refund payment. - [List vendor refund payments](https://docs.thredfi.com/api-reference/vendor-refund-payments/list-vendor-refund-payments.md): List all vendor refund payments for a business with filtering and pagination. - [Update vendor refund payment](https://docs.thredfi.com/api-reference/vendor-refund-payments/update-vendor-refund-payment.md): Update an existing vendor refund payment's status or details. - [Create vendor refund](https://docs.thredfi.com/api-reference/vendor-refunds/create-vendor-refund.md): Create a new vendor refund record (parent transaction). - [Delete vendor refund](https://docs.thredfi.com/api-reference/vendor-refunds/delete-vendor-refund.md): Soft-delete a vendor refund (sets deleted_at timestamp) - [Get vendor refund details](https://docs.thredfi.com/api-reference/vendor-refunds/get-vendor-refund.md): Retrieve complete details of a specific vendor refund including all allocations and payments. - [List vendor refunds](https://docs.thredfi.com/api-reference/vendor-refunds/list-vendor-refunds.md): List all vendor refunds for a business with advanced filtering and search. - [Update vendor refund](https://docs.thredfi.com/api-reference/vendor-refunds/update-vendor-refund.md): Update vendor refund fields (description, memo, metadata, etc.). Supports optional document upload via multipart field `document` (with optional document_type, upload_source, metadata, tags). JSON-only requests remain supported when no file is provided. - [Archive vendor](https://docs.thredfi.com/api-reference/vendors/archive-vendor.md): Archive a vendor (soft-delete semantics) - [Create vendor](https://docs.thredfi.com/api-reference/vendors/create-vendor.md): Create a new vendor within a business. - [Fetch vendor](https://docs.thredfi.com/api-reference/vendors/get-vendor.md): Fetch a single vendor by ID for the specified business. - [List vendors](https://docs.thredfi.com/api-reference/vendors/list-vendors.md): List all vendors within a business. Active vendors are returned by default; include archived ones with include_archived=true. - [Unarchive vendor](https://docs.thredfi.com/api-reference/vendors/unarchive-vendor.md): Reactivate a previously archived vendor - [Update vendor](https://docs.thredfi.com/api-reference/vendors/update-vendor.md): Update an existing vendor - [AR Integration](https://docs.thredfi.com/implementation/ar-integration.md): Sync invoices, payments, and refunds - [Authentication](https://docs.thredfi.com/implementation/authentication.md): Get partner and business tokens for API access - [Bank Accounts](https://docs.thredfi.com/implementation/bank-accounts.md): Zero integration work - enable your customers to connect their business bank accounts via our embedded frontend SDK - [Embedded Accounting](https://docs.thredfi.com/implementation/embedded-accounting.md): How bookkeeping works after integration - [End-to-End Flow](https://docs.thredfi.com/implementation/end-to-end-flow.md): Complete integration in 6 simple steps - [Business Entity Types](https://docs.thredfi.com/implementation/entity-types.md): Country-specific business entity type validation rules - [Error Handling](https://docs.thredfi.com/implementation/error-handling.md): Understanding error responses and how to handle them - [Frontend SDK](https://docs.thredfi.com/implementation/frontend-sdk.md): Embed Thred accounting widget in your platform - [Idempotency](https://docs.thredfi.com/implementation/idempotency.md): Prevent duplicate transactions with idempotent API calls - [Importing Business Activity](https://docs.thredfi.com/implementation/importing-overview.md) - [Menu Configuration](https://docs.thredfi.com/implementation/menu-configuration.md): Control tab visibility for each business - [Onboarding a Business](https://docs.thredfi.com/implementation/onboarding-business.md): Create your first business in Thred - [Overview](https://docs.thredfi.com/implementation/overview.md) - [Pagination](https://docs.thredfi.com/implementation/pagination.md): Working with paginated API responses - [Understanding the Tabs](https://docs.thredfi.com/implementation/understanding-tabs.md): Overview of accounting interface sections - [Verify Integration](https://docs.thredfi.com/implementation/verify-integration.md): Test your integration works ## OpenAPI Specs - [openapi](https://docs.thredfi.com/openapi.yaml)