The Actuals API provides a mechanism to send transactions directly to Actuals (from the source e.g. website or mobile app where the transaction is created). By doing this as real time as possible when the transaction is created, Actuals provides companies with an independent source of expectations that can be used to match transactions against from other sources.

REST API

The Actuals (REST) API allows for real-time transaction sending by extending a company’s IT infrastructure with a small script. This script should send transactions to the Actuals platform once they are definitive. It is recommended to do this asynchronously to avoid impacting the primary workflow. The Actuals API follows a Representational State Transfer (REST) architecture.

Raw transactions endpoint (preview)

ℹ️
This API is in preview state. Documentation and behaviour can be changed without notification. You can request a raw transactions API key via your implementation consultant.
You can interact with the Actuals API in test and production mode, which allows safe experimentation without affecting production data or triggering real-world operations. The mode of your request. Test or production, is determined by the API key used for authentication.
Each request must target a single resource. The Actuals API does not support bulk operations.

Authentication

Authentication is handled via API keys. You can request keys via your Actuals implementation consultant. Keys are prefixed to indicate their mode:
  • test_ for test mode
  • prod_ for production mode
The api key is needs to be added to the request header in the ‘token’ parameter.

Raw transactions

Endpoint

This is an object representing a raw transaction coming from another application into Actuals.
🌐
ENDPOINT POST https://api.actuals.io/v1/raw_transactions

The raw transaction object

The body has a partly mandatory structure. A couple of standardized fields and an object field that can contain a custom json structure determined by the user of the API Endpoint.
type
external_id
timestamp
object
json
{ "type":"order", "external_id": "123456", "timestamp": "2025-01-01T00:00:00Z", "object":{} }

Example CURL

json
curl --location 'https://api.actuals.io/v1/raw_transactions' \ --header 'Content-Type: application/json' \ --header 'token: ••••••' \ --data '{ "type": "order", "external_id": "123456", "timestamp": "2025-01-01T00:00:00", "object": { { "id":"order_123456", "customer": "customer_1", "amount": 50, "vatamount": 10 } }'

Idempotency/deduplication

ℹ️
When processing API calls we categorize the API calls into three different statuses:
  1. NEW
  1. IGNORED
  1. ERROR
Usually the platform is configured to only process NEW transactions. Others are not processed but kept for debugging purposes.
flowchart TD subgraph database ingest_record_new ingest_record_ignored ingest_record_error end received_api_call --> |upon succesful response| compare_external_id{compare external id} compare_external_id --> |new| ingest_record_new compare_external_id --> |existing| comparison_content{compare contents} comparison_content --> |identical| ingest_record_ignored comparison_content --> |different| ingest_record_error

Obsolete API