Back

Available APIs related to Expenses

Explore various APIs that can help you effectively manage and track expenses for personal or business use.

Here you may find a single-stop summary of the public APIs you can use with Factorial to build expense integrations, automations, exports, and realtime flows. It points you to the right docs pages and recommends which endpoints and features to use for the most common scenarios.

Start at Factorial’s developer guides for quick orientation: Getting started, Authentication (API keys and OAuth), Webhooks, Pagination, and building integrations. These guides show the recommended flows, auth methods, and implementation notes. Factorial

 

Core API resources you will use for Expenses

The API reference exposes resources that are most useful for expense automation and reconciliation. Key resources include:

  • Expenses and Expensables (read and inspect expense records)
  • Mileage and PerDiem endpoints for programmatic per diem and mileage data
  • Documents for attachments and download URLs
  • Banking endpoints such as CardPayment and Transaction to reconcile card activity
  • Finance endpoints such as JournalEntry, FinancialDocument, AccountingSetting, CostCenter for posting and mapping

You will find the full resource list in the API reference. Factorial


  1. Exporting expenses programmatically
    • Use the Expenses / Expensables endpoints to pull transaction-level data. Include fields like document amount, reimbursable amount, currency, exchange_rate, approval_status, receipt/document link, accounting codes, and project/cost center. Check whether the resource supports GET only or create/update based on the reference. 
  2. Handling attachments and receipts
    • Use the Documents resource to retrieve download URLs or to link documents to expenses. If you need embedded attachments for an ERP, consider requesting a custom SQL/packaged extract via Factorial instead of repeatedly downloading binary attachments via API. 
  3. Reconciliation of card transactions
    • Use Banking endpoints (CardPayment, Transaction) to compare issuer/card feeds with expense records. Include card_last4 and transaction identifiers in your exports for reliable matching. 
  4. Per diems and mileage automation
    • Pull PerDiem and Mileage endpoints to reconcile per diem claims with submitted receipts and to compute payroll adjustments where needed. 
  5. Real-time notifications and two-way syncs
    • Subscribe to webhooks to get notified of expense.created, expense.updated, card.payment, or similar events (see the Webhooks guide). Use webhooks to trigger downstream workflows like Slack alerts, invoice creation, or scheduler jobs. 

Important implementation notes and best practices

  • Authentication - Use API keys or OAuth as documented in the Getting Started guides. Rotate keys and follow secure storage best practices. Factorial
  • Check resource capabilities - Some endpoints are read-only while others accept POST/PUT. Confirm in the reference before coding. Factorial
  • Pagination - Always implement pagination for list endpoints to avoid timeouts or partial data. Use the Pagination guide for details. Factorial
  • Webhooks - Use webhook subscriptions for realtime flows and implement idempotent handlers. See webhooks policies and examples in the docs. Factorial
  • Versioning & changelog - Bind requests to a specific API version and monitor the changelog for breaking changes. Check the changelog frequently during development and before production deploys. Factorial
  • Export fields to request - include document_amount, reimbursable_amount, currency, exchange_rate, base_amount, receipt_url, approval_status, accounting_account_code, project_code, cost_center, card_last4 for clean downstream reconciliation. (These are recommended fields, not strict API requirements.)

Error handling and operational tips

  • Detect and reconcile FX diffs by including both document_amount and base_amount with exchange_rate.
  • For large historical extracts prefer scheduled SQL Analytics reports or the Data team rather than repeated large API pulls.
  • Rate limits, quotas, or special access may apply. Check the Getting Started guides and the API reference for any usage notes. Factorial

Where to find details and track changes

  • Developer guides and quickstarts: Getting Started pages. Factorial
  • Full endpoint reference and resource list: API Reference. Factorial
  • Version history and breaking change log: Changelog. Factorial

Need help or want a custom extract?

If you need a scheduled CSV/XLSX, embedded attachments, or a complex join across expenses and card transactions, ask for a custom SQL Analytics report via Support. For technical API questions use the Contact/Technical Support form in the docs. Factorial

 

Was this article helpful?

Give feedback about this article

Can’t find what you’re looking for?

Our customer care team is here for you.

Contact us

Knowledge Base Software powered by Helpjuice